[Gmsh] Gmesh

gabriela at cbpf.br gabriela at cbpf.br
Tue Jan 31 20:22:47 CET 2012


Hi,

I want to mesh a simple geometry, with a cilindrical hole in a box.  
But i have some errors about the definition of the volumes, because i  
have an error repeated 3 times.
The text description file is attached.
The error is:

" Error : Cannot tetrahedralize volume with quadrangles on boundary."


Please, can you help me?


Best regards,

Gabriela.

___________________________________________________________
Webmail CBPF - Fingerprint
3D:69:4A:68:B9:D3:AF:9A:4F:8B:BC:1E:DA:58:EE:8B:3A:61:63:DC

-------------- next part --------------

cm=1;
x=0; y=0; z=0; 
d=0.0250*cm;                  
lc=0.003;                 
r_up=0.0075*cm;
r_down=0.0075*cm;
th_d=0.0050*cm;
th_c=0.0005*cm;


p1 = newp; Point(p1) = {x, y, z-th_d/2, lc};
p2 = newp; Point(p2) = {x, y, z+th_d/2, lc};
p35 = newp; Point(p35) = {x, y, z-th_c-th_d/2, lc};
p36 = newp; Point(p36) = {x, y, z+th_c+th_d/2, lc}; 


p3 = newp; Point(p3) = {x+d/2, y+d/2, z-th_d/2, lc};
p4 = newp; Point(p4) = {x+d/2, y-d/2, z-th_d/2, lc};
p5 = newp; Point(p5) = {x-d/2, y-d/2, z-th_d/2, lc};
p6 = newp; Point(p6) = {x-d/2, y+d/2, z-th_d/2, lc};

l1 = newl; Line(l1) = {p3, p4};        
l2 = newl; Line(l2) = {p4, p5};
l3 = newl; Line(l3) = {p5, p6};
l4 = newl; Line(l4) = {p3, p6};


p7 = newp; Point(p7) = {x+d/2, y+d/2, z-th_c-th_d/2, lc};
p8 = newp; Point(p8) = {x+d/2, y-d/2, z-th_c-th_d/2, lc};
p9 = newp; Point(p9) = {x-d/2, y-d/2, z-th_c-th_d/2, lc};
p10 = newp; Point(p10) = {x-d/2, y+d/2, z-th_c-th_d/2, lc};            

l5 = newl; Line(l5) = {p7, p8};        
l6 = newl; Line(l6) = {p8, p9};
l7 = newl; Line(l7) = {p9, p10};
l8 = newl; Line(l8) = {p7, p10};

p11 = newp; Point(p11) = {x+d/2, y+d/2, z+th_d/2, lc};
p12 = newp; Point(p12) = {x+d/2, y-d/2, z+th_d/2, lc};
p13 = newp; Point(p13) = {x-d/2, y-d/2, z+th_d/2, lc};
p14 = newp; Point(p14) = {x-d/2, y+d/2, z+th_d/2, lc};

l9 = newl; Line(l9) = {p11, p12};
l10 = newl; Line(l10) = {p12, p13};
l11 = newl; Line(l11) = {p13, p14};
l12 = newl; Line(l12) = {p11, p14};


p15 = newp; Point(p15) = {x+d/2, y+d/2, z+th_c+th_d/2, lc};
p16 = newp; Point(p16) = {x+d/2, y-d/2, z+th_c+th_d/2, lc};
p17 = newp; Point(p17) = {x-d/2, y-d/2, z+th_c+th_d/2, lc};
p18 = newp; Point(p18) = {x-d/2, y+d/2, z+th_c+th_d/2, lc};

l13 = newl; Line(l13) = {p15, p16};
l14 = newl; Line(l14) = {p16, p17};
l15 = newl; Line(l15) = {p17, p18};
l16 = newl; Line(l16) = {p15, p18};

p19 = newp; Point(p19) = {x, r_down, z-th_d/2, lc};
p20 = newp; Point(p20) = {-r_down, y, z-th_d/2, lc};
p21 = newp; Point(p21) = {x, -r_down, z-th_d/2, lc};
p22 = newp; Point(p22) = {r_down, y, z-th_d/2, lc};

c1 = newreg; Circle(c1) = {p19,p1,p20};
c2 = newreg; Circle(c2) = {p20,p1,p21};
c3 = newreg; Circle(c3) = {p21,p1,p22};
c4 = newreg; Circle(c4) = {p19,p1,p22};


p23 = newp; Point(p23) = {x, r_down, z-th_c-th_d/2, lc};
p24 = newp; Point(p24) = {-r_down, y, z-th_c-th_d/2, lc};
p25 = newp; Point(p25) = {x, -r_down, z-th_c-th_d/2, lc};
p26 = newp; Point(p26) = {r_down, y, z-th_c-th_d/2, lc};

c5 = newreg; Circle(c5) = {p23,p35,p24};
c6 = newreg; Circle(c6) = {p24,p35,p25};
c7 = newreg; Circle(c7) = {p25,p35,p26};
c8 = newreg; Circle(c8) = {p23,p35,p26};


p27 = newp; Point(p27) = {x, r_up, z+th_d/2, lc};
p28 = newp; Point(p28) = {-r_up, y, z+th_d/2, lc};
p29 = newp; Point(p29) = {x, -r_up, z+th_d/2, lc};
p30 = newp; Point(p30) = {r_up, y, z+th_d/2, lc};

c9 = newreg; Circle(c9) = {p27,p2,p28};
c10 = newreg; Circle(c10) = {p28,p2,p29};
c11 = newreg; Circle(c11) = {p29,p2,p30};
c12 = newreg; Circle(c12) = {p27,p2,p30};


p31 = newp; Point(p31) = {x, r_up, z+th_c+th_d/2, lc};
p32 = newp; Point(p32) = {-r_up, y, z+th_c+th_d/2, lc};
p33 = newp; Point(p33) = {x, -r_up, z+th_c+th_d/2, lc};
p34 = newp; Point(p34) = {r_up, y, z+th_c+th_d/2, lc};

c13 = newreg; Circle(c13) = {p31,p36,p32};
c14 = newreg; Circle(c14) = {p32,p36,p33};
c15 = newreg; Circle(c15) = {p33,p36,p34};
c16 = newreg; Circle(c16) = {p31,p36,p34};


l17 = newl; Line(l17) = {p3, p7};
l18 = newl; Line(l18) = {p4, p8};
l19 = newl; Line(l19) = {p5, p9};
l20 = newl; Line(l20) = {p6, p10};

l21 = newl; Line(l21) = {p19, p23};
l22 = newl; Line(l22) = {p20, p24};
l23 = newl; Line(l23) = {p21, p25};
l24 = newl; Line(l24) = {p22, p26}; 

l25 = newl; Line(l25) = {p11, p15};
l26 = newl; Line(l26) = {p12, p16};
l27 = newl; Line(l27) = {p13, p17};
l28 = newl; Line(l28) = {p14, p18}; 

l25 = newl; Line(l25) = {p27, p31};
l26 = newl; Line(l26) = {p28, p32};
l27 = newl; Line(l27) = {p29, p33};
l28 = newl; Line(l28) = {p30, p34}; 

l29 = newl; Line(l29) = {p3, p11}; 
l30 = newl; Line(l30) = {p4, p12};
l31 = newl; Line(l31) = {p5, p13};
l32 = newl; Line(l32) = {p6, p14};


l33 = newl; Line(l33) = {p19, p27}; 
l34 = newl; Line(l34) = {p20, p28};
l35 = newl; Line(l35) = {p21, p29};
l36 = newl; Line(l36) = {p22, p30};


l_loop1 = newll; Line Loop(l_loop1) = {c1, c2, c3,-c4};           
l_loop2 = newll; Line Loop(l_loop2) = {l1, l2, l3,-l4};
s2 = news; Plane Surface(s2) = {l_loop1,l_loop2};    

l_loop3 = newll; Line Loop(l_loop3) = {c5, c6, c7,-c8};
l_loop4 = newll; Line Loop(l_loop4) = {l5, l6, l7,-l8};
s4 = news; Plane Surface(s4) = {l_loop3,l_loop4};


l_loop5 = newll; Line Loop(l_loop5) = {c9, c10, c11, -c12};
l_loop6 = newll; Line Loop(l_loop6) = {l9, l10, l11,-l12};
s6 = news; Plane Surface(s6) = {l_loop5,l_loop6};

l_loop7 = newll; Line Loop(l_loop7) = {c13, c14, c15,-c16};
l_loop8 = newll; Line Loop(l_loop8) = {l13, l14, l15,-l16};
s8 = news; Plane Surface(s8) = {l_loop7,l_loop8};


l_loop9 = newll; Line Loop(l_loop9) = {-18, -55, 26, 54};
s9 = news; Ruled Surface(s9) = {l_loop9};

l_loop10 = newll; Line Loop(l_loop10) = {-19, -56, 27, 55};
s10 = news; Ruled Surface(s10) = {l_loop10};


l_loop11 = newll; Line Loop(l_loop11) = {-20, 53, 28, -56};
s11 = news; Ruled Surface(s11) = {l_loop11};

l_loop12 = newll; Line Loop(l_loop12) = {-17, -54, 25, 53};
s12 = news; Ruled Surface(s12) = {l_loop12};    


l_loop13 = newll; Line Loop(l_loop13) = {1, 50, -9, -49};
s13 = news; Plane Surface(s13) = {l_loop13};

l_loop14 = newll; Line Loop(l_loop14) = {2, 51, -10 ,-50};
s14 = news; Plane Surface(s14) = {l_loop14};

l_loop15 = newll; Line Loop(l_loop15) = {3, 52, -11, -51};
s15 = news; Plane Surface(s15) = {l_loop15};

l_loop16 = newll; Line Loop(l_loop16) = {-4, 49, 12, -52};
s16 = news; Plane Surface(s16) = {l_loop16};   
                       


l_loop17 = newll; Line Loop(l_loop17) = {21, -38, -17, 37};
s17 = news; Ruled Surface(s17) = {l_loop17};

l_loop18 = newll; Line Loop(l_loop18) = {22, -39, -18, 38};
s18 = news; Ruled Surface(s18) = {l_loop18};

l_loop19 = newll; Line Loop(l_loop19) = {23, -40, -19, 39};
s19 = news; Ruled Surface(s19) = {l_loop19};

l_loop20 = newll; Line Loop(l_loop20) = {-24, -37, 20, 40};
s20 = news; Ruled Surface(s20) = {l_loop20};                          


l_loop21 = newll; Line Loop(l_loop21) = {5, -34, -1, 33};
s21 = news; Plane Surface(s21) = {l_loop21};

l_loop22 = newll; Line Loop(l_loop22) = {6, -35, -2, 34};
s22 = news; Plane Surface(s22) = {l_loop22};

l_loop23 = newll; Line Loop(l_loop23) = {7, -36, -3, 35};
s23 = news; Plane Surface(s23) = {l_loop23};

l_loop24 = newll; Line Loop(l_loop24) = {-8, -33, 4, 36};
s24 = news; Plane Surface(s24) = {l_loop24};                          



l_loop25 = newll; Line Loop(l_loop25) = {25, 46, -29, -45};
s25 = news; Ruled Surface(s25) = {l_loop25};

l_loop26 = newll; Line Loop(l_loop26) = {26, 47, -30, -46};
s26 = news; Ruled Surface(s26) = {l_loop26};

l_loop27 = newll; Line Loop(l_loop27) = {27, 48, -31, -47};
s27 = news; Ruled Surface(s27) = {l_loop27};

l_loop28 = newll; Line Loop(l_loop28) = {-28, 45, 32, -48};
s28 = news; Ruled Surface(s28) = {l_loop28};                          


l_loop29 = newll; Line Loop(l_loop29) = {9, 42, -13, -41};
s29 = news; Plane Surface(s29) = {l_loop29};

l_loop30 = newll; Line Loop(l_loop30) = {10, 43, -14, -42};
s30 = news; Plane Surface(s30) = {l_loop30};

l_loop31 = newll; Line Loop(l_loop31) = {11, 44, -15, -43};
s31 = news; Plane Surface(s31) = {l_loop31};

l_loop32 = newll; Line Loop(l_loop32) = {-12, 41, 16, -44};
s32 = news; Plane Surface(s32) = {l_loop32};          


s_loop1 = newsl; Surface Loop(s_loop1) = {s2, s6, s9, s10, s11, s12, s13, s14, s15, s16};
v1 = newv; Volume(v1) = {s_loop1};

//s_loop2 = newsl; Surface Loop(s_loop2) = {s1, -s5, s9, s10, s11, s12};  
//v2 = newv; Volume(v2) = {s_loop2};

s_loop3 = newsl; Surface Loop(s_loop3) = {s2, s4, s17, s18, s19, s20, s21, s22, s23, s24};
v3 = newv; Volume(v3) = {s_loop3};

//s_loop4 = newsl; Surface Loop(s_loop4) = {s1, s3, s17, s18, s19, s20};
//v4 = newv; Volume(v4) = {s_loop4};

s_loop5 = newsl; Surface Loop(s_loop5) = {s6, s8, s25, s26, s27, s28, s29, s30, s31, s32};
v5 = newv; Volume(v5) = {s_loop5};

//s_loop6 = newsl; Surface Loop(s_loop6) = {s5, s7, s25, s26, s27, s28};
//v6 = newv; Volume(v6) = {s_loop6};


Transfinite Line {49, 50, 51, 52, 53, 54, 55, 56} = 10;
Transfinite Surface {s9, s10, s11, s12, s17, s18, s19, s20, s25, s26, s27, s28};
Recombine Surface "*";
Transfinite Volume {v1,v3,v5};

p_surf1 = newreg; Physical Surface(p_surf1) = {s2, s6, s9, s10, s11, s12, s13, s14, s15, s16};
p_surf2 = newreg; Physical Surface(p_surf2) = {s2, s4, s17, s18, s19, s20, s21, s22, s23, s24};
p_surf3 = newreg; Physical Surface(p_surf3) = {s6, s8, s25, s26, s27, s28, s29, s30, s31, s32};


p_vol1 = newreg; Physical Volume(p_vol1) = {v1};
p_vol2 = newreg; Physical Volume(p_vol2) = {v3};
p_vol3 = newreg; Physical Volume(p_vol3) = {v5};