How to get voxel volumes from a cylindrical mesh?

Hi everyone,

Does anyone know how to get the volume of each voxel directly from a cylindrical mesh? I would like to normalize my results from the ‘heating-local’ tally.

Thanks!

The mesh object should have a .volumes property

import openmc
mesh = openmc.CylindricalMesh()
mesh.r_grid=[1,2]
mesh.z_grid=[1,2]
mesh.phi_grid=[1,2]
mesh.volumes
>>>array([[[1.5]]])
1 Like

Oh, I’ve missed this. Thks @Shimwell!