in Gmsh
only planes that have four corner points could be meshed with structured meshes using Trasnfinite
option. In your file, the plane is constituted from six points and Gmsh
can't mesh it structured. In such cases, you should partition the problem geometry into distinct rectangles (planes with four corner points) so the Trasnfinite
option could be applied to them. In the following code, the geometry is modeled using three rectangles:
lc = 0.3;
//Points
Point(1) = {0, 1, 0, lc};
Point(2) = {0, 2, 0, lc};
Point(3) = {7, 2, 0, lc};
Point(4) = {7, 0, 0, lc};
Point(5) = {1, 1, 0, lc};
Point(6) = {1, 0, 0, lc};
Point(7) = {1, 2, 0, lc};
Point(8) = {7, 1, 0, lc};
//Lines
Line(1) = {1,5};
Line(2) = {5,6};
Line(3) = {6,4};
Line(4) = {4,8};
Line(5) = {8,3};
Line(6) = {3,7};
Line(7) = {7,2};
Line(8) = {2,1};
Line(9) = {5,7};
Line(10) = {5,8};
//Curves
Curve Loop(1) = {3,4,-10,2};
Plane Surface(1) = {1};
Curve Loop(2) = {10,5,6,-9};
Plane Surface(2) = {2};
Curve Loop(3) = {1,9,7,8};
Plane Surface(3) = {3};
//
n1 = 4;
n2 = 4;
n3 = n1*5-1;
Transfinite Curve {1,7} = n1;
Transfinite Curve {2,4,5,8,9} = n2;
Transfinite Curve {3,6,10} = n3;
Transfinite Surface {1,2,3};
here are the resulting structured triangular and rectangular (using Recombine 2D
option) meshes:
Gmsh
the optionTransfinite
works only for planes with four corner points, here your plane has six corners soGmsh
throws an error. $\endgroup$