[Gmsh] get mesh volume

Juan Sanchez juan.e.sanchez at gmail.com
Thu May 3 22:00:51 CEST 2018


Hello,

Does anyone know how to get gmsh to output a mesh, where all
tetrahedra meet the Delaunay condition of having their circumcenter
inside their volume?  For my example, it seems like this condition is
not being met, even though I have tried these options:
Mesh.OptimizeNetgen=1;
Mesh.OptimizeThreshold=1;

Regards,

Juan


On Tue, May 1, 2018 at 7:51 AM, Juan E. Sanchez
<juan.e.sanchez at gmail.com> wrote:
> Hello,
>
> Thanks for the check, and the useful script.
>
> Upon further analysis, the circumcenter of many of the tetrahedron are
> outside their respective volumes.  This is where the additional volume is
> coming from in my calculations.
>
> This is affecting the results of the control volume method I am using, since
> the total volume of the structure is not conserved.
>
> Is there anything I can do to force the circumcenters to be inside of the
> tetrahedron?
>
> Regards,
>
> Juan
>
>
>
> On 5/1/18 2:01 AM, Christophe Geuzaine wrote:
>>
>>
>> You can run this script, e.g. compute_volume.geo :
>>
>> Merge "3dblock.msh";
>> Plugin(NewView).Run;
>> Plugin(ModifyComponents).Expression0 = "1";
>> Plugin(ModifyComponents).Run;
>> Plugin(Integrate).Dimension = 3;
>> Plugin(Integrate).Run;
>>
>> You'll get
>>
>> Info    : Running '/Applications/Gmsh.app/Contents/MacOS/gmsh vol.geo -'
>> [Gmsh 3.0.7, 1 node, max. 1 thread]
>> Info    : Started on Tue May  1 09:00:57 2018
>> Info    : Reading 'vol.geo'...
>> Info    : Reading '3dblock.msh'...
>> Info    : 6790 vertices
>> Info    : 32825 elements
>> Info    : Done reading '3dblock.msh'
>> Info    : Running Plugin(NewView)...
>> Info    : Done running Plugin(NewView)
>> Info    : Running Plugin(ModifyComponents)...
>> Info    : Done running Plugin(ModifyComponents)
>> Info    : Running Plugin(Integrate)...
>> Info    : Step 0: integral = 1.000000000000803e-15
>> Info    : Done running Plugin(Integrate)
>> Info    : Done reading 'vol.geo'
>> Info    : Stopped on Tue May  1 09:00:57 2018
>>
>>
>>
>>> On 30 Apr 2018, at 22:58, Juan E. Sanchez <juan.e.sanchez at gmail.com
>>> <mailto:juan.e.sanchez at gmail.com>> wrote:
>>>
>>> Hello,
>>>
>>> Is there a way to get the mesh volume calculated by gmsh?
>>>
>>> My simulator is calculating a volume of 1.09e-15 for the attached
>>> structure, but it should be 1e-15.
>>>
>>> Before I added these flags
>>> Mesh.OptimizeNetgen=1;
>>> Mesh.OptimizeThreshold=1;
>>>
>>> I was getting 1.17e-15.
>>>
>>> I am summing the volume for each tetrahedron sub volume from the edge
>>> center, to the element center, to the centers of each triangle face of the
>>> edge.
>>>
>>> If my calculation is correct, are there flags I can use to improve the
>>> situation?
>>>
>>> I am running version 3.06.
>>>
>>> gmsh -3 3dblock.geo
>>>
>>>
>>> Regards,
>>>
>>> Juan
>>> <3dblock.geo>_______________________________________________
>>> gmsh mailing list
>>> gmsh at onelab.info <mailto:gmsh at onelab.info>
>>> http://onelab.info/mailman/listinfo/gmsh
>>
>>
>



More information about the gmsh mailing list