[Gmsh] Controlling the tetrahedra orientation in an extruded 3D mesh

marco restelli mrestelli at gmail.com
Tue Apr 14 10:24:59 CEST 2015


Dear all,
   I am unable to control the tetrahedra orientation in an extruded 3D
mesh.

More in details: consider the following .geo file. If I set
"Transfinite Right" or "Left" for the surfaces 18 and 26, which are
two of the sides generated during the surface extrusion, this
orientation is followed by the 2D grids, but seems to be ignored by
the 3D grid, which has a rather irregular pattern. Is there a way to
control the 3D grid orientations?

In fact, for me it would be enough to ensure that the 3D grid is
periodic on the two faces 18 and 26, regardless of the specific
orientation.

I am using gmsh 2.8.5

Thank you!

Marco



// Create a line directed along the x axis

P1 = newp; Point(P1) = {0.0,0.0,0.0,0.0};
P2 = newp; Point(P2) = {3.0,0.0,0.0,0.0};

L1 = newreg; Line(L1) = {P1,P2};
Transfinite Line{L1} = 8;


// Extrude the line along the y axis

levs = { 0.1 , 0.3 , 0.6 , 1.0 };
ones = {  1  ,  1  ,  1  ,  1  };

pp = Extrude{0.0,2.0,0.0}{
  Line{L1}; Layers{ones[],levs[]};
};
S1 = pp[1]; // newly created surface


// Extrude the resulting surface along the z axis
pp[] = Extrude{0,0,1}{ Surface{S1}; Layers{3}; };


// Set the orientation on the two surfaces 18 and 26
Transfinite Surface{18} Right; // works for 2D grid, but not for 3D grid
Transfinite Surface{26} Left;




More information about the gmsh mailing list