Hi,

I'm a researcher at the University of Bergamo (Italy). Me and my team are dealing with a FEM simulation involving bottles. We are trying to create a 3D mesh of a simple bottle obtained by rotating a section. I'm attachingĀ  the example and the geo file.

The main difficulties we faced with is the insertion of almost two layers in the thickness. In the attachments we are trying to use two layers but we should add some more.

Could someone give us some advice to realize a correct mesh?

SetFactory("OpenCASCADE");
R = 35;
r = 15;
h1 = 180;
h2 = 200;
totalTck = 4;
layers = 2;  // Layers in the thickness
Rfil = 10;
rfil = 5;
rfilneck = 5;

tck = totalTck / layers;

Point(1) = {0,0,0};
Point(2) = {R-Rfil,0,0};
Point(3) = {R-Rfil, Rfil, 0};
Point(4) = {R, Rfil, 0};
Point(5) = {R,h1-rfil,0};
Point(6) = {R-rfil,h1-rfil,0};
Point(7) = {R-rfil,h1,0};
Point(8) = {r+rfilneck,h1,0};
Point(9) = {r+rfilneck,h1+rfilneck,0};
Point(10) = {r,h1+rfilneck,0};
Point(11) = {r,h2,0};

Point(12) = {r-tck,h2,0};
Point(13) = {r-tck,h1+rfilneck,0};
Point(14) = {r+rfilneck,h1-tck,0};
Point(15) = {R-rfil,h1-tck,0};
Point(16) = {R-tck,h1-rfil,0};
Point(17) = {R-tck, Rfil, 0};
Point(18) = {R-Rfil,tck,0};
Point(19) = {0,tck,0};

Point(20) = {r-2*tck,h2,0};
Point(21) = {r-2*tck,h1+rfilneck,0};
Point(22) = {r+rfilneck,h1-2*tck,0};
Point(23) = {R-rfil,h1-2*tck,0};
Point(24) = {R-2*tck,h1-rfil,0};
Point(25) = {R-2*tck, Rfil, 0};
Point(26) = {R-Rfil,2*tck,0};
Point(27) = {0,2*tck,0};

Line(1) = {1, 2};
Circle(2) = {2, 3, 4};
Line(3) = {4, 5};
Circle(4) = {5, 6, 7};
Line(5) = {7, 8};
Circle(6) = {8, 9, 10};
Line(7) = {10, 11};

Line(8) = {11, 12};
Line(9) = {12, 13};
Circle(10) = {13, 9, 14};
Line(11) = {14, 15};
Circle(12) = {15, 6, 16};
Line(13) = {16, 17};
Circle(14) = {17, 3, 18};
Line(15) = {18, 19};
Line(16) = {19, 1};

Line(17) = {12, 20};
Line(18) = {20, 21};
Circle(19) = {21, 9, 22};
Line(20) = {22, 23};
Circle(21) = {23, 6, 24};
Line(22) = {24, 25};
Circle(23) = {25, 3, 26};
Line(24) = {26, 27};
Line(25) = {27, 19};

Line Loop(1) = {15, 16, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14};
Plane Surface(1) = {1};
Line Loop(2) = {24, 25, -15, -14, -13, -12, -11, -10, -9, 17, 18, 19, 20, 21, 
22, 23};
Plane Surface(2) = {2};
//+
Extrude {{0, 1, 0}, {0, 0, 0}, Pi} {
  Surface{2}; Surface{1}; Layers{30}; Recombine;
}
Extrude {{0, 1, 0}, {0, 0, 0}, -Pi} {
  Surface{1}; Surface{2}; Layers{30}; Recombine;
}

BooleanUnion{ Volume{3}; Delete; }{ Volume{2}; Delete; }
BooleanUnion{ Volume{4}; Delete; }{ Volume{1}; Delete; }

Transfinite Line {139, 9,  189, 190, 132, 140} = 5 Using Progression 1;
Transfinite Line {185, 10, 143, 186, 129, 144} = 7 Using Progression 1;
Transfinite Line {147, 11, 181, 182, 126, 148} = 5 Using Progression 1;
Transfinite Line {151, 12, 177, 178, 123, 152} = 9 Using Progression 1;
Transfinite Line {155, 13, 173, 174, 120, 156} = 23 Using Progression 1;
Transfinite Line {159, 14, 169, 160, 117, 170} = 11 Using Progression 1;
Transfinite Line {162, 15, 166, 163, 115, 167} = 11 Using Progression 1;

Transfinite Surface {68, 70, 72, 74, 76, 78, 71, 73, 75, 77, 79, 81,
                     67, 65, 63, 61, 59, 57, 64, 62, 60, 58, 56, 54,  
                     94, 92, 90, 88, 86, 84, 97, 95, 93, 91, 89, 87};
Recombine Surface {68, 70, 72, 74, 76, 78, 71, 73, 75, 77, 79, 81,
                   67, 65, 63, 61, 59, 57, 55, 64, 62, 60, 58, 86, 56, 54, 5,  
                   94, 92, 90, 88, 86, 84, 97, 95, 93, 91, 89, 87};

Physical Surface("Top") = {69, 66, 96, 99};
Physical Surface("External") = {68, 70, 72, 74, 76, 78, 71, 73, 75, 77, 79, 81};
Physical Surface("Internal") = {94, 92, 90, 88, 86, 84, 83, 97, 95, 93, 91, 89, 
87, 85};
Physical Surface("Bottom") = {80, 82};
Physical Volume("Bottle") = {5,6};
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to