Rotational Periodic Boundary Conditions

Hi all,

I am having some trouble getting rotational periodic boundary conditions to work. This is the geometry I’m working with:

The top and right surfaces are periodic, while the bottom and left surfaces are reflective. To meet the requirements in the documentation: “Currently, only rotations about the z-axis are supported.”, both the top and right surfaces intersect the origin.

“For a rotational periodic BC, the normal vectors of each surface must point inwards—towards the valid geometry. If the geometry instead lies in the fourth quadrant, the YPlane must be replaced by a Plane with the normal vector pointing in the −y direction.”

My geometry is in the 3rd quadrant. Thus, my top and right surfaces are defined as follows:

H_top = openmc.Plane(a=0, b=-1, c=0, d=0, boundary_type="periodic")
H_right = openmc.Plane(a=-H_m, b=-1, c=0, d=0, boundary_type="periodic")

The top surface’s normal vector is then (0, -1, 0) and the right surface’s normal vector is (-H_m, -1, 0), both of which point inwards towards the geometry. However, when I try to run OpenMC on my geometry, I get the following warning:

WARNING: Couldn’t find particle after hitting periodic boundary on surface 6.
The normal vector of one periodic surface may need to be reversed.
ERROR: Maximum number of lost particles has been reached.

Here’s a link to a jupyter notebook gist with a minimal working example with the error: rotational_periodic_bc_test.ipynb · GitHub . I am using v0.12.2 of OpenMC.

Let me know if you have any ideas on why this is happening or if you notice an error in my Plane implementation.

Thanks,
Gwen

1 Like