[Gmsh] Having trouble to mesh muilti-domain geometries

Christophe Geuzaine cgeuzaine at uliege.be
Fri Nov 3 13:38:02 CET 2017

> On 3 Nov 2017, at 13:23, Wesley Ranger <metorm at outlook.com> wrote:
> Hi guys
> I am having trouble meshing a geometry composed of 3 kinds of materials. Let's call them material A, B and C.
> The 3 material in the geometry has 2 interfaces. I defined several physical surfaces and 3 physical domains.
> Weird things happened then. In the resulting mesh, the vertices on A/B interface are well aligned, i.e. each vertex on A/B interface and belongs to A mesh has an identical copy in B mesh. They have the same coordinates, so I can connect them in solving stage.
> However, the vertices on B/C are not well aligned. A vertex belongs to C mesh may be located in the middle of a facet which belongs to B mesh.
> It is hard to describe using words, so I posted a question here:
> https://stackoverflow.com/questions/47095493/any-way-to-make-gmsh-to-use-the-same-vertex-set-on-both-sides-of-a-material-boun
> Any way to make gmsh to use the same vertex set on both sides of a material boundary?

Your step file probably contains volumes that are topologically not connected, i.e. there are 2 surfaces (at the same location) for each internal boundary. Gmsh then creates 2 independent surface meshes, one for each surface. If you remove the duplicates, Gmsh will generate a single surface mesh for each interface, and your volume mesh will be conformal.

You can use the new CAD features in Gmsh to remove these duplicate internal surfaces. With the stable release, you can do

v() = ShapeFromFile("file.step");
BooleanFragments{ Volume{v()}; Delete; }{}

With the latest development snapshots, you can use the "Coherence" shortcut (which does exactly the same thing):

Merge "file.step";


PS : Physical definitions have no influence on mesh generation - they are just a way to group/name entities for exporting.

> I am trying to mesh a complex geometry composed of 3 kinds of materials, like below: The geometry is imported from a *.stp file. I defined several physical surfaces and 3 physical domains in the ...
> stackoverflow.com
> Anyone, please give me some suggestions to handle this. Thank you!
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 

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

More information about the gmsh mailing list