How can I correct collisions and preserve mesh during dynamic simulation?


During a dynamic simulation, when the mesh starts to have collisions (mesh entering into itself), how should I manage them in FEniCS?
In particular:

  • How do I identify the nodes that enter into collision?
  • How can I computate/apply a nodal force that correct these collisions and preserve the mesh all during the simulation long?

Many thanks,

You can try using the mesh.smooth command, see: How to use ALE for moving boundary problems? - #2 by dokken

Many thanks @dokken.
And in the case of inherent large deformation in which smoothing mesh is not sufficient? I mean, if I really need to compute collisions and anihilate them?

Then I would re-mesh the geometry.
See for instance: Re-meshing in fluid structure interaction - #2 by dokken
Remeshing with cashocs — cashocs 2.0.0-dev documentation
GitHub - wildmeshing/fTetWild: Fast Tetrahedral Meshing in the Wild

Ok, many thanks @dokken. Just one last question: in FEniCS simulation, is collision management compulsory or does FEniCS manages it somehow?

Many thanks!

I’m not sure what you mean by collision management. If your mesh degenerates, you will still be able to solve the problem, but the quality of the solution will degenerate.

FEniCS expects that you send in sensible data, i.e. sensible meshes/geometries, valid boundary conditions etc.

Dear @dokken , many thanks for your answer.

Actually, I have a mesh which interpenetrates/autocollides, as illustrated below. In a real material, I would assume the mesh walls would compress themselves without interpenetrating, but here part of the mesh is just disappearing and that is what I would like to correct.

For now, I am trying to apply a “corrective” force F independently from the variational form (I assume then this force is “numerical” and not “physicial”). Here is the process: I solve the problem, get the deformation, apply deformation to the mesh and in case the new mesh is interpenetrating, I then apply the corrective force doing ALE.move(mesh, F), before going to next timestep.

My questions were actually associated to that issue:

  • Is there a specific way in FEniCS correct interpenetration of the mesh?
  • Is what I am doing correct? Does it make sense?

Many thanks again for your help,

This is contact mechanics, and you would need to enforce the contact through your variational formulation, with either a Nitsche method or a penalty approach.

Legacy dolfin

@kamensky has also worked on contact mechanics: tIGAr/ at master · david-kamensky/tIGAr · GitHub
@bleyerj has quite alot of work on contact at: Hertzian contact with a rigid indenter using a penalty approach — Numerical tours of continuum mechanics using FEniCS master documentation


@evzen did his thesis on the subject with DOLFINx: GitHub - evzenkorec/thesis_contact: thesis on high performance solvers for contact mechanics
Some contact mechanics has been implemented by me, Sarah Roggendorf and @chris at: GitHub - Wells-Group/asimov-contact: Contact models for ASiMoV

1 Like

Many thanks @dokken!!! I will have a close look on those works.