yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02241
Re: Contact forces
For a triaxial test, I paused YADE after some iterations, then I copied
and pasted the script code for contact forces in the terminal from which
I launched yade but it shows nothing. It does only display empty
diagrams.
I tried with execfile and I always call the O.reset() before any new
YADE simulation and here is the error :
In [16]: execfile('Contactforces.py')
---------------------------------------------------------------------------
ZeroDivisionError Traceback (most recent call
last)
/home/nhadda/Documents/YADE/lib/yade-unknown/gui/PythonUI_rc.py in
<module>()
----> 1
2
3
4
5
/home/nhadda/Documents/YADE/lib/yade-unknown/gui/PythonUI_rc.py in
<module>()
11 if not i.isReal: continue
12 norm=i.geom['normal']
---> 13 angle=atan(norm[ax2]/norm[ax1])
14 force=i.phys['normalForce'].Length()
15 angles.append(angle)
ZeroDivisionError: float division
Le jeudi 07 janvier 2010 à 11:45 +0100, Václav Šmilauer a écrit :
> > So I need to save my simulation to a file file.xml.bz2 then load it,
> No. Why loading simulation if you already have it in memory?
> > Contactforces are then shown for the last iteration no?
> Yes, the current state.
> > what if I want to see the variation of contact forces along my
> > simulation ?
> You have to same them along the way.
> > In fact, it will be very useful for me write these contact forces into a
> > file to do some postprocessings on them. can you tell me how ?
> Learn python, write function that will output things you need to a file,
> add an engine like
>
> PeriodicPythonRunner(command="yourFunctionToSaveData()",...)
>
> and that's it.
>
> Cheers, v
>
>
>
> _______________________________________________
> 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
Follow ups
References