Summary of Gmsh hex meshing rules

In this thread, I’d like to collect all the rules that have to be followed to obtain hex meshes with Gmsh in PrePoMax since there are quite a few of them and some may require additional clarification. Please correct me if anything is wrong in my summary.

  1. Extruded and revolved meshing can’t be applied to compound parts and thus base face partitions should be used instead of volume partitions. Those base face patches should be selected all at once using e.g. Surface angle selection mode.

  2. Extruded and revolved meshing requires faces with 3 or 4 edges to generate hex elements automatically (using the transfinite algorithm). But then why doesn’t the example below work without recombination ?

  1. If there are no such faces (or if it doesn’t work for cases like above for some reason), one can try using recombination to generate hex or hex-dominated mesh.

  1. Transfinite meshing can be applied to compound parts so volume partitions are the way to go.

  2. Transfinite hex meshing requires volumes with 5 or 6 faces. Those faces should have 3 or 4 edges each.

1 Like

Ok, it seems that hex meshes are never created automatically, recombination is always necessary (see the example below) and those rules with the number of faces/edges for extruded and revolved meshing are just to enable the transfinite algorithm that creates more structured meshes.

Please correct me if I’m wrong.

Completely correct.

I agree it was also confusing to me when I started to work with Gmsh what exactly is transfinite what exactly is recombination, and how those two can be combined.

The thing is that both of them can be used separately and also at the same time. A transfinite constraint is based on tranfinite interpolation (Transfinite interpolation - Wikipedia), which is a way of how to get internal points between two curves or two faces. The result of using a transfinite constraint on a face/s are nicely - regularly positioned nodes inside the transfinite face. The result looks similar to a mapped mesh. When no recombination is used, these nodes are used to create a triangular mesh in 2D or a tetrahedral mesh in 3D.

Recombination is a process where neighboring triangles are merged into a single quad or where neighboring tetrahedrons are merged into hexahedrons. Without recombination, only triangular or tetrahedral elements can be created.

Using both of them is necessary to get a regular quad-based 2D mesh (in triangular faces, there are some triangular elements at the mesh peak node) that can be extruded/revolved into hexa mesh.

I tried to explain this in my first tutorial: https://youtu.be/AoDp3eZrG1s

1 Like

Exactly. Transfinite mesh is only possible on three-sided and four-sided faces. and then needs to be recombined to result in a quad-based shell mesh.

1 Like