[Gmsh] Different domains in a geometry

Mikhail Artemyev artemiev.mikhail at gmail.com
Mon Dec 2 15:49:48 CET 2013


Hi,

I'm not sure that I understood what you wanted, but take a look at the 
following code. Maybe it's what you wanted.

lc = 1;
ld = 20;

Dt=1;
Db=2;
R1=10;
R2=R1+Dt;
R3=R1+Dt+Db;
XY=25;
Z=50;
Zt=20;
Zba=Zt+2*Dt;
Zb=Zt+2*Dt+Db;


Point(1) = {0.0,0.0,0.0,lc};
Point(2) = {R2,0.0,0.0,lc};
Point(3) = {R3,0,0.0,lc};
Point(4) = {XY,0,0.0,ld};

Point(5) = {0.0,(-Dt),0.0,lc};
Point(6) = {R1,(-Dt),0.0,lc};

Point(7) = {0.0,-(Zt+Dt),0.0,lc};
Point(8) = {R1,-(Zt+Dt),0.0,lc};

Point(9) = {0.0,-Zba,0.0,lc};
Point(10) = {R2,-Zba,0.0,lc};

Point(11) = {0.0,-Zb,0.0,lc};
Point(12) = {R3,-Zb,0.0,lc};

Point(13) = {0.0,-Z,0.0,ld};
Point(14) = {XY,-Z,0.0,ld};


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


Line(11) = {3,12};
Line(12) = {12,11};


Line(13) = {2,10};
Line(14) = {10,9};


Line(15) = {5,6};
Line(16) = {6,8};
Line(17) = {8,7};


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

Physical Surface(101) = { 19 };
Physical Surface(102) = { 21 };
Physical Surface(103) = { 23 };
Physical Surface(104) = { 25 };


Best regards,
Mikhail