[Gmsh] Circular Symmetry on Faces

Wendy wendypino27 at gmail.com
Tue Jun 12 17:21:42 CEST 2012


Dear GMSH group,

I'm trying to mesh a geometry where I need the faces at the extremities to have
circular symmetry. 
I specify a mesh density when I create the points, and in addition I've tried:

1) Creating an Attractor Field and a Threshold Field so that the center of each
circular face is the Attractor Point. This gives me something that looks
symmetric, but upon further inspection, you can see that it's not perfectly
symmetric. Here's a link to the picture:
https://dl.dropbox.com/u/12850351/picture-attractor-field.pdf


2) I also tried starting with a coarse mesh (left in the next link) and using
the "refine by splitting option". This seems symmetric, but since I start out
with a 2nd order mesh after I choose to refine it I get a 1st order mesh. 
When I set the order to 2, I get sections that bulge out and are not straight:
https://dl.dropbox.com/u/12850351/refine-by-splitting.pdf

I've also tried to refine directly in the command line:
gmsh -refine bar.msh -order 2
But I end up with a 1st order mesh, is this incorrect?


My goal is to have circular symmetry for the mesh on the circular faces. 
Please let me know if you have a suggestion to make this happen. 
I'd really appreciate it!

Thanks!
Wendy

P.S. This is my .geo file that I start with when I try to do refine by splitting:

l = 0.213000;
r = 0.058000;
theta = 0.802851;
angle = Pi/6;
rad = theta;
dip = (r / Tan(rad)) - (r / Sin(rad));
Geometry.Tolerance=1e-06;
Geometry.AutoCoherence=1;
Mesh.CharacteristicLengthFromPoints=1;
zellipse = 0.047084;
xellipse = 0.047084;

//Define mesh element size (subdivisions)
//lc is the density at the nodes away from the extremities: ellipse and dip nodes
//dc is the density in the center of the circle faces
//d  is the density at the rim of the circle faces 
lc = 0.08;
dc = 0.9;
d = 0.1;


// This is where Point generation begins
Point(1) = {0, 0, -l, dc};
Point(2) = {r, 0, -l, d};
Rotate {{0, 0, 1}, {0, 0, 1}, 1*Pi/3} {Duplicata{  Point{2};}}
Rotate {{0, 0, 1}, {0, 0, 1}, 2*Pi/3} {Duplicata{  Point{2};}}
Rotate {{0, 0, 1}, {0, 0, 1}, 3*Pi/3} {Duplicata{  Point{2};}}
Rotate {{0, 0, 1}, {0, 0, 1}, 4*Pi/3} {Duplicata{  Point{2};}}
Rotate {{0, 0, 1}, {0, 0, 1}, 5*Pi/3} {Duplicata{  Point{2};}}

// Create circular face
Circle(1) = {2, 1, 7};
Circle(2) = {7, 1, 6};
Circle(3) = {6, 1, 5};
Circle(4) = {5, 1, 4};
Circle(5) = {4, 1, 3};
Circle(6) = {3, 1, 2};
Line(7) = {1, 2};
Line(8) = {1, 7};
Line(9) = {1, 6};
Line(10) = {1, 5};
Line(11) = {1, 4};
Line(12) = {1, 3};
Line Loop(13) = {9, -2, -8};
Plane Surface(14) = {13};
Line Loop(15) = {8, -1, -7};
Plane Surface(16) = {15};
Line Loop(17) = {7, -6, -12};
Plane Surface(18) = {17};
Line Loop(19) = {12, -5, -11};
Plane Surface(20) = {19};
Line Loop(21) = {11, -4, -10};
Plane Surface(22) = {21};
Line Loop(23) = {10, -3, -9};
Plane Surface(24) = {23};

//Create the base points, dip points, and ellipse points
Point(638) = {0, 0, 0, lc};
Point(639) = {r, 0, 0, lc};
Point(640) = {r, 0, dip, lc};
Rotate {{0, 0, 1}, {0, 0, 1}, Pi/3} { Point{640};}
Rotate {{0, 0, 1}, {0, 0, 1}, 2*Pi/3} {Duplicata{  Point{640};}}
Rotate {{0, 0, 1}, {0, 0, 1}, 4*Pi/3} {Duplicata{  Point{640};}}
Rotate {{0, 0, 1}, {0, 0, 1}, 2*Pi/3} {Duplicata{  Point{639};}}
Rotate {{0, 0, 1}, {0, 0, 1}, 4*Pi/3} {Duplicata{  Point{639};}}
//Create top ellipse point
Point(645) = {0, 0, r/Sin(rad), lc};
//Create midpoint in the ellipse for more connections
Point(646) = {xellipse, 0, zellipse, lc};
Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata{  Point{646};}}
Rotate {{0, 0, 1}, {0, 0, 0}, 4*Pi/3} {Duplicata{  Point{646};}}


//Draw ellipses in center
Ellipse(25) = {644, 638, 642, 642};
Ellipse(26) = {639, 638, 642, 642};
Ellipse(27) = {639, 638, 640, 640};
Ellipse(28) = {643, 638, 640, 640};
Ellipse(29) = {643, 638, 641, 641};
Ellipse(30) = {644, 638, 641, 641};
Ellipse(31) = {639, 638, 645, 646};
Ellipse(32) = {646, 638, 645, 645};
Ellipse(33) = {644, 638, 645, 648};
Ellipse(34) = {648, 638, 645, 645};
Ellipse(35) = {643, 638, 645, 647};
Ellipse(36) = {647, 638, 645, 645};



//Rotate handle to create struts
Rotate {{0, 1, 0}, {0, 0, 0}, Pi-theta} {Duplicata{ Surface{16, 18, 14, 20, 24,
22};}}

//Create Lines and Surfaces for a strut
Line(60) = {655, 641};
Line(61) = {702, 645};
Line(62) = {676, 648};
Line(63) = {650, 644};
Line(64) = {668, 643};
Line(65) = {694, 647};
Line Loop(66) = {62, -33, -63, -47};
Ruled Surface(67) = {66};
Line Loop(68) = {34, -61, 55, 62};
Ruled Surface(69) = {68};
Line Loop(70) = {36, -61, -59, 65};
Ruled Surface(71) = {70};
Line Loop(72) = {35, -65, -51, 64};
Ruled Surface(73) = {72};
Line Loop(74) = {29, -60, 43, 64};
Ruled Surface(75) = {74};
Line Loop(76) = {30, -60, -39, 63};
Ruled Surface(77) = {76};

// Rotate surfaces to get the other 2 struts
Rotate {{0, 0, 1}, {0, 0, 0}, 2*Pi/3} {Duplicata{ Surface{75, 41, 49, 73, 57,
77, 37, 45, 71, 53, 67, 69};}}
Rotate {{0, 0, 1}, {0, 0, 0}, 4*Pi/3} {Duplicata{ Surface{75, 41, 49, 73, 57,
77, 37, 45, 71, 53, 67, 69};}}

//Create lines and surfaces for the handle
Line(178) = {642, 7};
Line(179) = {644, 6};
Line(180) = {641, 5};
Line(181) = {643, 4};
Line(182) = {640, 3};
Line(183) = {639, 2};
Line Loop(184) = {4, -181, 29, 180};
Ruled Surface(185) = {184};
Line Loop(186) = {5, -182, -28, 181};
Ruled Surface(187) = {186};
Line Loop(188) = {6, -183, 27, 182};
Ruled Surface(189) = {188};
Line Loop(190) = {1, -178, -26, 183};
Ruled Surface(191) = {190};
Line Loop(192) = {2, -179, 25, 178};
Ruled Surface(193) = {192};
Line Loop(194) = {3, -180, -30, 179};
Ruled Surface(195) = {194};

// Entire Volume
Surface Loop(196) = {83, 105, 109, 118, 96, 87, 91, 67, 69, 113, 127, 163, 177,
71, 57, 49, 41, 37, 45, 53, 77, 195, 24, 22, 20, 18, 16, 14, 193, 78, 100, 191,
189, 128, 150, 187, 185, 75, 73, 172, 159, 168, 146, 137, 133, 155, 141, 122};
Volume(197) = {196};
Rotate {{0, 1, 0}, {0, 0, -l}, Pi} {Duplicata{  Volume{197};}}