yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #04408
Re: [Question #155725]: Plot data
Question #155725 on Yade changed:
https://answers.launchpad.net/yade/+question/155725
Status: Open => Answered
Chiara Modenese proposed the following answer:
Hi Arthur,
see the periodic engine PyRunner for your purpose. Here below is a basic
example of what you can do:
O.engines=[
...
PyRunner(iterPeriod=5000,command='saveData()')
]
def saveData():
def saveData():
plot.addData(t)
On 3 May 2011 18:40, Arthur Mercier <question155725@xxxxxxxxxxxxxxxxxxxxx>wrote:
> Question #155725 on Yade changed:
> https://answers.launchpad.net/yade/+question/155725
>
> Status: Answered => Open
>
> Arthur Mercier is still having a problem:
> Ok, I think I understand but the problem is still I don't know how to
> create a function
> It plots, but I have to pause the simulation and to write each time what I
> want... which is not conveniant. I'd like to plot automatically at each 50
> iterations for instance.
> How to do the thing below at each 50 iterations ?
> "plot.plots={'t':('velocity')}
> plot.addData({'t':O.time, 'velocity':O.bodies[77].state.angVel[0]})"
>
> --
> 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
>
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.