← Back to team overview

yade-users team mailing list archive

Re: [Question #251967]: Parametric studies -Datas problem

 

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

    Status: Open => Answered

Alexander Eulitz [Eugen] proposed the following answer:
Hi Ferenc,
first of all please don't use GravityEngine anymore. It is now part of the newton integrator.
So using NewtonIntegrator(damping=0.1, gravity=(0,0,-9.81)) is enough.
If I got you right, your problem is that you can't execute your self-defined python functions in a yade simulation, right?
There is a Engine called PyRunner for this purpose [1]. This engine calls the specified function regularly. In your case it will be sufficent to call your function before (or after) your engine list:

Gravitydepos()
O.engines=[
     ForceResetter(),
     InsertionSortCollider([Bo1_Sphere_Aabb()]),
     InteractionLoop(
        [Ig2_Sphere_Sphere_L3Geom()], # collision geometry
        [Ip2_FrictMat_FrictMat_FrictPhys()], # collision "physics"
        [Law2_L3Geom_FrictPhys_ElPerfPl()] # contact law -- apply forces
     ),
     # damping: numerical dissipation of energy
     NewtonIntegrator(damping=0.1,gravity=(0,0,-9.81)),
     #here would PyRunner go: (just for illustration)
     #PyRunner(command='Gravitydepos',iterPeriod=1)
  ]

Cheers,
Alex

[1] https://yade-
dem.org/doc/yade.wrapper.html?highlight=pyrunner#yade.wrapper.PyRunner

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.