-
Notifications
You must be signed in to change notification settings - Fork 91
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
Add measure of convergence for tight coupling #1033
Add measure of convergence for tight coupling #1033
Conversation
Summary: - removes "numCoupledIterations" and adds new settings to turn on and control the number of iterations for tight coupling - adds variables to interfaces so that different physics can converge on different things (e.g., global flux can converge on keff or power) and have different convergence criteria. - prints convergence summary for each iteration and at the end of a coupling iteration - cleans up loose coupling (presumably) typos
1) reduce default number of tight coupling iterations 2) make tight coupling convergence criteria a case setting and add a settings validator
- it is more useful to print as it unfolds and the final iteration has all the information. No need to print the same information twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few in-line requests about refactoring.
Also this PR requres an update to the user documentation further describing the coupling schemes.
This page should be expanded/updated: https://terrapower.github.io/armi/user/assorted_guide.html
What I was saying is I don't want to put this in But |
Yes I'm committing to that now. Thank you |
doc/user/assorted_guide.rst
Outdated
method. | ||
ARMI supports loose and tight coupling. Loose coupling is interpreted as one-way coupling between physics for a single time node. For example, a power distribution in cycle 0 node 0 is used to calculate a temperature distribution in cycle 0 node 0. This temperature is then used in cycle 0 node 1 to compute new cross sections and a new power distribution. This process repeats itself for the lifetime of the simulation. | ||
|
||
.. image:: images/looseCouplingIllustration.png |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see these images in the PR. I assume they are generated during the doc build?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will make an issue to make these via graphviz instead of a force added png.
doc/user/assorted_guide.rst
Outdated
^^^^^^^^^^^^^^^^ | ||
The block-wise power can be used as a convergence mechanism to avoid the integral effects of :math:`k_{\text{eff}}` (i.e., over and under predictions cancelling each other out) and in turn, can have a different convergence rate. To measure the convergence of the power distribution with the prescribed tolerances (e.g., 1e-4), the power is scaled in the following manner (otherwise the calculation struggles to converge). | ||
|
||
For assembly, :math:`a`, we compute the total power of the assembly, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor grammar: "For an assembly"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ntouran The SRSD looks ok to me. We could tweak the language, but I think it's ok as-is. I did update the ARMI user docs and think that the SRSD aligns well with the new updated user docs. Let me know what you think? EDIT: I updated the "status" for |
@@ -0,0 +1,147 @@ | |||
# Copyright 2019 TerraPower, LLC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I believe today is 2023 in the Gregorian calendar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is ready for prime time.
@opotowsky @sombrereau @drewj-usnctech This is an API-breaking change. I just want to make sure our major stake-holders are aware of it.
|
||
Tight Coupling | ||
----------------- | ||
Tight coupling is interpreted as two-way communication between physics within a given time node. Revisiting our previous example, enabling tight coupling results in the temperature distribution being used to generate updated cross sections (new temperatures induce changes such as Doppler broadening feedback) and ultimately an updated power distribution. This process is repeated iteratively until a numerical convergence criteria is met. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super minor point but this would be better if it were line wrapped rather than just one huge line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
best doc page ever, thanks!
…30/assembly-1d-parent-class * terrapower/main: Adding measure of convergence for tight coupling (terrapower#1033) Fixing ruamel.yaml deprecation warning (terrapower#1109) Fix Issues with Peak Params (terrapower#1108) Adding a helper method to validate versions in settings files (terrapower#1102) Using fuelCycle settings constants (terrapower#1107) Using mockRunLogs in a better way (terrapower#1106) Using module-level neutronics settings constants (terrapower#1104) Cleanup umc (terrapower#1099) Fixing broken doc link for mpi4py (terrapower#1105) Improving logic for getNumPins (terrapower#1098) fix `code-block` sphinx errors (terrapower#1091) Defer setting material number in MCNP material card (terrapower#1086) Efficiency improvement for uniform mesh converter and general operations (terrapower#1042) Updating python version listed in README (terrapower#1076) Removing unused code from `calcReactionRates()` (terrapower#1084)
Description
This PR adds the capability to quantifiably measure the numerical convergence of solving nonlinear systems of equations when considering tight coupling. The current approach within ARMI blindly iterates on the system of equations using the
numCoupledIterations
setting. While indispensable for framework development, characterizing the numerical convergence of the nonlinear system of equations is essential to ensuring the mathematical validity of obtained solutions. This PR aims to accomplish this by adding several methods and settings to measure the convergence of parameters on individual interfaces.Breaking Changes
looseCoupling
andnumCoupledIterations
settings (they are removed).Forthcoming/Follow-on Work
Checklist
doc/release/0.X.rst
) are up-to-date with any bug fixes or new features.doc
folder.setup.py
.