<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Dr. Ir. Ruth V. Sabariego</div><div>University of Liege, Electrical Engineering & Computer Science, </div><div>Applied & Computational Electromagnetics (ACE),</div><div>phone: +32-4-3663737 - fax: +32-4-3662910 - <a href="http://ace.montefiore.ulg.ac.be/">http://ace.montefiore.ulg.ac.be/</a></div><br class="Apple-interchange-newline"><br></div></div>
</div>
<br><div><div>On 02 Nov 2011, at 13:35, Margarita Satraki wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<br><br>I'm trying to mesh a hemisphere using only hexahedral and I followed the logic behind the code given here:<br><a href="http://geuz.org/pipermail/gmsh/2005/001609.html">http://geuz.org/pipermail/gmsh/2005/001609.html</a><br>
<br>I'm probably doing something wrong with the Transfinite function and I get errors such as:<br>"Cannot tetrahedralize volume with quadrangles on boundary"<br>But what I want is the software to hexahedralize. Can you spot the problem with the code?<br>
<br>Many thanks!<br><br>Margarita<br><br>////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////<br><br>l = 1;<br>r1 = 0.5;<br>r2 = 1;<br>n = 10;<br>r3=1.224744871391589;<br>
<br>// interior cube<br>Point(1) = {0,0,0,l};<br>Point(2) = {r1,r1,-r1,l};<br>Point(3) = {-r1,r1,-r1,l};<br>Point(4) = {-r1,-r1,-r1,l};<br>Point(5) = {r1,-r1,-r1,l};<br>Line(1) = {2,3};<br>Line(2) = {3,4};<br>Line(3) = {4,5};<br>
Line(4) = {5,2};<br>Transfinite Line{1:4} = n;<br>Line Loop(5) = {4,1,2,3};<br>Plane Surface(6) = {5};<br>Transfinite Surface{6} = {2,3,4,5};<br>Recombine Surface{6};<br>Extrude Surface {6, {0.0,0.0,r1}};<br><br>// force transfinite grid in interior cube<br>
Transfinite Line {3,22,11,13,8,4,14,9,1,18,10,2} = n;<br>Transfinite Surface {6} = {4,5,2,3};<br>Transfinite Surface {15} = {5,6,7,2};<br>Transfinite Surface {19} = {11,7,2,3};<br>Transfinite Surface {23} = {4,15,11,3};<br>
Transfinite Surface {27} = {15,6,5,4};<br>Transfinite Surface {28} = {15,6,7,11};<br>Recombine Surface{6,15,19,23,27,28};<br>Transfinite Volume{1} = {4,5,2,3,15,6,7,11};<br><br>// exterior shell<br>Point(102) = {r2,-r2,-r2,l};<br>
Point(103) = {-r2,-r2,-r2,l};<br>Point(104) = {-r3,-r3,-0,l};<br>Point(105) = {r3,-r3,-0,l};<br>Circle(29) = {103,1,102};<br>Circle(30) = {102,1,105};<br>Circle(31) = {105,1,104};<br>Circle(32) = {104,1,103};<br>Line Loop(33) = {29,30,31,32};<br>
Ruled Surface(45) = {33};<br>Rotate { {0,0,1},{0,0,0}, Pi/2 } { Duplicata{ Surface{45}; } }<br>Rotate { {0,0,1},{0,0,0}, Pi } { Duplicata{ Surface{45}; } }<br>Rotate { {0,0,1},{0,0,0}, 3*Pi/2 } { Duplicata{ Surface{45}; } }<br>
<br><br><br>Line Loop(58) = {51, 55, 29, 47};<br>Ruled Surface(59) = {58};<br>Line(60) = {11, 121};<br>Line(61) = {116, 3};<br>Line(62) = {15, 104};<br>Line(63) = {103, 4};<br>Line(64) = {6, 105};<br>Line(65) = {102, 5};<br>
Line(66) = {7, 113};<br>Line(67) = {108, 2};<br>Line Loop(68) = {61, 18, 60, -52};<br>Plane Surface(69) = {68};<br>Line Loop(70) = {67, 14, 66, -48};<br>Plane Surface(71) = {70};<br>Line Loop(72) = {65, 13, 64, -30};<br>Plane Surface(73) = {72};<br>
Line Loop(74) = {22, 62, 32, 63};<br>Plane Surface(75) = {74};<br>Line Loop(76) = {10, 62, 57, -60};<br>Plane Surface(77) = {76};<br>Line Loop(78) = {9, 60, 53, -66};<br>Plane Surface(79) = {78};<br>Line Loop(80) = {8, 66, 49, -64};<br>
Plane Surface(81) = {80};<br>Line Loop(82) = {4, -67, -47, 65};<br>Plane Surface(83) = {82};<br>Line Loop(84) = {29, 65, -3, -63};<br>Plane Surface(85) = {84};<br>Line Loop(86) = {2, -63, -55, 61};<br>Plane Surface(87) = {86};<br>
Line Loop(88) = {51, 61, -1, -67};<br>Plane Surface(89) = {88};<br>Line Loop(91) = {11, 64, 31, -62};<br>Plane Surface(92) = {91};<br><br>Transfinite Line {49,31,32,53,8,9,10,11,47,51,57,29,55,30,48,52,32,65,64,63,62,60,61,66,67} = n;<br>
Transfinite Surface {77} = {15,11,121,104};<br>Transfinite Surface {75} = {103,4,15,104};<br>Transfinite Surface {69} = {3,11,121,116};<br>//Transfinite Surface {23} = {};<br>Transfinite Surface {87} = {103,116,4,3};<br>Transfinite Surface {54} = {103,116,121,104};<br>
Recombine Surface{77,75,69,23,87,54};<br>Surface Loop(99) = {77, 54, 75, 69, 23, 87};<br>Volume(100) = {99};<br><br>Transfinite Surface {79} = {11,7,113,121};<br>//Transfinite Surface {69} = {3,11,121,116};<br>Transfinite Surface {71} = {2,108,113,7};<br>
Transfinite Surface {50} = {116,108,113,121};<br>//Transfinite Surface {19} = {11,7,2,3};<br>Transfinite Surface {89} = {2,3,116,108};<br>Recombine Surface{79,69,71,50,19,89};<br>Surface Loop(93) = {50, 79, 89, 19, 71, 69};<br>
Volume(94) = {93};<br><br>Transfinite Surface {81} = {7,6,105,113};<br>//Transfinite Surface {71} = {2,108,113,7};<br>Transfinite Surface {73} = {5,6,105,102};<br>Transfinite Surface {83} = {2,5,102,108};<br>Transfinite Surface {46} = {102,105,113,108};<br>
//Transfinite Surface {15} = {};<br>Recombine Surface{81,71,73,83,46,15};<br>Surface Loop(95) = {81, 46, 71, 73, 15, 83};<br>Volume(96) = {95};<br><br>Transfinite Surface {92} = {6,15,105,104};<br>//Transfinite Surface {27} = {};<br>
Transfinite Surface {45} = {105,104,103,102};<br>//Transfinite Surface {73} = {};<br>//Transfinite Surface {75} = {};<br>Transfinite Surface {85} = {4,5,102,103};<br>Recombine Surface{92,27,45,73,75,85};<br>Surface Loop(97) = {92, 45, 73, 75, 85, 27};<br>
Volume(98) = {97};<br><br>//Transfinite Surface {89} = {};<br>//Transfinite Surface {87} = {};<br>//Transfinite Surface {83} = {};<br>//Transfinite Surface {6} = {};<br>Transfinite Surface {59} = {102,108,116,103};<br>//Transfinite Surface {85} = {};<br>
Recombine Surface{89,87,83,6,59,85};<br>Surface Loop(101) = {59, 85, 83, 89, 87, 6};<br>Volume(102) = {101};<br><br>Transfinite Volume{100} = {15,11,3,4,121,104,103,116};<br>Transfinite Volume{94} = {2,3,11,7,113,121,116,108};<br>
Transfinite Volume{96} = {2,5,6,7,102,105,108,113};<br>Transfinite Volume{98} = {4,5,6,15,102,103,104,105};<br>Transfinite Volume{102} = {2,3,4,5,102,108,103,116};<br>Physical Volume(1) = {1, 94:102:2};<br>Mesh 3;<br>
_______________________________________________<br>gmsh mailing list<br><a href="mailto:gmsh@geuz.org">gmsh@geuz.org</a><br>http://www.geuz.org/mailman/listinfo/gmsh<br></blockquote></div><br></body></html>