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

Control decusping #1229

Merged
merged 30 commits into from
Apr 18, 2023
Merged

Control decusping #1229

merged 30 commits into from
Apr 18, 2023

Conversation

mgjarrett
Copy link
Contributor

@mgjarrett mgjarrett commented Mar 31, 2023

Description

The performance of the UniformMeshGeometryConverter depends significantly on how good of a common uniform mesh can be generated. The uniform mesh converter will homogenize materials in neighboring blocks, which can be a problem at material boundaries between fuel or absorber and another material. One manifestation of this issue is a significant control rod "cusping" effect that has been observed when calculating differential rod worth.

The existing method _computeAverageAxialMesh() is too simplistic and is totally agnostic to material boundaries. This PR introduces a new class, UniformMeshGenerator, that has a set of methods to modify the mesh produced by _computeAverageAxialMesh so that it does a better job of representing important material boundaries. The main goal of this PR is to eliminate control rod cusping effects, but it will also help when modeling a core that has fuel assemblies at different heights.

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.

@onufer onufer self-requested a review April 5, 2023 21:50
Uniform mesh converter was using Flags.FUEL and Flags.CONTROL as
"priority" blocks for determining XS type for a block when two
blocks with different xs types are blended. Radial shield also has
B4C, so B10 XS are needed in the converted uniform block.

This commit also checks for the relative insertion fraction of a control
rod before adding its top material boundary as a preferred mesh point.
Rounding of the common mesh to 5 places was causing problems because the
non-uniform mesh is not rounded, so you could get really small pieces of
fuel smeared into plenum above.
@mgjarrett mgjarrett marked this pull request as ready for review April 7, 2023 17:55
materialTops,
preference="top",
)
# combine all mesh points using all material boundaries as anchors with top preference
Copy link
Member

Choose a reason for hiding this comment

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

it seems like this step top vs bottom is somewhat arbitrary. is that true? if so say that its arbitrary. if not explain why its not? maybe that you know 0.0 is already in there so you want 0.0 + tops

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is arbitrary. I've gone back and forth on bottom vs. top preference.

The fuel and control material boundaries are all anchorPoints by now, so this is more about adjusting the mesh points away from boundaries if they are smaller than the minimumMeshSize. In most cases, I would expect that this filtering step doesn't actually filter out any mesh points, but there could be a situation where it becomes necessary. It's hard to say whether bottom or top is better in general here; it would depend on the specific circumstances of a given case.

Copy link
Member

Choose a reason for hiding this comment

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

sorry, i meant to say add a comment in the code that it is arbitrary if its arbitrary. helps next person to figure out if they are breaking past intent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment

This function operates by filtering out mesh points that are too close together while always holding on
to the specified "anchor" points in the mesh. The anchor points are built up progressively as the
appropriate bottom and top boundaries of fuel and control assemblies are determined.
"""
Copy link
Member

Choose a reason for hiding this comment

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

I really like how clear this code is an how you were able to re-use filter!

@john-science
Copy link
Member

@mgjarrett You mention performance. This certainly adds a lot of code, do we know how this affects our performance?

@onufer
Copy link
Member

onufer commented Apr 11, 2023

This looks great @mgjarrett! thanks!

@john-science take a look at the results shared in the latest issue on our internal reactivity control plugin. its hard to evaluate performance of de-cusping without an actual flux solver and we decided it would be better to share that evaluation internally.

@mgjarrett
Copy link
Contributor Author

mgjarrett commented Apr 12, 2023

@mgjarrett You mention performance. This certainly adds a lot of code, do we know how this affects our performance?

The goal here was to improve performance with respect to accuracy. I don't think this will significantly impact the runtime performance.

I have not profiled it at all, but I just ran an example case to measure timing and found that it consistently takes about 0.6-0.7 s for the UniformMeshGenerator class to run _generateUniformMesh() on a Natrium model. The entire UniformMeshConverter typically takes tens of seconds at least, so this is a minor increase in run time overall.

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.

Talked it out with the team. Looks great!

@john-science john-science merged commit 00c40c2 into terrapower:main Apr 18, 2023
@mgjarrett mgjarrett deleted the controlDecusping branch April 18, 2023 19:59
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.

3 participants