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

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Apr 23 21:54:37 CEST 2015


> On 14 Apr 2015, at 10:24, marco restelli <mrestelli at gmail.com> wrote:
> 
> 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?
> 

Unfortunately, no: there’s no way to guarantee the orientation in a general geometrical configuration. The seemingly random orientations you observe are die to swaps that are performed to recover the boundary mesh.

> 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;
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine







More information about the gmsh mailing list