RectangularPrism not of type region

Hi there,

I tried to replicate some bits of depletion code but ran into trouble with defining a bounding box.
The following lines of code produce the error:

Unable to set "cell region" to "<RectangularPrism at 0x7c913fc55fd0>" which is not of the type "Region"
pitch = 1.24
bound_box = openmc.model.RectangularPrism(-pitch, pitch, boundary_type="reflective")
root_cell = openmc.Cell(fill=pin_univ, region=bound_box)
model.geometry = openmc.Geometry([root_cell])

Documentation

openmc.model.RectangularPrism — OpenMC Documentation

says that the prism is bounded by four planar surfaces, so I don’t understand why it is not of type Region. Any suggestions would be very appreciated.

Best regards
Frank

1 Like

It is not a region, but a composite surface. So I guess you’d need to orient the surface ?

Does that work if you write ?
root_cell = openmc.Cell(fill=pin_univ, region=-bound_box)

2 Likes

Hi, sounds like a good idea. My Notebook is at my workplace. Have to try tomorrow, but thanks already for the suggestion!

1 Like

Turned out “-bound box” works! Thanks!

1 Like