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

GlobalFluxInterface has a silent, undocumented, default tight coupling #1570

Open
drewj-usnctech opened this issue Jan 3, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@drewj-usnctech
Copy link
Contributor

I'm working on an internal tight coupling workflow that should have converged, but didn't. After some digging, I found the GlobalFluxInterface sets an undocumented default tight coupler, even if you don't request to converge on keff

self._setTightCouplingDefaults()
def _setTightCouplingDefaults(self):
"""Enable tight coupling defaults for the interface.
- allows users to set tightCoupling: true in settings without
having to specify the specific tightCouplingSettings for this interface.
- this is splt off from self.__init__ for testing
"""
if self.coupler is None and self.cs["tightCoupling"]:
self.coupler = interfaces.TightCoupler(
"keff", 1.0e-4, self.cs["tightCouplingMaxNumIters"]
)

I understand why a default tight coupler for global flux makes sense. In most cases, this is probably what you want to do. But the behavior isn't documented, at least not in the tight coupling docs, which led to my confusion. And it's not included in any logging so the log file wasn't super helpful.

The thing that tipped me off was the addition of the keff convergence table in addition to the field I cared about. So there was something about converging on keff, but I had no idea where it came from

@albeanth
Copy link
Member

But the behavior isn't documented, at least not in the tight coupling docs, which led to my confusion

Yeah that's fair. Feel free to make an addition to the docs, if you'd like! I'm happy to review and help with that as needed. Unfortunately, my plate is currently full and I cannot take that on myself.

And it's not included in any logging so the log file wasn't super helpful.
The thing that tipped me off was the addition of the keff convergence table in addition to the field I cared about. So there was something about converging on keff, but I had no idea where it came from

At the conclusion of each tight coupling iteration, there is a tight coupling convergence summary table (as you've seen). The idea was that each interface that is being used for measuring convergence is listed along with the parameter being used to measure convergence of said interface. So my hope was that the interface listed would point a user/dev in that direction. If you have suggestions on how to improve that, I think we'd welcome it!

@john-science john-science added the documentation Improvements or additions to documentation label Jan 13, 2024
@john-science
Copy link
Member

@drewj-usnctech I agree with Tony about the tight coupling summary table. But... sure, better documentation. That's totally fair.

Do you want to take a crack at that documentation? Or should I?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants