number of iterations and human time

Asked by azim

Hi,

i have a model in laboratory and i want to simulate it by yade. i want to set a time (for example two hours) to the simulation (like time in laboratory). how can i do it?
i think it is done through setting number of iterations by O.run(), but i don't know how exchange calculations are done!!?

if there is a reference, pleases refer me to it.

thanks in advance.
Azim

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jérôme Duriez
Solved:
Last query:
Last reply:
Revision history for this message
Best Jérôme Duriez (jduriez) said :
#1

Hi,

1. If your simulation runs with a fixed time step (= O.dt [1]), it's easy to compute the number N of DEM timesteps corresponding to 2 hours, then ask O.run(N,wait=True) [2]

2. If you have no idea about the time step (which "should" not appear, maybe), you may still check O.time [3] and do something like
while O.time < 2hours: # obviously you have to use numbers in correct units (seconds ?), not "2 hours"
    O.run(1000,wait = True)

Jérôme

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.dt
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.run
{3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Omega.time

Revision history for this message
azim (mirzavand) said :
#2

Thanks Jérôme Duriez, that solved my question.