Repository navigation
improved rate interpolation and T corrections in solver - #1143
Merged
Merged
Conversation
Evaluate trial temperatures from a reference temperature and compute rate table offsets in quad precision. Add a retry damping control and set both solver controls for the 20M core collapse test.
Refresh the final abundances for the small network and constant pressure one-zone burns. The updated output matches a fresh MESA installation.
Apply the tested solver and Skye settings in the collapse stage. Refresh the standard models from the full run so the collapse stage starts from the tested checkpoint.
… energy error limits
Debraheem
requested review from
annethoul,
aurimontem and
fxt44
as code owners
December 1, 2026 03:54
Debraheem
force-pushed
the
EbF/T_sensitivity_and_rate_interpolation
branch
from
December 1, 2026 04:34
1723526 to
9e0b413
Compare
Update the one-zone burn reference output for the revised rate interpolation. Use the reference temperature through 20M collapse, refresh the six standard models, and use sticky gradr during the hb_2M helium flash with equL residuals included.
Debraheem
force-pushed
the
EbF/T_sensitivity_and_rate_interpolation
branch
from
December 1, 2026 04:38
9e0b413 to
bf3fff6
Compare
zingale
reviewed
Dec 1, 2026
Collaborator
|
I like |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Only the best parts of #1043
For rate interpolation between two table nodes, we evaluate
log10(T/Tk)in quad precision and use that offset to evaluate the cubic in double precision. This lets the rates respond to small changes inTthat can get lost when subtracting two absolute log temperatures. In the late burning model in the20M_pre_ms_to_cctest_suite model, one spacing inlnTwas only3.6d-15, but that was enough to change the scaled Fe54 residual by about1.4d-4. So there is extreme sensitivity to small T changes in the late burning stages. This change is the difference between the model converging or not. I suspect this improvement will improve the overall convergence at high temperature, by allowing finer corrections in sensitive regimes where jacobian is nearly singular and double precision is not enough to reliably converge.Two new dev controls for main that will be useful to test, but are great for improving overall convergence.
solver_use_T_referencelets us evaluate the trial temperature usingdlnTfrom a reference linearT. The purpose here is to retain smallTcorrections produced by the solver. Withexp(s% lnT(k)), the correction can get lost when we add it to the absolutelnT, before we even callexp. This matters in stiff burning where a small change inTcan produce a large change in the burning residual.Pretty soon here, i might suggest making
solver_use_T_reference = .true., the global default, but for now, i want it to live in the 20M model to see how it behaves longer term over many commits.The other control,
solver_max_T_correction_factor, lets us shorten the whole Newton step if theTcorrection in any cell is too large. Both controls are off by default. This is a dev control that is similar to other solver damping controls but specifically targets large temperature corrections that can make the rates explode, and cause the solver to flail. If it proves not useful, we can remove it later, hence why it's a dev control.