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

Relax Error Check for 1D cylindrical collection #1347

Merged
merged 8 commits into from
Jul 28, 2023

Conversation

mgjarrett
Copy link
Contributor

@mgjarrett mgjarrett commented Jul 17, 2023

What is the change?

The CylindricalComponentsAverageBlockCollection was recently added: #1238

This collection is in some ways modeled after the SlabComponentsAverageBlockCollection, which is much older. The _checkComponentConsistency concept is similar, where each analogous component of each block in the collection is checked for consistency before homogenizing multiple blocks into one representative block. However, the new implementation checked that two components being homogenized into one have exactly the same nuclides. The old implementation just checked key nuclides like U-235, Pu-239, Fe-56, and Na-23 to verify that components were similiar; i.e., structure being merged with structure (Fe-56), fuel with fuel (U-235/Pu-239), coolant with coolant (Na-23).

Why is the change being made?

The new implementation was excessively picky about what can be homogenized together. Two similar assembly types where one has some extra trace isotopes in the cladding would throw a ValueError instead of just graciously being homogenized together.

This PR revises the implementation to make it functionally equivalent to the similar, older method.

Note: using Fe-56 as a proxy for structure and Na-23 for coolant is undesirably SFR-centric, but I'm not going to address that in this PR.


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 important changes.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

@mgjarrett mgjarrett requested a review from keckler July 25, 2023 15:08
@keckler
Copy link
Member

keckler commented Jul 25, 2023

@tjayasa FYI, I think your work was one of the motivations for this PR?

@keckler
Copy link
Member

keckler commented Jul 25, 2023

Note: using Fe-56 as a proxy for structure and Na-23 for coolant is undesirably SFR-centric, but I'm not going to address that in this PR.

I'd sugget putting a comment in the code saying as much, for future readers.

doc/release/0.2.rst Outdated Show resolved Hide resolved
Comment on lines +484 to +486
diffNucs = theseNucs.symmetric_difference(thoseNucs).intersection(
consistentNucs
)
Copy link
Member

Choose a reason for hiding this comment

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

This check is, IMO, pretty opaque and could use a comment. It works, but is one of those "elegant but unreadable" pieces of code.

Co-authored-by: Chris Keckler <kecklerct@gmail.com>
@mgjarrett mgjarrett marked this pull request as ready for review July 28, 2023 17:39
@mgjarrett mgjarrett merged commit e888b23 into terrapower:main Jul 28, 2023
@mgjarrett mgjarrett deleted the fixCylindricalCollection branch July 28, 2023 17:39
mgjarrett added a commit to mgjarrett/armi that referenced this pull request Aug 24, 2023
Co-authored-by: Chris Keckler <kecklerct@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants