improve mesh quality of boolean fuse solid
Hi all,
I'm finding problems in tetra meshing a complex solid. Such solid is built from multiple automatic OCC boolean fuse operations of randomly generated cylinders, and as such its geometry at the intersections can be -- and is -- far from perfect. However, most of the geometry is meshed successfully with very high quality elements, and I'm wondering about the possibility to "force" gmsh to automatically defeature (or not consider) the small imperfections to have high quality tetrahedrons even on problematic regions. In other words, relaxing the geometric constraint when high quality cannot be achieved by strictly respecting them. The issue comes from the fact that my control over the geometry is limited, and such imperfections cannot be managed prior to meshing (which obviously should be the best practice). The result is a few collapsed tetrahedrons as shown in two pictures below. An optimization doesn't seem to improve the results.
I'm attaching the python api code and here's a link to the CAD file.
import gmsh
gmsh.initialize()
gmsh.merge('issuefile.step')
gmsh.option.setNumber("Mesh.MeshSizeMin", .2)
gmsh.option.setNumber("Mesh.MeshSizeMax", .3)
gmsh.model.mesh.generate(3)
## gmsh.model.mesh.optimize(method = "Relocate3D", force = True, niter = 3, dimTags = [] )
gmsh.fltk.run()
gmsh.write('mesh.msh')
gmsh.finalize()
Any help is very much appreciated.
Thanks in advance,
ic