← Back to team overview

yade-users team mailing list archive

Re: [Question #678799]: O.load but still in the first code

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi James,

> unbalancedForce is largger than 3e-3

please provide exact value

> 1.Why the unbalancedForce become largger?

from my experience, the unbalanced force has oscillating value. So once
you stop the simulation when it reaches a small value, it is likely that
after re-run, it exceeds this limit again

> 2.I've rewritten the triaxFinished function. Why still in the first compress until the unbalancedForce is small enough?
> 
> def triaxFinished():
>  ...
>  triax.doneHook='functionToRunWhenFinished()'
> 
> def functionToRunWhenFinished():
>     print 'Finished'
>     O.pause()

I would say, that in triaxFinished, the new doneHook is set, but it is
not executed (there is no reason) and the simulation continues.. Why not
to put "print 'Finished'" and "O.pause()" directly in triaxFinished?

One more note:

> O.load('four.yade.gz')
> O.run()
> # some settings

I would first set everything properly and then run O.run afterwards,
otherwise you cannot be sure when the settings are applied (might be
before the first iteration, but it is possible that the settings are
applied after unknown number of time steps)

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.