[Gmsh] Re: Full Torus

Christophe Geuzaine geuzaine at acm.caltech.edu
Sat Jul 12 01:36:15 CEST 2003


Shrinivas Lankalapalli wrote:
> Thanks a lot !!

Note that if you want a regular mesh, you can also use:

lc = 0.4;
Point(1) = {0,0,0,lc};
Point(2) = {1,0,0,lc};
Point(3) = {0,1,0,lc};
Point(4) = {0,-1,0,lc};
Point(5) = {-1,0,0,lc};
Circle(1) = {2,1,3};
Circle(2) = {3,1,5};
Circle(3) = {5,1,4};
Circle(4) = {4,1,2};
Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};
Extrude Surface {6, {0,1,0}, {-2,0,0}, 2*Pi/3}{Layers{10,73,1};};
Extrude Surface {28, {0,1,0}, {-2,0,0}, 2*Pi/3}{Layers{10,73,1};};
Extrude Surface {50, {0,1,0}, {-2,0,0}, 2*Pi/3}{Layers{10,73,1};};

Christophe

> 
> Christophe Geuzaine wrote:
> 
>>Shrinivas Lankalapalli wrote:
>>
>>
>>>Hi Christophe
>>>
>>>  I need to generate a mesh for a full torus. One way would be to 
>>>rotate a disc through 2Pi using extrude command. From a search on the 
>>>gmsh site, one cannot extrude a surface beyond Pi.
>>>
>>>  Is it possible to mirror the half torus ? Thanks a lot.
>>>
>>>Shrinivas
>>>
>>
>>
>>Just use multiple extrusions:
>>
>>lc = 0.4;
>>Point(1) = {0,0,0,lc};
>>Point(2) = {1,0,0,lc};
>>Point(3) = {0,1,0,lc};
>>Point(4) = {0,-1,0,lc};
>>Point(5) = {-1,0,0,lc};
>>Circle(1) = {2,1,3};
>>Circle(2) = {3,1,5};
>>Circle(3) = {5,1,4};
>>Circle(4) = {4,1,2};
>>Line Loop(5) = {1,2,3,4};
>>Plane Surface(6) = {5};
>>Extrude Surface {6, {0,1,0}, {-2,0,0}, 2*Pi/3};
>>Extrude Surface {28, {0,1,0}, {-2,0,0}, 2*Pi/3};
>>Extrude Surface {50, {0,1,0}, {-2,0,0}, 2*Pi/3};
>>Surface Loop(72) = {45,23,67,71,49,27,15,59,37,41,19,63};
>>Volume(73) = {72};
>>
>>Christophe
>>
> 
> 


-- 
Christophe A. Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org