# Difficulty when using gmsh to create a structured mesh.

 Register Blogs Members List Search Today's Posts Mark Forums Read

 November 4, 2014, 08:06 Difficulty when using gmsh to create a structured mesh. #1 New Member   Al Prinn Join Date: Nov 2014 Posts: 1 Rep Power: 0 Hi! I am trying to create a structured 3D mesh from an annular duct, using gmsh. I begin by creating a 2D mesh. I would then like to extrude the mesh to create the 3D mesh, but it is at this stage that the problems occur... Below is my .geo: // element spacing Nz = 50; //136 innerh = Pi/2*0.13/10; outerh = Pi/2*0.424/10; // centre point Point(1) = { 0, 0, 0.4}; // inner circle points Point(2) = { 0.13, 0, 0.4, innerh}; Point(3) = { 0, 0.13, 0.4, innerh}; Point(4) = { -0.13, 0, 0.4, innerh}; Point(5) = { 0, -0.13, 0.4, innerh}; // outer circle points Point(6) = { 0.424, 0, 0.4, outerh}; Point(7) = { 0, 0.424, 0.4, outerh}; Point(8) = {-0.424, 0, 0.4, outerh}; Point(9) = { 0, -0.424, 0.4, outerh}; // lines Line(1) = {2, 6}; Line(2) = {8, 4}; Transfinite Line{1, 2} = (0.424-0.13)/0.01; // circle arcs Circle(3) = {2, 1, 4}; Circle(4) = {4, 1, 2}; Circle(5) = {6, 1, 8}; Circle(6) = {8, 1, 6}; // surfaces Line Loop(10) = {1, 5, 2, -3}; Plane Surface(10) = {10}; Transfinite Surface{10}; Recombine Surface {10}; Line Loop(11) = {1, -6, 2, 4}; Plane Surface(11) = {11}; Transfinite Surface{11}; Recombine Surface {11}; // extrusions // Extrude{0,0,-0.2}{Surface{10}; Layers{Nz*0.2}; Recombine;} Extrude{0,0,-0.2}{Surface{11}; Layers{Nz*0.2}; Recombine;} This gives me a strange dislocated geometry, but I am not sure why. If I comment the last line, and uncomment the second last, then the bottom half of the duct disappears.. Can anyone see my error? Cheers, Al

 Tags gmsh cylinder, structured hex mesh