2011/3/19  <[email protected]>:
> Hi all,
> I have attached below a simple script to generate grid for a full circle. I
> create it for half a circle and use Symmetry to reflect it, so it becomes a
> full circle.
> But Symmetry is not working. Can you point out the mistake in my script.
> Thanks
> praveen
>
> r = 1.0;  // cylinder radius
> R = 10.0; // outer boundary radius
> n1 = 10;
> n2 = 10;
> Point(1) = { 0, 0, 0};
> Point(2) = {-r, 0, 0};
> Point(3) = { r, 0, 0};
> Point(4) = {-R, 0, 0};
> Point(5) = { R, 0, 0};
> Circle(1) = {3,1,2};
> Circle(2) = {5,1,4};
> Line(3) = {5,3};
> Line(4) = {2,4};
> Line Loop(1) = {3, 1, 4, -2};
> Ruled Surface(1) = {1};
> Transfinite Surface(1) = {3,5,4,2};
> Recombine Surface(1);
> Transfinite Line {3,4} = n1;
> Transfinite Line {1,2} = n2;
> Symmetry {0.0, 1.0, 0.0, 0.0} { Duplicata{Surface{1};} }
> _______________________________________________

I see that this doesn't work they way you expected.  Note that Circle
`creates a circle arc (strictly) smaller than Pi.'
<http://geuz.org/gmsh/doc/texinfo/gmsh.html#Lines>.

In the attached modified input file, the arcs subtend right angles,
and Symmetry does work as expected.  (The resulting mesh probably
isn't what you're after, but I'll leave the further modifications
required to fix that to you.)

Attachment: symmetry1.geo
Description: Binary data

_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to