Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assembly Rotation Cleanup #1533

Open
albeanth opened this issue Dec 8, 2023 · 1 comment
Open

Assembly Rotation Cleanup #1533

albeanth opened this issue Dec 8, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@albeanth
Copy link
Member

albeanth commented Dec 8, 2023

There several rotation methods:

  1. def rotate(self, rad):
  2. def rotatePins(self, *args, **kwargs):
  3. def rotate(self, rad):
  4. def rotatePins(self, rotNum, justCompute=False):
  5. def simpleAssemblyRotation(fh):

It looks like they all boil down to the two methods on blocks.py, rotate and rotatePins. The docstring for rotatePins suggests that calling it on it's own does not constitute rotation.

armi/armi/reactor/blocks.py

Lines 1928 to 1932 in 7e1e167

Notes
-----
Changing (x,y) positions of pins does NOT constitute rotation, because the indexing of pin
atom densities must be re-ordered. Re-order indexing of pin-level quantities, NOT (x,y)
locations of pins. Otherwise, subchannel input will be in wrong order.

That said, I think we should consider making rotatePins private and/or putting warnings in docstrings (on that method, assembly.rotatePins, and assemblyRotationAlgorithms.py::simpleAssemblyRotation) saying that it's an incomplete rotation.

@albeanth albeanth added documentation Improvements or additions to documentation help wanted Extra attention is needed labels Dec 8, 2023
@albeanth
Copy link
Member Author

albeanth commented Dec 8, 2023

Additionally, rotatePins is fixed to increments of 60 degree rotations, while rotate is expected to be a flexible rotation. However, once assembly.rotate boils down to blocks.rotate, that flexible rotation angle needs to be in 60 degree increments

armi/armi/reactor/blocks.py

Lines 1839 to 1844 in 7e1e167

Parameters
----------
rad: float, required
Angle of counter-clockwise rotation in units of radians. Rotations must be
in 60-degree increments (i.e., PI/6, PI/3, PI, 2 * PI/3, 5 * PI/6,
and 2 * PI)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant