← Back to team overview

yade-users team mailing list archive

Re: [Question #680868]: How to get resultant contact force of each sphere

 

Question #680868 on Yade changed:
https://answers.launchpad.net/yade/+question/680868

    Status: Open => Answered

Jérôme Duriez proposed the following answer:
Hi,

Above [1] says that you can not really predict *beforehand* which body
would be labelled as 1 (or 2) in the contact treatment, however, for a
given body and a given contact the body participates into, you still can

* check whether that body is id1 or id2 for that interaction
* then, know without ambiguity the "direction" of the force since that force is usually in YADE (if not always) "from id1 to id2". It is like that in particular for NormShearPhys and derived classes [*,**]


So it's possible to measure resultant contact force looping over contacts. If the body sustains only contact forces (no gravity), the resulting contact force also corresponds to O.forces.f(idOfBody)

[*] https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.NormShearPhys.normalForce
[**] https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.NormShearPhys.shearForce

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.