[Gmsh] how to specifically determine mesh size from imported STEP or BREP File ?

Christophe Geuzaine cgeuzaine at uliege.be
Wed Feb 7 18:30:51 CET 2018



> On 6 Feb 2018, at 11:38, Benedikt Oswald <benedikt.oswald at lspr.swiss> wrote:
> 
> Dear gmsh
> 
> I create geometries in FreeCAD; I export them either in STEP or BREP format.
> 
> Then I import them into gmsh for meshing.
> 
> However, gmsh (3.0.7, current daily snapshot) has a tendency to not
> resolve smooth rounded geometry in this case.
> 
> Is there an elegant way to teach gmsh how to resolve which portions of
> the STEP/BREP
> 
> geometry ?

You can either do it by hand, by explicitly assigning mesh sizes to points (or by using fields) - see e.g. https://gitlab.onelab.info/gmsh/gmsh/blob/master/demos/boolean/baffles.geo

You could also refine automatically depending on curvature (it’s a bit slow in the current implementation, but has the advantage of being more automatic):

Merge "ring-rev-100.brep";
Physical Volume(100) = {1};            // volume ring
Physical Volume(200) = {2};            // air volume
Physical Surface(1000) = {7};        // outer truncation boundary
Mesh.CharacteristicLengthMin = 10;
Mesh.CharacteristicLengthMax = 100;
Mesh.CharacteristicLengthFromCurvature = 1;
Mesh.MinimumCirclePoints = 20; // points per 2*pi



> 
> I use an intermediate file such as ring-rev-100-aux.geo with this contents:
> 
> Merge "ring-rev-100.brep";
> Physical Volume(100) = {1};            // volume ring
> Physical Volume(200) = {2};            // air volume
> Physical Surface(1000) = {7};        // outer truncation boundary
> 
> to assign physical tags to volumes & surface ?
> 
> Greetings & thanks, Benedikt
> 
> 
> 
> 
> ----------------------------------------------------------------------------------------------------------------------
> Dr. sc. techn. Benedikt Oswald - first engineer - LSPR AG - phone +41 43 366 90 74
> Grubenstrasse 9, CH-8045 Zürich, benedikt.oswald at lspr.swiss
> ----------------------------------------------------------------------------------------------------------------------
> 
> <ring-rev-100.brep>_______________________________________________
> 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

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20180207/cafd071a/attachment.html>


More information about the gmsh mailing list