Hi Nicola,
you should install Gmsh and have a look at these files:
demos/pripyrtet.geo
demos/transfinite.geo
and the attached files
to see if Gmsh can help you.
Cheers,
Dave
--
David Colignon, Ph.D.
Collaborateur Logistique du F.R.S.-FNRS
CÉCI - Consortium des Équipements de Calcul Intensif
ACE - Applied & Computational Electromagnetics
Sart-Tilman B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
WWW: http://hpc.montefiore.ulg.ac.be/
Agenda: http://www.google.com/calendar/embed?src=david.colignon%40gmail.com
[email protected] wrote:
Dear GMSH group,
I'm Nicola Cavallini and I'm working CDF in collaboration with
Giovanna Guidoboni at the University of Houston.
I'm currently working with my own Navier Stokes 3D sover
and what I acually need in theese days is a thetraedral
mesh generator to get an axial symmetric mesh generator.
The geometry is pretty simple, it's a cylinder.
Do you think GMESH can help?
I really appreciate your help .
best
Nicola Cavallini
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh
// Cylinder //
//----------//
Mesh.Algorithm = 2;
N = 0.5;
bl = 0.025;
NBL = 10*N;
NBL_PROG = 1.1;
N_CYL = 100*N;
CYL_PROG = 0.99;
Delta_0 = 0.5*3.1415*(0.5+bl)*(CYL_PROG-1)/(CYL_PROG*(CYL_PROG^N_CYL-1));
Delta_N = Delta_0*CYL_PROG^N_CYL;
h_square = 0.75;
l_rectangle = 10.;
m_box = 0.02/N;
N_LARGEBOX = 11*N;
L_LARGEBOX = 100;
// CYLINDER //
Point(11) = { 0, 0,0,1};
Point(12) = { 0, 0.5,0,1};
Point(13) = { 0.5, 0,0,1};
Point(14) = { 0,-0.5,0,1};
Point(15) = {-0.5, 0,0,1};
Circle(21) = {12,11,13};
Circle(22) = {13,11,14};
Circle(23) = {14,11,15};
Circle(24) = {15,11,12};
// 15 , 24 //
// BOUNDARY LAYER //
Point(16) = { 0, 0.5+bl,0,Delta_0};
Point(17) = { 0.5+bl, 0,0,Delta_N};
Point(18) = { 0,-0.5-bl,0,Delta_0};
Point(19) = {-0.5-bl, 0,0,Delta_N};
Line(25) = {12,16};
Line(26) = {13,17};
Line(27) = {14,18};
Line(28) = {15,19};
Circle(29) = {16,11,17};
Circle(210)= {17,11,18};
Circle(211)= {18,11,19};
Circle(212)= {19,11,16};
Line Loop(213) = {-25,21,26,-29};
Line Loop(214) = {-26,22,27,-210};
Line Loop(215) = {-27,23,28,-211};
Line Loop(216) = {-28,24,25,-212};
Ruled Surface(31) = {213};
Ruled Surface(32) = {214};
Ruled Surface(33) = {215};
Ruled Surface(34) = {216};
Transfinite Line{29,-210,211,-212,21,-22,23,-24} = Floor(N_CYL) Using
Progression CYL_PROG;
Transfinite Line{25,26,27,28} = Floor(NBL) Using
Progression NBL_PROG;
Transfinite Surface{31} = {16,12,13,17};
Transfinite Surface{32} = {17,13,14,18};
Transfinite Surface{33} = {18,14,15,19};
Transfinite Surface{34} = {19,15,12,16};
Recombine Surface{31,32,33,34};
// 19 , 216 , 34 //
// SQUARE //
Point(111)={-h_square,-h_square,0,m_box*3};
Point(112)={-h_square, h_square,0,m_box*3};
Point(113)={ h_square, h_square,0,m_box};
Point(114)={ h_square,-h_square,0,m_box};
Line(217) = {111,112};
Line(218) = {112,113};
Line(219) = {113,114};
Line(220) = {114,111};
Line Loop(221) = {-217,-218,-219,-220};
Line Loop(222) = {-29,-210,-211,-212};
Plane Surface(35) = {221,222};
// 114 , 222 , 35 //
// RECTANGLE //
Point(115) = {h_square+l_rectangle,-h_square,0,m_box};
Point(116) = {h_square+l_rectangle, h_square,0,m_box};
Line(223) = {114,115};
Line(224) = {115,116};
Line(225) = {116,113};
Line Loop(226) = {223,224,225,219};
Ruled Surface(36) = {226};
Transfinite Line{224,219} = Floor(2*h_square/m_box) Using Progression 1;
Transfinite Line{223,225} = Floor(l_rectangle/m_box) Using Progression 1;
Transfinite Surface{36} = {114,115,116,113};
Recombine Surface{36};
// 116 , 226 , 36 //
// EXTERIOR //
Point(117) = {-L_LARGEBOX,-L_LARGEBOX,0,2*L_LARGEBOX/N_LARGEBOX};
Point(118) = { L_LARGEBOX,-L_LARGEBOX,0,2*L_LARGEBOX/N_LARGEBOX};
Point(119) = { L_LARGEBOX, L_LARGEBOX,0,2*L_LARGEBOX/N_LARGEBOX};
Point(120) = {-L_LARGEBOX, L_LARGEBOX,0,2*L_LARGEBOX/N_LARGEBOX};
Line(227) = {117,118};
Line(228) = {118,119};
Line(229) = {119,120};
Line(230) = {120,117};
Line(231) = {117,111};
Line(232) = {118,115};
Line(233) = {119,116};
Line(234) = {120,112};
Line Loop(235) = {-231,227,232,-223,220};
Line Loop(236) = {-232,228,233,-224};
Line Loop(237) = {-233,229,234,218,-225};
Line Loop(238) = {-234,230,231,217};
Plane Surface(37) = {235};
Plane Surface(38) = {236};
Plane Surface(39) = {237};
Plane Surface(310) = {238};
Recombine Surface{37,38,39,310};
// 120 , 238 , 310 //
// EXTRUSION //
out1[] = Extrude{0,0,0.1}{Surface{31}; Layers{4,1} ; Recombine;};
out2[] = Extrude{0,0,0.1}{Surface{32}; Layers{4,1} ; Recombine;};
out3[] = Extrude{0,0,0.1}{Surface{33}; Layers{4,1} ; Recombine;};
out4[] = Extrude{0,0,0.1}{Surface{34}; Layers{4,1} ; Recombine;};
out5[] = Extrude{0,0,0.1}{Surface{35}; Layers{4,1} ; Recombine;};
out6[] = Extrude{0,0,0.1}{Surface{36}; Layers{4,1} ; Recombine;};
out7[] = Extrude{0,0,0.1}{Surface{37}; Layers{4,1} ; Recombine;};
out8[] = Extrude{0,0,0.1}{Surface{38}; Layers{4,1} ; Recombine;};
out9[] = Extrude{0,0,0.1}{Surface{39}; Layers{4,1} ; Recombine;};
out10[] = Extrude{0,0,0.1}{Surface{310}; Layers{4,1} ; Recombine;};
Physical Volume(1) =
{out1[1],out2[1],out3[1],out4[1],out5[1],out6[1],out7[1],out8[1],out9[1],out10[1]};
Physical Surface(2) = {31,32,33,34,35,36,37,38,39,310}; // Z_DOWN //
Physical Surface(3) =
{out1[0],out2[0],out3[0],out4[0],out5[0],out6[0],out7[0],out8[0],out9[0],out10[0]};
// Z_UP //
Physical Surface(4) = {476}; // Y_DOWN //
Physical Surface(5) = {525}; // Y_UP //
Physical Surface(6) = {551}; // INLET //
Physical Surface(7) = {502}; // OUTLET //
Physical Surface(8) = {389,323,345,367}; // CYLINDER //
lc = 0.02;
r = 0.1;
d = 2*r;
h = 2*d;
assym = 0.1*d;
depth = 0.5;
l1 = 2*d;
l2 = 20*d;
n = 1;
nl1 = n*8;
nl2 = n*88;
nc = n*8;
nz = 16;
//nz = 1;
Point(1) = {0,0,0,lc};
Point(2) = {0,r,0,lc};
Point(3) = {r,0,0,lc};
Point(4) = {-r,0,0,lc};
Point(5) = {-l1,0,0,lc};
Point(6) = {l2,0,0,lc};
Point(7) = {-l1,h,0,lc};
Point(8) = {l2,h,0,lc};
Point(9) = {2*r,0.0,0,lc};
Point(10) = {-2*r,0.0,0,lc};
Point(11) = {0.0,0.2,0,lc};
Point(12) = {0.0,h,0,lc};
Point(13) = {r*Sin(Pi/4),r*Sin(Pi/4),0,lc};
Point(14) = {-r*Sin(Pi/4),r*Sin(Pi/4),0,lc};
Point(15) = {2*r*Sin(Pi/4),2*r*Sin(Pi/4),0,lc};
Point(16) = {-2*r*Sin(Pi/4),2*r*Sin(Pi/4),0,lc};
Point(17) = {l2,2*r*Sin(Pi/4),0,lc};
Point(18) = {-l1,2*r*Sin(Pi/4),0,lc};
Point(19) = {2*r*Sin(Pi/4),h,0,lc};
Point(20) = {-2*r*Sin(Pi/4),h,0,lc};
Circle(1) = {15,1,11};
Circle(2) = {13,1,2};
Circle(3) = {2,1,14};
Circle(4) = {11,1,16};
Circle(5) = {16,1,10};
Circle(6) = {14,1,4};
Circle(7) = {13,1,3};
Circle(8) = {15,1,9};
Line(9) = {9,3};
Line(10) = {15,13};
Line(11) = {11,2};
Line(12) = {16,14};
Line(13) = {10,4};
Line(14) = {12,11};
Line(15) = {19,15};
Line(16) = {12,19};
Line(17) = {19,8};
Line(18) = {8,17};
Line(19) = {17,15};
Line(20) = {6,9};
Line(21) = {6,17};
Line(22) = {16,20};
Line(23) = {20,12};
Line(24) = {10,5};
Line(25) = {5,18};
Line(26) = {18,16};
Line(27) = {7,18};
Line(28) = {20,7};
Line Loop(29) = {17,18,19,-15};
Plane Surface(30) = {29};
Line Loop(31) = {21,19,8,-20};
Plane Surface(32) = {31};
Line Loop(33) = {10,7,-9,-8};
Plane Surface(34) = {33};
Line Loop(35) = {1,11,-2,-10};
Plane Surface(36) = {35};
Line Loop(37) = {16,15,1,-14};
Plane Surface(38) = {37};
Line Loop(39) = {4,22,23,14};
Plane Surface(40) = {39};
Line Loop(41) = {11,3,-12,-4};
Plane Surface(42) = {41};
Line Loop(43) = {6,-13,-5,12};
Plane Surface(44) = {43};
Line Loop(45) = {26,5,24,25};
Plane Surface(46) = {45};
Line Loop(47) = {28,27,26,22};
Plane Surface(48) = {47};
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{32}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{34}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{36}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{42}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{44}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{46}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{48}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{40}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{38}; }
}
Symmetry { 0.0,1.0,0.0,0.0 } {
Duplicata { Surface{30}; }
}
Translate {0.0,assym,0.0} {
Point{7};
}
Translate {0.0,assym,0.0} {
Point{20};
}
Translate {0.0,assym,0.0} {
Point{12};
}
Translate {0.0,assym,0.0} {
Point{19};
}
Translate {0.0,assym,0.0} {
Point{8};
}
Transfinite Line {28,26,24,70,75} = nl1+1 Using Progression 1.0;
Transfinite Line {17} = nl2+1 Using Progression 1.0/0.99;
Transfinite Line {19} = nl2+1 Using Progression 0.99;
Transfinite Line {20} = nl2+1 Using Progression 0.99;
Transfinite Line {51} = nl2+1 Using Progression 0.99;
Transfinite Line {88} = nl2+1 Using Progression 1.0/0.99;
Transfinite Line {18,21,8,15,14,22,27,25,5,6,7,4,3,13,12,11,10,2,9,1,16,23} =
nc+1 Using Progression 1.0;
Transfinite Line {50,89,52,86,55,54,59,57,85,83,58,62,64,82,63,78,68,73,76,66}
= nc+1 Using Progression 1.0;
Transfinite Line {15,14,18,27} = nc+1 Using Progression 1.0;
Transfinite Line {76,78,86,89} = nc+1 Using Progression 1.0;
Transfinite Surface {30} = {17,8,19,15};
Transfinite Surface {32} = {17,15,9,6};
Transfinite Surface {34} = {15,13,3,9};
Transfinite Surface {36} = {13,15,11,2};
Transfinite Surface {38} = {11,15,19,12};
Transfinite Surface {40} = {11,12,20,16};
Transfinite Surface {42} = {2,11,16,14};
Transfinite Surface {44} = {4,14,16,10};
Transfinite Surface {46} = {10,16,18,5};
Transfinite Surface {48} = {18,16,20,7};
Transfinite Surface {49} = {6,22,26,9};
Transfinite Surface {53} = {3,9,26,28};
Transfinite Surface {56} = {28,26,31,35};
Transfinite Surface {60} = {42,35,31,46};
Transfinite Surface {65} = {10,4,42,46};
Transfinite Surface {69} = {5,10,46,47};
Transfinite Surface {74} = {47,46,48,49};
Transfinite Surface {79} = {46,31,60,48};
Transfinite Surface {84} = {31,26,62,60};
Transfinite Surface {87} = {22,64,62,26};
allsurf[] = {30,32,34,36,38,40,42,44,46,48,
49,53,56,60,65,69,74,79,84,87};
// Recombine Surface{allsurf[]};
Extrude {0,0,depth} {
// Surface{allsurf[]}; Layers{nz}; Recombine;
Surface{allsurf[]}; Layers{nz};
}
// Walls
Physical Surface(600) =
{98,186,216,296,516,494,480,450,146,344,370,388,406,252,234,172};
// Inlet
Physical Surface(601) = {300,286,440,454};
// Outlet
Physical Surface(602) = {102,120,318,520};
//Physical Volume(603) = {9000};
lc = .5;
Point(1) = {2.0,0.0,0.0,lc};
Point(2) = {2.0,1,0.0,lc};
Point(3) = {1,0,0.0,lc};
Point(4) = {3,0,0.0,lc};
Point(5) = {2,-1,0.0,lc};
Circle(1) = {4,1,2};
Circle(2) = {2,1,3};
Circle(3) = {3,1,5};
Circle(4) = {5,1,4};
Line Loop(5) = {4,1,2,3};
Plane Surface(6) = {5};
Extrude Surface{6, {0.0,1,0}, {0,0.0,0.0}, 3.14159/2}
{
Layers {{5,10,5}, {.1,.9,1.}} ;
} ;
Coherence;
Extrude Surface {6, {0,0.0,2}} ;
Extrude Surface {45, {0,2,0.0}}
{
Layers {{2,2,2}, {.3,.6,1.}};
} ;
Coherence;
Extrude Surface {65, {-1,0,0}};
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh