volume

property RectilinearGrid.volume: float

Return the mesh volume.

Returns
float

Total volume of the mesh.

Examples

Get the volume of a sphere.

>>> import pyvista
>>> mesh = pyvista.Sphere()
>>> mesh.volume
0.51825