how to calculate the unbalanced force

Asked by xuelong14

During my simulation, I need to apply forces to the boundary particles. So I really don't know if the applied force is considered when geting the unbalanced force from utils.unbalancedForce .

Actually, I tried to calculated the unbalanced force by myself. During my calculation, I averaged the resultant force of every particle and divided it by the average contact force. Is that means (f1 + f2 + f3 + ...) / (contact_f1 + contact_f2 + contact_f3 +...). Here fi = sqrt(fi_x^2 + fi_y^2 + fi_z^2) and contact_f1 = sqrt(contact_fi_x^2 + contact_i_y^2 + contact_fi_z^2)?
Is this correct?

Thank you!

Question information

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

>Is this correct?

No.
(f1 + f2 + f3 + ...) / (contact_f1 + contact_f2 + contact_f3 +...) is the sum of body forces magnitude divided by the sum of contact forces magnitude.

unbF is average divided by average, which is different as soon as the number of contacts is not equal to the number of bodies.

>if the applied force is considered when geting the unbalanced force from utils.unbalancedForce

The calculation of unbF uses O.forces.f(id) so your additional forces will be included provided that unbf is calculated _after_ applying the forces (end of the iteration loop typically).

Bruno

Revision history for this message
Jan Stránský (honzik) said :
#2

Hello,

> So I really don't know if the applied force is considered when geting the unbalanced force from utils.unbalancedForce .

yes, it is considered, because O.forces.f(id) and its C++ equivalent, which is used to get resultant body force, simply considers it.

> Actually, I tried to calculated the unbalanced force by myself. ... Is this correct?

utils.unbalancedForce does exactly what you described [1].

cheers
Jan

[1] https://github.com/yade/trunk/blob/master/pkg/dem/Shop_01.cpp#L117

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#3

>"does exactly what you described"
Not really, see what happens to "nb". ;)
B

Revision history for this message
Jan Stránský (honzik) said :
#4

Good point :-) In OP, there is a discrepancy between the formula and word description:

> I averaged the resultant force of every particle and divided it by the average contact force. Is that means (f1 + f2 + f3 + ...) / (contact_f1 + contact_f2 + contact_f3 +...)

According to the formula, of course Bruno is right. For my answer, I relied on the word description, actually not paying much attention to the formula :-)

cheers
Jan

Revision history for this message
xuelong14 (xuelong03) said :
#7

sorry, I have another question.
The particles I used in my simulation are 2-sphere clumps.
The numbers of members in one clump are 1 and 2 less than the clump number.
I got f1 = O.forces.f[clumpId - 1]; f2 =O.forces.f[clumpId - 2]; and f3 = f1 + f2.
But f3 is not equal to O.forces.f[clumpId].
So I really don't know why and what is used in the unbalanced force calculation for clumps.

Thank you.

Revision history for this message
Jérôme Duriez (jduriez) said :
#8

Hello,

To avoid any confusion (I'm experiencing some, at least) could you please specify what do you mean with "unbalanced force". In YADE, unbalanced force is a rather specific term referring to the dimensionless quantity discussed at the start of this thread, and which may be directly provided by the YADE function unbalancedForce().
This dimensionless quantity is used to quantify the quasi-static nature of YADE simulations.

Here, in #7, it seems you focus onto resultant forces (sum of external forces on some system, e.g. your clump)

What are you interested in, exactly ?

(This being said, a MWE [*] demonstrating the behavior you describe in #7 would obviously be helpful)

[*] https://www.yade-dem.org/wiki/Howtoask

Revision history for this message
Jan Stránský (honzik) said :
#9

> So I really don't know why and what is used in the unbalanced force calculation for clumps.

have a look at the source code [1]. If a body is clump, its force is computed from mebers.
I had a look to the source code of NewtonIntegrator and its force should be sum of forces of its members, so your assumption should
be validd.. As Jerome said, a MWE is needed to solve this problem..

cheers
Jan

[1] https://github.com/yade/trunk/blob/master/pkg/dem/Shop_01.cpp#L126

Revision history for this message
xuelong14 (xuelong03) said :
#10

Sorry for confusing you.

Actually, I want to calculate the unbalancedForce by myself because I only focus on part of the whole sample and want to know the unbalancedForce of this part.

During the calculation, I need to calculate the average of the resultant force of particles and the average contact force in this part. When I tried to get the resultant force, I met the problem I mentioned. That is, the sum of the forces of every element in one 2-sphere clump is not the same as the force got directly from the clump. The code is below,

for body in O.bodies:
 if body.isClump:
  f1 = O.forces.f(body.id - 1)[0]; f2 = O.forces.f(body.id - 2)[0];
  f3 = f1 + f2;
  print f3, O.forces.f(body.id)[0]

In it, f3 is not equal to O.forces.f(body.id)[0].

So I am really confused about it.

Thank you.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#11

>the sum of the forces of every element in one 2-sphere clump is not the same as the force got directly from the clump

Correct. The clump members have no inertia by themselves, hence gravitational acceleration does not apply to them. The clump has a weight OTOH.
In fact you should not even think about checking forces on clump members, they are non-dynamic objects.
Bruno

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#12

My previous answer is wrong I think. The weight of the clump is not included in O.forces either.
What is the output of the "print"? Significant numbers?
B

Revision history for this message
xuelong14 (xuelong03) said :
#13

in my simulation, there is no gravity and only some forces are applied on the boundary particles.

below are some results printed:

-0.103900383082 -0.78125
0.885310992301 -0.78125
-0.00603130033529 0.0
4.44618164142 -4.6875
0.0584737243531 0.0
1.00438702824 0.0
-0.10125437182 0.78125
-0.0591514202813 0.0

thank you

Revision history for this message
Jan Stránský (honzik) said :
#14

> The code is below,

to help you with the problem, please provide a MWE as asked by Jerome. the W stands for working, i.e. complete script (also with the code how you create the bodies and clumps) such that we can try it.
cheers
Jan

Can you help with this problem?

Provide an answer of your own, or ask xuelong14 for more information if necessary.

To post a message you must log in.