I’m working on a model (that will eventually be used in a Cardinal multiphysics simulation) for a reactor with coolant that flows in the y-direction. According to the documentation for HexagonalPrism, orientation can only be 'x' or 'y'
It seems like for my picture, by definition of orientation in the docs, I’d want orientation = 'z', but that isn’t an option. What is the recommendation here?
I will answer my own question, in case others are wondering the same in the future.
The best way is to use one of the options available and then rotate the geometry to be in the desired reference frame. The key here is that two rotation calls are necessary. First, the region (intersection of hex cell and bounding z-planes) must be rotated via openmc.Region.rotate(). Then, the cell that contains the universe must be rotated by specifying openmc.Cell.rotation on the cell after it is created. Here’s some code to show how I do this
(note the definition of core_lattice is not shown, but I used a HexLattice)
Important to note that openmc.Cell.rotation applies to the fill of the cell and doesn’t actually rotate the cell itself, which is why openmc.Region.rotate() must be used.