Newton Integrator updating of position and velocity
Hi
I am trying to look at how Yade updates postion and velocity through a simple example of a body falling freely under gravity. The code is:
O.bodies.
b = O.bodies[0]
#b.state.
print O.time,
O.engines=[
ForceResetter(),
NewtonIntegr
PyRunner(
]
O.dt = 0.1
def addData():
print O.time,
O.run(10,True)
Now the output which I obtain is :
0.0 0.0 1.0
0.1 -1.962 0.7057
0.2 -2.943 0.4114
0.3 -3.924 0.019
0.4 -4.905 -0.4715
0.5 -5.886 -1.0601
0.6 -6.867 -1.7468
0.7 -7.848 -2.5316
0.8 -8.829 -3.4145
0.9 -9.81 -4.3955
The velocity at dt =0.1 should be -0.981 but it gives the expected value at 2*dt. Similarly the position at dt=0.1 is what one expects at 6*dt. I am not sure if there is something wrong in what I do or if there is some other issue.
Thanks
Mukesh
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Bruno Chareyre
- Solved:
- Last query:
- Last reply: