# How O.forces work in Yade

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.

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
Trishala DAKA
Solved:
Last query:
 Revision history for this message Jérôme Duriez (jduriez) said on 2021-03-12: #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

 Revision history for this message Jan Stránský (honzik) said on 2021-03-12: #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

 Revision history for this message Trishala DAKA (saidaka) said on 2021-03-13: #3

Thanks Jan & Jerome.