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

Moving FuelHandler Algorithms to separate files #962

Merged
merged 5 commits into from
Nov 15, 2022
Merged

Conversation

john-science
Copy link
Member

Description

The FuelHandler.py file has a ton of algorithms of various kinds that are very specific to hex assembly reactors. This has caused lots of confusion for people who are implementing some sort of fuel handling logic. It also muddies the waters significantly between general fuel handling logistics code and detailed hex assembly algorithms.

The code in the old fuelHandler.py has been broken up into three files:

  • fuelHandlers.py - has FuelHandler class
  • hexAssemblyFuelMgmtUtils.py - Assorted shuffling and misc algorithms for managing hex assembly reactors.
  • assemblyRotationAlgorithms.py - Rotation algorithms called by FuelHandler.outage(). (This does seem to be specific to assembly/hex-assembly reactor, but FuelHandler.outage() will only call it if a particular setting is used, which does an okay job of keeping the FuelHandler class from being specific to hex assemblies.)

Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes (location doc/release/0.X.rst) are up-to-date with any bug fixes or new features.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

@john-science john-science added architecture Issues related to big picture system architecture cleanup Code/comment cleanup: Low Priority labels Nov 14, 2022
@john-science john-science linked an issue Nov 14, 2022 that may be closed by this pull request
Copy link
Member

@keckler keckler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It makes a lot of sense to move those fuel handler methods off of the class anyways, or at least to make them into staticmethods, because none of them utilized the class/instance attributes at all.

armi/physics/fuelCycle/fuelHandlers.py Show resolved Hide resolved
@john-science john-science merged commit 75c2c87 into main Nov 15, 2022
@john-science john-science deleted the mv_fh_algos branch November 15, 2022 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Issues related to big picture system architecture cleanup Code/comment cleanup: Low Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean assorted algos out of FuelHandler class
2 participants