How to get tension force of a cohesive contact

Asked by Leonard


I use cohFrictMa with cohesion as particle material to do triaxial compression simulation. During the simulation, the contact force in normal direction could be compression and tension.
I only know using i.phys.normalForce.norm() to get the value of the contact normal force, but I don't know how to extract the contact force in compression and tension respectively.


Question information

English Edit question
Yade Edit question
No assignee Edit question
Solved by:
Jan Stránský
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :


The dot product of a vector "F" and unit vector "n" is a projection of F on the direction of n, i.e. the "oriented length" in the "n" direction.
The magnitude should be the same as i.phys.normalForce.norm(), but you can distinguish tension/compression based on the sign of the dot product.


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

In case you would have this in mind, note that CohFrictMat does not really use two forces, one in tension and one in compression, but just one that can be tensile in nature up to some threshold =

Revision history for this message
Leonard (z2521899293) said :

Hi Jan,

I test your idea with two particles which works really fine!

I just have a question: For example, for one interaction in the model, is positive which represents that it is compressive, does this apply for all the other interactions in the model? I.e., for other interactions whose is positive, is the force compressive as well?
I have this question because in my impression, the direction of contact normal unit vector "n" is arbitrary, not always orientates to the direction of compression.


Revision history for this message
Leonard (z2521899293) said :

Hi Jérôme,

Yes, thanks for your reminder!


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

Yes, the same sign w.r.t. tension/compression of is the same for all contacts.

There is no "direction of compression" (recall action-reaction law).

The direction of contact normal (if it is from body A to body B or from B to A) is arbitrary, more precisely chosen by collider "randomly" (i.e. non-trivially).
But, the value of internal force (tension/compression) is determined by the given normal convention, as forces on bodies are usually computed from i.phys.normalForce, assigned positive to one body, but negative to the other body. The resultant forces on bodies must be independent of the choice A->B / B->A. See e.g. [1], similarly it is done in other laws.

So if you swapped body1 and body2 of the contact (i.geom.normal would be negated), i.phys.normalForce would need to be negated, too, to preserve the consistency of formula [1]



Revision history for this message
Leonard (z2521899293) said :

Thanks Jan Stránský, that solved my question.

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

You can also realize that geom.normal is from i.id1 to i.id2 [1] (whether i.id1 is = 10 or 20 in a 10-20 contact being indeed collider-dependent), and that contact forces are from i.id1 onto i.id2 [2]

This insures the given sign for the dot product, in accordance with the repulsive (compression) or attractive (tension) nature of the force.