[Gmsh] Difficulty with generating a volume mesh from a stl file

Geordie McBain gdmcbain at freeshell.org
Fri May 29 02:00:55 CEST 2015


2015-05-28 20:09 GMT+10:00 David Love <dml42 at cam.ac.uk>:
> Dear Geordie,
>
> Thank you very much for your reply.
>
> You are right, GMSH does not generate zero volume tetrahedra. I think the
> issues with the finite element simulations are due to a combination of my
> Matlab script and GMSH's volume meshing routine. When loading the volume
> mesh into COMSOL a minimum quality factor of 6E-10 (average quality 0.66) is
> obtained, which is rather poor.

Dear David,
  Thanks for updating on your progress and clarifying the difficulty.
I see that the latter is poor tetrahedra rather than completely flat
ones.  Since last writing, I remembered the advice of M. Z. to another
query on this list earlier this month: -optimize.

http://www.geuz.org/pipermail/gmsh/2015/009750.html

I passed this option to Gmsh on the command-line

$ gmsh -3 -optimize -format mesh -string "Mesh.SaveElementTagType=2;"
-o Plane111_UnitCellCountXYZ331_VolumeFraction13_NetworkNR1.mesh
Plane111_UnitCellCountXYZ331_VolumeFraction13_NetworkNR1.geo

and checked the resulting .mesh files by opening them in the Gmsh GUI
and inspecting the last three fields in the Tools/Statistics panel:
SICN, Gamma, and Rho.  The minima of these over the mesh seem to have
lifted quite a bit which I assume (without going into details) imply a
better mesh.
  Perhaps -optimize or -optimize_netgen would help in your problem too.

Best wishes.