Skip to content
Snippets Groups Projects
Commit b865bc38 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

*** empty log message ***

parent c62553c0
No related branches found
No related tags found
No related merge requests found
//gasdis.geo
//
//gas distribution ring
//parameters
mm=1e-3;
lc1=0.25*mm;
bigrad=100*mm;
bigang=Pi/9;
tuberad=4*mm;
holerad=1*mm;
seglength=3*mm;
Point(1) = {0.0,0.0,0.0,lc1};
Point(2) = {tuberad,0.0,0.0,lc1};
Point(3) = {-tuberad,0.0,0.0,lc1};
Point(4) = {0,tuberad,0.0,lc1};
Point(5) = {0,-tuberad,0.0,lc1};
Rotate { {0,1,0},{0.0,0.0,0.0},Pi/6 } {Duplicata { Point{3}; }}
Rotate { {0,1,0},{0.0,0.0,0.0},-Pi/6 } {Duplicata { Point{3}; }}
Rotate { {0,0,1},{0.0,0.0,0.0},Pi/6 } {Duplicata { Point{3}; }}
Rotate { {0,0,1},{0.0,0.0,0.0},-Pi/6 } {Duplicata { Point{3}; }}
Point(10)={-tuberad*Cos(Pi/6), 0, 0, lc1};
Circle(1) = {9,10,6};
Circle(2) = {6,10,8};
Circle(3) = {8,10,7};
Circle(4) = {7,10,9};
Point(12) = {tuberad,0.0,seglength,lc1};
Point(13) = {-tuberad,0.0,seglength,lc1};
Point(14) = {0,tuberad,seglength,lc1};
Point(15) = {0,-tuberad,seglength,lc1};
Point(16) = {0,0,seglength,lc1};
Point(17) = {tuberad,0.0,-seglength,lc1};
Point(18) = {-tuberad,0.0,-seglength,lc1};
Point(19) = {0,tuberad,-seglength,lc1};
Point(20) = {0,-tuberad,-seglength,lc1};
Point(21) = {0,0,-seglength,lc1};
Circle(6) = {13,16,14};
Circle(7) = {14,16,12};
Circle(8) = {12,16,15};
Circle(9) = {15,16,13};
Circle(10) = {18,21,19};
Circle(11) = {19,21,17};
Circle(12) = {17,21,20};
Circle(13) = {20,21,18};
Circle(14) = {9,1,4};
Circle(15) = {4,1,2};
Circle(16) = {2,1,5};
Circle(17) = {5,1,8};
Point(22)={0,tuberad,-tuberad*Sin(Pi/6), lc1};
Point(23)={0,-tuberad,-tuberad*Sin(Pi/6), lc1};
Point(24)={tuberad,0,-tuberad*Sin(Pi/6), lc1};
Point(25)={0,0,-tuberad*Sin(Pi/6), lc1};
Point(26)={0,tuberad,tuberad*Sin(Pi/6), lc1};
Point(27)={0,-tuberad,tuberad*Sin(Pi/6), lc1};
Point(28)={tuberad,0,tuberad*Sin(Pi/6), lc1};
Point(29)={0,0,tuberad*Sin(Pi/6), lc1};
Point(30)={-bigrad,tuberad,0, lc1};
Point(31)={-bigrad,-tuberad,0, lc1};
Point(32)={-bigrad,0,0, lc1};
Ellipse(18) = {6,29,26,26};
Ellipse(19) = {7,25,22,22};
Ellipse(20) = {6,29,27,27};
Ellipse(21) = {7,25,23,23};
Circle(22) = {26,29,28};
Circle(23) = {28,29,27};
Circle(24) = {22,25,24};
Circle(25) = {24,25,23};
Line(26) = {22,4};
Line(27) = {4,26};
Line(28) = {24,2};
Line(29) = {2,28};
Line(30) = {23,5};
Line(31) = {5,27};
Line(32) = {19,22};
Line(33) = {20,23};
Line(34) = {27,15};
Line(35) = {28,12};
Line(36) = {26,14};
Line(37) = {18,7};
Line(38) = {17,24};
Line(39) = {6,13};
Line Loop(40) = {17,-2,20,-31}; Ruled Surface(41) = {40};
Line Loop(42) = {3,21,30,17}; Ruled Surface(43) = {42};
Line Loop(44) = {37,21,-33,13}; Ruled Surface(45) = {44};
Line Loop(46) = {19,-32,-10,37}; Ruled Surface(47) = {46};
Line Loop(48) = {19,26,-14,-4}; Ruled Surface(49) = {48};
Line Loop(50) = {14,27,-18,-1}; Ruled Surface(51) = {50};
Line Loop(52) = {30,-16,-28,25}; Ruled Surface(53) = {52};
Line Loop(54) = {31,-23,-29,16}; Ruled Surface(55) = {54};
Line Loop(56) = {28,-15,-26,24}; Ruled Surface(57) = {56};
Line Loop(58) = {32,24,-38,-11}; Ruled Surface(59) = {58};
Line Loop(60) = {25,-33,-12,38}; Ruled Surface(61) = {60};
Line Loop(62) = {27,22,-29,-15}; Ruled Surface(63) = {62};
Line Loop(64) = {39,-9,-34,-20}; Ruled Surface(65) = {64};
Line Loop(66) = {18,36,-6,-39}; Ruled Surface(67) = {66};
Line Loop(68) = {36,7,-35,-22}; Ruled Surface(69) = {68};
Line Loop(70) = {8,-34,-23,35}; Ruled Surface(71) = {70};
Rotate { {0.0,1.0,0.0},{-bigrad,0.0,0.0},bigang } {Duplicata { Surface{41,43, 45,47,49,51,53,55,57, 59,61,63, 65, 67,69, 71}; }}
Rotate { {0.0,1.0,0.0},{-bigrad,0.0,0.0},2*bigang } {Duplicata { Surface{41,43,45,47,49,51,53,55,57, 59,61,63, 65, 67,69, 71}; }}
Rotate { {0.0,1.0,0.0},{-bigrad,0.0,0.0},3*bigang } {Duplicata { Surface{41,43,45,47,49,51,53,55,57, 59,61,63, 65, 67,69, 71}; }}
Rotate { {0.0,1.0,0.0},{-bigrad,0.0,0.0},4*bigang } {Duplicata { Surface{41,43,45,47,49,51,53,55,57, 59,61,63, 65, 67,69, 71}; }}
Rotate { {0.0,1.0,0.0},{-bigrad,0.0,0.0},5*bigang } {Duplicata { Surface{41,43,45,47,49,51,53,55,57, 59,61,63, 65, 67,69, 71}; }}
Rotate { {0.0,1.0,0.0},{-bigrad,0.0,0.0},6*bigang } {Duplicata { Surface{41,43,45,47,49,51,53,55,57, 59,61,63, 65, 67,69, 71}; }}Circle(534) = {1620,31,1168};
Circle(535) = {1615,32,1157};
Circle(536) = {1658,32,1299};
Circle(537) = {1640,30,1183};
Circle(538) = {1349,31,897};
Circle(539) = {1344,32,886};
Circle(540) = {1369,30,912};
Circle(541) = {1387,32,1028};
Circle(542) = {1073,32,615};
Circle(543) = {1116,32,757};
Circle(544) = {1078,31,626};
Circle(545) = {1098,30,641};
Circle(546) = {802,32,344};
Circle(547) = {807,31,355};
Circle(548) = {827,30,370};
Circle(549) = {845,32,486};
Circle(550) = {531,32,73};
Circle(551) = {215,32,574};
Circle(552) = {99,30,556};
Circle(553) = {536,31,84};
Circle(554) = {260,32,18};
Circle(555) = {17,32,303};
Circle(556) = {20,31,265};
Circle(557) = {285,30,19};
Line Loop(558) = {534,433,-536,533};
Ruled Surface(559) = {558};
Line Loop(560) = {536,429,-537,529};
Ruled Surface(561) = {560};
Line Loop(562) = {534,394,-535,519};
Ruled Surface(563) = {562};
Line Loop(564) = {535,-398,-537,525};
Ruled Surface(565) = {564};
Line Loop(566) = {442,538,317,-539};
Ruled Surface(567) = {566};
Line Loop(568) = {539,-321,-540,448};
Ruled Surface(569) = {568};
Line Loop(570) = {540,-352,-541,-452};
Ruled Surface(571) = {570};
Line Loop(572) = {541,-356,-538,-456};
Ruled Surface(573) = {572};
Line Loop(574) = {542,-244,-545,371};
Ruled Surface(575) = {574};
Line Loop(576) = {545,-275,-543,-375};
Ruled Surface(577) = {576};
Line Loop(578) = {542,-240,-544,-365};
Ruled Surface(579) = {578};
Line Loop(580) = {544,279,-543,379};
Ruled Surface(581) = {580};
Ruled Surface(582) = {576};
Line Loop(583) = {546,-163,-547,-288};
Ruled Surface(584) = {583};
Line Loop(585) = {202,-549,302,547};
Ruled Surface(586) = {585};
Line Loop(587) = {549,198,-548,298};
Ruled Surface(588) = {587};
Line Loop(589) = {167,-546,-294,548};
Ruled Surface(590) = {589};
Line Loop(591) = {217,550,-90,552};
Ruled Surface(592) = {591};
Line Loop(593) = {550,-86,-553,-211};
Ruled Surface(594) = {593};
Line Loop(595) = {225,553,125,551};
Ruled Surface(596) = {595};
Line Loop(597) = {221,-551,121,552};
Ruled Surface(598) = {597};
Line Loop(599) = {554,-13,556,-134};
Ruled Surface(600) = {599};
Line Loop(601) = {556,-148,-555,12};
Ruled Surface(602) = {601};
Line Loop(603) = {10,-557,140,554};
Ruled Surface(604) = {603};
Line Loop(605) = {557,11,555,-144};
Ruled Surface(606) = {605};
Line Loop(607) = {7,8,9,6};
Plane Surface(608) = {607};
Physical Surface(609) = {67,608,69,63,608,51,65,71,55,41,49,57,59,53,43,47,604,45,61,606,602,600,137,142,127,97,132,147,112,92,92,72,107,117,87,77,102,598,122,82,592,594,596,214,219,224,209,174,204,184,149,154,179,189,169,159,199,586,194,164,590,584,588,286,301,296,291,226,261,281,251,256,231,246,266,276,236,241,271,582,582,582,581,575,579,582,378,363,368,373,338,303,328,358,333,343,323,308,313,318,348,353,573,571,567,569,450,567,445,440,455,435,405,415,380,420,400,410,385,425,395,390,430,561,559,563,565,522,517,527,532,512,457,482,492,497,462,477,487,502,472,467,507};
Line Loop(610) = {4,1,2,3};
Plane Surface(611) = {610};
Line Loop(612) = {101,96,-78,74};
Plane Surface(613) = {612};
Line Loop(614) = {178,173,-155,151};
Plane Surface(615) = {614};
Line Loop(616) = {255,250,-232,228};
Plane Surface(617) = {616};
Line Loop(618) = {327,-309,305,332};
Plane Surface(619) = {618};
Line Loop(620) = {404,-386,382,409};
Plane Surface(621) = {620};
Line Loop(622) = {481,-463,459,486};
Plane Surface(623) = {622};
Line Loop(624) = {506,475,-471,510};
Plane Surface(625) = {624};
Physical Surface(626) = {611,613,615,617,619,621,623};
Physical Surface(627)={625};
Surface Loop(628) = {571,569,567,-440,-445,-405,-400,395,425,-420,-410,385,621,-380,-415,455,573,353,-333,308,619,-323,318,348,-343,358,-328,-368,373,582,575,-579,-236,241,-246,-266,-256,231,617,-251,281,296,-291,-590,164,-169,-189,-179,154,615,-174,204,219,-214,592,-594,-82,87,-92,-112,-102,77,613,-97,127,142,-137,604,47,-49,-57,-53,43,-611,-51,63,69,-67,-608,71,-65,-41,-55,-45,61,602,-600,-132,147,-107,-72,606,59,122,-596,224,-209,-149,-184,-598,117,-159,199,-586,-588,194,301,-286,-584,-226,-261,276,-581,378,-363,-303,-338,271,-313,450,435,-390,430,-559,563,565,-561,527,-522,-482,-477,472,502,-497,-487,462,623,-457,-517,532,-492,512,-467,507,-625};
Volume(629) = {628};
//Mesh.Algorithm = 1;
//Mesh.CharacteristicLengthFactor = 1;
Geometry.AutoCoherence = 1;
u = 1e-3;
FEM = 0; /* 0->Hybrid model, 1->FEM model */
a=u* 1000;
b=u* 1;
c=u* 400;
d=u* 150;
R=u* 30; // radius conductors
ym = u* -250; // vertical offset of circular ring
M =u* 1000*Sqrt(0.5); // circular ring inner boundary
m =u* 1500*Sqrt(0.5); // circular ring outerr boundary
eh1 =u* 0.5;
ev1 =u* 0.5*2;
eh2 =u* 1.5;
ev2 =u* 1.5*2;
eh3 =u* 4.5;
ev3 =u* 4.5*2;
p =u* 2;
pe1 =u* 2;
pe2 =u* 5;
pe3 =u* 10;
p =u* 2;
pe1 =u* 2;
pe2 =u* 5;
pe3 =u* 10;
pu=u*6*3.6;
pM1=4*pu;//4 /* For refining FEM mesh */
pM2=4*pu;
pc=pu/3;
b1=0;
b2=-b/4;
b3=-b/2;
b4=-3*b/4;
b5=-b;
Point(1) = {-a/2,b1+ym,0,p};
Point(2) = {-a/2,b2+ym,0,p};
Point(3) = { a/2,b1+ym,0,p};
Point(4) = { a/2,b2+ym,0,p};
Point(5) = {-a/2,b3+ym,0,p};
Point(6) = { a/2,b3+ym,0,p};
Point(7) = {-a/2,b4+ym,0,p};
Point(8) = { a/2,b4+ym,0,p};
Point(9) = {-a/2,b5+ym,0,p};
Point(10) = { a/2,b5+ym,0,p};
Line(701) = {2,4};
Line(703) = {4,3};
Line(704) = {3,1};
Line(705) = {1,2};
Line(901) = {2,5};
Line(902) = {5,6};
Line(903) = {6,4};
Line(913) = {5,7};
Line(914) = {7,8};
Line(915) = {6,8};
Line(916) = {8,10};
Line(917) = {10,9};
Line(918) = {9,7};
Line Loop(714) = {705,701,703,704};
Plane Surface(715) = {714};
Line Loop(904) = {-903,-902,-901,701};
Plane Surface(905) = {904};
Line Loop(919) = {914,-915,-902,913};
Plane Surface(920) = {919};
Line Loop(921) = {914,916,917,918};
Plane Surface(922) = {921};
Fpc = 100;
If (FEM)
Fpc = 1;
EndIf
Point(11) = {-c/2+R/2,-b-d+ym+R/2,0,pc*Fpc};
Point(12) = {-c/2+R/2,-b-d+ym-R/2,0,pc*Fpc};
Point(13) = {-c/2-R/2,-b-d+ym+R/2,0,pc*Fpc};
Point(14) = {-c/2-R/2,-b-d+ym-R/2,0,pc*Fpc};
Point(21) = {R/2,-b-d+ym+R/2,0,pc*Fpc};
Point(22) = {R/2,-b-d+ym-R/2,0,pc*Fpc};
Point(23) = {-R/2,-b-d+ym+R/2,0,pc*Fpc};
Point(24) = {-R/2,-b-d+ym-R/2,0,pc*Fpc};
Point(31) = {c/2+R/2,-b-d+ym+R/2,0,pc*Fpc};
Point(32) = {c/2+R/2,-b-d+ym-R/2,0,pc*Fpc};
Point(33) = {c/2-R/2,-b-d+ym+R/2,0,pc*Fpc};
Point(34) = {c/2-R/2,-b-d+ym-R/2,0,pc*Fpc};
Line(1) = {12,11};
Line(2) = {11,13};
Line(3) = {13,14};
Line(4) = {14,12};
Line(5) = {22,21};
Line(6) = {21,23};
Line(7) = {23,24};
Line(8) = {24,22};
Line(9) = {32,31};
Line(10) = {31,33};
Line(11) = {33,34};
Line(12) = {34,32};
Line Loop(906) = {1,2,3,4};
Plane Surface(907) = {906};
Line Loop(908) = {5,6,7,8};
Plane Surface(909) = {908};
Line Loop(910) = {9,10,11,12};
Plane Surface(911) = {910};
Point(501) = {-a/2-eh1,b1+ym+ev1,0,pe1};
Point(502) = {-a/2-eh1,b5+ym-ev1,0,pe1};
Point(503) = {0,b1+ym+ev1,0,pe1};
Point(504) = {0,b5+ym-ev1,0,pe1};
Point(505) = {a/2+eh1,b1+ym+ev1,0,pe1};
Point(506) = {a/2+eh1,b5+ym-ev1,0,pe1};
Point(507) = {-a/2-eh1,ym+(b1+b5)/2,0,pe1/1};
Point(508) = {a/2+eh1,ym+(b1+b5)/2,0,pe1/1};
Line(100003) = {502,507};
Line(100004) = {501,503};
Line(100005) = {503,505};
Line(100006) = {505,508};
Line(100007) = {506,504};
Line(100008) = {504,502};
Line(100009) = {507,501};
Line(100010) = {508,506};
Point(601) = {-a/2-eh2,b1+ym+ev2,0,pe2};
Point(602) = {-a/2-eh2,b5+ym-ev2,0,pe2};
Point(603) = {0,b1+ym+ev2,0,pe2};
Point(604) = {0,b5+ym-ev2,0,pe2};
Point(605) = {a/2+eh2,b1+ym+ev2,0,pe2};
Point(606) = {a/2+eh2,b5+ym-ev2,0,pe2};
Point(607) = {-a/2-eh2,ym+(b1+b5)/2,0,pe2/1};
Point(608) = {a/2+eh2,ym+(b1+b5)/2,0,pe2/1};
Line(200003) = {602,607};
Line(200004) = {601,603};
Line(200005) = {603,605};
Line(200006) = {605,608};
Line(200007) = {606,604};
Line(200008) = {604,602};
Line(200009) = {607,601};
Line(200010) = {608,606};
Point(701) = {-a/2-eh3,b1+ym+ev3,0,pe3};
Point(702) = {-a/2-eh3,b5+ym-ev3,0,pe3};
Point(703) = {0,b1+ym+ev3,0,pe3};
Point(704) = {0,b5+ym-ev3,0,pe3};
Point(705) = {a/2+eh3,b1+ym+ev3,0,pe3};
Point(706) = {a/2+eh3,b5+ym-ev3,0,pe3};
Point(707) = {-a/2-eh3,ym+(b1+b5)/2,0,pe3/1};
Point(708) = {a/2+eh3,ym+(b1+b5)/2,0,pe3/1};
Line(300003) = {702,707};
Line(300004) = {701,703};
Line(300005) = {703,705};
Line(300006) = {705,708};
Line(300007) = {706,704};
Line(300008) = {704,702};
Line(300009) = {707,701};
Line(300010) = {708,706};
Line Loop(100009) = {100004,100005,100006,100007,100008,100003,100009,100010};
Line Loop(100010) = {703,704,705,901,913,-918,-917,-916,-915,903};
Plane Surface(100011) = {100009,100010};
Line Loop(200009) = {200004,200005,200006,200007,200008,200003,200009,200010};
Line Loop(300009) = {300004,300005,300006,300007,300008,300003,300009,300010};
Plane Surface(200011) = {200009,100009};
Plane Surface(300011) = {300009,200009};
AirLayer1 = 1000;
Physical Surface(AirLayer1) = {100011}; // AirLayer1
SkinAirLayer1 = 1500 ;
Physical Line(SkinAirLayer1) = {100004,100003,100008,100007,100006,100005,100009,100010}; // SkinAirLayer1
AirLayer2 = 2000 ;
Physical Surface(AirLayer2) = {200011}; // AirLayer2
SkinAirLayer2 = 2500 ;
Physical Line(SkinAirLayer2) = {200004,200003,200008,200007,200006,200005,200009,200010}; // SkinAirLayer2
AirLayer3 = 3000 ;
Physical Surface(AirLayer3) = {300011}; // AirLayer3
SkinAirLayer3 = 3500 ;
Physical Line(SkinAirLayer3) = {300004,300003,300008,300007,300006,300005,300009,300010}; // SkinAirLayer3
ym2 = u* 0;
If (FEM)
Point(0) = {0,-ym2,0,p};
Point(100) = {M,M-ym2,0,pM1};
Point(101) = {-M,-M-ym2,0,pM1};
Point(102) = {-M,M-ym2,0,pM1};
Point(103) = {M,-M-ym2,0,pM1};
Point(200) = {m,m-ym2,0,pM2};
Point(201) = {-m,-m-ym2,0,pM2};
Point(202) = {-m,m-ym2,0,pM2};
Point(203) = {m,-m-ym2,0,pM2};
Circle(25) = {103,0,100};
Circle(26) = {100,0,102};
Circle(27) = {102,0,101};
Circle(28) = {101,0,103};
Circle(35) = {203,0,200};
Circle(36) = {200,0,202};
Circle(37) = {202,0,201};
Circle(38) = {201,0,203};
Line Loop(307) = {37,38,35,36};
Line Loop(720) = {27,28,25,26};
Line Loop(923) = {913,-918,-917,-916,-915,903,703,704,705,901};
EndIf
Physical Surface(100) = {907}; // left conductor
Physical Surface(150) = {909}; // middle conductor
Physical Surface(200) = {911}; // right conductor
//Recombine Surface {715,905,920,922};
Plate = 300 ;
Physical Surface(Plate) = {715,905,920,922}; // plate
Physical Line(700) = {-1,-2,-3,-4}; // SkinLeft
Physical Line(750) = {-5,-6,-7,-8}; // SkinMid
Physical Line(800) = {-9,-10,-11,-12}; // SkinRight
SkinPlate = 900 ;
Physical Line(SkinPlate) = {-704,-705,-901,918,917,916,915,-903,-703,-913}; // SkinPlate
If (FEM)
Plane Surface(722) = {307,720};
Plane Surface(924) = {720,300009,906,908,910}; // air
Physical Surface(400) = {924}; // air
RingIn = 500 ;
RingOut = 600 ;
Physical Surface(RingIn) = {722}; // ring
Physical Line(RingOut) = {35,36,37,38}; // outer boundary
EndIf
//Post Processing
xt1=0.8;
xt2=0.6;
yt1=ym+0.5;
yt2=ym+1.0;
Point(10001) = {xt1,yt1,0,p};
Point(10002) = {-xt1,yt1,0,p};
Point(10003) = {xt2,yt2,0,p};
Point(10004) = {-xt2,yt2,0,p};
Line(100001) = {10001,10002};
Line(100002) = {10003,10004};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment