How O.forces work in Yade

Asked by Trishala DAKA on 2021-03-12

In the yade documentation. For the Force Container.f (O.forces.f(id)) it was mentioned that " Resultant force on body, excluding gravity. ". Can any one explain what does that mean.

Regards.

Thank You,
Daka.

[1] https://yade-dem.org/doc/yade.wrapper.html#forcecontainer

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Trishala DAKA
Solved:
2021-03-13
Last query:
2021-03-13
Last reply:
2021-03-12
Jérôme Duriez (jduriez) said : #1

Discrete Elements (YADE bodies) in a DEM simulation experience forces, possibly of different nature.

O.forces.f(id) is the sum of all of those, for body of label [*] id excluding the weight imposed through NewtonIntegrator.gravity

[*] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Body.id

Jan Stránský (honzik) said : #2

> Can any one explain what does that mean.

can you explain more in detail what is not clear?

Also, you can test it yourself, and then providing the MWE [1] with more focused question
###
O.bodies.append([
    sphere((0,0,0),2),
    sphere((0,0,1),2),
    sphere((0,0,3),2),
])
newton = O.engines[-1]
newton.gravity = (0,0,-10)
O.step()
print("interaction info")
for i in O.interactions:
    print(i.id1,i.id2,i.phys.normalForce)
print("O.forces info")
for b in O.bodies:
    print(b.id,O.forces.f(b.id))
###

cheers
Jan

Trishala DAKA (saidaka) said : #3

Thanks Jan & Jerome.