Repository navigation
Conversation
In update_rotation_mixing_info, the tau limiter added in d3022fd unconditionally overwrote the logT factor f. With the default D_mix_rotation_min_tau_full_on/off = 0, tau >= 0 always gives f = 1, so the documented logT cutoff (D_mix_rotation_max_logT_full_on = 9.4, D_mix_rotation_min_logT_full_off = 9.5) was never applied. In the tau ramp region f was computed from lgT instead of tau, which gives a large negative f (and negative D_mix_rotation) in the envelope. Compute the logT and tau factors separately and multiply them, and ramp the tau factor in tau. Also fix the direction of the logT ramp, here and for am_nu_factor in profile_getval: f went from 0 at full_on to 1 at full_off, then jumped back to 0, instead of decreasing from 1 to 0. Update the formula in controls.defaults to match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Thanks for fixing my errors! I half-hazardly added these controls thinking they would be useful for ppisn, and I no longer rely on them so feel they might be useless bloat. As such, I'm considering removing them entirely unless someone feels they should stay. |
This branch has not been deployed
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.
Problem
In
update_rotation_mixing_info(star/private/mix_info.f90), the rotational part ofD_mixis scaled by a factorfthat is meant to:D_mix_rotation_max_logT_full_on = 9.4,D_mix_rotation_min_logT_full_off = 9.5), andD_mix_rotation_min_tau_full_off/on, both 0 by default).The tau block added in d3022fd (Jan 2025) assigns
funconditionally, overwriting the logT factor:Consequences:
full_on_tau, sof = 1everywhere and rotational mixing is never suppressed above logT 9.4–9.5 as documented. This affects rotating massive stars run through late burning stages.dev_TDC_through_ppisnsets 1 and 10), cells in the ramp getffrom the logT formula. In an envelope with lgT ≈ 5 that is (5 − 9.4)/0.1 ≈ −44, i.e. a large negativeD_mix_rotation.A separate, older issue (from the initial import): the logT ramp runs the wrong way.
f = (lgT - full_on)/(full_off - full_on)goes from 0 atfull_onto 1 atfull_off, then jumps back to 0. It should fall from 1 to 0. The same reversed ramp is used foram_nu_factorinprofile_getval.f90, and in the formula incontrols.defaults.Fix
fand the tau factorf_tauseparately, and usef*f_tau.f_tauin tau:(tau - full_off_tau)/(full_on_tau - full_off_tau).(full_off - lgT)/(full_off - full_on), inmix_info.f90andprofile_getval.f90.controls.defaultsand describe the tau factor there.The ramp branches are only reached when
full_off_tau < tau < full_on_tau(orfull_on < lgT < full_off), so the denominators are positive and the default0/0tau settings never divide.Expected behaviour change
Testing
linters/check_defaults.pypasses. The code has not been compiled or run (no MESA SDK where this was written). In the test suite,ppisnis the case most likely to change: it rotates (new_omega_div_omega_crit = 0.1) and runs to Fe-core infall, so it reaches logT > 9.4.12M_pre_ms_to_core_collapse,20M_pre_ms_to_core_collapse,zams_to_cc_80andpisnturn on rotation with Ω = 0, so their rotational D_mix should be essentially zero. Thedev_TDC_through_ppisndev case, which sets the tau controls, should also be checked.🤖 Generated with Claude Code