Gmsh mesher : Quasi-Structured Quad & Hex-Dominant

hi

i try new advanced mesher using Gmsh, there’s interesting algorithm to generate mesh of complex 3D shell with quasi-structred quad automatically without partition, and it seems to be working inside PrePoMax.

however, an algorithm of R-Tree to generates hex-dominant mesh is not working.

i’m curious and try to test by loading Gmsh library from Python, and it seems have the same issue in deactivation feature as stand-alone executable.

hopefully there’s someone to have experiences or expertise in compiling these libraries with the feature is activated, then possible to share.

regards,

I really liked the results of the quasi-structured quad algorithm while I tested it. So it is unfortunate it cannot be used in expanded and revolved meshes (there is a bug or unfinished feature according to the Gmsh issue reports). So, I was even thinking of preparing my own code to create an extruded or revolved mesh based on the mesh of the base surface.

1 Like

I am wondering if this work: A frontal approach to hex-dominant mesh generation | Advanced Modeling and Simulation in Engineering Sciences | Full Text is actually implemented in Gmsh. Are there any test cases that can be run? Is this the R-tree algorithm?

I’m using this option a lot. I start with quasi-structured quad algorithm to mesh the envelope of the volume.

Mesh.Algorithm = 11;
Mesh.ElementOrder=1;
Mesh 2;

Note the Element order = 1 and mesh =2 (just want a surface mesh). Second order elements gives problems to me.
It generates a high quality surface mesh . The volume is void.

Then I just select the face I need to extrude or revolve.

1 Like

Maybe I was testing it using second-order elements? I will try it using linear elements again.

I tried it with linear elements and had no luck. I get very strange results.

Can you share a .geo Gmsh file I can run that produces hexahedral mesh with Mesh.Algorithm = 11 for the geometry on the image?

As far as I know Mesh.Algorithm=11 can’t produce hexahedral meshes. It is a 2D algorithm.

2D mesh algorithm 3D mesh algorithm
Mesh.Algorithm Mesh.Algorithm3D
1 MeshAdapt 1 Delaunay
2 Automatic 2
3 Initial mesh only 3 Initial mesh only
4 4 Frontal
5 Delaunay 5
6 Frontal-Delaunay 6
7 BAMG 7 MMG3D
8 Frontal-Delaunay for Quads 8
9 Packing of Parallelograms 9 R-tree
10 10 HXT
11 Quasi-structured Quad) 11

indeed, a feature in further processing based on existing surface mesh successfully generated by Gmsh is required. It can be used as purpose of extrusion or revolving of :

  • base 2D mesh from quasi-structured quad mesh results
  • midside nodes of quadratic element to follow geometry of revolve curved path
  • normal extrusion of complex 3D Nurbs

sure, it has been implemented. R-tree algorithm option is available in version of 3.x but later is deactivated by developer due to some reason.

2023-11-03 10_19_50-Options - Mesh

a user only need to reference part or geometry files (step,iges,brep), below geo file input format which can be used as template.


Merge "part.igs";

Mesh.CharacteristicLengthFactor = 0.25;

Mesh.Algorithm = 9;
Mesh.Algorithm3D = 9;
Mesh.Optimize = 1;
Mesh.Recombine3DAll = 1;
Mesh.Smoothing = 0;

Mesh.RemeshAlgorithm = 0;

I am aware of that. I wanted first to mesh a surface and then extrude/revolve it to get hexahedral mesh. But this does not work when the 2D algorithm is Quasi-structured Quad. Unfortunatelly.

Oh. That is a shame. I would really like to test it, but on the other hand, I would prefer using the newest Gmsh mesher. I am stuck with an old Netgen version, so using up-to-date Gmsh is preferred.

right, maybe next release of Gmsh will re-activate this feature with improvement. Unfortunately, even the latest development version seems capable, but the mesh result is not so good as version before.


Mesh.Algorithm = 9; //8 = delquad or 9= 2D R-tree
Mesh.Algorithm3D = 9; // 3D R-tree
Mesh.Recombine3DAll = 1;
Mesh.Smoothing = 0;

c1 = 0.25; //125;
c2 = 0.25;
Point(1) = {1, 1, -1, c2};
Point(2) = {-1, 1, -1, c1};
Point(3) = {-1, -1, -1, c1};
Point(4) = {1, -1, -1, c1};
Point(5) = {1, 1, 1, c1};
Point(6) = {-1, 1, 1, c1};
Point(7) = {1, -1, 1, c1};
Point(8) = {-1, -1, 1, c1};
Line(1) = {7, 5};
Line(2) = {5, 6};
Line(3) = {6, 8};
Line(4) = {8, 7};
Line(5) = {7, 4};
Line(6) = {4, 1};
Line(7) = {1, 5};
Line(8) = {1, 2};
Line(9) = {2, 6};
Line(10) = {8, 3};
Line(11) = {3, 2};
Line(12) = {3, 4};
Line Loop(13) = {1, -7, -6, -5};
Plane Surface(14) = {13};
Line Loop(15) = {8, 9, -2, -7};
Plane Surface(16) = {15};
Line Loop(17) = {11, 9, 3, 10};
Plane Surface(18) = {17};
Line Loop(19) = {4, 5, -12, -10};
Plane Surface(20) = {19};
Line Loop(21) = {12, 6, 8, -11};
Plane Surface(22) = {21};
Line Loop(23) = {1, 2, 3, 4};
Plane Surface(24) = {23};
Surface Loop(25) = {14, 24, 16, 22, 20, 18};
Volume(26) = {25};
2 Likes

only want to confirm, update to latest stable version generate better result and faster also.

Did you try with this model in the newest version (which is 4.12.2 at the moment) ?

not yet, currently being concern in mesh result related to acceptance by the solver (CalculiX).

example of flange models is taken from my previous one of large variance model testing. Interesting to reproduce all the problem, geometry and mesh result generate by latest version of Gmsh.

below result using latest version. Gmsh runs faster, but it seems previous mesh have better at curved surface intersection and recombination also.

Nice example to show the regression. Can you post it in their GitHub issues ?

thanks i will try to discuss whenever possible to developer.

How to set up gmsh4.12.2 to mesh? I have tried several times, but it still doesn’t work

maybe a CAD geometry have problem, usually it almost works by general setting. However, it is not for tuning (refinement). I’m frequently in problems and failed also.

If you want some help, you need to tell us more about your problem, describe the workflow and possibly share the files (in a new forum thread). If you just want a triangular/tetrahedral mesh then in most cases you can get it even with the default settings. Unless the geometry is a bit more complex and requires customized settings, at least when it comes to max element size. You can try meshing in PrePoMax first and then proceed to standalone Gmsh if it works.

or maybe the question is related to Gmsh mesher setting inside PrePoMax? i also did not find any equivalency in menus.

Mesh.Algorithm = 9; //8 = delquad or 9= 2D R-tree
Mesh.Algorithm3D = 9; // 3D R-tree
Mesh.Recombine3DAll = 1;
Mesh.Smoothing = 0;