# Re-meshing in fluid structure interaction

**URL:** <https://fenicsproject.discourse.group/t/re-meshing-in-fluid-structure-interaction/1190>\
**Category:** mesh\
**Created:** [July 23, 2019, 8:10am UTC](https://fenicsproject.discourse.group/t/re-meshing-in-fluid-structure-interaction/1190 "2019-07-23T08:10:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alastair](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@alastair](https://fenicsproject.discourse.group/u/alastair)\
**Post date:** [July 23, 2019, 8:10am UTC](https://fenicsproject.discourse.group/t/re-meshing-in-fluid-structure-interaction/1190/1 "2019-07-23T08:10:26Z")

</div>

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](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](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.

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [July 23, 2019, 10:00am UTC](https://fenicsproject.discourse.group/t/re-meshing-in-fluid-structure-interaction/1190/2 "2019-07-23T10:00:41Z")

</div>

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](https://bitbucket.org/Epoxid/femorph/src/c7317791c8f00d70fe16d593344cb164a53cad9b/?at=dokken%2Frestructuring). 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,

---

<div class="post-metadata">

**Author:** ![jgs](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@jgs](https://fenicsproject.discourse.group/u/jgs)\
**Post date:** [August 23, 2022, 12:43am UTC](https://fenicsproject.discourse.group/t/re-meshing-in-fluid-structure-interaction/1190/3 "2022-08-23T00:43:34Z")

</div>

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

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

```

with

```auto
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

```auto
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

---

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [August 29, 2022, 8:59am UTC](https://fenicsproject.discourse.group/t/re-meshing-in-fluid-structure-interaction/1190/4 "2022-08-29T08:59:41Z")

</div>

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