[mesa-users] Temperature gradient from Canuto & Mazzitelli (1991)

Bill Paxton paxton at kitp.ucsb.edu
Wed Dec 17 14:18:18 EST 2014


Hi Warrick,

Great job!!  When you think things have settled down, let's add your changes to the standard mesa release as a new option.

On Dec 17, 2014, at 1:33 AM, Warrick Ball wrote:

> Finally, note that I haven't done anything regarding (a) the turbulent pressure, for which CM1991 also offers a different expression (I think?),

I don't believe the fact that mesa/star has an option for turbulent pressure is well-known (now that you are aware of it, I think that brings the total count up to 2.)  

In case anyone else is interested, the current option for turbulent pressure is based on Cox&Giuli (14.69).   You enable it by setting conv_dP_term_factor to 1.  Then the pressure P is increased by factor `(1 + conv_dP_term)` by inclusion of convective turbulence.   The value of the is calculated in the mesa/mlt routines.   You can find this being used in mesa/star in the hydro_vars routine do_dlnP_dm.  It calculates the expected pressure gradient, dlnP_dm, for use in the momentum equation.

> or (b) the suggestion of limiting the mixing-length to the distance to the convective boundary.


As you know, that's something that I've changed recently.  Here's the current info about this from controls.defaults.  It is not in effect by default; set the control to 1 to enable it.

            !### limit_mixing_length_by_dist_to_bdy
            
            ! reduce local value of mixing length alpha if necessary in order to make
            ! mixing length <= distance to convective boundary times this value
            ! only applies when value is > 0
            ! setting this value = 1 implements the restriction that near a convective boundary,
            ! the mixing length doesn't exceed the distance to the boundary.
            ! Peter Eggleton, "Composition Changes during Stellar Evolution", MNRAS 156, 361-376, 1972.

         limit_mixing_length_by_dist_to_bdy = 0 ! 1 

-------------------------------------------------------------------------------

I'll take advantage of this email to stress that the code really doesn't like to have abrupt edges to convection zones such as arise if using pure Schw without overshooting or pure Ledoux without semiconvection.  As an option for "stellar engineering" a solution to this computational problem, I've recently added an option for "softening" convective boundaries.   Let me emphasize that I'm not putting this forward as a "solution" to the scientific question of what might be going on at boundaries --- I'm happy to leave that to others (such as Dave).  This is an engineering solution to a numerical problem (somewhat analogous to the use of artificial viscosity for shocks).  So if you happen to find that your convection zone boundaries seem to be jumping around in a strange unstable manner, you may want to try this as a way to smooth things out.  


            !### conv_bdy_mix_softening_f0
            !### conv_bdy_mix_softening_f
            !### conv_bdy_mix_softening_min_D_mix
            
            ! These controls cause the convective mixing coefficient to drop off "softly"
            ! near the boundary of the convective zone -- i.e, they prevent situations
            ! where the mixing coefficient drops from 10^10 or more to zero in a distance
            ! covered by only one or two cells as can happen at jumps in composition.
            ! Such a sharp edge is no problem when it is not adjacent to a convective region.
            ! But when it shows up at a convective boundary, it is problematic.
            ! It may not be physical, and it is certainly bad news numerically.
            ! This has been discussed as early as 1970's -- see for example,
            ! Peter Eggleton, "Composition Changes during Stellar Evolution", MNRAS 156, 361-376, 1972.
            
            ! The implementation of softening at convective boundaries is like overshooting
            ! but the distances are typically smaller by an order of magnitude or more.
            ! Also, the softening is primarily inside the convective region rather
            ! than penetrating strongly into the area beyond.  This is done by 
            ! backing up from the boundary into the convection region to start the
            ! softening of the mixing coefficient so that most of the effect
            ! takes place before reaching the exterior of the region.  The softening
            ! extends a short way into the exterior with a decreasing value of mixing.
            ! For example, it might start a distance of `0.003*Hp` into the convective
            ! region (Hp = pressure scale height at the boundary), and then project
            ! a mixing coefficient outward from there decreasing exponentially
            ! with distance scale of `0.001*Hp`.  For those numbers, there are
            ! 3 e-foldings before reaching the boundary, so most of the drop
            ! has happened inside the convective region.  The strength of the mixing
            ! then continues to drop exponentially until it reaches some given limit.
            
            ! The effect of this will be to soften the jump in abundances immediately
            ! adjacent to the convective region.  That will in turn soften the jump
            ! in opacity and the corresponding jump in `grad_rad` so that there will 
            ! not be a large jump from a convective point with `grad_rad >> grad_ad`
            ! to a neighboring non-convective point with `grad_rad << grad_ad`.

         conv_bdy_mix_softening_f0 = 0 ! 0.003
         conv_bdy_mix_softening_f = 0 ! 0.001
         conv_bdy_mix_softening_min_D_mix = 0 ! 1d-3




Of course you will also want to make sure that you have adequate resolution near the convection boundary --- that does NOT happen in all cases if you just use the default controls.   You should get in the habit of plotting "logdq" to check the grid resolution in the parts of the model that you care about like convective boundaries.  You'd like to see an increase in resolution around the boundaries.  don't just expect to be able to crank down mesh_delta_coeff to do this.  that increases resolution everywhere in the model, and you need to be selective for this to get really good resolution where you need it without pushing the total number of zones through the ceiling.   I've recently added some more mesh controls to make it easier to do this.   In my usual style of "anything worth doing is worth overdoing", I've provided a ton of options -- e.g., xtra_coef_a_l_hb_czb gives the extra factor for above lower nonburn convective boundary.

         !### xtra_coef_{above | below}_{lower | upper}_{nonburn | hburn | heburn | zburn}_czb
         ! Make these < 1 to increase resolution.

You can specify an extra "delta_coeff" factor above or below the upper or lower convection boundary of zones that are nonburning, H burning, He burning, or metals burning.   And you can specify the distance over which this applies -- e.g., xtra_dist_a_l_nb_czb gives the distance for above lower nonburn convective boundary in  units of the pressure scale height at the boundary.  

As an example, I've used the following in my inlist for some work I'm doing with Anne Thoul on stabilizing the evolution of the core convection zone during main sequence of a 10Msun model using Ledoux and semiconvection along with softening and limits on mixing length near boundaries --- of course I'm not suggesting this as the only "good" solution, it is just presented as an example.

! for extra resolution near convective boundaries

      xtra_dist_a_u_rzb = 2
      xtra_coef_a_u_rzb = 1d-4
      xtra_dist_b_u_rzb = 2
      xtra_coef_b_u_rzb = 1d-4
      
      xtra_dist_a_l_rzb = 2
      xtra_coef_a_l_rzb = 1d-4
      xtra_dist_b_l_rzb = 2
      xtra_coef_b_l_rzb = 1d-4

      xtra_coef_czb_full_on = 1
      xtra_coef_czb_full_off = 1
      
      xtra_dist_a_u_hb_czb = 2
      xtra_coef_a_u_hb_czb = 1d-4
      xtra_dist_b_u_hb_czb = 2
      xtra_coef_b_u_hb_czb = 1d-4
      
      xtra_dist_a_l_hb_czb = 2
      xtra_coef_a_l_hb_czb = 1d-4
      xtra_dist_b_l_hb_czb = 2
      xtra_coef_b_l_hb_czb = 1d-4
      
      xtra_dist_a_u_sczb = 2
      xtra_coef_a_u_sczb = 1d-4
      xtra_dist_b_u_sczb = 2
      xtra_coef_b_u_sczb = 1d-4
      
      xtra_dist_a_l_sczb = 2
      xtra_coef_a_l_sczb = 1d-4
      xtra_dist_b_l_sczb = 2
      xtra_coef_b_l_sczb = 1d-4

! Mixing:

      mixing_length_alpha = 1.80
      MLT_option = 'Henyey'
      use_Ledoux_criterion = .true.
      alpha_semiconvection = 0.01

      limit_mixing_length_by_dist_to_bdy = 1
      
      conv_bdy_mix_softening_f  = 0.001
      conv_bdy_mix_softening_f0 = 0.003
      conv_bdy_mix_softening_min_D_mix = 1d-3

      
Enough for now.

Cheers,
Bill





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141217/bb9ff79a/attachment.html>


More information about the Mesa-users mailing list