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.sanc...@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@onelab.info
> http://onelab.info/mailman/listinfo/gmsh

_______________________________________________
gmsh mailing list
gmsh@onelab.info
http://onelab.info/mailman/listinfo/gmsh

Reply via email to