# [Gmsh] Problems with structured meshing

Kushagra Vidyarthi kushagra.vidyarthi at ymail.com
Sat Oct 15 19:02:33 CEST 2016

```Dear Sir/Madam,

I am working on a CFD analysis around an ellipse. For this purpose, I
have created a circular domain around the geometry, and I am trying to
create a structured mesh around it, so that I can have some control over
the boundary layer. My .geo file is below:

// Gmsh project created on Fri Oct 14 10:40:40 2016

//geometry creation
//ellipse: major axis 0.075, minor axis 0.009375
// 1st arc
Point(1) = {-0.0375, 0, 0, 0.01};
Point(2) = {0, 0, 0, 0.01}; //global center
Point(3) = {-0.02, 0, 0, 0.1};
Point(4) = {-0.026516504, 0.003314563, 0, 0.01};
Ellipse(1) = {1, 2, 3, 4};

//arc 2
Point(5) = {0, 0.0046875, 0, 0.01};
Point(6) = {0.02, 0, 0, 0.01};
Ellipse(2) = {4, 2, 3, 5};

//arc3
Point(7) = {0.026516504, 0.003314563, 0, 0.01};
Ellipse(3) = {5, 2, 6, 7};

//arc4
Point(8) = {0.0375, 0, 0, 0.01};
Ellipse(4) = {7, 2, 6, 8};

//arc5
Point(9) = {0.026516504, -0.003314563, 0, 0.01};
Ellipse(5) = {8, 2, 6, 9};

//arc6
Point(10) = {0, -0.0046875, 0, 0.01};
Ellipse(6) = {9, 2, 6, 10};

//arc7
Point(11) = {-0.026516504, -0.003314563, 0, 0.01};
Ellipse(7) = {10, 2, 3, 11};

//arc8
Ellipse(8) = {11, 2, 3, 1};

//circle
Point(12) = {-1.7677669, -1.7677669, 0, 0.01};
Point(13) = {-1.7677669, 1.7677669, 0, 0.01};
Point(14) = {1.7677669, 1.7677669, 0, 0.01};
Point(15) = {1.7677669, -1.7677669, 0, 0.01};

Circle(9) = {12, 2, 13};
Circle(10) = {13, 2, 14};
Circle(11) = {14, 2, 15};
Circle(12) = {15, 2, 12};

//blocking lines
Line(13) = {11, 12};
Line(14) = {4, 13};
Line(15) = {7, 14};
Line(16) = {9, 15};

//splitting lines
Transfinite Line {9} = 100 Using Progression 1;
Transfinite Line {10} = 100 Using Progression 1;
Transfinite Line {11} = 100 Using Progression 1;
Transfinite Line {12} = 100 Using Progression 1;
Transfinite Line {14} = 100 Using Progression 1;
Transfinite Line {15} = 100 Using Progression 1;
Transfinite Line {16} = 100 Using Progression 1;
Transfinite Line {13} = 100 Using Progression 1;
Transfinite Line {8} = 100 Using Progression 1;
Transfinite Line {1} = 100 Using Progression 1;
Transfinite Line {2} = 100 Using Progression 1;
Transfinite Line {3} = 100 Using Progression 1;
Transfinite Line {4} = 100 Using Progression 1;
Transfinite Line {5} = 100 Using Progression 1;
Transfinite Line {6} = 100 Using Progression 1;
Transfinite Line {7} = 100 Using Progression 1;
Line Loop(17) = {13, 9, -14, -1, -8};
Plane Surface(1) = {17};
Line Loop(19) = {15, -10, -14, 2, 3};
Plane Surface(2) = {19};
Line Loop(21) = {16, -11, -15, 4, 5};
Plane Surface(3) = {21};
Line Loop(23) = {13, -12, -16, 6, 7};
Plane Surface(4) = {23};
Transfinite Surface {1} = {4, 13, 12, 11};
Transfinite Surface {2} = {7, 14, 13, 4};
Transfinite Surface {3} = {9, 15, 14, 7};
Transfinite Surface {4} = {11, 12, 15, 9};

Recombine Surface {1};
Recombine Surface {2};
Recombine Surface {3};
Recombine Surface {4};

When I run this file in gmsh, I get errors like: "Error   : Surface 4
cannot be meshed using the transfinite algo". I also get a warning
stating: "Warning : Cannot apply Blosson: odd number of triangles
(15167) in surface 4". My error log and .geo files are attached. Please
advise on what I can do to fix these errors.

Thanks and Regards,

Kushagra Vidyarthi

-------------- next part --------------
Info    : -------------------------------------------------------
Info    : Gmsh version   : 2.10.1
Info    : Build OS       : Linux
Info    : Build options  : 64Bit Ann Bamg Bfgs Blas(Generic) Blossom Chaco DIntegration Dlopen Fltk Gmm Jpeg Kbipack Lapack(Generic) LinuxJoystick MPI MathEx Med Mesh Mmg3d Mpeg NativeFileChooser Netgen ONELAB ONELABMetamodel OpenCascade(OCE) OpenGL OptHom Parser Plugins Png Post Python Salome Solver Tetgen Voro3D Zlib
Info    : Build date     : 20160212
Info    : Build host     : lgw01-54
Info    : Packager       : buildd
Info    : Executable     : /usr/bin/gmsh
Info    : Home directory : /home/kushagra/
Info    : Launch date    : Sat Oct 15 18:59:00 2016
Info    : Command line   : gmsh
Info    : -------------------------------------------------------
Info    : Done reading '/home/kushagra/gmsh_work/ellipse+domain_geom_o-grid (copy).geo'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Ellipse)
Info    : Meshing curve 2 (Ellipse)
Info    : Meshing curve 3 (Ellipse)
Info    : Meshing curve 4 (Ellipse)
Info    : Meshing curve 5 (Ellipse)
Info    : Meshing curve 6 (Ellipse)
Info    : Meshing curve 7 (Ellipse)
Info    : Meshing curve 8 (Ellipse)
Info    : Meshing curve 9 (Circle)
Info    : Meshing curve 10 (Circle)
Info    : Meshing curve 11 (Circle)
Info    : Meshing curve 12 (Circle)
Info    : Meshing curve 13 (Line)
Info    : Meshing curve 14 (Line)
Info    : Meshing curve 15 (Line)
Info    : Meshing curve 16 (Line)
Info    : Done meshing 1D (0.012 s)
Info    : 1583 vertices 1599 elements
Info    : Meshing 2D...
Info    : Meshing surface 1 (transfinite)
Error   : Surface 1 cannot be meshed using the transfinite algo
Info    : Meshing surface 1 (Plane, Delaunay)
Warning : Cannot apply Blosson: odd number of triangles (14799) in surface 1
Info    : BEFORE OPTIMIZATION :  6497 quads  1805 triangles   23 invalid quads   32 quads with Q < 0.1 Avg Q =  6.55195E-01 Min -2.24772E-01
Info    : IN OPTIMIZATION :  6475 quads  1805 triangles    4 invalid quads   11 quads with Q < 0.1 Avg Q =  7.51179E-01 Min -2.13071E-01
Info    : IN OPTIMIZATION :  6475 quads  1805 triangles    2 invalid quads   11 quads with Q < 0.1 Avg Q =  7.58009E-01 Min -2.12706E-02
Info    : IN OPTIMIZATION :  6475 quads  1805 triangles    2 invalid quads   11 quads with Q < 0.1 Avg Q =  7.61635E-01 Min -2.12706E-02
Info    : Blossom recombination algorithm completed (0.984 s)
Info    : AFTER OPTIMIZATION :  6464 quads  1827 triangles    0 invalid quads    5 quads with Q < 0.1 Avg Q =  7.66524E-01 Min  2.75609E-02
Info    : Meshing surface 2 (transfinite)
Error   : Surface 2 cannot be meshed using the transfinite algo
Info    : Meshing surface 2 (Plane, Delaunay)
Warning : Cannot apply Blosson: odd number of triangles (15133) in surface 2
Info    : BEFORE OPTIMIZATION :  6624 quads  1885 triangles   32 invalid quads   52 quads with Q < 0.1 Avg Q =  6.52075E-01 Min -4.10481E-01
Info    : IN OPTIMIZATION :  6585 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.54460E-01 Min -6.42812E-02
Info    : IN OPTIMIZATION :  6585 quads  1885 triangles    1 invalid quads    2 quads with Q < 0.1 Avg Q =  7.61538E-01 Min -6.26951E-02
Info    : IN OPTIMIZATION :  6585 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.65306E-01 Min -6.15080E-02
Info    : IN OPTIMIZATION :  6585 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.67637E-01 Min -6.05185E-02
Info    : IN OPTIMIZATION :  6585 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.69325E-01 Min -5.97747E-02
Info    : IN OPTIMIZATION :  6585 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.70397E-01 Min -5.90744E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.71232E-01 Min -5.85468E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.71823E-01 Min -5.81489E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.72327E-01 Min -5.78486E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.72728E-01 Min -5.76220E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73013E-01 Min -5.74509E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73253E-01 Min -5.73216E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73441E-01 Min -5.72239E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73602E-01 Min -5.71501E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73738E-01 Min -5.70943E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    0 invalid quads    2 quads with Q < 0.1 Avg Q =  7.73910E-01 Min  5.11553E-02
Info    : IN OPTIMIZATION :  6584 quads  1885 triangles    0 invalid quads    2 quads with Q < 0.1 Avg Q =  7.74019E-01 Min  5.11553E-02
Info    : Blossom recombination algorithm completed (3.696 s)
Info    : AFTER OPTIMIZATION :  6582 quads  1889 triangles    0 invalid quads    0 quads with Q < 0.1 Avg Q =  7.74384E-01 Min  1.31364E-01
Info    : Meshing surface 3 (transfinite)
Error   : Surface 3 cannot be meshed using the transfinite algo
Info    : Meshing surface 3 (Plane, Delaunay)
Warning : Cannot apply Blosson: odd number of triangles (14799) in surface 3
Info    : BEFORE OPTIMIZATION :  6497 quads  1805 triangles   23 invalid quads   32 quads with Q < 0.1 Avg Q =  6.55195E-01 Min -2.24772E-01
Info    : IN OPTIMIZATION :  6475 quads  1805 triangles    4 invalid quads   11 quads with Q < 0.1 Avg Q =  7.51180E-01 Min -2.13071E-01
Info    : IN OPTIMIZATION :  6475 quads  1805 triangles    2 invalid quads   11 quads with Q < 0.1 Avg Q =  7.58009E-01 Min -2.12706E-02
Info    : IN OPTIMIZATION :  6475 quads  1805 triangles    2 invalid quads   11 quads with Q < 0.1 Avg Q =  7.61634E-01 Min -2.12706E-02
Info    : Blossom recombination algorithm completed (0.988 s)
Info    : AFTER OPTIMIZATION :  6464 quads  1827 triangles    0 invalid quads    1 quads with Q < 0.1 Avg Q =  7.66741E-01 Min  9.35287E-02
Info    : Meshing surface 4 (transfinite)
Error   : Surface 4 cannot be meshed using the transfinite algo
Info    : Meshing surface 4 (Plane, Delaunay)
Warning : Cannot apply Blosson: odd number of triangles (15167) in surface 4
Info    : BEFORE OPTIMIZATION :  6644 quads  1879 triangles   32 invalid quads   49 quads with Q < 0.1 Avg Q =  6.51155E-01 Min -4.10481E-01
Info    : IN OPTIMIZATION :  6603 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.54432E-01 Min -6.42812E-02
Info    : IN OPTIMIZATION :  6603 quads  1879 triangles    1 invalid quads    2 quads with Q < 0.1 Avg Q =  7.61761E-01 Min -6.26951E-02
Info    : IN OPTIMIZATION :  6603 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.65630E-01 Min -6.15080E-02
Info    : IN OPTIMIZATION :  6603 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.68057E-01 Min -6.05185E-02
Info    : IN OPTIMIZATION :  6603 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.69824E-01 Min -5.97747E-02
Info    : IN OPTIMIZATION :  6603 quads  1879 triangles    1 invalid quads    2 quads with Q < 0.1 Avg Q =  7.70904E-01 Min -5.90744E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.71666E-01 Min -5.85468E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.72333E-01 Min -5.81489E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.72773E-01 Min -5.78486E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73189E-01 Min -5.76220E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73470E-01 Min -5.74509E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73745E-01 Min -5.73216E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.73924E-01 Min -5.72239E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74065E-01 Min -5.71501E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74201E-01 Min -5.70943E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74320E-01 Min -5.70522E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74421E-01 Min -5.70203E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74478E-01 Min -5.69963E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74521E-01 Min -5.69781E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74565E-01 Min -5.69643E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74605E-01 Min -5.69539E-02
Info    : IN OPTIMIZATION :  6602 quads  1879 triangles    1 invalid quads    3 quads with Q < 0.1 Avg Q =  7.74633E-01 Min -5.69460E-02
Info    : Blossom recombination algorithm completed (4.656 s)
Info    : AFTER OPTIMIZATION :  6599 quads  1885 triangles    0 invalid quads    0 quads with Q < 0.1 Avg Q =  7.74993E-01 Min  1.31190E-01
Info    : Done meshing 2D (12.2373 s)
Info    : 30420 vertices 35136 elements
Error   : ------------------------------
Error   : Mesh generation error summary
Error   :     3 warnings
Error   :     3 errors
Error   : Check the full log for details
Error   : ------------------------------
Info    : Writing '/home/kushagra/gmsh_work/ellipse+domain_geom_o-grid (copy)-msgs.geo'...
-------------- next part --------------
// Gmsh project created on Fri Oct 14 10:40:40 2016

//geometry creation
//ellipse: major axis 0.075, minor axis 0.009375
// 1st arc
Point(1) = {-0.0375, 0, 0, 0.01};
Point(2) = {0, 0, 0, 0.01}; //global center
Point(3) = {-0.02, 0, 0, 0.1};
Point(4) = {-0.026516504, 0.003314563, 0, 0.01};
Ellipse(1) = {1, 2, 3, 4};

//arc 2
Point(5) = {0, 0.0046875, 0, 0.01};
Point(6) = {0.02, 0, 0, 0.01};
Ellipse(2) = {4, 2, 3, 5};

//arc3
Point(7) = {0.026516504, 0.003314563, 0, 0.01};
Ellipse(3) = {5, 2, 6, 7};

//arc4
Point(8) = {0.0375, 0, 0, 0.01};
Ellipse(4) = {7, 2, 6, 8};

//arc5
Point(9) = {0.026516504, -0.003314563, 0, 0.01};
Ellipse(5) = {8, 2, 6, 9};

//arc6
Point(10) = {0, -0.0046875, 0, 0.01};
Ellipse(6) = {9, 2, 6, 10};

//arc7
Point(11) = {-0.026516504, -0.003314563, 0, 0.01};
Ellipse(7) = {10, 2, 3, 11};

//arc8
Ellipse(8) = {11, 2, 3, 1};

//circle
Point(12) = {-1.7677669, -1.7677669, 0, 0.01};
Point(13) = {-1.7677669, 1.7677669, 0, 0.01};
Point(14) = {1.7677669, 1.7677669, 0, 0.01};
Point(15) = {1.7677669, -1.7677669, 0, 0.01};

Circle(9) = {12, 2, 13};
Circle(10) = {13, 2, 14};
Circle(11) = {14, 2, 15};
Circle(12) = {15, 2, 12};

//blocking lines
Line(13) = {11, 12};
Line(14) = {4, 13};
Line(15) = {7, 14};
Line(16) = {9, 15};

//splitting lines
Transfinite Line {9} = 100 Using Progression 1;
Transfinite Line {10} = 100 Using Progression 1;
Transfinite Line {11} = 100 Using Progression 1;
Transfinite Line {12} = 100 Using Progression 1;
Transfinite Line {14} = 100 Using Progression 1;
Transfinite Line {15} = 100 Using Progression 1;
Transfinite Line {16} = 100 Using Progression 1;
Transfinite Line {13} = 100 Using Progression 1;
Transfinite Line {8} = 100 Using Progression 1;
Transfinite Line {1} = 100 Using Progression 1;
Transfinite Line {2} = 100 Using Progression 1;
Transfinite Line {3} = 100 Using Progression 1;
Transfinite Line {4} = 100 Using Progression 1;
Transfinite Line {5} = 100 Using Progression 1;
Transfinite Line {6} = 100 Using Progression 1;
Transfinite Line {7} = 100 Using Progression 1;
Line Loop(17) = {13, 9, -14, -1, -8};
Plane Surface(1) = {17};
Line Loop(19) = {15, -10, -14, 2, 3};
Plane Surface(2) = {19};
Line Loop(21) = {16, -11, -15, 4, 5};
Plane Surface(3) = {21};
Line Loop(23) = {13, -12, -16, 6, 7};
Plane Surface(4) = {23};
Transfinite Surface {1} = {4, 13, 12, 11};
Transfinite Surface {2} = {7, 14, 13, 4};
Transfinite Surface {3} = {9, 15, 14, 7};
Transfinite Surface {4} = {11, 12, 15, 9};

Recombine Surface {1};
Recombine Surface {2};
Recombine Surface {3};
Recombine Surface {4};

```