[Gmsh] Question about mesh refinement with stating of characteristic lengths
Moritz Nadler
moritz_nadler at gmx.de
Mon Jul 21 16:51:13 CEST 2008
Hallo,
I played a bit around the field commands which I still do not really understand
(and the manual does not say much about them), but I am not satisfied with my
results.
How can I get soother changes in the element density where the fields are connected.
I thought of something where you can state the length of a gradual change in the
element density between the density of one entity and its neighbour.
I fist thought the .DistMax statement is something like that but it seems to be
ignored in general.
.DistMin determines the size of a Field but DistMax does not do anything.
So my question is:
Is there a way to get gradual changes in the element densities similar to the
ones created by only stating characteristic length at the point definitions
without any fields when using fields.
kind regards
Moritz
Christophe Geuzaine wrote:
> Moritz Nadler wrote:
>> 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.
>>
>
> Just set LcMax to the largest char length in the model. The eventual
> mesh size os computed as the minimum of all prescribed sizes (at points,
> using fields, using a background mesh, using curvatures, etc.).
>
>
> //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 = highPr;
> Field[2].LcMax = vLowPr;
> Field[2].DistMin = 0.002;
> Field[2].DistMax = 0.008;
>
> Background Field = 2;
>
> 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
>
>
>