About cylindrical mesh using in multi cylindrical-fuel pins

Hi guys,
I am confused about the cylindrical mesh how to define on fuel assembly, such as the dimension 2x2.
Now I just have known how to use the cylindrical mesh for one pin like:

# Create a mesh that will be used for tallying
mesh=openmc.CylindricalMesh()
# mesh.r_grid = [0, 0.445, 0.89, 1.335, 1.78]
mesh.r_grid = np.linspace(0, 1.78, num=5)
# mesh.phi_grid = [0, 0.25*pi, 0.5*pi, 0.75*pi, pi, 1.25*pi, 1.5*pi, 1.75*pi, 2*pi]
mesh.phi_grid = np.linspace(0, 2*np.pi, num=9)
# mesh.z_grid = [-17.5, -16.5, -15.5, -14.5, -13.5, -12.5, -11.5, -10.5, -9.5, -8.5, -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5]
mesh.z_grid = np.linspace(-17.5, 17.5, 36)

And could cylindrical mesh define each fuel-pin of array arrangement ?


Best regard!
Zhuangli

If you wanted to have a cylindrical mesh in multiple fuel pins, you would need to define a separate mesh for each fuel pin. There is no way to have a single cylindrical mesh cover multiple fuel pins.

Alternatively, the MeshFilter class allows you to arbitrarily translate the mesh being used, so if your goal is to just tally over multiple fuel pins with the same cylindrical mesh, you could do that with a single CylindricalMesh and multiple MeshFilters. This would look like:

mesh = openmc.CylindricalMesh()
...

filter_pin1 = openmc.MeshFilter(mesh)
filter_pin2 = openmc.MeshFilter(mesh)
filter_pin2.translation = (pitch, 0, 0)
filter_pin3 = openmc.MeshFilter(mesh)
filter_pin3.translation = (0, pitch, 0)
filter_pin4 = openmc.MeshFilter(mesh)
filter_pin4.translation = (pitch, pitch, 0)

# Create four tallies, each with a different filter from above
...

Yes! Paul,
I just use the mesh to tally. For some days I look for the method to make it, I missed myself, Thank you for saving me! :smiling_face_with_three_hearts:
I am glad that getting the all reply from you about my topics before.
Thanks for you kinder answer.


Zhuangli