yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #08426
[Question #237426]: Run from a saved Yade model
New question #237426 on Yade:
https://answers.launchpad.net/yade/+question/237426
Hello Yade devs and users,
I have a question about loading a saved model and change the engine behavior.:
I followed the example in https://github.com/yade/trunk/blob/master/examples/triax-tutorial/script-session1.py
At line 160: O.save('compactedState'+key+'.yade.gz') I use O.save('mymodel.xml.gz') and then I have the file mymodel.xml.gz in that folder, I stopped there and turn off yade.
Next time, to continue my simulation I run this script to continue, as a normal triaxial test:
from yade import pack, utils
O.load('mymodel.xml.gz')
triax=TriaxialStressController()
while 1:
triax.stressMask=5
triax.goal2=-0.01
triax.goal1=100000
triax.goal3=100000
O.run(100,True)
print 'p=', triax.meanStress
if triax.strain[1] < 80000:
break
but I see that when I run that script, in the terminal, the output of triax.meanStress is 0.0, and the TriaxialStressController is still continuing to use stressMask=7 with goal=100000 (I used Inspect tool from graphic interface) as saved from previous simulation. It seems that my code didn't affect the model at all.
I tried both
yade-stable myscript.py and yade-stable then execfile('myscript.py')
Can you explain this for me, thank you!
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.