Re-meshing in fluid structure interaction

I am running fluid structure interaction simulations using a unified continuum method (see e.g. Jansson J, Degirmenci NC, Hoffman J. 2017 Adaptive unified continuum FEM modeling of a 3D FSI benchmark problem. Int. j. numer. method. biomed. eng. 33 , 1–12. (doi:10.1002/cnm.2851)). This involves having a single mesh representing the fluid and the solid which is deformed as the simulation progresses so that an element is always either a fluid or a solid element. There comes a point when the deformation of the fluid mesh is too extreme and it is necessary to re-mesh at least the fluid domain before continuing.

I have not found a good way of doing this. So far my attempts have centered around trying to export the (deformed) boundary mesh, and use this in gmsh to re-mesh the fluid domain, but I have been unable to export the boundary mesh in a way that allows me to do this.

I have been looking at posts like,

https://fenicsproject.discourse.group/t/transitioning-from-mesh-xml-to-mesh-xdmf-from-dolfin-convert-to-meshio/412

but have not yet found an answer here, and I have also seen a similar question on this forum,

https://fenicsproject.discourse.group/t/remeshing-using-gmsh/713

but this has not been answered yet.

I am running the latest version of FEniCS available from docker.

Stephan Schmidt did some work on how to remesh from a boundary a couple of years back.
A modified version of his repository, which is pip installable can be found at
FEmorph branch. Look at the Demos, for instance Demo_Navier_Reduced.py around line 435 for the remesh commands. It is not as straight forward as it might look, as it requries some dummy gmsh files,

1 Like

Hi dokken, I’ve been going through the FEmorph Demo_Navier_Reduced.py file, and the Gmsh tutorial 13: Remeshing an STL file without an underlying CAD model, however have been unsuccessful in remeshing my mesh. I’m using meshio so have replaced the line in the FEmorph example

WriteMSH(mesh, boundary_parts, AllMarkers, MeshFolder + "/remesh/OldMesh.msh", VolumeParts)

with

XDMFFile(MPI.comm_world, 'OldMesh.xdmf').write(mesh)
msh = meshio.read('OldMesh.xdmf')
meshio.write('OldMesh.msh', msh, file_format='gmsh')

Is this correct?
I’ve been using a simple box mesh just for practice, and when I call the remeshing geo file and save as xdmf nothing has changed. When I replicate Gmsh tutorial 13, when it gets to CreateGeometry I get

Warning : No triangles to reclassify in surface mesh
Error   : Discrete volume 0 has no surfaces on its boundary

So I’m thinking I’m saving my msh file incorrectly and it doesn’t contain all the necessary data. Any help would be greatly appreciated

I would suggest asking the GMSH developers regarding this, as this is about how gmsh works with msh files.