Killing neutrons at a plane?

Hello, I am fairly new to using OpenMC and am currently just trying to chug my way through making a simple tally that tells me how many neutrons enter my cell of material from a mono-directional point source and how many exit out the other side. However, if they do exit out the other side, they keep going forever and my program never finishes. I know you can kill neutrons based on energy and weight, but is there a way I can just kill them once they cross a certain x-value?

Hi @madhofs and welcome to the community. To kill particles when they reach a surface, you just need to assign a vacuum boundary condition:

xplane = openmc.XPlane(value, boundary_type='vacuum')

When this plane is used as part of a cell’s region definition, any particles that hit it will be killed.

Thank you @paulromano for your response! This make sense and I have implemented it.