Invalid periodic mesh - TPMS
Hi!
I am involved in a project where we are trying to use FreeFEM to solve linear elasticity problems on Triply periodic minimal surfaces (TPMS) with periodic boundary condition. We are interested in the IWP TPMS unit cell in particular.
For the periodic boundary condition, it is essential to have periodic mesh on all opposite sides of the boundary surfaces which connect to the neighboring cell in the lattice structure.
We have a set of 100 IWP TPMS unit cell models with varying thickness generated with a Matlab script. We want to mesh all of them so we can put them into the FEM program. To achieve this we have used code from Gmsh tutorial 13 (import stl) and 18 (periodic mesh). We have attached the Python script here as well -> periodicMeshGen.py
Of the 100 models we wanted to mesh, we managed to do the first 88 of them before we started getting errors from Gmsh. Of those 88 successful meshes however, almost half of them could not be run with the FEM-software due to some vertices not corresponding correctly to eachother in the periodic mesh. When investigating those problematic meshes more closely we found that these meshes were indeed not perfectly periodic, see the figure below:
The figure shows an overlap of two opposite surfaces which are supposed to be identical from the periodic mesh code and the top layer with 50% visibility for the see-through possibility. For the most part the surface meshes look the same on the boundary surfaces, except the regions circled with blue where we get some trouble. We presume this is causing the issues with the FEM software.
In general, we have had issues with meshing TPMS unit cells, not only IWP. It might be because of the .stl format, but unfortunately this is the only format we have access to for TPMS (if anyone has better ideas, please throw them at us).
Any ideas, suggestions or guidance to help us along would be much appreciated! Would love to discuss more if anyone has questions.