openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Add inclusive, exclusive options for openmc.model.subdivide

Open MicahGale opened this issue 5 months ago • 0 comments

Description

openmc.model.subdivide creates a set of regions which cover all of $\mathbb{R}^3$ by bookending the returned regions with regions towards $-\infty$ and another towards $+\infty$. Sometimes this isn't useful, such as discretizing an existing fuel pin, which already has bounding ZPlanes.

It would be nice to have an optional argument that excludes these bookends (or even just one of them). I can't quite think of a good name. @tjlaboss may have better ideas. I'm thinking:

def subdivide(surfaces, inclusive = True):
     pass

Alternatives

Uses can always exclude these regions manually:

regions = openmc.model.subdivide(planes)[1:-1]

Compatibility

This would add an optional argument which does not change default behavior.

MicahGale avatar Aug 05 '25 18:08 MicahGale