18 January 2021 at 6 h 56 min #18242
Has anyone had any experience with measuring contact pressure in SOFA? i.e. when object A contacts object B, measure the pressure experienced by object B at the contact area.
I have been using the Monitor object so far to measure forces on individual nodes (which has been working very well), but is there some way to convert the force measurements to pressure measurements?
For example, could the pressure on a single triangular mesh element be calculated from the force measured at the 3 triangle corners? As far as I know, the Monitor and ExtraMonitor objects do not have an option to directly measure pressure.
Any guidance is appreciated, thanks!1 February 2021 at 11 h 20 min #18460
Which contact responsive method are you using:
– penalty method
– or Lagrange-multiplier based resolution ?
Depending on the method, I would point you out two different solution.
(If you are not sure about the method, could you just share your scene file?)
Hugo1 February 2021 at 16 h 02 min #18466
Thanks for the response.
I am not 100% sure, but I believe I am using the Lagrange-multiplier based method.
My scene and object files are here: https://github.com/thomaswxu/SOFA
I hope it is not too annoying to use; you will have to change some file paths/names for the objects to be loaded correctly.
(i.e. change “fea_variant” variable in scene file, then change corresponding file paths in “filenames.py”)
Please feel free to contact me if it doesn’t work or if you have any questions!5 February 2021 at 12 h 38 min #18536
From your scene singleFinger_wObject_XML.scn, it appears that you indeed use Lagrange multipliers: use of the FreeMotionAnimationLoop + GenericConstraintSolver.
Recovering contact forces can be done in the GenericConstraintSolver:
– activate the “computeConstaintForces” boolean
– this fills the nodal data field “constraintForces” that you can use to compute your pressure
I hope this helps.
Hugo5 February 2021 at 15 h 44 min #18542
Thanks for your suggestion! I have activated the “computeConstraintForces” boolean, and can see the “constraintForces” data under GenericConstraintSolver in the SOFA GUI.
But, I’m not sure how to interpret this data. It appears to be a single row vector; I see in the SOFA documentation that it represents intensities of constraint forces, but I could not find further information.
Could you provide more details on how to calculate contact pressure from the “constraintForces” data? I’m not sure how to proceed with the pressure calculation currently.26 February 2021 at 19 h 02 min #18766
“constraintForces” is a vector which size equals the number of constraints (maybe contacts in your case). If you have 3 contacts you would have :
“Contact1_ForceInX Contact1_ForceInY Contact1_ForceInZ Contact2_ForceInX Contact2_ForceInY Contact2_ForceInZ Contact3_ForceInX Contact3_ForceInY Contact3_ForceInZ”
Hugo26 February 2021 at 19 h 02 min #18767
To compute the pressure, use directly the P = F/S relationship.
Hugo26 February 2021 at 19 h 25 min #18769
- You must be logged in to reply to this topic.