[Gmsh] Question about mesh refinement with stating of characteristic lengths

Moritz Nadler moritz_nadler at gmx.de
Thu Jul 10 17:30:26 CEST 2008


Hallo,

I tried so somehow use the fields demo file in my geometry without really 
understanding it. This did not work, when I compile my .geo I get a mesh with 
way to much elements. The large ch. lengths of the "outer" point are being 
ignored now.

I tried to read about fields in the manual but I could not really get the 
concept why so many different "fields" are needed to just fully define one for 
example what the background field is good for...

What I want I if a fine mesh around line 3 and 7 and point 16 19 which I have 
now but in the rest of the domain the mesh density should still correspond to 
the large ch length defined in the points there which I do not have.


What to do to get this?

kind regards

Moritz Nadler


//my current .geo file with too high element density
highPr = 0.0002;
argPr =  0.00004;
midPr =  0.0002;
lowPr =  0.0006;
vLowPr = 0.001;

Point(1) = {0,0,0,argPr};
Point(2) = {0.25E-2,0,0,midPr};
Point(3) = {0.5E-2,0,0,highPr};
Point(4) = {0.5E-2,0.025E-2,0,highPr};
Point(5) = {0.75E-2,0.025E-2,0,midPr};
Point(6) = {2.25E-2,0.025E-2,0,midPr};
Point(7) = {2.5E-2,0.025E-2,0,highPr};
Point(8) = {2.5E-2,0,0,highPr};
Point(9) = {2.75E-2,0,0,midPr};
Point(10) = {4E-2,0,0,lowPr};
Point(11) = {9.5E-2,0,0,vLowPr};
Point(13) = {0,9.525E-2,0,vLowPr};
Point(14) = {0,4.025E-2,0,lowPr};
Point(15) = {0,2.775E-2,0,midPr};
Point(16) = {0,2.525E-2,0,highPr};
Point(17) = {0,2.275E-2,0,midPr};
Point(18) = {0,0.775E-2,0,midPr};
Point(19) = {0,0.525E-2,0,highPr};
Point(20) = {0,0.275E-2,0,midPr};
Point(21) = {0,0.025E-2,0,argPr};

Field[1] = Attractor;
Field[1].NNodesByEdge = 100;
Field[1].NodesList = {16,19};
Field[1].EdgesList = {3,7};

Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = 0.000015;
Field[2].LcMax = midPr;
Field[2].DistMin = 0.025E-2;
Field[2].DistMax = 0.25E-2;

Field[4] = Min;
Field[4].FieldsList = {2};

Background Field = 4;


Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,5};
Line(5) = {5,6};
Line(6) = {6,7};
Line(7) = {7,8};
Line(8) = {8,9};
Line(9) = {9,10};
Line(10) = {10,11};
Circle(11) = {11,1,13};
Line(13) = {13,14};
Line(14) = {14,15};
Line(15) = {15,16};
Line(16) = {16,17};
Line(17) = {17,18};
Line(18) = {18,19};
Line(19) = {19,20};
Line(20) = {20,21};
Line(21) = {21,1};

Line Loop(22) = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21};
Plane Surface(23) = {22};
// end of file


Christophe Geuzaine schrieb:

> You can use Fields to impose characteristic lengths outside the geometry.
> 
> See demos/fields.geo for an example.