← Back to team overview

yade-users team mailing list archive

[Question #193337]: Question about "O.forces.addF" in YADE

 

New question #193337 on Yade:
https://answers.launchpad.net/yade/+question/193337

Hello, 
I need your opinion to make sure that what I have done with "O.forces.addF" in YADE is correct.

Actually, I want to add  a force (name it "Force_jessica") in the Newton's second law for each iteration with a constant value. 

Was it already correct what I've done with the comment "O.forces.addF" below? Does it mean I add the "Force_jessica" with the other forces just before the computation of the Newton's second law for each iteration? 

Thank you very much for your reply.

  def addForceJessica():
      id_ball= 6
      Fx_jessica= 0.1
      Fy_jessica=0.2
      Fz_jessica= 0.3
      O.forces.addF(id_ball, (Fx_jessica, Fy_jessica, Fz_jessica))

  O.engines=[
    ForceResetter(),
    InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb(),Bo1_Facet_Aabb()]),
    InteractionLoop(
	[Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
	[Ip2_FrictMat_FrictMat_FrictPhys()],
	[Law2_ScGeom_FrictPhys_CundallStrack()]
    ),
    GravityEngine(gravity=(0,0,-9.81)),
    PyRunner(command='addForceJessica()',iterPeriod=1),
    NewtonIntegrator(damping=0.4),
    ]

  O.run(10)

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