[mesa-users] Bug: variable order in other_mlt

Bill Paxton paxton at kitp.ucsb.edu
Mon Feb 8 12:15:25 EST 2016


Hi Warrick,

Thanks for the report!

I've now fixed the sources in the manner you suggest.

Cheers,
Bill



On Feb 8, 2016, at 1:33 AM, Warrick Ball wrote:

> Hi,
> 
> I've been continuing occasional work on implementing Canuto, Goldman & Mazzitelli's (1996) theory of convection.  While hunting for a bug of my own, I noticed a slip in the template for other_mlt.  This could only possibly have affected your results if you added your own MLT routine by copying null_other_mlt.
> 
> First, here's the template for other_mlt given on lines 92--102 of
> $MESA_DIR/star/other/other_mlt.f90 (leading whitespace removed):
> 
> subroutine null_other_mlt(  &
>    id, k, cgrav, m, r, T, rho, L, P, &
>    chiRho, chiT, Cp, Cv, csound, X, opacity, grada,  &
>    gradr_factor, gradL_composition_term, &
>    alpha_semiconvection, semiconvection_option, &
>    thermohaline_coeff, thermohaline_option, &
>    dominant_iso_for_thermohaline, &
>    mixing_length_alpha, alt_scale_height, remove_small_D_limit, &
>    MLT_option, Henyey_y_param, Henyey_nu_param, &
>    prev_conv_vel, max_conv_vel, dt, g_theta, tau, MLT_dbg, &
>    mixing_type, mlt_basics, mlt_partials1, ierr)
> 
> Here's what the actual function call looks like on lines 936--946 of $MESA_DIR/star/mlt/private/mlt_info.f90 (leading whitespace removed):
> 
> call s% other_mlt(  &
>    s% id, k, cgrav, m, r, T, rho, L, P, &
>    chiRho, chiT, Cp, Cv, csound, X, opacity, grada, &
>    gradr_factor, gradL_composition_term, &
>    alpha_semiconvection, semiconvection_option, &
>    thermohaline_coeff, thermohaline_option, &
>    dominant_iso_for_thermohaline, &
>    mixing_length_alpha, alt_scale_height,
>    remove_small_D_limit, &
>    MLT_option, Henyey_y_param, Henyey_nu_param, &
>    prev_conv_vel, max_conv_vel, g_theta, dt, tau, MLT_dbg, &
>    mixing_type, mlt_basics, mlt_partials1, ierr)
> 
> In particular, here are the second last lines of each:
> 
>    prev_conv_vel, max_conv_vel, dt, g_theta, tau, MLT_dbg, &
>    prev_conv_vel, max_conv_vel, g_theta, dt, tau, MLT_dbg, &
> 
> The order of dt and g_theta appear to be backwards in null_other_mlt.  I found the bug in r7624 but I just checked out r8118 and the bug is also present (but the other_mlt call is now on line 1085).
> 
> It's entirely possible that this doesn't actually affect anyone, but I figured I should report it anyway.
> 
> Cheers,
> Warrick
> 
> 
> 
> 
> 
> ------------
> Warrick Ball
> Postdoc, Institut für Astrophysik Göttingen
> wball at astro.physik.uni-goettingen.de
> +49 (0) 551 39 5069





More information about the Mesa-users mailing list