What are the functions for anisotropic mesh element "splitting" or refinement?

Hello,

Step1: I have been experimenting with mmg2d and want to create an anisotropic surface mesh where the elements of the coarse initial Gmsh mesh are modified to become anisotropic with an approximate aspect ratio x:y of e.g. 1:3. This mesh would then be the basis to create an anisotropic prismatic boundary layer mesh using Gmsh extrusion.

So far I have not been able to create a mesh consisting of modified cells that have an aspect ratio. How can I achieve that? What are the related functions? - I keep creating in y-direction refined meshes.

Background / ultimate goal: Step 2: If the above works I’d like to link the anisotropic mesh elements aspect ratio to the curvature and flow direction of the envisioned OpenFOAM flow simulation. The driving objective is to create a mesh with the minimal cell count that conforms with the shape of the object to be studied. I expect a cell count reduction of up to 2/3 compared to a “refined” mesh usually used to reach the surface shape conformity.

BR,

Klaus

Hello Klaus,

Thank you for your question. To enforce an anisotropic metric, you need to create the input metric file that will be read by mmg.
To do so, you must follow the following template:

MeshVersionFormatted 2

Dimension 2

SolAtVertices
      NP
1 2

m11 m12 m22
...
m11 m12 m22

where NP is the total number of points in your input mesh, and the line “m11 m12 m22” is repeated as many times as the number of points.

For more information, please have a look at Anisotropic metric prescription — mmg 5.8.0 documentation
If you attempt to do it in 3D, pay attention to the difference between command line execution and API execution. Flattened matrix storage differs depending on the way you use mmg.
Do not hesitate to come back to me if you have any other questions.

Kind regards,
Corentin