Question on flux tally by openmc.CylindricalMesh

Hello everyone,

I am using CylindricalMesh and tally the axial flux at r=55.8cm to 56.2cm. My code is as follow:

mesh_axial = openmc.CylindricalMesh(
name=‘Mesh_Axial’,
r_grid=np.linspace(55.8, 56.2, 2),
phi_grid=np.linspace(0.0, 6.283185307179586, 2),
z_grid=np.linspace(0, 200, 21))

And I found that the result is not equivalent to the sum of the flux at r=‘55.8cm to 56cm’ and r=‘56cm to 56.2cm’.

More precisely, I run with the line ‘r_grid=np.linspace(55.8, 56.2, 2)’ and get flux1. Then I change the line into ‘r_grid=np.linspace(55.8, 56.0, 2)’ and ‘r_grid=np.linspace(56.0, 56.2, 2)’, and run respectively to get the axial flux2 and flux3.

My question is: flux1 is not equal to flux2+flux3. Is there something wrong I’ve made? Why are the results different when using a total mesh compared to the meshed divided?

Hello.

I have been using a cylindrical mesh myself, so I may be able to help with this.

I believe your flux 1 calc will average the flux over the 55.8 and 56.2 region, to essentially get a flux at 56cm distance. With the other two, flux2 gives an average at 55.9, and flux3 gives an average at 56.1. This is why the sum is not giving what you expect. I would suggest maybe using a surface filter (openmc.SurfaceMeshFilter), which tracks crossings on a surface.

Thank you very much for your response! Now I understand it clearly and I will try the surface filter to get the flux of a surface.