WARNING: Failed to find a mesh intersection on a tally mesh filter.

At runtime, after my inactive batches are over, I start getting this error:

WARNING: Failed to find a mesh intersection on a tally mesh filter.

I’m using a geometry that I constructed with the Python API. Any hints on how to debug this?

Thanks in advance!

I suspect this is caused by a finite-precision error. OpenMC thinks that a particle which starts outside of a tally mesh is crossing into the mesh, but it can’t find which mesh cell. Do you get this error message once, or a bunch of times?

When I run a small simulation with 1000 particles per batch, I get the error message 3 - 5 times per batch.

Hmm, that’s not good. Can you give me the dimensions of the mesh, and how much reactor there is outside of the mesh?

My mesh is instantiated like this:

mesh = openmc.Mesh(mesh_id=1)
mesh.type = ‘regular’
mesh.dimension = [100, 100, 1]
mesh.lower_left = [-0.75, -0.75, -5.0]
mesh.upper_right = [0.75, 0.75, 5.0]

And here are the outer bounds of the geometry. There are many regions defined inside the bounds. Let me know if you need to see those, too.

Instantiate domain bounds

left_bound = openmc.XPlane(x0=-0.75, boundary_type=‘reflective’, name=‘left’)
right_bound = openmc.XPlane(x0=+0.75, boundary_type=‘reflective’, name=‘right’)
bottom_bound = openmc.YPlane(y0=-0.75, boundary_type=‘reflective’, name=‘bottom’)
top_bound = openmc.YPlane(y0=+0.75, boundary_type=‘reflective’, name=‘top’)

back_bound = openmc.ZPlane(z0=-5.00, boundary_type=‘periodic’, name=‘back’)
front_bound = openmc.ZPlane(z0=+5.00, boundary_type=‘periodic’, name=‘front’)
back_bound.periodic_surface = front_bound
front_bound.periodic_surface = back_bound

I have some more info for you, along with a workaround for me.

I also had these cylinders defined:

Instantiate ZCylinder surfaces

fuel_outer_surface = openmc.ZCylinder(x0=0, y0=0, R=0.42889, name=‘Fuel OR’)
clad_inner_surface = openmc.ZCylinder(x0=0, y0=0, R=0.43750, name=‘Clad IR’)
clad_outer_surface = openmc.ZCylinder(x0=0, y0=0, R=0.50000, name=‘Clad OR’)
water_outer_surface = openmc.ZCylinder(x0=0, y0=0, R=0.75000, name=‘Water OR’)

I’ve also defined some inner rings and segments that I haven’t shown here. Below are the materials (left) and the cells (right):

Notice how the outermost cylinder (water_outer_surface) has the same radius as the reflective boundaries. I can avoid the warnings if I leave a gap between the outermost cylinder and the reflective bounds, for example:

water_outer_surface = openmc.ZCylinder(x0=0, y0=0, R=0.74900, name=‘Water OR’)

Thanks, Ron. I’m able to reproduce your error. I’ll try to get a fix into OpenMC for this case.

Thanks, Sterling. The issue is not blocking me right now. The model I’m using does not need to have that problematic cylinder/plane intersection.