Skip to content

improved rate interpolation and T corrections in solver - #1143

Merged
Debraheem merged 8 commits into
mainfrom
EbF/T_sensitivity_and_rate_interpolation
Dec 2, 2026
Merged

Debraheem merged 8 commits into
mainfrom
EbF/T_sensitivity_and_rate_interpolation

Conversation

@Debraheem

Copy link
Copy Markdown
Member

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 in T that can get lost when subtracting two absolute log temperatures. In the late burning model in the 20M_pre_ms_to_cc test_suite model, one spacing in lnT was only 3.6d-15, but that was enough to change the scaled Fe54 residual by about 1.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_reference lets us evaluate the trial temperature using dlnT from a reference linear T. The purpose here is to retain small T corrections produced by the solver. With exp(s% lnT(k)), the correction can get lost when we add it to the absolute lnT, before we even call exp. This matters in stiff burning where a small change in T can produce a large change in the burning residual.

if (s% solver_use_T_reference) then
   s% T(k) = s% solver_T_reference(k)*exp(s% solver_dx(i_lnT,k))
else
   s% T(k) = exp(s% lnT(k))
end if

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 the T correction 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.

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.
@Debraheem Debraheem added enhancement New feature or request rates-net Rates and net modules labels Dec 1, 2026
@Debraheem
Debraheem force-pushed the EbF/T_sensitivity_and_rate_interpolation branch from 1723526 to 9e0b413 Compare December 1, 2026 04:34
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
Debraheem force-pushed the EbF/T_sensitivity_and_rate_interpolation branch from 9e0b413 to bf3fff6 Compare December 1, 2026 04:38
@zingale

zingale commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

I like solver_use_T_reference -- I think that approach makes sense here.

@Debraheem
Debraheem merged commit 15eecb8 into main Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request rates-net Rates and net modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants