[Gmsh] Using Gmsh

Christophe Geuzaine cgeuzaine at ulg.ac.be
Thu Aug 28 19:48:59 CEST 2008


Alyssa Papalopa wrote:
> I have a large rectanglar surface with a course characteristic length 
> (CL).  Inside it I need to make a small rectangular surface with a fine CL.
> 
> I am very new to Gmsh. What is the best way to do this?
> 
> I tried to simply place a new small rectangle with the fine CL inside 
> the large rectangle but this does not seem work.  I get two separate, 
> overlaid meshes.
> I tried to create a rectangular hole in the large surface and then add 
> back in the small rectangle with the fine CL.  This works but is very 
> tedious to do manually, especially for very complex geometries and for 
> volumes.

Indeed.

You can use a "Box" field for this:

lc = .1;
Point(1) = {0,0,0,lc};
Point(2) = {1,0,0,lc};
Point(3) = {1,1,0,lc};
Point(4) = {0,1,0,lc};
Line(1) = {3,2};
Line(2) = {2,1};
Line(3) = {1,4};
Line(4) = {4,3};
Line Loop(5) = {1,2,3,4};
Plane Surface(6) = {5};

Field[1] = Box;
Field[1].VIn = lc/10;
Field[1].VOut = lc;
Field[1].XMin = 0.2;
Field[1].XMax = 0.6;
Field[1].YMin = 0.2;
Field[1].YMax = 0.6;

Background Field = 1;



> Regards,
> Alyssa
> 
> ------------------------------------------------------------------------
> See what people are saying about Windows Live. Check out featured posts. 
> Check It Out! 
> <http://www.windowslive.com/connect?ocid=TXT_TAGLM_WL_connect2_082008>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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