Question about "O.forces.addF" in YADE

Asked by jessica sjah

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)

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
jessica sjah
Solved:
Last query:
Last reply:
Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Yes Jessica, it does what you want. :)

Revision history for this message
jessica sjah (jessica-sjah) said :
#2

Thank you bruno for your quick response :).....