[Gmsh] Dissimilar behaviour between extrusions from plane surface, andplane surface with hole cut. Help!

Mark Starnes mark.starnes at fttech.co.uk
Thu Apr 2 19:33:49 CEST 2009

```Hi everyone.

First, thanks for this great package!  I've been using gmsh for about
three years now, and consider it my first port of call, for mesh
generation.

I've two short scripts, illustrating my question.  The first generates
two adjacent surfaces with a circle between them, and extrudes the
surfaces.  Generating the mesh, shows it to generate a volume, with the
elements connected between the two.

The second generates a circular, plane surface, then cuts a hole from
it.  The inner and outer surfaces are extruded.  Generating the mesh
results in the original surfaces meeting as before, but rotating the
mesh and examining the underside, shows the extruded volumes do not
meet.

Am I doing something wrong?  I'd like the second case to generate
elements that meet up.  I'm using v2.3.1 on Linux.

Thanks again for this useful tool.

BR,

Mark.

---------------------------------------------

r = 1;
p = 1;

Point(1) = {0, 0, 0, p};  // centre
Point(2) = {-r, 0, 0, p};  // inner left
Point(3) = {0, r, 0, p};  // inner top

Point(4) = {-2*r, 0, 0, p};  // outer left
Point(5) = {0, 2*r, 0, p};  // outer top

Circle(1) = {2, 1, 3};
Line(2) = {1, 2};
Line(3) = {1, 3};

Circle(4) = {4, 1, 5};
Line(5) = {2, 4};
Line(6) = {3, 5};

// inner
Line Loop(4) = {1, -3, 2};
Plane Surface(5) = {4};

// outer
Line Loop(6) = {4, -6, -1, 5};
Plane Surface(7) = {6};

vol1[] = Extrude {0, 0, -0.25} {
Surface{5};
Layers{1};
Recombine;};

vol2[] = Extrude {0, 0, -0.25} {
Surface{vol1[0]};
Layers{1};
Recombine;};

vol3[] = Extrude {0, 0, -0.25} {
Surface{7};
Layers{1};
Recombine;};

vol4[] = Extrude {0, 0, -0.25} {
Surface{vol3[0]};
Layers{1};
Recombine;};

------------------------------------------------------------

r = 1;
p = 1;

Point(1) = {0, 0, 0, p};  // centre
Point(2) = {-r, 0, 0, p};  // inner left
Point(3) = {0, r, 0, p};  // inner top
Point(4) = {r, 0, 0, p};  // inner top
Point(5) = {0, -r, 0, p};  // inner top

Point(6) = {-2*r, 0, 0, p};  // outer left
Point(7) = {0, 2*r, 0, p};  // outer top
Point(8) = {2*r, 0, 0, p};  // inner top
Point(9) = {0, -2*r, 0, p};  // inner top

Circle(1) = {2, 1, 3};
Circle(2) = {3, 1, 4};
Circle(3) = {4, 1, 5};
Circle(4) = {5, 1, 2};

Circle(5) = {6, 1, 7};
Circle(6) = {7, 1, 8};
Circle(7) = {8, 1, 9};
Circle(8) = {9, 1, 6};

Line Loop(9) = {5, 6, 7, 8};
Line Loop(10) = {1, 2, 3, 4};
Plane Surface(11) = {9, 10};
Plane Surface(12) = {10};

vol1[] = Extrude {0, 0, -0.25} {
Surface{11};
Layers{1};
Recombine;};

vol2[] = Extrude {0, 0, -0.25} {
Surface{vol1[0]};
Layers{1};
Recombine;};

vol3[] = Extrude {0, 0, -0.25} {
Surface{12};
Layers{1};
Recombine;};

vol4[] = Extrude {0, 0, -0.25} {
Surface{vol3[0]};
Layers{1};
Recombine;};

// difference between top and bottom mesh

-------------------------------------

FT Technologies Limited is registered in England and Wales under registered number 01603909. Its registered office is at Church Lane, Teddington, Middlesex, TW11 8PA.
The information in this message is confidential and is intended only for the use of the intended recipient(s). If you are not an intended recipient, you should not disclose, use or copy this information. Please contact the sender immediately if you have received this message in error.

```

More information about the gmsh mailing list