[Gmsh] Small cylinder in huge domain
Christophe Geuzaine
cgeuzaine at uliege.be
Sun Feb 23 20:42:16 CET 2020
Dear Songt,
Very thin (or very long) cylinders have very anisotropic parametric representations in OpenCASCADE. When the ratio is sufficiently large you run into floating point tolerance issues in the mesh generation process.
With OpenCASCADE cylinders, the workaround is to segment the cylinders in several parts. Attached is a modified version of your file that shows one way of doing it:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cc.geo
Type: application/octet-stream
Size: 629 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20200223/ffb90ec3/attachment.geo>
-------------- next part --------------
Christophe
PS: once the new hxt algorithm supports Fields (hopefully later this year), 3D meshing time for very refined meshes will be dramatically decreased.
> On 23 Feb 2020, at 17:52, tao song <songtao198801 at gmail.com> wrote:
>
> 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;
> ---------------------------
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
?
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
More information about the gmsh
mailing list