← Back to team overview

yade-users team mailing list archive

Re: [Question #258679]: Non conservation of energy when, simulation is loaded after saving

 

Question #258679 on Yade changed:
https://answers.launchpad.net/yade/+question/258679

Janek Kozicki posted a new comment:
Sorry, I forgot to check the list.

It seems to me, then, that some values are not saved and lost upon
loading a saved file. Generally we take care that this thing does not
happen, but I see that you are using Mindlin law. Maybe the culprit
is hidden there, and some attribute there is marked to skips saving,
while it shouldn't. Or maybe somewhere else. You could make a very
simple test:

1. generate a simulation
2. save it
3. close yade
4. start two instances of yade, let's call them A and B.
5. load your saved file in A, start simulation and do for example 4 iterations, then stop, and save .xml file
6. load your saved file in B, run simulation for 2 iterations, stop it and save it, close B
7. start B again, run simulation for 2 iterations, save it as .xml
8. now compare .xml files obtained after 4 iterations for example
with 'kompare'. Make sure that your scene is very small (for example
just two spheres). Try to find the differences and try to make some
sense out of them. Maybe this way you will locate the item that is
not saved between the simulations.
9. try doing the same, but without closing yade `A` in step 3.

There is also another option that I recall right now: all python
variables are lost between saves. So if you generate your scene and
run simulation, and rely on any python variable during your
simulation, then simple loading a saved file will not work. You must
take care of all your python variables to make sure that they  have
the correct values that they should have. That includes lines like:
`law=Law2_ScGeom_MindlinPhys_Mindlin(label='Mindlin')`. Because after
loading the saved file and trying to run the script in python it will
be an empty pointer unless you take special care to extract it from
O.engines after loading the file.

best regards
Janek Kozicki

ipemath said:     (by the date of Sat, 06 Dec 2014 05:41:26 -0000)

> Question #258679 on Yade changed:
> https://answers.launchpad.net/yade/+question/258679
> 
>     Status: Answered => Open
> 
> ipemath is still having a problem:
> I am writing total energy after every 50 iterations.
> 
> I have wrong total energy value when I run the second script which
> restarts the simulation from where the first script has saved.
> 
> I am saying this since, Initially I ran the first python script for a
> large number of iterations and store the energy values. Now I would like
> to divide the simulations in to fixed steps of iterations and saving in
> between. It is in this state where I find the enrgy is not conserved.
> 
> Thanks Janek for the interest shown.
> 
> -- 
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
> 


-- 
Janek Kozicki                               http://janek.kozicki.pl/  |

You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.