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

Fix scaling of edge assembly VOLUME_INTEGRATED parameters in third core periodic symmetry #2060

Merged
merged 6 commits into from
Jan 22, 2025

Conversation

mgjarrett
Copy link
Contributor

@mgjarrett mgjarrett commented Jan 21, 2025

What is the change?

Combine volume-integrated parameters for symmetric edge assemblies before removing one of them.

Why is the change being made?

There was previously a condition where the volume-integrated parameters of assemblies on the 0-degree and 120-degree symmetry line in a third-core periodic model were incorrect when the core still had both copies of the symmetric assembly. Typically we remove the assemblies on the 120-degree symmetry line using the EdgeAssemblyChanger.removeEdgeAssemblies(), at which point the volume-integrated params in the assemblies on the 0-degree line would become correct again.

A recent updated treatment of the symmetry factor (#2017) applies symmetry factor scaling to volume-integrated block parameters in an assembly immediately before that assembly is moved to a new location in the core (or initially placed in the core). This fixed the condition where the volume-integrated params were technically incorrect while both symmetric identicals were present. However, once the edge assemblies are removed, the volume-integrated params would become incorrect again.

This PR adds a step to scale the volume-integrated params on the 0-degree symmetry line immediately before removing the assemblies along the 120-degree symmetry line, so that the volume-integrated params are always correctly scaled to account for symmetry.


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.

@mgjarrett
Copy link
Contributor Author

The unit test for the edge assembly changer did not need to be updated because the scaling was already applied in the unit test:

converter.scaleParamsRelatedToSymmetry(self.r)

It just wasn't being applied when the core was constructed from blueprints.

@john-science john-science added the bug Something is wrong: Highest Priority label Jan 22, 2025
Copy link
Member

@john-science john-science left a comment

Choose a reason for hiding this comment

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

Okay, it's a very lightweight change in terms of number of lines of code. I like it.

And it will only very slightly increase the time to load a Reactor data model from blueprints.

Not a LOT of extra testing, but I see what you mean about the existing unit test.

Thanks!

@john-science john-science merged commit 516c55d into main Jan 22, 2025
17 checks passed
@john-science john-science deleted the edgeAssemblyScaling branch January 22, 2025 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong: Highest Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants