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

Chiara Modenese proposed the following answer:
Sorry, I send the mail again. see below.

On 3 May 2011 19:47, Chiara Modenese <c.moden...@gmail.com> wrote:

> Hi Arthur,
>
> see the periodic engine PyRunner for your purpose

https://yade-dem.org/doc/yade.wrapper.html?highlight=pyrunner#yade.wrapper.PyRunner.
> Here below is a basic example of what you can do (am sure you can find some
> examples in yade already):
>
> O.engines=[
>     ...
>     PyRunner(iterPeriod=50,command='saveData()')
> ]
>
> def saveData():
>     plot.addData(t=O.time,velocity=O.bodies[77].state.angVel[0])
>
> plot.plots={'t':('velocity')}
>
>
>
> On 3 May 2011 18:40, Arthur Mercier 
> <question155...@answers.launchpad.net>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@lists.launchpad.net
>> 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.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to