[Gmsh] Small cylinder in huge domain

tao song songtao198801 at gmail.com
Sun Feb 23 17:52:17 CET 2020


Dear all,
While i meshing a model with small cylinder in a huge domain, if the
filed is not given, it gives me an error "No elements in volume x",
where x denote the small cylinder volume, and if the field is used,
the gmsh blocked and finally crashed.
How can i get the right mesh of this kind of model (small cylinder in
a huge domain)? I want the whole domain and the small cylinder both
are meshed.

Kind regards,
Songt.

The code i used:
---------------------------
SetFactory("OpenCASCADE");

Point(1) = {0,0,0}; Point(2) = {0,0,-40};
Line(1) = {1,2};

Box(1)={-50,-50,-50,100,100,100};
Cylinder(2) = {0, 0, 0, 0, 0, -40, 0.01, 2*Pi};
//Cylinder(2) = {0, 0, 0, 0, 0, -40, 1, 2*Pi};
BooleanDifference(3) = { Volume{1}; Delete; }{ Volume{2}; };
//Coherence;
Physical Volume ( "c",11 ) = {1};
Physical Volume ( "d",12 ) = {2};

len = 0.001;
Field[1] = Distance;
Field[1].NNodesByEdge = 100;
Field[1].EdgesList = {1};

Field[2] = Threshold;
Field[2].IField = 1;
Field[2].LcMin = len*5;
Field[2].LcMax = 20;
Field[2].DistMin = 200*len;
Field[2].DistMax = 30;
Field[3] = Min;
Field[3].FieldsList = {2};
Background Field = 3;
---------------------------



More information about the gmsh mailing list