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

    Status: Needs information => Answered

Jan Stránský proposed the following answer:
You have access to the interactions and forces both in Python and in the
saved files, you can do whatever you want with them.. getting number of
them as well as the summation seems like trivial task..

Yes, simple summation of the forces will give you the result of the total 
force, which is the sum of the (x,y,z) components..
If it is not what you are looking for, then please describe more in detail what 
you are looking for.

Also next time please provide the code, there might be some
misunderstanding in the words.

in Python:
###
# extract relevant interactions
inrs = [i for i in O.interactions if isinstance(O.bodies[i.id1].shape,Facet) or 
isinstance(O.bodies[i.id2].shape,Facet)]
# get data
numberOfInteractions = len(intrs)
totalNormalForce = sum((i.phys.normalForce for i in intrs), Vector3.Zero)
totalNormalForceMagnitude = sum(i.phys.normalForce.norm() for i in intrs)
###

cheers
Jan

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

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to