# When summing contact forces to obtain total force on an object, is friction taken into account?

151 views

Hi Vaclav,

This is a partial follow-up to the question I asked earlier here: https://ask.woodem.org/index.php/298/can-i-use-paraview-to-visualize-the-forces-on-facets

You mentioned that summing up the contact forces, while ensuring that the proper signs are taken into account, is the correct means of finding the total force on a facet in Woo. I was just wondering: If friction exists between the facet and the object which is in contact with it, does the magnitude of the contact force include a deduction due to friction? If not, is the friction stored somewhere else?

Cheers,

Christopher Stanbridge

commented Jul 14, 2015 by (48,570 points)

PS if you are hacking up your solution for saving forces in Python, really let's consider adding that to VtkExport instead. It will be faster and useful for more people. I am glad you look under the hood, though, smart and curious people are fun to work with.

answered Jul 14, 2015 by (48,570 points)
selected Jul 15, 2015

Hi Christopher,

yes, friction is included. The force has 3 components in the contact-local axes, $x$ is normal force and $yz$ is the shear force. Contact-local axes are defined by CGeom.node and that is updated as particles move (you can visualize those via Gl1_DemField under Contacts).

Before summing the force, you need to rotate them to global coordinates (I did not mention that in the other question, sorry); this is how that is done in c++, if you want to see it: this computes force and torque on the node from contact node,  this applies them (in ContactLoop, for uninodal particles only, such as Spheres, where all contact force is transferred to that single node).

HTH, Václav

commented Jul 15, 2015 by (1,030 points)
edited Jul 15, 2015

Would I be able to calculate the global x, y, and z components of a contact force by multiplying the local x, y, and z components by the contact's geom.trsf matrix?

i.e.
[x-global]　 　 　 [x-local]
[y-global] = [trsf] [y-local]
[z-global]　 　 　 [z-local]

or in other words,
global-force = Contact.geom.trsf * Contact.phys.force

commented Jul 15, 2015 by (48,570 points)

Just multiply by the C.geom.node.ori quaternion (from left), as in Fglob=C.geom.node.ori*C.phys.force, that's it. (The trsf matrix is only auxiliary, and actually an implementation detail of L6Geom; but it will work just the same, just is not as cool as using quaternions).