[Gmsh] meshing circular inclusions with desired element size

Jose Paulo Moitinho de Almeida moitinho at civil.ist.utl.pt
Wed Jul 22 10:38:20 CEST 2015


If I understand correctly the goal, you need to define the Attractor relative 
to the edges.

You also had problems by defining 

Field[4].IField=1; (Threshold was relative to the first attractor)

and by not defining the 

Field[5].FieldsList = {2, 4};

The attached file is doing what you need?

Regards

ZP


On Wednesday 22 July 2015 15:26:57 Nguyen Vinh Phu wrote:
> Dear Johannes,
> 
> Your help is very much appreciated. And I managed to do that for one single
> inclusion. When I tried to extend the approach to more than one, I failed.
> Could you please help me how to do that for a simple problem with two
> inclusions of which the geo file is attached so that you just modify it.
> Note that the two inclusions are of different radii. And my target is a
> domain with many many inclusions. So any help on how to generalise the
> procedure is welcome.
> 
> Best regards,
> Phu
> 
> > On 21 Jul 2015, at 5:44 pm, Johannes Wimmer <johannes.wimmer at rwth-
aachen.de> wrote:
> > 
> >
> > Dear Phu,
> > are your inclusions intersecting the domain boundary? If not, simple
> > attractors will do.
> 
> inclusions.geo
> 
> > 
> >
> > I have attached a snippet of tutorial 10. It works in 3D analogously.
> > Just pay attention that DistMin is not your inner radius of your
> > transition zone from coarse to fine, but the outer one, now. Think of it
> > as the radius where the minimal lc applies again. DistMax is then your
> > radius up to which the maximal lc (i.e. 5*lc) holds.
> >
> > 
> >
> > Cheers,
> > Johannes
> >
> > 
> >
> > On 20.07.2015 16:47, Nguyen Vinh Phu wrote:
> >> Dear all,
> >>
> >> 
> >>
> >> I have a square domain with a number of circular inclusions. For each
> >> inclusion, I normally define 5 points with the same characteristic
> >> length. This resulted in a mesh where the inclusions are finely
> >> discretised which is not what I need since the inclusions are only
> >> elastic in my FE simulations.
> >>
> >> 
> >>
> >> What I need to achieve is a mesh which is refined around the
> >> inclusion boundaries not within them. I heard and read the
> >> documentation about  background meshes but I really do not know how
> >> to get what I need.
> >>
> >> 
> >>
> >> Any help would be much appreciated.
> >>
> >> 
> >>
> >> Best regards, Phu
> >>
> >> 
> >> 
> >>
> >> _______________________________________________ gmsh mailing list
> >> gmsh at geuz.org http://www.geuz.org/mailman/listinfo/gmsh
> >>
> >> 
> >
> > 
> >
> > -- 
> > Dipl.-Ing. Johannes Wimmer
> > RWTH Aachen
> > Institut für Angewandte Mechanik
> > Mies-van-der-Rohe-Str.1
> > D-52074 Aachen
> >
> > 
> >
> > Tel.: +49 (0)241 80 25013
> > Fax : +49 (0)241 80 22001
> > www.ifam.rwth-aachen.de
> > <t10_partial_coarseGraining.geo>__________________________________________
> > _____ gmsh mailing list
> > gmsh at geuz.org
> > http://www.geuz.org/mailman/listinfo/gmsh
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
-------------- next part --------------
a = 1;
r = 0.15;

h  = 0.05;
h2 = 0.2*h;

// -------------------
// corner points 
// -------------------

Point(1) = {0,0,0,h};
Point(2) = {a,0,0,h};
Point(3) = {a,a,0,h};
Point(4) = {0.,a,0,h};

// -------------------
// inner circle's points
// -------------------

Point(5) = {0.5*a,0.5*a,0,0.06};
Point(6) = {0.5*a+r,0.5*a,0,h2};
Point(7) = {0.5*a,0.5*a+r,0,h2};
Point(8) = {0.5*a-r,0.5*a,0,h2};
Point(9) = {0.5*a,0.5*a-r,0,h2};

r2 = 0.1;

Point(10) = {0.8,0.8,0,h2};
Point(11) = {0.8+r2,0.8,0,h2};
Point(12) = {0.8,0.8+r2,0,h2};
Point(13) = {0.8-r2,0.8,0,h2};
Point(14) = {0.8,0.8-r2,0,h2};


// -------------------
// outer lines
// -------------------

Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};

Circle(5) = {6,5,7};
Circle(6) = {7,5,8};
Circle(7) = {8,5,9};
Circle(8) = {9,5,6};

Circle(9)  = {11,10,12};
Circle(10) = {12,10,13};
Circle(11) = {13,10,14};
Circle(12) = {14,10,11};

Line Loop(100) = {1,2,3,4};
Line Loop(200) = {5,6,7,8};
Line Loop(300) = {9,10,11,12};

// -------------------
//  Surfaces
// -------------------

Plane Surface(100) = {100,200,300}; // matrix
Plane Surface(200) = {200};     // aggregate
Plane Surface(300) = {300};     // aggregate

Field[1] = Attractor;
Field[1].EdgesList={5,6,7,8}; // node 5, center of the circle is attractor

Field[2] = Threshold;
Field[2].IField=1;
Field[2].LcMin=h2;
Field[2].LcMax=h;
Field[2].DistMin=0.1*r;
Field[2].DistMax=0.3*r;

Field[3] = Attractor;
Field[3].EdgesList={9,10,11,12}; // node 5, center of the circle is attractor

Field[4] = Threshold;
Field[4].IField=3;
Field[4].LcMin=h2;
Field[4].LcMax=h;
Field[4].DistMin=0.1*r2;
Field[4].DistMax=0.3*r2;

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

Background Field = 5;

Mesh.CharacteristicLengthExtendFromBoundary = 0;