-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add conv_vel cs limit to mlt/tdc #780
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, q and dq are set before this subroutine which calls mlt/tdc to create the pms model.
call look_for_brackets(lnd, dlnd, lnd1, lnd3, pre_ms_f, y1, y3, &
imax, pre_ms_lrpar, rpar, pre_ms_lipar, ipar, ierr)
…rol opacity_min to introduce opacity floor
Adding support to max_conv_vel_div_csound (non-TDC MLT options) and adding opacity_min control
replace max_conv_vel_div_cs with max_conv_vel. still missing csound from star.
fixes.
This pr needs a changelog, and some testing, then it will be ready for a merge. |
Reconsideration, perhaps we can introduce a convective enthalpy flux limiter as well for TDC, as in Radek's thesis. This might be more appropriate than a strict convective velocity limter for TDC. It might help convergence on the pre-ms for TDC. https://acta.astrouw.edu.pl/Vol58/n3/pap_58_3_4.pdf. This would be useful for RSP as well. |
if (s% use_Ledoux_criterion) then | ||
gradL = grada + gradL_composition_term ! Ledoux temperature gradient | ||
else | ||
gradL = grada | ||
end if | ||
|
||
! maximum convection velocity. | ||
if (k>=1) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately checking if associated(s% Csound_face) .and. associated(s% q)
still yields in backtrace errors from astero in the fast_from_file
and other tests, see https://testhub.mesastar.org/EbF%2Fadd_Cs_limit_to_TDC/commits/0a89a8e.
Using a check for k >=1
seems to work better.
To make use of deprecated controls
max_conv_vel_div_csound
andmax_conv_vel_div_csound_maxq
by request #776 and #373. This pr introduces a cs limiter, initially designed by adam/pablo for tdc. We can also introduce a limit for mlt, similar to the one present in previous releases. At the moment, this pr only includes the cs limiter for conv_vel inside TDC.This pr has also highlighted some potential issues in the building of the pre_ms_model. We are unable to call
s% q(k)
inside mlt when building the pre_ms_model because it is not yet set. In fact, I've marked a couple statements inside the pms build routine which could be problematic.I don't mind removing
max_conv_vel_div_csound_maxq
, but ideally, we can call q(k) inside the mlt_routine during the pms model creation.worst case, we don't introduce either of these controls, but in that case we should remove them all together.