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

Updates for pin-related functionality #1990

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

albeanth
Copy link
Member

@albeanth albeanth commented Oct 30, 2024

What is the change?

These changes are to support upgrades in pin-related functionality. The changes in this PR can be lumped into the following buckets:

  1. History Tracker: "detail assemblies" are now fuel and control assemblies. I also added some type hints to this module to help understand what was getting passed around.
  2. Removing blocks.py::Block::breakFuelComponentsIntoIndividuals. This is removed because it is a very memory expensive way of storing pin level characteristics. Storing data as numpy arrays is much more manageable.
  3. Move getPuMoles from blocks.py up to composites.py
  4. Populate molesHmBOL and puFrac on components during completeInitialLoading.
  5. Add a method getPinMgFluxes to retrieve the pin-wise multigroup fluxes from a Block.

Why is the change being made?

To support downstream pin-related functionality upgrades.

close #791


Checklist

  • The release notes have been updated if necessary.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in pyproject.toml.

@albeanth albeanth marked this pull request as draft October 30, 2024 22:27
@albeanth
Copy link
Member Author

@zachmprince a heads up

@john-science john-science added the feature request Smaller user request label Oct 30, 2024
@john-science
Copy link
Member

@albeanth This PR needs several release notes:

num Your Change Release Note
1 History Tracker: "detail assemblies" are now fuel and control assemblies. Add this to "API Changes"
2 Removing breakFuelComponentsIntoIndividuals Add this to "API Changes"
3 Move getPuMoles from blocks.py up to composites.py Add this to "API Changes"
4 Populate molesHmBOL and puFrac on components during completeInitialLoading ignore
5 Add a method getPinMgFluxes to retrieve the pin-wise multigroup fluxes from a Block. Add to "New Features"

@drewj-tp drewj-tp self-requested a review November 4, 2024 19:27
Copy link
Contributor

@drewj-tp drewj-tp left a comment

Choose a reason for hiding this comment

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

Changes seem to be in order. Requesting release notes according to @john-science comment - #1990 (comment)

Some softer, non-blocking changes that I'd consider good to haves but not strictly needed at this time.

armi/reactor/components/component.py Outdated Show resolved Hide resolved
armi/reactor/components/component.py Outdated Show resolved Hide resolved
Comment on lines 1330 to 1331
# Return pin fluxes
return self.parent.p.get(param)[indexMap]
Copy link
Contributor

Choose a reason for hiding this comment

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

If the parameter param is not defined on the parent, or is None, there could be a not great exception raised here. I would recommend some error helping, maybe a try/except/raise pattern like

try:
    return self.parent.p.get(param)[indexMap]
except Exception as ee:
    msg = f"Failure getting {param} from {self} via parent {self.parent}"
    runLog.error(msg)
    runLog.error(ee)
    raise ValueError(msg) from ee

or just allowing the raised exception to pass up, replacing the raise ValueError(msg) from ee with raise

armi/reactor/components/componentParameters.py Outdated Show resolved Hide resolved
armi/reactor/components/componentParameters.py Outdated Show resolved Hide resolved
armi/reactor/tests/test_components.py Outdated Show resolved Hide resolved
armi/reactor/tests/test_components.py Outdated Show resolved Hide resolved
armi/reactor/tests/test_components.py Show resolved Hide resolved
armi/reactor/tests/test_components.py Outdated Show resolved Hide resolved
@@ -120,6 +124,8 @@ class HistoryTrackerInterface(interfaces.Interface):

name = "history"

DETAILED_ASSEMBLY_FLAGS = [Flags.FUEL, Flags.CONTROL]
Copy link
Member

Choose a reason for hiding this comment

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

Did we check with the users of this to ensure that this doesn't need to be configurable? Specifically for pin performance evaluations? @sammiller11235?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. We were told that, for now, we are only concerned with fuel and control assemblies.

Copy link
Member

Choose a reason for hiding this comment

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

prior to this we only got fuel.

Copy link
Contributor

@drewj-tp drewj-tp left a comment

Choose a reason for hiding this comment

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

Changes from @zachmprince look good. Just need release notes and I feel okay with this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Smaller user request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

axialExpansionChanger and breakFuelComponentsIntoIndividuals() are not compatible
6 participants