yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #30027
[Question #707972]: why the data is 1 iter behind
New question #707972 on Yade:
https://answers.launchpad.net/yade/+question/707972
Hello,
The data I recorded is one simulation step behind, which confused me .
Take the gravity depostion as an example.
Let the O.dt = 1e-5.
I want to record the postion of ball no.36 and save it in TXT at Virperiod = 9.5e-5.
I assume that the data in O.Iter = 10 should be recorded because 9 < 9.5 <10 .
However , actually the positon of the ball in O.iter = 11 is recorded in Txt although the txt is named by iter10.
I want to record the postion in Iter10 instead.
I really appreciate your help.
======================================================
from yade import pack, plot
O.bodies.append(geom.facetBox((.5, .5, .5), (.5, .5, .5), wallMask=31))
sp = pack.SpherePack()
sp.makeCloud((0, 0, 0), (1, 1, 1), rMean=.05, rRelFuzz=.5)
sp.toSimulation()
O.engines = [
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb(), Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(), Ig2_Facet_Sphere_ScGeom()],
[Ip2_FrictMat_FrictMat_FrictPhys()],
[Law2_ScGeom_FrictPhys_CundallStrack()]
),
NewtonIntegrator(gravity=(0, 0, -9.81), damping=0.4),
PyRunner(command='depth36()',virtPeriod=9.5e-5),
]
def depth36():
depth_36 = O.bodies[36].state.pos[2]
plot.addData(i=O.iter, time=O.time,depth = depth_36)
plot.saveDataTxt('depth-36 '+ str(O.iter)+ '-'+str(O.time)+'.txt')
O.dt = 1e-5
O.saveTmp()
===============================================
Best.
Mikexue
--
You received this question notification because your team yade-users is
an answer contact for Yade.