[Gmsh] anisotropic 2D mesh at face boundary

Geordie McBain gdmcbain at freeshell.org
Wed Mar 2 00:14:38 CET 2011


2011/3/2 claudio comis <claudio.comis at alice.it>:
> Is it possible to have a simple expalining .geo file containing the instructions
> to intensify a mesh as the mesh itself goes closer a boundary?

Hello.  I had a go at creating a simplest possible .geo file defining
a mesh with a boundary layer.  It's based on Section `6.3.1 Specifying
mesh element sizes' of the manual.

http://geuz.org/gmsh/doc/texinfo/gmsh.html#Specifying-mesh-element-sizes

Does this do what you want?

%<---bl.geo
Point(1) = {0, 0, 0};		// a unit right-angle triangle
Point(2) = {1, 0, 0};		// in the first quadrant
Point(3) = {0, 1, 0};		// of the xy-plane

Line(1) = {1, 2};		// floor
Line(2) = {2, 3};		// hypoteneuse
Line(3) = {3, 1};		// wall

Line Loop(4) = {1, 2, 3};
Plane Surface(5) = {4};

Field[1] = Attractor;		// distance from hypoteneuse
Field[1].EdgesList = {2};	

Field[2] = BoundaryLayer;
Field[2].IField = 1;		// element size far from wall
Field[2].hwall_n = 0.01;	// mesh size normal to the wall

Background Field = 2;
%<--end of bl.geo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bl.geo
Type: application/octet-stream
Size: 525 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110302/da65d324/attachment.geo>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bl.png
Type: image/png
Size: 59969 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110302/da65d324/attachment.png>