Adjustable Orientation for Right Circular Cylinder

Hello,

I’ve come across the need to make cylinders that are not parallel to the x, y, or z axis. I’ve seen a few threads about using quadric surfaces and cell rotations (see Model angular Cylinder sarfaces), but I think it would be very helpful to add an option to the openmc.model.RightCircularCylinder class to either define a unit vector for the cylinder axis, while keeping the ability to define with just ‘x’, ‘y’, or ‘z’ (to prevent existing code from breaking) or change the class to be similar to the new openmc.model.ConicalFrustum class (openmc.model.ConicalFrustum — OpenMC Documentation) where the composite surface is defined by two vectors: the center_base (x0, y0, z0) and the axis (dx, dy, dz), similar to the RCC macrobody in MCNP (see image below).

Any thoughts?

Agreed, it would be nice to have this option directly. In the meantime, you can look at the conversion logic in our MCNP to OpenMC converter for how this can be done using the existing functionality:

1 Like