[Gmsh] Refine mesh via Gaussian rim inside disk

Christophe Geuzaine cgeuzaine at uliege.be
Fri Apr 24 09:21:19 CEST 2020


Hi Lars,

The default algorithm (Frontal-Delaunay) sometimes still has trouble with size fields with small features. You might want to use the Delaunay algorithm in such cases:

Mesh.Algorithm = 5;

(I will add a note in the documentation about this.)

For 3D meshes, the latest development snapshot includes mesh size field support in the new 3D algorithm HXT (Mesh.Algorithm3D = 10). Your feedback on this experimental support will be very welcome!

Cheers,

Christophe


> On 23 Apr 2020, at 17:54, Lars Hubatsch <hubatsch at pks.mpg.de> wrote:
> 
> Hi all,
> 
> I’m trying to create a disk mesh with a given background and, within a rim around the center, a local decrease of the characteristic length that follows a Gaussian (see attached image 1).
> 
> Code:
> 
> SetFactory("OpenCASCADE");
> Disk(1) = {0, 0, 0, 4};
> Physical Surface("surfacedomain") = {1};
> 
> Field[3] = MathEval;
> Field[3].F = ".5 - (.5-0.01)*exp(-(1./0.1) *((sqrt(x*x+y*y)-1))*((sqrt(x*x+y*y)-1)))";
> 
> Background Field = 3;
> 
> However, for the parameters above the rim is not closed, what am I getting wrong?
> If I change parameters slightly, e.g. 0.1 to 0.2 or 0.01 to 0.005 I get the correct representation. My problem is, that I eventually would like to do this in 3D within a sphere instead of a disk. However, this is visually harder to inspect (or is there a good way to do this?), so I would like to make sure that things work in principle in 2D.
> 
> Thanks,
> Lars
> 
> <Screenshot 2020-04-23 at 17.54.29.png>
> _______________________________________________
> 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