Repository navigation
Relax reaction progress tolerance by default (1e20) - #7319
buchanankerswell wants to merge 1 commit into
Conversation
909ccad to
0d2d1d9
Compare
|
Hi @gassmoeller and @tjhei, I have circled back to this now. This PR has been rebased onto main and is ready for review. Once it is merged, I will rebase buchanankerswell#1 onto main. Once buchanankerswell#1 is merged, I will finally rebase #7119 onto main. This PR + buchanankerswell#1 will solve #7287, and will allow @lhy11009 to make progress on #7331. Thanks for the support. |
0d2d1d9 to
e273797
Compare
cda5d1f to
8f1c2da
Compare
8f1c2da to
ea11e10
Compare
|
|
||
| prm.declare_entry("Tolerance in reaction progress", | ||
| "0.1", | ||
| "1e20", |
There was a problem hiding this comment.
As for the problem you described: "Model immediately crashes during initialization or after a few timesteps". Is that because the model can start off with a very large reaction rate and it gets to a large value, so it requires the tolerance to be large?
There was a problem hiding this comment.
That is basically what we observed during testing.
However, the issue actually related to the over/undershoot problem that we are addressing in separate PRs (buchanankerswell#1 and #7482). If the operator splitting integration maintains strict [0, 1] bounds, then you don't get the same blow-up even if ASPECT is initialized with very large reaction rates.
This PR is more of a safeguard that sets a large reaction progress tolerance by default until those other kinks are worked out.
Pull Request Checklist. Please read and check each box with an X. Delete any part not applicable. Ask on the forum if you need help with any step.
Describe what you did in this PR and why you did it.
Before your first pull request:
For all pull requests:
If yes, please describe your usage of AI models in the creation of this pull request
I used a coding agent (mainly DeepSeek V4 Flash) to explore and test possible solutions to this issue. I ran initial tests to generate output, described the issue, and guided the agent as it isolated the root cause. I asked for possible fixes and chose the recommended solution, which it presented as the "cleanest" fix.
Summary
This PR relaxes the constraint on the reaction progress field in
material_model/reaction_model/reaction_chain.{h,cc}. The previous constraint was too strict, causing models to immediately crash during initialization or after a few timesteps. Unit tests are revised/added to test expected behavior.The underlying problem of numerical overshoots/undershoots of reaction progress fields is documented in issue #7287. This PR combined with PR buchanankerswell#1 should close issue #7287.