Home › Forum › SOFA › Using SOFA › [SOLVED] Objects do not deform on collision when using FrictionContact response
Tagged: 64_bits, collision, constraints, deformation, FreeMotionAnimationLoop, Linux_ubuntu, Plugin_other, SOFA_other, SofaPython3
- This topic has 1 reply, 2 voices, and was last updated 3 years, 11 months ago by Hugo.
-
AuthorPosts
-
11 December 2020 at 10:42 #18005ScheiklBlocked
Dear SOFA Community,
I created a scene file in SofaPython3, that uses theFreeMotionAnimationLoop
, together with theGenericConstraintSolver
in the root node andUncoupledConstraintCorrection
in each object.When choosing the response “default” (creating forces proportional to the detected interpenetration) in
DefaultContactManager
, the objects deformed on collision.
When using the response “FrictionContact” (constraint-based method) the models did not deform anymore.
@Hugo proposed the following solution that worked perfectly.
First: set the datacompliance
in theUncoupledConstraintCorrection
to roughly 1/totalMass of the object. Now, all the models deformed on collision, but the behavior seemed a bit unstable.Second: use
PrecomputedConstraintCorrection
instead ofUncoupledConstraintCorrection
in models with heavy deformation. That made everything much more stable.I added the thread as [SOLVED], so that other people might find this solution when facing a similar problem.
Cheers,
PaulSOFA version: v20.12_beta
SofaPython3 version: master (4566e4d83a126b7722cbeb824b38254e99d4cf73)Minimal Scene:
root_node.addObject("FreeMotionAnimationLoop") root_node.addObject( "GenericConstraintSolver", maxIterations=1000, tolerance=0.001, computeConstraintForces=True, ) root_node.addObject("DefaultPipeline", name="CollisionPipeline") root_node.addObject("BruteForceDetection") root_node.addObject( "MinProximityIntersection", name="localmindistance", alarmDistance=0.2, contactDistance=0.1, ) root_node.addObject( "DefaultContactManager", name="Response", response="FrictionContact" ) ... (solver, topology, mesh loader) liver.addObject( "MechanicalObject", template="Vec3d", name="dofs", ) liver.addObject("UniformMass", totalMass=1.5, name="LiverMass") liver.addObject( "TetrahedronFEMForceField", template="Vec3d", method="large", name="FEMforcefield", poissonRatio=0.3, youngModulus=3000, computeGlobalMatrix=False, ) liver.addObject("PrecomputedConstraintCorrection") ... (collision models and mapping)
11 December 2020 at 11:15 #18006 -
AuthorPosts
- You must be logged in to reply to this topic.