[Gmsh] Mesh connection between 2 surfaces
Leonardo Roncetti
leonardo at techcon.eng.br
Fri Jul 24 22:44:16 CEST 2015
1) I have a pressure vessel with torispherical head and a nozzle. How can I
connect the mesh of the head with the nozzle? I need a separated mesh inside
the nozzle (cylinder) so I can remove it later and have a hole. See code
below!
2) How can I avoid the error: "The 1D mesh seems not to be forming a closed
loop" running the code below?
Regards,
Leonardo
lc = 0.3;
Di = 3.0;
H = 2.0;
Ri = Di/2;
Rc = 3.0;
Rp = 0.5;
Ra = Rc-Rp;
Ah = Ri-Rp;
teta = Pi/2-Acos(Ah/Ra);
beta = Pi/2-teta;
x3 = -Ri+Rp*(1-Cos(beta));
y3 = Rp*Sin(beta);
f = 2*Rc*(Sin(teta/2))^2;
y4 = y3+f;
y5 = Rc-y4;
x6 = -Ri+Rp;
Point(1) = {0,0,0,lc};
Point(2) = {-Ri,0,0,lc};
Point(3) = {x3,y3,0,lc};
Point(4) = {0,y4,0,lc};
Point(5) = {0,-y5,0,lc};
Point(6) = {x6,0,0,lc};
Point(7) = {-Ri,-H,0,lc};
Line(1) = {7,2};
Circle(2) = {2,6,3};
Circle(3) = {3,5,4};
Line Loop(4) = {1,2,3};
Plane Surface(5) = {4};
vol01[] = Extrude{{0,1,0},{0,0,0},Pi/2}{ Surface{5}; };
vol02[] = Extrude{{0,1,0},{0,0,0},Pi/2}{ Surface{vol01[0]}; };
vol03[] = Extrude{{0,1,0},{0,0,0},Pi/2}{ Surface{vol02[0]}; };
vol04[] = Extrude{{0,1,0},{0,0,0},Pi/2}{ Surface{vol03[0]}; };
//nozzle neck
D1 = 0.5;
R1 = D1/2;
Xins1 = -0.6;
Yins1 = 0.0;
Zins1 = 0.0;
Alt1 = 1.0;
Pins1 = newp; Point(Pins1) = {Xins1,Yins1,Zins1,lc};
Paux1 = newp; Point(Paux1) = {Xins1-R1,Yins1,Zins1,lc};
Paux2 = newp; Point(Paux2) = {Xins1-R1,Alt1,Zins1,lc};
L1 = newreg; Line(L1) = {Pins1,Paux1};
L1_2 = newreg; Line(L1_2) = {Paux1,Paux2};
Pl1 = newreg; Line Loop(Pl1) = {L1,L1_2};
S1 = newreg; Plane Surface(S1) = {Pl1};
C1[] = Extrude{{0,1,0},{Xins1,Yins1,Zins1},Pi/2}{ Line{L1_2}; };
C1_2[] = Extrude{{0,1,0},{Xins1,Yins1,Zins1},Pi/2}{ Line{C1[0]}; };
C1_3[] = Extrude{{0,1,0},{Xins1,Yins1,Zins1},Pi/2}{ Line{C1_2[0]}; };
C1_4[] = Extrude{{0,1,0},{Xins1,Yins1,Zins1},Pi/2}{ Line{C1_3[0]}; };
Scomp = newreg; Compound Surface(Scomp) = {20,36,52,68};