[Gmsh] script for creating transfinite surfaces and volumes

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Aug 28 19:36:30 CEST 2008


Fabian wrote:
> Hi,
> 
> creating hexa grids with 'transfinite' works quite nice, though I am 
> kind of defining the existing surfaces twice; once of the geometry and 
> the same a second time for 'transfinite'. Is there an option to create 
> the 'transfinite' surfaces and volumes automatically? Or maybe anyone 
> has some kind of e.g. sed script, which does this; e.g.:
> 
> Line Loop(5) = {3,4,1,2};
> Plane Surface(6) = {5};
> 
> Look for all surfaces and the corresponding line loop to create:
> 
> Transfinite Surface {6} = {3,4,1,2};
> 
> Would be nice, if this could work!?
> 

Yes. The only limitation is that a transfinite surface can have more 
than 4 "corners". For example:

Point(1) = {0,0,0,0.1};
Point(2) = {1,0,0,0.1};
Point(3) = {0,1,0,0.1};
Point(4) = {3,0,0,0.1};
Point(5) = {3,3,0,0.1};
Point(6) = {0,3,0,0.1};
Line(1) = {3,6};
Line(2) = {6,5};
Line(3) = {5,4};
Line(4) = {4,2};
Circle(5) = {2,1,3};
Line Loop(6) = {3,4,5,1,2};
Plane Surface(7) = {6};
Transfinite Line {1} = 20 Using Progression 1.2;
Transfinite Line {4} = 20 Using Progression 1./1.2;
Transfinite Line {3,2} = 10;
Transfinite Line {5} = 19;
Transfinite Surface {7} = {3,6,4,2};
Recombine Surface {7};



> Regards!
> Fabian
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
> 
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine