[Gmsh] Strange mesh in a curved square

Sabrina Zacarias szacarias at ikp.tu-darmstadt.de
Tue Feb 25 17:18:38 CET 2020


Dear experts,

I am doing a very simple test to see the mesh of a surface, but the output is not right (see attachment). I would be grateful if someone can point out what I’m missing. This is the code:

 //Electrode
 16  lc_el=1;
 17  x0=0;
 18  y0=0;
 19  z0=0;
 20  w=50;
 21 
 22  //inner radius
 23 
 24  pel_1_1 = newp; Point(pel_1_1) =  {x0,y0,z0,lc_el}; //center
 25  pel_2_1 = newp; Point(pel_2_1) =  {Rel_in,y0,z0,lc_el};
 26  pel_3_1 = newp; Point(pel_3_1) =  {x0,Rel_in,z0,lc_el};
 27 
 28  //circular boundary 1
 29 
 30 cel_1_i = newc; Circle(cel_1_i) = {pel_2_1,pel_1_1,pel_3_1};
 31 //same +width
 32 pel_1_2 = newp; Point(pel_1_2) =  {x0,y0,z0+w,lc_el}; //center
 33 pel_2_2 = newp; Point(pel_2_2) =  {Rel_in,y0,z0+w,lc_el};
 34 pel_3_2 = newp; Point(pel_3_2) =  {x0,Rel_in,z0+w,lc_el};
 35 
 36 //circular boundary 2
 37 
 38 cel_2_i = newc; Circle(cel_2_i) = {pel_3_2,pel_1_2,pel_2_2};
 39 
 40 //lines connecting circles 1 & 2 (translated in z===width)
 41 
 42 l_low_i = newl; Line(l_low_i) = {pel_2_2,pel_2_1};
 43 l_low_ii = newl; Line(l_low_ii) = {pel_3_1,pel_3_2};
 44 
 45 //surface loop 
 46 
 47 ll_low_i = newreg; Line Loop(ll_low_i) = {cel_1_i,l_low_ii,cel_2_i,l_low_i};
 48 s_low_i = news; Plane Surface(s_low_i) = {ll_low_i};
 49 

Thank you very much in advance.

Best regards,

Sabrina

-- 
Sabrina Zacarias
Institut für Kernphysik
Technische Universität Darmstadt
S2|14 / office 319
Schlossgartenstr. 9

64289 Darmstadt

Office: +49 6151 16 23589

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20200225/0cac19c8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2020-02-25 at 17.07.29.png
Type: image/png
Size: 180355 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200225/0cac19c8/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2020-02-25 at 17.09.15.png
Type: image/png
Size: 214372 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200225/0cac19c8/attachment-0003.png>


More information about the gmsh mailing list