Closed rjfarmer closed 1 year ago
From Anne on slack: convcorecpm.pdf
Do we have a test case that specify tests that the core grows with ledoux? That would a be helpful first step to make sure we keep this working (when we have a fix)
Some notes that hopefully help clarify what's going on.
conv_premix_fix_pgas = .false.
in 12778 breaks convective premixing. This means that the EOS updates internal to CPM need to be done at fixed PT rather than fixed DT.gradr
getting set improperly. Doing an EOS call at fixed DT changes the pressure of the newly mixed cell after attempting to move the CPM convective boundary. Then when gradr
is recalculated it uses that wrong pressure, it can end up below grada
and therefore non-convective. But then the subsequent Newton iterations adjust the pressure profile back into the right configuration, and at the end of the step you end up seeing gradr > grada
at the convective boundary.lnPgas_flag
to fix this, but we do need to reintroduce EOS calls at fixed PT for the cells touched by CPM. We need to change the logic that's commented out around here so that it no longer relies on lnPgas_flag
for doing EOS calls at fixed PT for the relevant cells.@annethoul Here's a rough draft of a test suite case to check this for the future. It uses the starting model from the MESA summer school lab and works similarly to the existing hb_2M test suite case. The insist specifies the range of convective core mass that is acceptable when the central H abundance is 0.5. The extras_after_evolve routine checks whether the model ends up in this range. The values currently given in the inlist were pulled from the plot shared by Evan in this thread. CPM_LEDOUX_test.tar.gz
Appears to be related to the removal of lnpgas