Repository navigation
Turn off the density reset during ZACHeB in hb_2M - #1140
Merged
Merged
Conversation
Set set_rho_to_dm_div_dV to false during the helium flash and regenerate the TAMS and ZACHeB fixtures. The test reaches HB_limit and passes the subsequent core helium burning check. See #1136 for the reconstruction work.
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.
This PR temporarily fixes the
hb_2Mfailure onmain. I think it points to a deeper issue in the radius reconstruction scheme that adjusts the cell densities at the start of each step.To make the densities consistent with shell volumes, MESA reconstructs the density at the start of each step, using
rho = dm(k)/delta_V. For an interior shell, this isHere
s% r(k) = exp(s% lnR(k)). The difference can hit precision limits when the cell is very thin and sits at a large radius. In cell 1381 of accepted model 2016, the two faces wereThe shell was only about 34 cm thick. Cubing and differencing those radii changed the density from 22216.10548 to 22216.10677 g/cm³, an increase of about 5.8e⁻⁸ relative.
At face 1380 of the attempted model 2017, that small density change was enough to shrink the EOS pressure interval from 6.50e⁻⁸ to 7.83e⁻¹⁰ in magnitude in
ln P. That made the Brunt composition term about 83 times larger in magnitude. A large temperature correction in a nearby burning cell then sent the energy residual up, and the retries eventually hit the minimum timestep. The inlist usesconvergence_ignore_equL_residuals = .true.during the flash. Including that residual in the convergence check still reproduced the failure.Merely turning off the reconstruction with
set_rho_to_dm_div_dV = .false.gets this test through the flash. If we want to keep the reconstruction, we still need to fix the precision issue.I’ve drafted a PR that reconstructs radii and densities in a potentially more robust way, with the same goal as in MESA I, Section 6.2. That could affect MESA globally, so I don’t want to rush it in just to fix this one test case. Draft #1136 · MESA I
For this test case, I set
set_rho_to_dm_div_dV = .false.in the ZACHeB inlist, regenerated the saved models, and opened an issue for the reconstruction. Issue #1139Locally, ZACHeB reached
HB_limitat model 2240. The final core helium burning stage reached helium depletion and reportedall values are within tolerance.