[Gmsh] Meshing Volume within a Volume

Christophe Geuzaine cgeuzaine at uliege.be
Fri May 31 13:55:11 CEST 2019



> On 31 May 2019, at 07:42, Aritra Bal <aritrabal98 at iitkgp.ac.in> wrote:
> 
> Hello there,
> 
> I am using gmsh to mesh a geometry than contains one volume(with holes) inside another volume. The mesh completes just fine, but the results in the FEM solver later on are not what I'd expect. The same geometry, when designed and meshed in COMSOL, gives me the correct results. Is there anything wrong with my code, in the way I define the volumes and/or the holes?

You have overlapping volumes. Just fragment the outside box with the internal solids (or use "Coherence") - see attached file.

> Attaching the code, as well as screenshots of the gmsh and COMSOL mesh. (exported to gmsh format). The COMSOL mesh also looks different to the one made in gmsh.

You didn't specify any mesh sizes, so Gmsh generated the coarsest mesh possible. (Then my guess is that you clicked on "Refine by splitting" - this will refine by splitting elements, which is useful for convergence analysis, but will lead to quite an ugly mesh indeed.)

See modifications in attached file.

Christophe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Geometry_fixed.geo
Type: application/octet-stream
Size: 2872 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20190531/9a53c9e6/attachment.geo>
-------------- next part --------------

> 
> Sincerely,
> Aritra Bal,
> Indian Institute of Technology, Kharagpur.
> <Geometry.geo><GMSH_mesh.png><COMSOL_mesh.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