[Gmsh] Meshing two volumes inside one another

Shawn Nipun shawn.3531 at gmail.com
Tue Jan 13 12:18:06 CET 2015


Hello Sir,
         I am suffering a little bit problem. I am trying mesh an structure
using the following code. Here, there is an small volume which is indicated
by volume 2 inside another volume indicated by  volume 1. The plane
surfaces 34 and 36 of volume 2 are coincide with the the plane surfaces of
47 and 49 of volume 1. Problem is when I am doing the 3d mesh, it can be
seen that only the surfaces of volume 1 are meshing, not the whole volume.

// Gmsh project created on Mon Jan 12 14:22:18 2015
nm = 1e-06;
e1 = 4.5 * nm; e2 = 6 * nm / 2; e3 =  5 * nm / 2;
l1 = 20 * nm;
h1 = 4 * nm; h2 = 22 * nm; h3 = 14 * nm; h4 = 20 * nm; h5 = 4 * nm;
R1 = 10 * nm; R2 = 2 * nm; R3 = 8 * nm;
Lc1 = 0.000001;
Lc2 = 0.0000005;
Lc3 = 0.000001;


// Si substarte
Point(1) = {-e1-e2, 0    , 0, Lc1};
Point(2) = {e1+e2, 0  , 0, Lc1};
Point(3)= { e1+e2,  -l1  , 0, Lc1};
Point(4)= {-e1-e2, -l1 , 0, Lc1};
Point(5) = {-e1-e2, 0    , h1, Lc1};
Point(6) = {e1+e2, 0  , h1, Lc1};
Point(7)= { e1+e2,  -l1  , h1, Lc1};
Point(8)= {-e1-e2, -l1 , h1, Lc1};

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

// SiO2 layer
Point(9) = {-e1-e2, 0  , h1+h2  , Lc1};
Point(10) = {e1+e2, 0   , h1+h2  , Lc1};
Point(11) = {e1+e2, -l1  , h1+h2  , Lc1};
Point(12) = {-e1-e2, -l1   , h1+h2  , Lc1};
Line(13) = {5, 9};
Line(14) = {9, 10};
Line(15) = {10, 6};
Line(16) = {10, 11};
Line(17) = {11, 12};
Line(18) = {12, 9};
Line(19) = {7, 11};
Line(20) = {8, 12};

// Cu layer
Point(13)= {-e3, 0 , h1+h3, Lc2};
Point(14)= {e3, 0 , h1+h3, Lc2};
Point(15)= {-e3,  -l1, h1+h3, Lc2};
Point(16)= {e3, -l1 , h1+h3, Lc2};
Point(17)= {-e3, 0 , h1+h4, Lc2};
Point(18)= {e3, 0 , h1+h4, Lc2};
Point(19)= {-e3,  -l1, h1+h4, Lc2};
Point(20)= {e3, -l1 , h1+h4, Lc2};
Line(21) = {13, 14};
Line(22) = {14, 18};
Line(23) = {18, 17};
Line(24) = {17, 13};
Line(25) = {14, 16};
Line(26) = {16, 15};
Line(27) = {15, 13};
Line(28) = {18, 20};
Line(29) = {20, 19};
Line(30) = {19, 17};
Line(31) = {16, 20};
Line(32) = {15, 19};

Line Loop(33) = {23, 24, 21, 22};
Plane Surface(34) = {33};
Line Loop(35) = {29, -32, -26, 31};
Plane Surface(36) = {35};
Line Loop(37) = {22, 28, -31, -25};
Plane Surface(38) = {37};
Line Loop(39) = {24, -27, 32, 30};
Plane Surface(40) = {39};
Line Loop(41) = {21, 25, 26, 27};
Plane Surface(42) = {41};
Line Loop(43) = {23, -30, -29, -28};
Plane Surface(44) = {43};
Surface Loop(45) = {44, 34, 40, 42, 38, 36};
Volume(2) = {45};

//SiO2 volume define
Line Loop(46) = {14, 15, -6, 13};
Plane Surface(47) = {46,33};
Line Loop(48) = {17, -20, -9, 19};
Plane Surface(49) = {48,35};
Line Loop(50) = {15, 8, 19, -16};
Plane Surface(51) = {50};
Line Loop(52) = {13, -18, -20, 10};
Plane Surface(53) = {52};
Line Loop(54) = {14, 16, 17, 18};
Plane Surface(55) = {54};
Line Loop(56) = {6, 8, 9, 10};
Plane Surface(57) = {56};
Surface Loop(46) = {47, 49, 51, 53, 55, 57,34,36};
Volume(1) = {46};

// Vacuum define

Extrude {0, 0, .00001} {
  Surface{55};
}
Physical Volume(300) = {3};
Physical Volume(200) = {2};
Physical Volume(100) = {1};
Physical Surface(1) = {43};
Physical Surface(2) = {87};
Physical Surface(3) = {34, 36, 38, 40, 42, 44};

Thanks and regards
Shawn


-- 
Shawn Shakahwat Millat
Master of Science in Nanoelectronics System
Faculty of Electrical and Computer Engineering
Dresden University of Technology
Schnorrstarße 38, Room no: 0502
01069, Dresden
Germany.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150113/0e7df2b6/attachment.html>