<div dir="ltr">Dear Geordie,<div><br></div><div>Thank you very much for your reply.</div><div><br></div><div>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. I think this is primarily due to stretched tetrahedra, which due to rounding errors may have lead to the interpretation of 'zero volume' elements. I also noticed that more recent versions of GMSH have the tendency to fill a volume with 'super nodes' that connect to many surface nodes. After optimisation with COMSOL the minimum quality factor could be improved to 3E-2 (average quality 0.69) .</div><div><br></div><div><span style="font-size:12.8000001907349px">Aside: The mesh statistics use a quality metric that is worked out for each tetrahedra in the mesh and is proportional to d_i/d_o, where d_i would be the diameter of the largest sphere entirely enclosed in the tetrahedra, and d_o is the diameter of the smallest sphere that can entirely enclose a tetrahedra. This is normalised so that quality=1 for a equilateral shape.</span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">For my simulations </span><span style="font-size:12.8000001907349px">an ideal mesh has tetrahedrons with approximately the same volumes, where each node is part of </span><span style="font-size:12.8000001907349px">4-10 tetrahedrons and where tetrahedrons </span><span style="font-size:12.8000001907349px">are not distorted. Do you know of any ways in GMSH to prevent 'super nodes' and encourage more consistent volumes when generating a volume mesh?</span></div><div><br></div><div>Thank you again for your help.</div><div><br></div><div>Kind regards,</div><div>David</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 26, 2015 at 1:47 AM, Geordie McBain <span dir="ltr"><<a href="mailto:gdmcbain@freeshell.org" target="_blank">gdmcbain@freeshell.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2015-05-26 2:06 GMT+10:00 David Love <<a href="mailto:dml42@cam.ac.uk">dml42@cam.ac.uk</a>>:<br>
> Dear Sir/Madam,<br>
><br>
> I have been experiencing difficulties generating a volume mesh (.geo and<br>
> .msh) from a surface mesh (.stl) generated in matlab. The main issue is that<br>
> I end up with zero volume tetrahedra (elements with four collinear points)<br>
> which causes difficulties in subsequent finite element simulations.<br>
><br>
> I have attached an example of a surface mesh (.stl) that I start off with. I<br>
> then use the procedure outlined in the following link to create the volume<br>
> mesh (.geo and .msh):<br>
> <a href="http://fengl.org/2012/05/21/converting-stl-surface-mesh-to-volume-mesh-using-gmsh/" target="_blank">http://fengl.org/2012/05/21/converting-stl-surface-mesh-to-volume-mesh-using-gmsh/</a><br>
><br>
> My questions are:<br>
> - Is there a way to avoid zero volume tetrahedra or does the issue originate<br>
> from the matlab generated stl file? Do you have a suggestion to avoid this<br>
> issue?<br>
<br>
</span>Hello. I had a go at your STL surface and it seemed to work here.<br>
<br>
I meshed it with the attached, no frills, .geo file.<br>
<br>
To check that the mesh was O. K., I solved a Poisson problem on the<br>
volume with uniform forcing and zero Dirichlet conditions using P1<br>
elements in FreeFem++, using the attached .edp script.<br>
<br>
It computes the volume as 0.54956, the area as 15.7748, and the<br>
integral of the solution as 0.000286442.<br>
I don't think that this would work if there were degenerate<br>
elements. Is it possible that the error is in the solver rather than<br>
the mesh?<br>
<span class=""><br>
<br>
> - Is there a possibility of generating a volume mesh in GMSH by defining the<br>
> surface boundary in an equation? For instance if I describe my shape in form<br>
> of a triple sinusoidal (as done in the matlab code) and then tell GMSH to<br>
> mesh the inner volume. If so could you point me towards some examples?<br>
<br>
</span>I don't think that this can be done in a .geo file, but your first<br>
approach of generating the STL externally and merging it into Gmsh<br>
should work as you expected.<br>
<br>
I'm using gmsh 2.9.4 (compiled under 64-bit Debian from SVN sources),<br>
in case that matters.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">David Love<div><br></div><div>PhD Candidate in Physics</div><div>Cavendish Laboratory</div><div>University of Cambridge</div><div><br></div><div>Office: +44 (0)1223 764169</div><div>Email: <a href="mailto:dml42@cam.ac.uk" target="_blank">dml42@cam.ac.uk</a></div></div>
</div>