Best strategy for importing external meshes

One method, which I am using extensively, is Salome export as med to gmsh to xml to h5. You need to install Salome and import CAD or generate your CAD file in there. By using Salome you can also select and give names to boundaries. Then after exporting, in FEniCS you see these names as numbers.

Have a look at Back Matter in this book
https://link.springer.com/book/10.1007%2F978-981-10-2444-3
in Appendix A.3 Complicated Geometries in FEniCS

For any specific step, you find difficult, simply ask a question here, I will help.

If you want to have the book, write me an email, we find a solution as well.

Best, Emek

2 Likes