2D mesh tallies at different heights?

I am assuming that defining a mesh tally as below will create a 100x100 2D mesh on the xy plane at z=0.

mesh = openmc.RegularMesh()
mesh.dimension = [1000,1000]
mesh.lower_left = [-50,-50]
mesh.upper_right = [50,50]

For the purposes of tallying I’d like to be able to move this mesh to different locations in the +/- z direction. What I have tried is:

mesh = openmc.RegularMesh()
mesh.dimension = [1000,1000]
mesh.lower_left = [-50,-50,40]
mesh.upper_right = [50,50,40]

I was hoping this would give me a 2D mesh at z = +40, but it throws an error. How can I take a 2d mesh tally at a different z coordinate?

Thanks,
Luke

Hi Luke,
Without a z-coordinate specified, I think it’s infinite in the z-plane. So when you do specify a z-coordinate, you need to give it some thickness. So if you want a small slice in the z-plane, try:

mesh.lower_left = [-50,-50,39.5]
mesh.upper_right = [-50,-50,40.5]

Best,
Miriam