This web documentation corresponds to the most recent MESA release (r9575). Documentation for past versions can be found here.
If you find errors or formatting issues, please email Josiah Schwab using this link.
This page documents the MESA options that are part of the controls namelist. It is autogenerated from the file $MESA_DIR/star/defaults/controls.defaults.
Boxes like
show the default value of each option. To override the default values, add an entry to the controls namelist in your inlist.
specifications for starting model ¶
NOTE: if you are loading a saved model,
then the following initial values are NOT USED to modify the model.
in particular, you cannot use these to change Y or Z of an existing model.
if you want to do that, see star_job.defaults
controls such as change_Y
.
however, these are reported in output as the initial values for the star.
initial_mass ¶
initial mass in Msun units. can be any value you'd like when you are creating a premain sequence model.
not used when loading a saved model. however is reported in output as the initial mass of the star.
if you are loading a ZAMS model and the requested mass is in the range of
prebuilt models, the code will interpolate in mass using the closest prebuilt models.
if the requested mass is beyond the range of the prebuilt models, the code will
load the closest one and then call "relax mass" to create a model to match the request.
the prebuilt range is 0.08 Msun to 100 Msun, so the relax_mass
method is only used for extreme cases. there are enough prebuilt models that the
interpolation in mass seems to work fine for many applications.
initial_z ¶
initial metallicity for create prems and create initial model
initial_z
can be any value from 0 to 0.04
not used when loading a saved model. however is reported in output as the initial Z of the star.
however, if you are loading a zams model,
then initial_z
must match one of the prebuilt values.
look in the 'data/star_data/zams_models'
directory
to see what prebuilt zams Z's are available.
at time of writing, only 0.02 was included in the standard version of star.
initial_y ¶
initial helium mass fraction for create prems and create initial (< 0 means use default which is 0.24 + 2*initial_z)
not used when loading a saved model or a zams model. however is reported in output as the initial Y of the star.
NOTE: this is only used for create premainsequence model and create initial model, and not when loading a zams model.
controls for output ¶
terminal_interval ¶
write info to terminal when mod(model_number, terminal_interval) = 0
.
note: this replaces the obsolete control terminal_cnt
.
write_header_frequency ¶
output the log header info to the terminal
when mod(model_number, write_header_frequency*terminal_interval) = 0
.
extra_terminal_output_file ¶
if not empty, output terminal info to this file in addition to terminal.
this does not capture all of the terminal output  just the common items.
it is intended for use in situations where you cannot directly see the terminal output
such as when running on a cluster. if you want to be able to monitor
the progress for such cases, you can set extra_terminal_output_file = 'log'
and then do tail f log
to view the terminal output as it is recorded in the file.
terminal_show_age_in_years ¶
if false, then show in seconds
terminal_show_age_in_days ¶
num_trace_history_values ¶
any valid name for a history data column, such as surf_v_rot
for example if you have rapid rotation at the surface,
you might want to try something like this:
num_trace_history_values = 7
trace_history_value_name(1) = 'surf_v_rot'
trace_history_value_name(2) = 'surf_omega_div_omega_crit'
trace_history_value_name(3) = 'log_rotational_mdot_boost'
trace_history_value_name(4) = 'log_total_angular_momentum'
trace_history_value_name(5) = 'center n14'
trace_history_value_name(6) = 'surface n14'
trace_history_value_name(7) = 'average n14'
value must be less than or equal to 10
trace_history_value_name(:) ¶
write values to terminal
photo_directory ¶
directory for binary snapshots used in restarts
photo_interval ¶
save a photo file for possible restarting when mod(model_number, photo_interval) = 0
.
note: this replaces the obsolete control photostep
.
photo_digits ¶
use this many digits from the end of the model_number
for the photo name
log_directory ¶
for data files about the run
do_history_file ¶
history file is created if this is true
history_interval ¶
append an entry to the history.data file when mod(model_number, history_interval) = 0
.
star_history_name ¶
name of history file
star_history_header_name ¶
If not empty, then put star history header info in star_history_name
file.
In this case the history file has only data, making it easier
to use with some plotting packages.
star_history_dbl_format ¶
format for writing reals to star_history_name
file
star_history_int_format ¶
format for writing integer to star_history_name
file
star_history_txt_format ¶
format for writing characters to star_history_name
file
write_profiles_flag ¶
profiles are written only if this is true
profile_interval ¶
save a model profile info when mod(model_number, profile_interval) = 0
.
priority_profile_interval ¶
give saved profile a higher priority for retention when
mod(model_number, priority_profile_interval) = 0
.
profiles_index_name ¶
name of the profile index file
profiles_data_prefix ¶
prefix of the profile data
profiles_data_suffix ¶
suffix of the profile data
profile_data_header_suffix ¶
If not empty, then put profile data header info here. In this case the profile data file has only data, making it easier to use with some plotting packages.
profile_dbl_format ¶
format for writing reals to profile file
profile_int_format ¶
format for writing integers to profile file
profile_txt_format ¶
format for writing characters to profile file
max_num_profile_zones ¶
if nz > this
, then only write a subsample of the zones.
only used if > 1
max_num_profile_models ¶
Maximum number of saved profiles. If there's no limit on the number of profiles saved, you can fill up your disk  I've done it. So it's a good idea to set this limit to a reasonable number such as 20 or 30. Once that many have been saved during a run, old ones will be discarded to make room for new ones. Profiles that were saved for key events are given priority and aren't removed as long as there is a lower priority profile that can be discarded instead. Less than zero means no limit.
profile_model ¶
save profile when model_number
equals this
write_model_with_profile ¶
if this is true, models are written at same time as profiles
model_data_prefix ¶
prefix of the model data files
model_data_suffix ¶
suffix of the model data files
write_controls_info_with_profile ¶
if this is true, the values of the options in the controls inlist are written at same time as profiles
controls_data_prefix ¶
prefix of the control data files
controls_data_suffix ¶
suffix of the control data files
mixing_D_limit_for_log ¶
if max D_mix
in mixing region is less than this, don't include the region in the log
doesn't apply to thermohaline or semiconvective regions
eta_RTI_limit_for_log ¶
if eta_RTI
is less than this, treat it as zero for history log
mass_loc_for_extra_log_info ¶
log contains info about this mass location in the model negative value means "don't bother"
write_pulse_data_with_profile ¶
if true, write pulse info file when writing profile
pulse_data_format ¶
pulsation code format, e.g., 'FGONG', 'OSC', 'GYRE'
add_atmosphere_to_pulse_data ¶
if true, write atmosphere to pulse files
add_center_point_to_pulse_data ¶
if true, add point for r=0 to pulse files
keep_surface_point_for_pulse_data ¶
if true, add k=1 cell to pulse files
add_double_points_to_pulse_data ¶
add double points at discontinuities
interpolate_rho_for_pulsation_info ¶
If true, then get rho_face
by interpolating rho at cell center.
If false, then calculate rho_face by dm/(4*pi*r^2*dr)
.
threshold_grad_mu_for_double_point ¶
threshold in grad_mu = dln(mu)/dln(P) for a double point to be written
max_number_of_double_points ¶
maximum number of double points to be written (0 = no limit); when this limit is set, double points are chosen in order of decreasing grad_mu
format_for_FGONG_data ¶
This is the 'wide' FGONG format, as agreed on at the 5th Aarhus RGB workshop (University of Birmingham, UK, October 2015)
format_for_OSC_data ¶
write_pulsation_plot_data ¶
if true and saving pulsation info, also write out text file in column format for plotting
max_num_gyre_points ¶
limit gyre output files to at most this number of points only used when > 1
fgong_zero_A_inside_r ¶
when writing FGONG, if r < this and cell has mixing of some kind, force A = 0 Rsun units
trace_mass_location ¶
location for trace_mass_radius
, trace_mass_logT
, etc. (Msun units)
min_tau_for_max_abs_v_location ¶
controls choice of location in model for max_abs_v
history info.
can use this to exclude locations too close to surface.
ignore if <= 0
min_q_for_inner_mach1_location ¶
controls choice of location in model for innermost mach 1 history info. can use this to exclude locations too close to center.
max_q_for_outer_mach1_location ¶
controls choice of location in model for outermost mach 1 history info. can use this to exclude locations too close to surface.
burn_min1 ¶
used for reporting where burning zone occur, for example in the pgstar TRho profiles.
see star/public/star_data.inc
for details.
must be < burn_min2
.
In ergs/g/sec.
burn_min2 ¶
used for reporting where burning zone occur, for example in the pgstar TRho profiles.
see star/public/star_data.inc
for details.
In ergs/g/sec.
max_conv_vel_div_csound_maxq ¶
only consider from center out to this location
width_for_limit_conv_vel ¶
look this number of cells on either side of boundary to see if any boundary k in that range has s% csound(k) < s% v(k) <= s% csound(k1) i.e. transition from subsonic to supersonic as go inward if find any such transition then don't allow increase in convection velocity. this implies no change from radiative to convective. the purpose of this is to prevent convective energy transport from moving energy from behind a shock to in front of the shock.
max_q_for_limit_conv_vel ¶
for q(k) <= this, don't allow conv_vel to grow
max_r_in_cm_for_limit_conv_vel ¶
for r(k) <= this, don't allow conv_vel to grow
max_mass_in_gm_for_limit_conv_vel ¶
for m(k) <= this, don't allow conv_vel to grow
center_avg_value_dq ¶
reported center values are averages over this fraction of star mass
surface_avg_abundance_dq ¶
reported surface abundances are averages over this fraction of star mass
mass_depth_for_L_surf ¶
only if use_flux_limiting_with_dPrad_dm_form
definition of core overshooting boundary for output ¶
alpha_bdy_core_overshooting ¶
bdy = core_overshoot_r0 + core_overshoot_Hp* &
(alpha_bdy_core_overshooting*core_overshoot_f  core_overshoot_f0)
The values of core_overshoot_r0
, core_overshoot_Hp
, core_overshoot_f
, and core_overshoot_f0
are the actual values used for this step to calculate the core overshooting.
definition of core boundaries ¶
he_core_boundary_h1_fraction ¶
If >= 0, boundary is outermost location where h1 mass fraction is <= this value,
and he4 mass fraction >= min_boundary_fraction
(see below).
If < 0, boundary is outermost location where he4 is the most abundant species.
c_core_boundary_he4_fraction ¶
If >= 0, boundary is outermost location where he4 mass fraction is <= this value,
and c12 mass fraction >= min_boundary_fraction
(see below).
If < 0, boundary is outermost location where c12 is the most abundant species.
o_core_boundary_c12_fraction ¶
If >= 0, boundary is outermost location where c12 mass fraction is <= this value,
and o16 mass fraction >= min_boundary_fraction
(see below).
If < 0, boundary is outermost location where o16 is the most abundant species.
si_core_boundary_o16_fraction ¶
If >= 0, boundary is outermost location where o16 mass fraction is <= this value,
and si28 mass fraction >= min_boundary_fraction
(see below).
If < 0, boundary is outermost location where si28 is the most abundant species.
fe_core_boundary_si28_fraction ¶
For this case, "iron" includes any species with A > 46.
If >= 0, boundary is outermost location where si28 mass fraction is <= this value,
and "iron" mass fraction >= min_boundary_fraction
(see below).
If < 0, boundary is outermost location where "iron" is the most abundant species.
neutron_rich_core_boundary_Ye_max ¶
Boundary is outermost location where Ye is <= this value.
min_boundary_fraction ¶
Value for deciding boundary regions.
when to stop ¶
max_model_number ¶
The code will stop when it reaches this model number. Negative means no maximum.
when_to_stop_rtol ¶
Relative error criteria when hitting stop target time. The system will automatically redo with a smaller timestep to hit a stopping target. It calculates the following "error" term and retries if it is > 1.
error = abs(value  target_value)/ &
(when_to_stop_atol + when_to_stop_rtol*max(abs(value),abs(target_value)))
when_to_stop_atol ¶
Abolute error criteria when hitting stop target time. The system will automatically redo with a smaller timestep to hit a stopping target. It calculates the following "error" term and retries if it is > 1.
error = abs(value  target_value)/ &
(when_to_stop_atol + when_to_stop_rtol*max(abs(value),abs(target_value)))
max_age ¶
Stop when the age of the star exceeds this value (in years). only applies when > 0.
max_age_in_seconds ¶
Stop when the age of the star exceeds this value (in seconds). only applies when > 0.
num_adjusted_dt_steps_before_max_age ¶
This adjusts max_years_for_timestep
so that hit max_age
exactly,
without needing possibly large change in timestep at end of run.
only used if > 0
number of time steps to adjust to prior to hitting max age only used if > 0
dt_years_for_steps_before_max_age ¶
timestep in years
reduction_factor_for_max_timestep ¶
per time step reduction limited to this
gamma_center_limit ¶
gamma is the plasma interaction parameter. Stop when the center value of gamma exceeds this limit.
eta_center_limit ¶
eta is the electron chemical potential in units of k*T. Stop when the center value of eta exceeds this limit.
log_center_density_limit ¶
Stop when log10 of the center density exceeds this limit.
log_center_density_lower_limit ¶
Stop when log10 of the center density is below this limit.
log_center_temp_limit ¶
Stop when log10 of the center temperature exceeds this limit.
log_center_temp_lower_limit ¶
Stop when log10 of the center temperature is below this limit.
surface_accel_div_grav_limit = 1 ¶
This is used when do not have a velocity variable.
The acceleration ratio is abs(accel)/grav
at surface,
where accel is (rdotrdot_old)/dt
and grav is G*m/r^2
.
Stop if the ratio becomes larger than this limit.
Ignored if <= 0.
log_max_temp_upper_limit ¶
stop when log10 of the maximum temperature rises above this limit.
log_max_temp_lower_limit ¶
stop when log10 of the maximum temperature drops below this limit.
center_entropy_limit ¶
stop when the center entropy exceeds this limit. in kerg per baryon
center_entropy_lower_limit ¶
stop when the center entropy is below this limit. in kerg per baryon
max_entropy_limit ¶
stop when the max entropy exceeds this limit. in kerg per baryon
max_entropy_lower_limit ¶
stop when the max entropy is below this limit. in kerg per baryon
xa_central_lower_limit_species ¶
xa_central_lower_limit ¶
Lower limits on central mass fractions.
Stop when central abundance drops below this limit.
Can have up to num_xa_central_limits
of these (see star_def.inc
for value).
xa_central_lower_limit_species
contains an isotope name as defined in chem_def.f
.
xa_central_lower_limit
contains the lower limit value.
xa_central_upper_limit_species ¶
xa_central_upper_limit ¶
Upper limits on central mass fractions.
Stop when central abundance rises above this limit.
Can have up to num_xa_central_limits
of these (see star_def.inc
for value).
E.g., to stop when center c12 abundance reaches 0.5, set
xa_central_upper_limit_species(1) = 'c12'
xa_central_upper_limit(1) = 0.5
xa_surface_lower_limit_species ¶
xa_surface_lower_limit ¶
Lower limits on surface mass fractions.
Stop when surface abundance drops below this limit.
Can have up to num_xa_surface_limits
of these (see star_def
for value)
xa_surface_lower_limit_species
contains an isotope name as defined in chem_def.f
xa_surface_lower_limit
contains the lower limit value
xa_surface_upper_limit_species ¶
xa_surface_upper_limit ¶
upper limits on surface mass fractions
stop when surface abundance rises above this limit
can have up to num_xa_surface_limits
of these (see star_def
for value)
e.g., to stop when surface c12 abundance reaches 0.5, set
xa_surface_upper_limit_species(1) = 'c12'
xa_surface_upper_limit(1) = 0.5
xa_average_lower_limit_species ¶
xa_average_lower_limit ¶
lower limits on average mass fractions
stop when average abundance drops below this limit
can have up to num_xa_average_limits
of these (see star_def
for value)
xa_average_upper_limit_species ¶
xa_average_upper_limit ¶
upper limits on average mass fractions
stop when average abundance rises above this limit
can have up to num_xa_average_limits
of these (see star_def
for value)
HB_limit ¶
For detecting horizontal branch. Only applies when center abundance by mass of h1 is < 1d4. Stop when the center abundance by mass of he4 drops below this limit.
stop_at_TP ¶
If true, stop at next AGB thermal pulse.
This is defined as having a convective zone with helium burning
when central helium is depleted
and he_core_mass  c_core_mass <= TP_he_shell_max
.
TP_he_shell_max ¶
Stop when thermal pulse helium shell mass reaches this value, in Msun units
star_mass_min_limit ¶
Stop when star mass in Msun units is < this. <= 0 means no limit.
star_mass_max_limit ¶
Stop when star mass in Msun units is > this. <= 0 means no limit.
star_H_mass_min_limit ¶
Stop when star hydrogen mass in Msun units is < this. <= 0 means no limit.
star_H_mass_max_limit ¶
Stop when star hydrogen mass in Msun units is > this. <= 0 means no limit.
star_He_mass_min_limit ¶
Stop when star he3+he4 mass in Msun units is < this. <= 0 means no limit.
star_He_mass_max_limit = 0 ¶
Stop when star he3+he4 mass in Msun units is > this. <= 0 means no limit.
star_C_mass_min_limit ¶
Stop when star c12 mass in Msun units is < this. <= 0 means no limit.
star_C_mass_max_limit = 0 ¶
Stop when star c12 mass in Msun units is > this. <= 0 means no limit.
envelope_mass_limit ¶
envelope_mass = star_mass  he_core_mass
Stop when envelope_mass
drops below this limit, in Msun units.
envelope_fraction_left_limit ¶
envelope_fraction_left = (star_mass  he_core_mass)/(initial_mass  he_core_mass)
Stop when envelope_fraction_left
< this limit.
xmstar_min_limit ¶
! xmstar = mstar  M_center stop when xmstar in grams is < this. <= 0 means no limit.
xmstar_max_limit ¶
xmstar = mstar  M_center stop when xmstar in grams is > this. <= 0 means no limit.
he_core_mass_limit ¶
stop when helium core reaches this mass, in Msun units
c_core_mass_limit ¶
stop when carbon core reaches this mass, in Msun units
o_core_mass_limit ¶
stop when oxygen core reaches this mass, in Msun units
si_core_mass_limit ¶
stop when silicon core reaches this mass, in Msun units
fe_core_mass_limit ¶
stop when iron core reaches this mass, in Msun units
neutron_rich_core_mass_limit ¶
stop when neutron rich core reaches this mass, in Msun units
he_layer_mass_lower_limit ¶
he layer mass is defined as he_core_mass
 c_core_mass
stop when c_core_mass
> 0 and he layer mass < this limit (Msun units).
abs_diff_lg_LH_lg_Ls_limit ¶
stop when abs(lg_LH  lg_Ls) <= abs_diff_LH_Lsurf_limit
can be useful for deciding when premain sequence star has reached ZAMS
set to negative value to disable
Teff_upper_limit ¶
stop when Teff is greater than this limit.
Teff_lower_limit ¶
stop when Teff is less than this limit.
photosphere_r_upper_limit ¶
stop when photosphere_r
is greater than this limit, in Rsun units
photosphere_r_lower_limit ¶
stop when photosphere_r
is less than this limit, in Rsun units
photosphere_m_upper_limit ¶
stop when photosphere_m
is greater than this limit, in Msun units
photosphere_m_lower_limit ¶
stop when photosphere_m
is less than this limit, in Msun units
photosphere_m_sub_M_center_limit ¶
stop when photosphere_m
is less than this limit above M_center
, in Msun units
log_Teff_upper_limit ¶
stop when log10 of Teff is greater than this limit.
log_Teff_lower_limit ¶
stop when log10 of Teff is less than this limit.
log_Tsurf_upper_limit ¶
stop when log10 of T in outermost cell is greater than this limit.
log_Tsurf_lower_limit ¶
stop when log10 of T in outermost cell is less than this limit.
log_L_upper_limit ¶
stop when log10(total luminosity in Lsun units) is greater than this limit.
in order to skip prems, this limit only applies when L_nuc
> 0.01*L
log_L_lower_limit ¶
stop when log10(total luminosity in Lsun units) is less than this limit.
log_g_upper_limit ¶
stop when log10(gravity at surface) is greater than this limit.
log_g_lower_limit ¶
stop when log10(gravity at surface) is less than this limit.
log_Psurf_upper_limit ¶
stop when log10 of surface pressure is greater than this limit.
log_Psurf_lower_limit ¶
stop when log10 of surface pressure is less than this limit.
log_Dsurf_upper_limit ¶
stop when log10 of surface density is greater than this limit.
log_Dsurf_lower_limit ¶
stop when log10 of surface density is less than this limit.
power_nuc_burn_upper_limit ¶
stop when total power from all nuclear reactions (in Lsun units) is > this.
power_h_burn_upper_limit ¶
stop when total power from hydrogenconsuming reactions (in Lsun units) is > this.
power_he_burn_upper_limit ¶
stop when total power from reactions burning helium (in Lsun units) is > this.
power_c_burn_upper_limit ¶
stop when total power from reactions burning carbon (in Lsun units) is > this
power_nuc_burn_lower_limit ¶
stop when total power from all nuclear reactions (in Lsun units) is < this.
power_h_burn_lower_limit ¶
stop when total power from hydrogen consuming reactions (in Lsun units) is < this.
power_he_burn_lower_limit ¶
stop when total power from reactions burning helium (in Lsun units) is < this.
power_c_burn_lower_limit ¶
stop when total power from reactions burning carbon (in Lsun units) is < this.
max_number_backups ¶
Stop if the number of backups exceeds this value. Ignore if < 0.
max_number_retries ¶
Stop if the number of retries exceeds this value. Ignore if < 0.
max_backups_in_a_row ¶
if do more than this many without a successful step, then terminate the run.
relax_max_number_backups ¶
Stop if the number of backups during a "relax" evolution exceeds this value. ignore if < 0
relax_max_number_retries ¶
Stop if the number of retries during a "relax" evolution exceeds this value. ignore if < 0
min_timestep_limit ¶
stop if need timestep smaller than this limit, in seconds
logQ_limit ¶
logQ = logRho  2*logT + 12. stop if logQ at any zone is larger than this limit. 5 is a reasonable limit for the current mesa/eos.
logQ_min_limit ¶
logQ = logRho  2*logT + 12. stop if logQ at any zone is smaller than this limit. 10 is a reasonable limit for the current mesa/eos.
center_Ye_lower_limit ¶
stop if center_ye
drops below this limit
fe_core_infall_limit ¶
stop if max infall velocity at any location interior to fe_core_mass
, in cm/s
non_fe_core_infall_limit ¶
stop if max infall velocity at any location interior to he_core_mass
. in cm/s
v_div_csound_max_limit ¶
stop if any v/csound
> this limit
v_div_csound_surf_limit ¶
stop if v_surf/csound_surf
> this limit
v_surf_div_v_kh_upper_limit ¶
stop if abs(v_surf/v_kh)
> this limit, where v_kh = photosphere_r/kh_timescale
v_surf_div_v_kh_lower_limit ¶
stop if abs(v_surf/v_kh)
< this limit, where v_kh = photosphere_r/kh_timescale
v_surf_div_v_esc_limit ¶
stop if v_surf/v_esc
> this limit
v_surf_kms_limit ¶
stop if v_surf
in km/s > this limit
Lnuc_div_L_zams_limit ¶
defines "near zams"  note: must also set stop_near_zams
stop_near_zams ¶
if true, stop if Lnuc/L > Lnuc_div_L_zams_limit
Lnuc_div_L_upper_limit ¶
stop when Lnuc/L is greater than this limit.
Lnuc_div_L_lower_limit ¶
stop when Lnuc/L is less than this limit.
Pgas_div_P_limit ¶
criteria for stopping on Pgas/P
Pgas_div_P_limit_max_q ¶
stop if Pgas/P < this limit at any location with q <= Pgas_div_P_limit_max_q
values near unity skip the outer envelope
peak_burn_vconv_div_cs_limit ¶
limits ratio of convection velocity to sound speed at location of peak eps_nuc
omega_div_omega_crit_limit ¶
stop if omega/omega_crit is > this anywhere in star ignore if < 0
delta_nu_lower_limit ¶
stop when asteroseismology delta_nu
in micro Hz is < this. <= 0 means no limit.
delta_nu_upper_limit ¶
stop when asteroseismology delta_nu
in micro Hz is > this. <= 0 means no limit.
shock_mass_upper_limit ¶
stop when shock_mass is > this. <= 0 means no limit.
delta_Pg_lower_limit ¶
stop when delta_Pg
in micro Hz is < this. <= 0 means no limit.
delta_Pg_upper_limit ¶
stop when delta_Pg
in micro Hz is > this. <= 0 means no limit.
stop_when_reach_this_cumulative_extra_heating ¶
(ignore if <= 0)
mixing parameters ¶
mixing_length_alpha ¶
The mixing length is this parameter times a local pressure scale height.
To increase R vs. L, decrease mixing_length_alpha
.
remove_small_D_limit ¶
If MLT diffusion coeff D (cm^2/sec) is less than this limit,
then set D to zero and change the point to mixing_type == no_mixing
.
use_Ledoux_criterion ¶
a location in the model is Schwarzschild stable when gradr < grada
it is Ledoux stable when gradr < gradL
, where gradL = grada + composition_gradient
note that these are the same when composition_gradient = 0
so you can force the use of the Schwarzschild criterion by passing 0 for
the composition_gradient
argument to the mlt routine.
that's what happens if you set the control "use_Ledoux_criterion
" to false.
overshooting and rotational mixing are dealt with separately and are added after the MLT classifications are made.
num_cells_for_smooth_gradL_composition_term ¶
Number of cells on either side to use in weighted smoothing of gradL_composition_term
.
gradL_composition_term
is set to the "raw" unsmoothed brunt_B
and then optionally smoothed according num_cells_for_smooth_gradL_composition_term
.
In cases where the Ledoux criterion is used to evaluate the boundary for burning
convective cores, you may need to set num_cells_for_smooth_gradL_composition_term = 0
to avoid smoothing the stabilizing composition jump into the convection zone and
unphysically causing it to shrink. See section 3.2 in Moore, K., & Garaud, P. 2016, APJ, 817, 54
alpha_semiconvection ¶
Determines efficiency of semiconvective mixing.
Semiconvection only applies if use_Ledoux_criterion
is true.
semiconvection_upper_limit_center_h1 ¶
Turn off semiconvection when center_h1
> this limit.
This let's you delay semiconvection until helium burning.
E.g., you can do overshooting for core hydrogen burning,
then switch to semiconvection after core h is gone.
semiconvection_option ¶
 'Langer_85 mixing; gradT = gradr' : uses Langer scheme for mixing but sets gradT = gradr
 'Langer_85' : this calculates special gradT as well as doing mixing.
thermohaline_coeff ¶
Determines efficiency of thermohaline mixing.
was previously named thermo_haline_coeff
.
thermohaline mixing only applies if use_Ledoux_criterion
is true.
thermohaline_option ¶
determines which method to use for calculating thermohaline diffusion coef:

'Kippenhahn'
: use method of Kippenhahn, R., Ruschenplatt, G., & Thomas, H.C. 1980, A&A, 91, 175. 
'Traxler_Garaud_Stellmach_11'
: use method of Traxler, Garaud, & Stellmach, ApJ Letters, 728:L29 (2011). 
'Brown_Garaud_Stellmach_13'
: use method of Brown, Garaud, & Stellmach, (2013). Recommendsthermohaline_coeff = 1
, but it can nevertheless be changed.
alt_scale_height_flag ¶
If false, then stick to the usual definition  P/(g*rho). If true, use min of the usual and sound speed * hydro time scale, sqrt(P/G)/rho.
mlt_use_rotation_correction ¶
When doing rotation, multiply grad_rad
by ft_rot/ft_rot
if this flag is true.
MLT_option ¶
Options are:
 'none' : just give radiative values with no mixing.
 'Cox' : MLT as developed in Cox & Giuli 1968, Chapter 14.
 'ML1' : BohmVitense 1958
 'ML2' : Bohm and Cassinelli 1971
 'Mihalas' : Mihalas 1978, Kurucz 1979
 'Henyey' : Henyey, Vardya, and Bodenheimer 1965
'Cox' option assumes optically thick material. The other options are various ways of extending to include optically thin material.
Henyey_MLT_y_param ¶
Henyey_MLT_nu_param ¶
Values of the f1..f4 coefficients are taken from Table 1 of Ludwig et al. 1999, A&A, 346, 111
with the following exception: their value of f3 for Henyey convection is f4/8
when it should be
8*f4
, i.e., f3=32*pi**2/3
and f4=4*pi**2/3
. f3 and f4 are related to the henyey y parameter, so
for the 'Henyey' case they are set based on the value of Henyey_y_param
.
make_gradr_sticky_in_newton_iters ¶
if true, then location that becomes radiative during newton iterations, stays radiative for rest of the newton iterations. to avoid flipflopping between radiative and convective.
no_MLT_below_shock ¶
if true, then no MLT below an outward going shock (just radiative).
no_MLT_below_T_max ¶
if true, then no MLT below location of max T (just radiative).
T_mix_limit ¶
If there is any convection in surface zones with T < T_mix_limit
,
then extend the innermost such convective region outward all the way to the surface.
For example,

T_mix_limit <= 0
means omit this operation. 
T_mix_limit = 1d5
will effectively make the star convective down to the He++ region.
units in Kelvin
conv_dP_term_factor ¶
Set to 0 to turn off effect of pressure from convective turbulence.
The convective turbulence factor is based on Cox&Giuli (14.69)
Multiplier for conv_dP_term
P is increased by factor (1 + conv_dP_term)
by inclusion of convective turbulence.
mlt_gradT_fraction ¶
let f := mlt_gradT_fraction
if f is >= 0 and <= 1, then
gradT from mlt is replaced by f*grada_at_face(k) + (1f)*gradr(k)
see also the vector control adjust_mlt_gradT_fraction
for fine grain control
okay_to_reduce_gradT_excess ¶
gradT_excess
= gradT_sub_grada
= superadiabaticity.
Inefficient convection => large gradT excess and steep T gradient to enhance radiative transport.
Reduce gradT excess by making gradT closer to adiabatic gradient.
If true, code is allowed to adjust gradT to boost efficiency of energy transport
See gradT_excess_f1
, gradT_excess_f2
, and gradT_excess_age_fraction
below.
gradT_excess_f1 ¶
gradT_excess_f2 ¶
These are for calculation of efficiency boosted gradT.
gradT_excess_age_fraction ¶
These are for calculation of efficiency boosted gradT. Fraction of old to mix with new to get next.
gradT_excess_max_change ¶
These are for calculation of efficiency boosted gradT.
Maximum change allowed in one timestep for gradT_excess_alpha
.
Ignored if negative.
gradT_excess_lambda1 ¶
gradT_excess_beta1 ¶
In some situations you might want to force alfa = 1.
You can do that by setting gradT_excess_lambda1 < 0
.
The following are for the normal calculation of gradT_excess_alfa
gradT_excess_lambda2 ¶
gradT_excess_beta2 ¶
The following are for the normal calculation of gradT_excess_alfa
.
gradT_excess_dlambda ¶
gradT_excess_dbeta ¶
The following are for the normal calculation of gradT_excess_alfa
.
gradT_excess_max_center_h1 ¶
No boost if center H1 > this limit.
gradT_excess_min_center_he4 ¶
No boost if center He4 < this limit.
gradT_excess_max_logT ¶
No local boost if local logT > this limit.
gradT_excess_min_log_tau_full_on ¶
gradT_excess_max_log_tau_full_off ¶
No local boost if local log_tau < gradT_excess_max_log_tau_full_off
.
Reduced local boost if local log_tau < gradT_excess_min_log_tau_full_on
.
smooth_gradT ¶
use_grada_for_smooth_gradT ¶
gradT_smooth_low ¶
gradT_smooth_mid ¶
gradT_smooth_high ¶
gradT_smooth_factor ¶
EXPERIMENTAL: soften gradT at the boundaries of convective zones to help convergence
max_logT_for_mlt ¶
No mlt at cell if local logT > this limit.
overshooting ¶
Overshooting depends on the classification of the convective zone and can be different at the top and the bottom of the zone.
min_overshoot_q ¶
Overshooting is only allowed at locations with mass m >= min_overshoot_q * mstar
.
E.g., if min_overshoot_q = 0.1
, then only the outer 90% by mass can have overshooting.
This provides a simple way of suppressing bogus center overshooting in which a small
convective region at the core can produce excessively large overshooting because of
a large pressure scale height at the center.
D_mix_ov_limit ¶
Overshooting shuts off when the exponential decay has dropped the diffusion coefficient to this level.
max_brunt_B_for_overshoot ¶
Terminate overshoot region when encounter stabilizing composition gradient
where (unsmoothed) brunt_B
is greater than this limit. (<= 0 means ignore this limit)
note: both brunt_B
and gradL_composition_term
come from unsmoothed_brunt_B
and differ only in optional smoothing.
(see num_cells_for_smooth_brunt_B
and num_cells_for_smooth_gradL_composition_term
).
Parameters for exponential diffusive overshoot are described in the paper by Falk Herwig, "The evolution of AGB stars with convective overshoot", A&A, 360, 952968 (2000).
NOTE: In addition to giving these 'f' parameters nonzero values, you should also
check the settings for mass_for_overshoot_full_on
and mass_for_overshoot_full_off
.
The switch from convective mixing to overshooting happens
at a distance f0*Hp into the convection zone
from the estimated location where grad_ad == grad_rad
,
where Hp is the pressure scale height at that location.
A value <= 0 for f0 is a mistake  you are required to set f0 as well as f.
take a look at the following from an email concerning this:
Overshooting works by taking the diffusion mixing coefficient at the edge of the convection zone and extending it beyond the zone. But  and here's the issue  at the exact edge of the zone the mixing coefficient goes to 0. So we don't want that. Instead we want the value of the mixing coeff NEAR the edge, but not AT the edge. The "f0" parameter determines the exact meaning of "near" for this. It tells the code how far back into the zone to go in terms of scale height. The overshooting actually begins at the location determined by f0 back into the convection zone rather than at the edge where the diffusion coeff is illdefined. So, for example, if you want overshooting of 0.2 scale heights beyond the normal edge, you might want to back up 0.05 scale heights to get the diffusion coeff from near the edge and then go out by 0.25 scale heights from there to reach 0.2 Hp beyond the old boundary. In the inlist this would mean setting the "f0" to 0.05 and the "f" to 0.25.
There is no default value for f0; if you set f > 0 then you must get f0 > 0 as well.
overshoot_alpha ¶
The value of Hp for overshooting is limited to the radial thickness
of the convection zone divided by overshoot_alpha
.
only used when > 0. if <= 0, then use mixing_length_alpha
instead.
limit_overshoot_Hp_using_size_of_convection_zone ¶
if false, allow large distance of overshoot for small convective zones.
overshoot_f_above_nonburn_core ¶
overshoot_f0_above_nonburn_core ¶
overshoot_f_above_nonburn_shell ¶
overshoot_f0_above_nonburn_shell ¶
overshoot_f_below_nonburn_shell ¶
overshoot_f0_below_nonburn_shell ¶
For nonburning regions.
overshoot_f_above_burn_h_core ¶
overshoot_f0_above_burn_h_core ¶
overshoot_f_above_burn_h_shell ¶
overshoot_f0_above_burn_h_shell ¶
overshoot_f_below_burn_h_shell ¶
overshoot_f0_below_burn_h_shell ¶
For hydrogen burning regions.
overshoot_f_above_burn_he_core ¶
overshoot_f0_above_burn_he_core ¶
overshoot_f_above_burn_he_shell ¶
overshoot_f0_above_burn_he_shell ¶
overshoot_f_below_burn_he_shell ¶
overshoot_f0_below_burn_he_shell ¶
For helium burning regions.
overshoot_f_above_burn_z_core ¶
overshoot_f0_above_burn_z_core ¶
overshoot_f_above_burn_z_shell ¶
overshoot_f0_above_burn_z_shell ¶
overshoot_f_below_burn_z_shell ¶
overshoot_f0_below_burn_z_shell ¶
For metals burning regions.
overshoot_below_noburn_shell_factor ¶
Multiply overshoot_f_below_nonburn_shell
by this factor
only during dredge up phase of AGB thermal pulse.
Optional step function for overshooting. This can be used simultaneously with exponential overshooting. When using step overshoot, you must set overshoot_f0 as well as f.
A convective region is considered a shell if it doesn't reach the center.
step_overshoot_D ¶
step_overshoot_D0_coeff ¶
As above, f0*Hp
determines r0 where switch from convection to overshooting.
Overshooting extends a distance step_f*Hp0
from r0
with constant diffusion coeff D = step_D + step_D0_coeff*D0
where D0 = diffusion coefficient D at point r0.
mass_for_overshoot_full_on ¶
You can specify a range of star masses over which overshooting
above H burning zones is gradually enabled.
Do specified overshooting above H burning zone if star_mass
>= this (Msun).
mass_for_overshoot_full_off ¶
You can specify a range of star masses over which overshooting
above H burning zones is gradually enabled.
No overshooting above H burning zone if star_mass
<= this (Msun).
DUP_varcontrol_factor ¶
max_DUP_counter ¶
For deciding when to terminate use of overshoot_below_noburn_shell_factor
.
ovr_below_burn_he_shell_factor ¶
Multiply overshoot_f_below_burn_he_shell
by this factor
after the first AGB thermal pulse.
overshoot_D2 ¶
overshoot_f2 ¶
optional 2nd scale length for exponential overshooting
f0*Hp
determines location r0 where we switch from convection to overshooting.
Let D0 = diffusion coefficient D at point r0.
Let Hp0 = the scale height at r0.
In the standard version of exponential overshooting,
there is a single length scale = f*Hp0
and at a distance dr from r0, D(dr) = D0*exp(2*dr/(f*Hp0))
.
In the extended version there is a second length scale = f2*Hp0
.
The second length scale takes effect for distances dr > dr2
where dr2 is defined by D2 = D0*exp(2*dr2/(f*Hp0))
.
 for dr <= dr2, D(dr) =
D0*exp(2*dr/(f*Hp0))
 for dr > dr2, D(dr) =
D2*exp(2*(drdr2)/(f2*Hp0))
=D0*exp(2*dr2/(f*Hp0))*exp(2*(drdr2)/(f2*Hp0))
=D0*exp(2*(dr2/(f*Hp0) + (drdr2)/(f2*Hp0)))
RGB_to_AGB_cbm_switch ¶
If center hydrogen abundance is < 0.01
and center helium abundance by mass is less than RGB_to_AGB_cbm_switch
,
then system will include overshoot_D2
and overshoot_f2
parameters to describe
convective boundary mixing during the AGB phase if set to positive values.
See Battino et al. 2016, APJ, 827:30
"Application of a theory and simulationbased convective boundary
mixing model for AGB star evolution and nucleosynthesis"
RGB_to_AGB_cbm_switch = 1d4
is used in the paper above.
turbulence ¶
RTI_max_time_full_off ¶
RTI_min_time_full_on ¶
RTI_smooth_mass ¶
RTI_smooth_iterations ¶
RTI_smooth_fraction ¶
smoothing for dPdr_dRhodr_info
done at start of step
alpha_RTI_diffusion_factor ¶
dudt_RTI_diffusion_factor ¶
dedt_RTI_diffusion_factor ¶
dlnddt_RTI_diffusion_factor ¶
composition_RTI_diffusion_factor ¶
max_M_RTI_factors_full_on ¶
min_M_RTI_factors_full_off ¶
alpha_RTI_src_max_q ¶
alpha_RTI_src_min_q ¶
option to set alpha_RTI
source term to zero when cell q out of bounds.
to turn off RTI near surface or center
alpha_RTI_src_min_v_div_cs ¶
option to set alpha_RTI source term to zero when v/cs < this min. e.g. to filter out false sources ahead of shock
radiation_turbulence_coeff ¶
To counter depletion of h and metals in outer envelope of stars with M > 1.4 Msun. Morel, P., and Thevenin, F., Atomic diffusion in stellar models of type earlier than G., A&A, 390:611620 (2002)
D = radiation_turbulence_coeff * 4*crad*T^4/(15*clight*opacity*rho^2)
1 is reasonable value for this coefficient
turbulent_diffusion_D0 ¶
Turbulent diffusion below outer convection zone. Similar effect to overshooting. Proffitt, C.R., and Michaud, G., GRAVITATIONAL SETTLING IN SOLAR MODELS, ApJ, 380:238290, 1991. e.g., 8000 cm^2 s^1
turbulent_diffusion_rho_max ¶
Only have turbulent diffusion if rho < this.
Diffusion coef D = D0*(rho/rho_base_cz)^3
,
but only if rho_base_cz <= turbulent_diffusion_rho_max
.
turbulent_diffusion_Dmin ¶
Only set turbulent diffusion if it gives D >= this.
mixing misc ¶
such as smoothing and editing of diffusion coefficients
mix_factor ¶
Mixing coefficients are multiplied by this factor.
The mix_factor
is applied in subroutine get_convection_sigmas
in star/private/mix_info.f90

the lagrangian diffusion coefficient sigma(k) at cell boundary k is set to
mix_factor*D*(4*pi*r(k)^2*rho_face(k))^2
Note that the value of D is not changed  it is just used as a term in calculating sigma.
min_dt_for_increases_in_convection_velocity ¶
convective velocities are not increased if dt < this value (in seconds)
max_conv_vel_div_csound ¶
convective velocities are limited to local sound speed times this factor
max_v_div_cs_for_convection ¶
disable convection for locations with abs(v)/cs > this limit
max_abs_du_div_cs_for_convection ¶
main purpose is to force radiative in shock face
min_T_for_acceleration_limited_conv_velocity ¶
Acceleration limiting based on Wood 1974 and Arnett 1969. Wood, P.R., ApJ, 190:609630, 1974. (Appendix V, eqns 13) Arnett, W.D., 1969, Ap. and Space Sci, 5, 180.
max_T_for_acceleration_limited_conv_velocity ¶
mlt_accel_g_theta ¶
use this (if > 0) for limiting the acceleration of convection velocities.
prune_bad_cz_min_Hp_height ¶
Lower limit on radial extent of cz (<= 0 to disable).
Remove tiny convection zones unless have strong nuclear burning
i.e., remove if size < prune_bad_cz_min_Hp_height
.and.
max_log_eps < prune_bad_cz_min_log_eps_nuc
.
prune_bad_cz_min_log_eps_nuc ¶
Lower limit on max log eps nuc in cz. In units of average pressure scale height at top and bottom of region. This allows emergence of very small cz at site of he core flash, for example.
redo_conv_for_dr_lt_mixing_length ¶
Check for small convection zones with total height less than mixing length
and redo with reduced mixing_length_alpha
to make mixing_length <= dr
.
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, 361376, 1972.
WARNING: I've seen problems with 25M before He core burn when using this. bp.
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, 361376, 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 efoldings 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 nonconvective point with grad_rad << grad_ad
.
smooth_convective_bdy ¶
This is an option to smooth composition gradients in newly nonconvective regions trailing behind a retreating convection zone. This effectively erases (most) of the staircasing that happens without it. But you should be aware that the smoothing process does not conserve species mass  e.g., if have retreating He burning core below H shell, then the smoothing will convert some H into He in the newly nonconvective region (this can be hand waved away as modeling partial burning of those regions during the substep period before the convection had retreated past the location).
set this true to have the staircasing removed at the price of some changes in abundances.
max_dR_div_Hp_for_smooth ¶
Don't smooth across a newly nonconvective region larger than this limit where dR is radial thickness of region and Hp is min pressure scale height in region.
max_delta_limit_for_smooth ¶
Don't smooth across a newly nonconvective region where any mass fraction changes by more than this limit.
remove_mixing_glitches ¶
If true, then okay to remove gaps and singletons.
glitches ¶
The following controls are for different kinds of "glitches" that can be removed.
okay_to_remove_mixing_singleton ¶
If true, remove singetons.
clip_D_limit ¶
Zero mixing diffusion coeffs that are smaller than this.
min_convective_gap ¶
Close gap between convective regions if smaller than this (< 0 means skip this). Gap measured radially in units of pressure scale height.
min_thermohaline_gap ¶
Close gap between thermohaline mixing regions if smaller than this (< 0 means skip this). Gap measured radially in units of pressure scale height.
min_thermohaline_dropout ¶
max_dropout_gradL_sub_grada ¶
If find radiative region embedded in thermohaline,
and max(gradL  grada)
in region is everywhere < max_dropout_gradL_sub_grada
and region height is < min_thermohaline_dropout
then convert the region to thermohaline.
min_thermohaline_dropout <= 0
disables.
min_semiconvection_gap ¶
Close gap between semiconvective mixing regions if smaller than this (< 0 means skip this). Gap measured radially in units of pressure scale height.
remove_embedded_semiconvection ¶
If have a semiconvection region bounded on each side by convection, convert it to be convective too.
set_min_D_mix ¶
mass_lower_limit_for_min_D_mix ¶
mass_upper_limit_for_min_D_mix ¶
min_D_mix ¶
D_mix
will be at least this large if set_min_D_mix
is true.
doesn't apply for mass < lower limit or mass > upper limit.
mass_lower_limit_for_min_D_mix ¶
min_D_mix ¶
D_mix
will be at least this large if set_min_D_mix
is true.
set_min_D_mix_in_H_He ¶
min_D_mix_in_H_He ¶
D_mix
will be at least this large in regions
where max mass fractions of H and He add to more that 0.5
if set_min_D_mix_in_H_He
is true.
set_min_D_mix_below_Tmax ¶
min_D_mix_below_Tmax ¶
D_mix
will be at least this large for cells below location of max temperature
if set_min_D_mix_below_Tmax
is true.
min_center_Ye_for_min_D_mix ¶
min_D_mix
is only used when center_ye >= this
i.e., when center_ye
drops below this, min_D_mix = 0
.
smooth_outer_xa_big ¶
smooth_outer_xa_small ¶
Soften composition jumps in outer layers.
If smooth_outer_xa_big
and smooth_outer_xa_small
are bigger than 0, then
starting from the outermost grid point, homogeneously mix a region of size
smooth_outer_xa_small
(in solar masses), and proceed inwards, linearly reducing
the size of the homogeneously mixed region in such a way that it becomes zero.
After going smooth_outer_xa_big
solar masses in. In this way, the outer smooth_outer_xa_big
solar masses are "cleaned" of composition jumps.
rotation controls ¶
In the following "am" stands for "angular momentum".
the mesa implementation of rotation closely follows these papers:
 Heger, Langer, & Woosley, ApJ, 528, 368. 2000
Heger, Woosley, & Spruit, ApJ, 626, 350. 2005
D_DSI
= dynamical shear instabilityD_SH
= SolbergHoilandD_SSI
= secular shear instabilityD_ES
= EddingtonSweet circulationD_GSF
= GoldreichSchubertFrickeD_ST
= SpruitTayler dynamo
skip_rotation_in_convection_zones ¶
if true, then set rotational diffusion coefficients to 0 in convective regions. This applies both for material mixing and diffusion of angular momentum.
am_D_mix_factor ¶
Rotation and mixing of material.
D_mix
= diffusion coefficient for mixing of material.
It is sum of nonrotational and rotational components.
The rotational part is multiplied by this factor.
D_mix = D_mix_non_rotation + f*am_D_mix_factor*(
D_DSI_factor * D_DSI +
D_SH_factor * D_SH +
D_SSI_factor * D_SSI +
D_ES_factor * D_ES +
D_GSF_factor * D_GSF +
D_ST_factor * D_ST)
f = 1 when logT <= D_mix_rotation_max_logT_full_on = full_on
= 0 when logT >= D_mix_rotation_max_logT_full_on = full_off
= (log(T)full_on)/(full_offfull_on) else
note that for regions with brunt N^2 < 0, we set Richardson number to 1 which is > Ri_critical and therefore turns off DSI and SSI
according to Heger et al 2000 : 1/30d0 by default : 0
am_nu_factor ¶
am_nu_non_rotation_factor ¶
diffusion of angular momentum
am_nu
= diffusion coefficient for angular momentum
am_nu_non_rot = am_nu_factor*am_nu_non_rotation_factor*D_mix_non_rotation
am_nu_rot = am_nu_factor*(
am_nu_visc_factor* D_visc +
am_nu_DSI_factor * D_DSI +
am_nu_SH_factor * D_SH +
am_nu_SSI_factor * D_SSI +
am_nu_ES_factor * D_ES +
am_nu_GSF_factor * D_GSF +
am_nu_ST_factor * nu_ST)
am_nu = am_nu_non_rot + am_nu_rot
Note that for regions with brunt N^2 < 0, we set Richardson number to 1 which is > Ri_critical and therefore turns off DSI and SSI.
am_nu_DSI_factor ¶
< 0 means use D_DSI_factor
am_nu_SSI_factor ¶
< 0 means use D_SSI_factor
am_nu_SH_factor ¶
< 0 means use D_SH_factor
am_nu_ES_factor ¶
< 0 means use D_ES_factor
am_nu_GSF_factor ¶
< 0 means use D_GSF_factor
am_nu_ST_factor ¶
< 0 means use D_ST_factor
am_nu_visc_factor ¶
< 0 means use D_visc_factor
.
By default = 1 to mix angular momentum.
am_nu_omega_rot_factor ¶
am_nu_omega_non_rot_factor ¶
dj/dt = d/dm((4 pi r^2 rho)^2*(am_nu_omega*i_rot*domega/dm + am_nu_j*dj/dm))
am_nu_omega = am_nu_omega_non_rot_factor*am_nu_non_rot + am_nu_omega_rot_factor*am_nu_rot
am_nu_j_rot_factor ¶
am_nu_j_non_rot_factor ¶
dj/dt = d/dm((4 pi r^2 rho)^2*(am_nu_omega*i_rot*domega/dm + am_nu_j*dj/dm))
am_nu_j = am_nu_j_non_rot_factor*am_nu_non_rot + am_nu_j_rot_factor*am_nu_rot
set_uniform_am_nu_non_rot ¶
uniform_am_nu_non_rot ¶
You can specify a uniform value for am_nu_non_rot
by setting this flag true.
A large uniform am_nu
will produce a uniform omega.
set_min_am_nu_non_rot ¶
min_am_nu_non_rot ¶
You can also specify a minimum am_nu_non_rot
.
am_nu
will be at least this large.
min_center_Ye_for_min_am_nu_non_rot ¶
min_am_nu_non_rot
is only used when center Ye >= this.
Each rotationally induced diffusion coefficient has a factor that lets you control it. Value of 1 gives normal strength; value of 0 turns it off.
Note that for regions with brunt N^2 < 0, we set Richardson number to 1, which is > Ri_critical and therefore turns off DSI and SSI.
D_visc_factor ¶
Kinematic shear viscosity. Should be = 0 because viscosity doesn't mix chemical elements.
am_gradmu_factor ¶
Sensitivity to composition gradients.
In calculation of rotational induced mixing, grad_mu
is multiplied by am_gradmu_factor
.
Value from from Heger et al 2000.
Spatial smoothing is used in calculations of diffusion coefficients. These control the smoothing window widths (number of cells on each side).
time smoothing. Set to 0 to turn off time smoothing.
am_time_average ¶
If true, then D = (D_new + D_old)/2
,
where D_old
is D from previous step
and D_new
is D as calculated for current as if no time smoothing.
simple_i_rot_flag ¶
If true, i_rot = (2/3)*r^2
.
If false, use slightly more complex expression
that takes into account finite shell thickness.
In practice, there doesn't seem to be a significant difference.
do_adjust_J_lost ¶
adjust_J_fraction ¶
adjust angular momentum EXPERIMENTAL
actual_J_lost = &
adjust_J_fraction*mass_lost*s% j_rot_avg_surf + &
(1d0  adjust_J_fraction)*s% angular_momentum_removed
premix_omega ¶
if premix_omega is true, then do 1/2 of the transport of angular momentum before updating the structure and 1/2 after. otherwise, do all of the transport after updating the structure.
recalc_mixing_info_each_substep ¶
if recalc_mixing_info_each_substep
is true, then recalculate the omega mixing coefficients after each substep of the solve omega mix process.
FP_min ¶
FT_min ¶
Lower limits for rotational distortion corrections factors FP and FT.
FP_error_limit ¶
If calculate an fp < this, treat it as an error.
FT_error_limit ¶
If calculate an ft < this, treat it as an error.
D_mix_rotation_max_logT_full_on ¶
Use rotational components of D_mix
for locations where logT <= this.
For numerical stability, turn off rotational part of D_mix
at very high T.
D_mix_rotation_min_logT_full_off ¶
Drop rotational components of D_mix
for locations where logT >= this.
For numerical stability, turn off rotational part of D_mix
at very high T.
uniform_accretion_rotation_factor ¶
D_omega_max_replacement_fraction ¶
D_omega_growth_rate ¶
D_omega_mixing_rate ¶
D_omega_mixing_in_convection_regions ¶
atmosphere boundary conditions ¶
which_atm_option ¶

'simple_photosphere'
: don't integrate, just estimate for tau=2/3 
'Eddington_grey'
: Eddington Ttau integration 
'Krishna_Swamy'
: Krishna Swamy Ttau integration 
'solar_Hopf_grey'
: another T(tau), this one tuned to solar data. 
'tau_100_tables'
: use model atmosphere tables for Pgas and T at tau=100; solar Z only. 
'tau_10_tables'
: use model atmosphere tables for Pgas and T at tau=10; solar Z only. 
'tau_1_tables'
: use model atmosphere tables for Pgas and T at tau=1; solar Z only. 
'tau_1m1_tables'
: use model atmosphere tables for Pgas and T at tau=1e1; solar Z only. 
'photosphere_tables'
: use model atmosphere tables for photosphere; range of Z's. 
'grey_and_kap'
: iterate simple grey to find consistent P, T, and kap at surface 
'grey_irradiated'
: based on Guillot, T, and Havel, M., A&A 527, A20 (2011). 
'Paczynski_grey'
: create an atmosphere for given base conditions. inspired by B. Paczynski, 1969, Acta Astr., vol. 19, 1. takes into account dilution when tau < 2/3, and calls mlt to get gradT allowing for convection. 
'WD_tau_25_tables'
: hydrogen atmosphere tables for cool white dwarfs giving Pgas and T at log10(tau) = 1.4 (tau = 25.11886) Teff goes from 40,000 K down to 2,000K with step of 100 K Log10(g) goes from 9.5 down to 5.5 with step of 0.1. R.D. Rohrmann, L.G. Althaus, and S.O. Kepler, Lyman α wing absorption in cool white dwarf stars, Mon. Not. R. Astron. Soc. 411, 781–791 (2011) 
'fixed_Teff'
: set Tsurf from Eddington Ttau relation for current surface tau and Teff =atm_fixed_Teff
. set Psurf = Radiation_Pressure(Tsurf) 
'fixed_Tsurf'
: set Teff from Eddington Ttau relation for given Tsurf and tau=2/3 set Psurf = Radiation_Pressure(Tsurf) 
'fixed_Psurf'
: get value of Psurf from control parameteratm_fixed_Psurf
. set Tsurf from L and R usingL = 4*pi*R^2*boltz_sigma*T^4
. set Teff using Eddington Ttau relation for tau=2/3 and T=Tsurf.
which_atm_off_table_option ¶
If have selected an atm table as your option,
fallback to using this if the args are off the table.
'simple_photosphere'
or 'grey_and_kap'
.
atm_fixed_Teff ¶
Set this when using atm_option = 'fixed_Teff'
atm_fixed_Tsurf ¶
Set this when using atm_option = 'fixed_Tsurf'
atm_fixed_Psurf ¶
Set this when using which_atm_option = 'fixed_Psurf'
atm_switch_to_grey_as_backup ¶
If you select a table option, but the args are out of the range of the tables,
then this flag determines whether you get an error or the code automatically
switches to option = atm_simple_photosphere
as a backup.
Pextra_factor ¶
Parameter for extra pressure in surface boundary conditions.
Pressure at optical depth tau is calculated as P = tau*g/kap*(1 + Pextra)
Pextra takes into account nonzero radiation pressure at tau=0.
The equation for Pextra includes Pextra_factor
Pextra = Pextra_factor*(kap/tau)*(L/M)/(6d0*pi*clight*cgrav)
For certain situations such super eddington L,
you may need to increase Pextra to help convergence.
e.g. try Pextra_factor = 2
Pextra_factor < 0
means use (incorrect) old form 1.6d4*kap*(L/Lsun)/(M/Msun)
.
atm_grey_and_kap_atol ¶
atm_grey_and_kap_rtol ¶
Relative and absolute tolerance parameters for the grey_and_kap
option.
Iterates on kap until err = delta kap/(atol + rtol*kap) < 1
.
atm_grey_and_kap_max_tries ¶
trace_atm_grey_and_kap ¶
Limit on iterations and trace.
atm_grey_irradiated_atol
and atm_grey_irradiated_rtol
.
Parameters for the grey_irradiated
option.
Absolute and relative error tolerances.
atm_grey_irradiated_T_eq ¶
Equilibrium temperature based on irradiation.
irrad_flux = Lstar/(4*pi*orbit**2)
 Area of planet in plane perpendicular to
irrad_flux = pi*Rplanet**2
.  Stellar luminosity received by
planet = irrad_flux*area
.  This luminosity determines
T_eq
:T_eq**4 = irrad_flux/(4*sigma)
.
atm_grey_irradiated_kap_v ¶
atm_grey_irradiated_simple_kap_th ¶
Opacity for irradiation.
The T(tau) relation for this option depends on the ratio kap_v/kap_th
where kap_v
is the planet atmosphere opacity for stellar irradiation,
and kap_th
is the thermal opacity for internally produced radiation.
You can either specify the ratio of kap_v/kap_th
,
or you can specify kap_v
and have the code calc kap_th
to get the ratio.
atm_grey_irr_kap_v_div_kap_th ¶
If atm_grey_irradiated_simple_kap_th
is true, then just set kap_th = kap_v/kap_v_div_kap_th
.
Only used if > 0.
atm_grey_irradiated_P_surf ¶
Surface pressure ; set to 1 bar in cgs units.
atm_grey_irradiated_max_tries ¶
Limit on iterations.
trace_atm_grey_irradiated ¶
Trace the grey atmosphere.
atm_int_errtol ¶
dump_int_atm_info_model_number ¶
Parameters for integrate T(tau) and write atm structure at model number to terminal.
Parameters for Paczynski_grey
.
create_atm_max_step_size
in units of log10_tau
.
surface_extra_Pgas ¶
Extra gas pressure at surface. Added to surface pressure from atm. In ergs/cm^3.
use_atm_PT_at_center_of_surface_cell ¶
The surface boundary conditions for pressure and temperature, compare the model values at the center of the surface cell to values derived from the P and T returned by the atm module. If this flag is true, then the atm values are directly used. If false, then the values from the atm are treated as being for the outer boundary of the surface cell, and those values are used to estimate corresponding values for the cell center for comparison to the model values at the cell center.
Most cases will have this flag false. An example that sets this flag true is a case in which are using a special boundary condition (BC) routine to force a certain entropy for the surface cell. In that situation, it is better to have the special BC directly return P and T for the center of cell 1 to produce the desired entropy.
use_compression_outer_BC ¶
gradient of compression vanishes at surface
see Grott, Chernigovski, Glatzel, 2005.
d_dm(d_dm(r^2*v)) = 0 at surface
by continuity, this is d_dm(d_dt(1/rho)) = 0 at surface
finite volume form is
(1/rho(1)  1/rho_start(1)) = (1/rho(2)  1/rho_start(2))
this BC determines the density for surface cell.
T_surf
is set to Tsurf_factor*T_black_body(L_surf,R_surf)
use_momentum_outer_BC ¶
use P_surf
from atm to set pressure gradient at surface in momentum equation
calculate v(1) based on pressure difference P_surf  P(1)
T_surf
is set to Tsurf_factor*T_black_body(L_surf,R_surf)
use_zero_Pgas_outer_BC ¶
use Psurf = Radiation_Pressure(T_start(1))
use_zero_dLdm_outer_BC ¶
use L(1) = L(2) for T outer BC
use_T_Paczynski_outer_BC ¶
T_surf^4
is set to L/(8*pi*boltz_sig*R^2)
use_T_black_body_outer_BC ¶
T_surf
is set to Tsurf_factor*T_black_body(L_surf,R_surf)
use_fixed_vsurf_outer_BC ¶
fixed_vsurf ¶
v at outer boundary of model is set to be fixed_vsurf
Tsurf_factor ¶
used when use_compression_outer_BC
or use_momentum_outer_BC
T_surf
is set to Tsurf_factor*T_black_body(L_surf,R_surf)
irradiation_flux ¶
column_depth_for_irradiation ¶
mass gain or loss ¶
mass_change ¶
Rate of accretion (Msun/year). Negative for mass loss.
This only applies when the wind_scheme = ''
.
Enhanced mass loss due to rotation as in Heger, Langer, and Woosley, 2000, ApJ, 528:368396.
Mdot = Mdot_no_rotation/(1  Osurf/Osurf_crit)^mdot_omega_power
where
Osurf = angular velocity at surface
Osurf_crit^2 = (1  Gamma_edd)*G*M/R^3
Gamma_edd = kappa*L/(4 pi c G M), Eddington factor
Typical value for mdot_omega_power = 0.43
.
mdot_omega_power ¶
Set to 0 to disable this feature.
max_rotational_mdot_boost ¶
This limits the rotational boost.
max_mdot_jump_for_rotation ¶
Don't increase prev mdot by more that this.
NOTE: use vcrit_max_years_for_timestep
with this.
lim_trace_rotational_mdot_boost ¶
Output to terminal if boost > this.
rotational_mdot_boost_fac ¶
Increase mdot.
rotational_mdot_kh_fac ¶
Kelvinhelmholtz boost.
surf_avg_tau_min ¶
Use mass avg starting from this optical depth.
surf_avg_tau ¶
Use mass avg down to this optical depth.
hot_wind_scheme ¶
hot_wind_Wolf_Rayet_scheme ¶
cool_wind_RGB_scheme ¶
cool_wind_AGB_scheme ¶
This section replaces the old "RGB_wind_scheme
" and "AGB_wind_scheme
"
with temperaturedependent hot_wind and cool_wind. You can still
use the RGB and AGB wind scheme as before, the functionality remains.
Now you can also select a hot wind scheme that takes effect above
some temperature, set by hot_wind_full_on_T
and hot_wind_full_off_T
.
Similarly, the cool wind scheme has temperature controls that
set the temperature below which they are relevant
(cool_wind_full_off_T
and cool_wind_full_on_T
). The two temperature
regimes can overlap; in this case the hot and cool Mdot values are added.
The wind Mdot will ramp from 0 to full value between full_on_T and
full_off_T.
As before, an empty string '' means no wind.
The wind "eta" values, which are constant scaling factors, have all renamed *_wind_eta > *_scaling_factor.
Here is an example of how to translate an existing inlist from the old style to the new:
 Before  After 

 RGB_wind_scheme = 'Reimers'  cool_wind_RGB_scheme = 'Reimers' 
 Reimers_wind_eta = 0.1  Reimers_scaling_factor = 0.1 
 AGB_wind_scheme = 'Blocker'  cool_wind_AGB_scheme = 'Blocker' 
 Blocker_wind_eta = 0.5  Blocker_scaling_factor = 0.5 
 RGB_to_AGB_wind_switch = 1d4  RGB_to_AGB_wind_switch = 1d4 
  
  ! only use the cool_wind_scheme 
  cool_wind_full_on_T = 1d8 !K 
  cool_wind_full_off_T = 1.1d8 !K 
  hot_wind_scheme = '' 
suggested hot and cool wind schemes follow but any valid wind option will work for either hot or cool.
Empty string means no wind
Suggested hot wind options:
 'Kudritzki'
 'Vink'
Suggested cool wind options:
 'Reimers'
 'Blöcker'
 'de Jager'
 'van Loon'
 'Nieuwenhuijzen'
For now the 'Dutch' scheme can be used in either capacity.
cool_wind_full_on_T ¶
cool_wind_full_off_T ¶
on for T_phot < cool_wind_full_on_T
off for T_phot > cool_wind_full_off_T
ramp from 0 to 1 between the two limits
set cool_wind_full_on_T = 0
to ignore the cool_wind
hot_wind_full_on_T ¶
hot_wind_full_off_T ¶
on for T_phot > hot_wind_full_on_T
off for T_phot < hot_wind_full_off_T
ramp from 0 to 1 between the two limits
set hot_wind_full_on_T = 0
to ignore the hot_wind
RGB_to_AGB_wind_switch ¶
If center hydrogen abundance is < 0.01
and center helium abundance by mass is less than RGB_to_AGB_wind_switch
,
then system will use AGB_wind_scheme
rather than RGB_wind_scheme
.
The code will automatically choose between an RGB wind and an AGB wind. The following names for the different schemes are recognized:
 'Reimers'
 'Blocker'
 'de Jager'
 'van Loon'
 'Nieuwenhuijzen'
 'Kudritzki'
 'Vink'
 'Dutch'
 'Stern51'
 'Grafener'
 'other'  experimental
Reimers_scaling_factor ¶
Reimers mass loss for red giants.
D. Reimers "Problems in Stellar Atmospheres and Envelopes" Baschek, Kegel, Traving (eds), Springer, Berlin, 1975, p. 229.
Parameter for mass loss by Reimers wind prescription.
Reimers mdot is eta*4d13*L*R/M
(Msun/year), with L, R, and M in solar units.
Typical value is 0.5.
Blocker_scaling_factor = 0 ¶
Blocker's mass loss for AGB stars.
T. Blocker "Stellar evolution of low and intermediatemass stars" A&A 297, 727738 (1995).
Parameter for mass loss by Blocker's wind prescription.
Blocker mdot is eta*4.83d9*M**2.1*L**2.7*4d13*L*R/M
(Msun/year),
with L, R, and M in solar units.
Typical value is 0.1d0.
de_Jager_scaling_factor ¶
de Jager mass loss for various applications. de Jager, C., Nieuwenhuijzen, H., & van der Hucht, K. A. 1988, A&AS, 72, 259. Parameter for mass loss by de Jager wind prescription.
van_Loon_scaling_factor ¶
see van Loon et al. 2005, A&A, 438, 273 "An empirical formula for the massloss rates of dustenshrouded red supergiants and oxygenrich Asymptotic Giant Branch stars"
Kudritzki_scaling_factor ¶
Radiation driven winds of hot stars. See Kudritzki et al, Astron. Astrophys. 219, 205218 (1989).
Nieuwenhuijzen_scaling_factor ¶
See Nieuwenhuijzen, H.; de Jager, C. 1990, A&A, 231, 134.
Vink_scaling_factor ¶
Vink, J.S., de Koter, A., & Lamers, H.J.G.L.M., 2001, A&A, 369, 574. "Massloss predictions for O and B stars as a function of metallicity"
Grafener_scaling_factor ¶
Grafener, G. & Hamann, W.R. 2008, A&A 482, 945 contributed to mesa by Nilou Afsari
Dutch_scaling_factor ¶
The "Dutch" wind scheme for massive stars combines results from several papers, all with authors mostly from the Netherlands.
The particular combination we use is based on Glebbeek, E., et al, A&A 497, 255264 (2009) [more Dutch authors!]
For Teff > 1e4 and surface H > 0.4 by mass, use Vink et al 2001 Vink, J.S., de Koter, A., & Lamers, H.J.G.L.M., 2001, A&A, 369, 574.
For Teff > 1e4 and surface H < 0.4 by mass, use Nugis & Lamers 2000 Nugis, T.,& Lamers, H.J.G.L.M., 2000, A&A, 360, 227 Some folks use 0.8 for nonrotating mdoels (Maeder & Meynet, 2001).
Dutch_wind_lowT_scheme ¶
For Teff < 1e4
Use de Jager if Dutch_wind_lowT_scheme = 'de Jager'
de Jager, C., Nieuwenhuijzen, H., & van der Hucht, K. A. 1988, A&AS, 72, 259.
Use van Loon if Dutch_wind_lowT_scheme = 'van Loon'
van Loon et al. 2005, A&A, 438, 273.
Use Nieuwenhuijzen if Dutch_wind_lowT_scheme = 'Nieuwenhuijzen'
Nieuwenhuijzen, H.; de Jager, C. 1990, A&A, 231, 134
Stern51_scaling_factor ¶
wind scheme from Stern
use_accreted_material_j ¶
Angular momentum of accreted material.
If false, then accreted material is given j so that it
is rotating at the same angular velocity as the surface.
If true, then accreted material is given j = accreted_material_j
.
no_wind_if_no_rotation ¶
Use this to delay start of wind until after have started rotation.
min_wind ¶
Min wind in Msun/year > 0; ignore this limit if it is <= 0. e.g., might have low level wind even when normal scheme doesn't call for any.
max_wind ¶
Max wind in Msun/year > 0; ignore this limit if it is <= 0.
For critical rotation mass loss
Redo step as needed to find mdot that brings model to just below critical.
if max_mdot_redo_cnt
> 0, and surf_w_div_w_crit
> surf_w_div_w_crit_limit
,
then recompute the step while increasing mdot, until
surf_w_div_w_crit
< surf_w_div_w_crit_limit
. Once an upper limit for mdot is found,
the solution for mdot is further refined by bisection until it is computed to a tolerance of
surf_w_div_w_crit_tol
. During iterations, mdot is adjusted alternately by multiplication
by mdot_revise_factor
, and by adjusting it by implicit_mdot_boost*mdot_initial
, where
mdot_initial
is the value of mdot at the first iteration. This is done to deal with mass
accreting stars, where mdot might need to change sign for the star to remain below critical.
remove_H_wind_mdot ¶
This wind removes surface material until reaching a target total H mass for the star. Max rate of removal in Msun/year ; only applies if this is > 0.
remove_H_wind_H_mass_limit ¶
This wind removes surface material until reaching a target total H mass for the star. Turn off this wind when total H mass < this limit (Msun units).
super_eddington_scaling_factor ¶
For super eddington wind we use Ledd averaged by mass to optical depth tau = surf_avg_tau
.
super_eddington_wind_Ledd_factor ¶
Parameter for mass loss driven by super Eddington luminosity. Divide L by this factor when computing super Eddington wind, e.g., if this is 2, then only get wind when L/2 > Ledd.
wind_boost_full_off_L_div_Ledd ¶
Boost off for L/Ledd <= this (set large to disable this).
This alternative form is used when super_eddington_scaling_factor
== 0.
wind_boost_full_on_L_div_Ledd ¶
Do max boost for L/Ledd >= this.
This alternative form is used when super_eddington_scaling_factor
== 0.
super_eddington_wind_max_boost ¶
Multiply wind mdot by up to this amount.
This alternative form is used when super_eddington_scaling_factor
== 0.
trace_super_eddington_wind_boost ¶
Send super eddington wind information to terminal.
mass_change_full_on_dt ¶
mass_change_full_off_dt ¶
These params provide the option to turn off mass change when have very small timesteps.
Between mass_change_full_on_dt
and mass_change_full_ff_dt
mass change is gradually reduced.
Units in seconds.
trace_dt_control_mass_change ¶
min_abs_mdot_for_change_limits ¶
Only apply limits if abs(prev mdot) > this limit. These limit the change in mdot from one step to the next.
max_abs_mdot_factor ¶
Only allow abs(mdot) to increase by this factor per timestep.
min_abs_mdot_factor ¶
Only allow abs(mdot) to decrease by this factor per timestep.
max_star_mass_for_gain ¶
Automatic stops for mass loss/gain in Msun units (negative means ignore this parameter). Turn off mass gain when star mass reaches this limit.
min_star_mass_for_loss ¶
Automatic stops for mass loss/gain in Msun units (negative means ignore this parameter). Turn off mass loss when star mass reaches this limit.
max_T_center_for_any_mass_loss ¶
No mass loss for T center > this.
max_T_center_for_full_mass_loss ¶
No reduction in mass loss for T center <= this.
This must be <= max_T_center_for_full_mass_loss
.
Reduce mass loss rate to 0 as T center climbs from max_for_full
to max_for_any
.
The idea behind this is that during final stages of burning, there is so little time
left in the life of the star, that any mass loss to winds will be negligible,
but the inclusion of that insignificant mass loss can actually make
convergence more difficult, so you are better off without it.
wind_envelope_limit ¶
Winds automatically shut off when the hydrogen rich envelope mass is less than this limit.
The value of h1_boundary_limit
defines what is considered to be hydrogen poor.
Mass in Msun units.
rlo_scaling_factor ¶
Amplitude of mass loss. "rlo" wind scheme provides a simple radiusdeterminedwind with exponential increase.
rlo_wind_min_L ¶
Only on when L > this limit. (Lsun)
rlo_wind_max_Teff ¶
Only on when Teff < this limit.
rlo_wind_roche_lobe_radius ¶
Only on when R > this (Rsun).
rlo_wind_base_mdot ¶
Base rate of mass loss when R = roche lobe radius (Msun/year).
rlo_wind_scale_height ¶
Determines exponential growth rate of mass loss (Rsun).
roche_lobe_xfer_full_on ¶
Full accretion when R/RL <= this.
Limit accretion when Roche lobe is nearing full (only with rlo_scaling_factor
> 0).
roche_lobe_xfer_full_off ¶
No accretion when R/RL >= this.
nova_scaling_factor ¶
Amplitude of wind.
"nova" wind is scheme used in Kato and Hachisu, ApJ 437:802826, 1994. (eqn 23).
This only applies when nova_scaling_factor
> 0.
nova_wind_b ¶
Wind parameter
nova_wind_max_Teff ¶
Only on when Teff < this limit.
nova_wind_min_L ¶
only on when L > this limit. (Lsun)
nova_min_Teff_for_accretion ¶
When nova_scaling_factor /= 0
and Teff < this
and L > nova_wind_min_L
, no accretion.
nova_roche_lobe_radius ¶
units in Rsun
nova_RLO_mdot ¶
roche lobe overflow mdot, Msun/year
flash_wind_mdot ¶
Rate of mass ejection in Msun/year.
"flash" wind is scheme used in Kato, Saio, and Hachisu, ApJ 340:509517, 1989.
This only applies when flash_wind_mdot
> 0.
flash_wind_starts ¶
Wind starts when R >= this limit (Rsun units).
flash_wind_declines ¶
Wind starts to decline when R <= this limit (Rsun units).
flash_wind_full_off ¶
Wind full off when R <= this limit (Rsun units).
controls for adjust_mass ¶
max_logT_for_k_below_const_q ¶
max_q_for_k_below_const_q ¶
min_q_for_k_below_const_q ¶
Move k_below_const_q
inward from surface until q(k) <= max_q
.
Then continue moving inward until reach logT(k) >= max_logT
or q(k) <= min_q
.
max_logT_for_k_const_mass ¶
max_q_for_k_const_mass ¶
min_q_for_k_const_mass ¶
Move k_below_const_q
inward from k_below_const_q+1
until q(k) <= max_q
.
Then continue moving inward until reach logT(k) >= max_logT
or q(k) <= min_q
.
composition controls ¶
accrete_same_as_surface ¶
If true, composition of accreted material is identical to the current surface composition.
accrete_given_mass_fractions ¶
If true, use the following mass fractions  they must add to 1.0.
num_accretion_species ¶
Up to max_num_accretion_species
.
accretion_species_id ¶
Isotope name as defined in chem_def
.
accretion_species_xa ¶
mass fraction
otherwise, use the following composition
accretion_h1 ¶
Hydrogen mass fraction.
accretion_h2 ¶
If no h2 in current net, then this is automatically added to h1.
accretion_he3 ¶
he3 mass fraction
accretion_he4 ¶
he4 mass fraction
accretion_zfracs = ¶
One of the following identifiers for different Z fractions from chem_def
.

AG89_zfracs = 1
, Anders & Grevesse 1989 
GN93_zfracs = 2
, Grevesse & Noels 1993 
GS98_zfracs = 3
, Grevesse & Sauval 1998 
L03_zfracs = 4
, Lodders 2003 
AGS05_zfracs = 5
, Asplund, Grevesse & Sauval 2005
or set accretion_zfracs = 0
to use the following list of z fractions
accretion_dump_missing_metals_into_heaviest ¶
this controls the treatment metals that are not included in the current net. if this flag is true, then the mass fractions of missing metals are added to the mass fraction of the most massive metal included in the net. if this flag is false, then the mass fractions of the metals in the net are renormalized to make up for the total mass fraction of missing metals.
Special list of z fractions. If you use these, they must add to 1.0.
lgT_lo_for_set_new_abundances ¶
lgT_hi_for_set_new_abundances ¶
Composition controls for set_new_abundances
.
pure_fe56_limit ¶
Pure fe56 for base of ns envelope. If mass fraction of fe56 > this, convert cell to pure fe56.
mesh adjustment ¶
max_allowed_nz ¶
Maximum number of grid points allowed.
remesh_max_allowed_logT ¶
Turn off remesh if any cell has logT > this.
mesh_max_allowed_ratio ¶
Must be >= 2.5. Max ratio for mass of adjacent cells. If have ratio exceeding this, split the larger cell.
max_delta_x_for_merge ¶
Don't merge neighboring cells if any abundance differs by more than this.
mesh_delta_coeff ¶
A larger value increases the max allowed deltas and decreases the number of grid points.
and a smaller does the opposite.
E.g., you'll roughly double the number of grid points if you cut mesh_delta_coeff
in half.
Don't expect it to exacly double the number however since other parameters in addition to
gradients also influence the details of the grid spacing.
mesh_delta_coeff_for_highT ¶
Use different mesh_delta_coeff
at higher temperatures.
logT_max_for_standard_mesh_delta_coeff ¶
Use mesh_delta_coeff
for center logT <= this. This value
should be less than logT_min_for_highT_mesh_delta_coeff
.
logT_min_for_highT_mesh_delta_coeff ¶
Use mesh_delta_coeff_for_highT
for center logT >= this.
Linearly interpolate in logT for intermediate center temperatures.
mesh_Pgas_div_P_exponent ¶
Multiply mesh_delta_coeff
by (Pgas/Ptotal) to this power.
mesh_delta_coeff_pre_ms ¶
Multiply mesh_delta_coeff
by this when center XH > 0.5 and lg_LH < lg_L  1
.
max_dq ¶
Max size for cell as fraction of total mass.
min_dq ¶
Min size for cell as fraction of total mass.
min_dq_for_xa ¶
Min size for splitting because of composition gradient.
mesh_min_dlnR ¶
Limit on difference in lnR across cell for mesh refinement. Do not make this smaller than about 1d14 or will fail with numerical problems.
merge_if_dlnR_too_small ¶
If true, mesh adjustment will force merge if difference in lnR across cell is too small.
mesh_min_dr_div_dRstar ¶
Limit on relative radial extent for mesh refinement. dRstar = s% r(1)  s% R_center Don't split if dr/dRstar would drop below this limit.
merge_if_dr_div_dRstar_too_small ¶
If true, mesh adjustment will force merge if dr_div_dRstar
too small.
mesh_min_dr_div_cs ¶
Limit (in seconds) on sound crossing time for mesh refinement. Don't split if sound crossing time would drop below this limit.
merge_if_dr_div_cs_too_small ¶
If true, mesh adjustment will force merge if dr_div_cs
too small.
max_center_cell_dq ¶
Largest allowed dq at center.
max_surface_cell_dq ¶
Largest allowed dq at surface.
max_num_subcells ¶
Limits number of new cells from 1 old one.
max_num_merge_cells ¶
Limits number of old cells to merge into 1 new one.
mesh_adjust_use_quadratic ¶
Linear or quadratic reconstruction polynomials for mesh adjustments.
mesh_adjust_get_T_from_E ¶
If true, then use internal energy conservation to set new temperature. If false, just use average temperature based on reconstruction polynomials.
P_function_weight ¶
Pressure gradient, P_function = P_function_weight*log10(P)
.
T_function1_weight ¶
Temperature gradient, T_function1 = T_function1_weight*log10(T)
.
NOTE: The T gradient mesh controls below seems to be necessary to allow burning that starts off center
to be able to reach the center. You can see this in the pre_zahb
test_suite
case if you
try running it without the T function. The center temperature will fail to rise.
T_function2_weight ¶
T_function2_param ¶
T_function2 = T_function2_weight*log10(T / (T + T_function2_param))
Largest change in T_function2
happens around T = T_function2_param
.
Default value puts this in the envelope ionization region.
R_function_weight ¶
R_function_param ¶
log radius gradient
R_function = R_function_weight*log10(1 + (r/Rsun)/R_function_param)
R_function2_weight ¶
R_function2_param1 ¶
R_function2_param2 ¶
R_function2 = R_function2_weight*min(R_function2_param1,max(R_function2_param2,r/Rstar))
where Rstar = radius of outer edge of model.
R_function3_weight ¶
radius gradient
R_function3 = R_function3_weight*(r/Rstar)
M_function_weight ¶
M_function_param ¶
log mass gradient
M_function = M_function_weight*log10(1 + (m/Msun)/M_function_param)
gradT_function_weight ¶
gradT gradient, gradT_function = gradT_function_weight*gradT
log_tau_function_weight ¶
log_tau gradient (optical depth)
log_tau_function = log_tau_function_weight*log10(tau)
log_kap_function_weight ¶
log_kap gradient (optical depth)
log_kap_function = log_kap_function_weight*log10(kap)
omega_function_weight ¶
omega gradient (rotation omega in rad/sec)
omega_function = omega_function_weight*log10(omega)
gam_function_weight ¶
gam_function_param1 ¶
gam_function_param2 ¶
For extra resolution around liquid/solid transition.
gam = plasma interaction parameter
gam_function = gam_function_weight*tanh((gam  gam_function_param1)/gam_function_param2)
xa_function_species ¶
xa_function_weight ¶
Mass fraction gradients.
xa_function = xa_function_weight*log10(xa + xa_function_param),
Up to num_xa_function
of these  see star_def
for value of num_xa_function
.
0 length string means skip, otherwise name of nuclide as defined in chem_def
.
weight <= 0 means skip.
xa_mesh_delta_coeff ¶
Useful if you want to increase mesh_delta_coeff
during advanced burning.
If xa_function_species(j)
has the largest atomic number in current set of species,
then multiply mesh_delta_coeff
by xa_mesh_delta_coeff(j)
.
"Indirect" mesh controls work by increasing sensitivity in selected regions.
They work in the same way as mesh_delta_coeff
 values less than 1.0 mean
smaller allowed jumps in mesh functions and hence smaller grid points and
higher resolution. But whereas mesh_delta_coeff
applies uniformly to all
cells, the "extra" coefficients can vary in value from one cell to the next.
xtra_coef_above_xtrans ¶
xtra_coef_below_xtrans ¶
Multiply mesh_delta_coeff
near any change in most abundant species by this factor.
Value < 1 gives increased resolution.
xtra_dist_above_xtrans ¶
xtra_dist_below_xtrans ¶
Increase resolution up to this distance away from the abundance transition with distance measured in units of the pressure scale height at the boundary.
mesh_logX_species ¶
mesh_logX_min_for_extra ¶
Increase resolution at points with large abs(dlogX/dlogP); logX = log10(X mass fraction).
mesh_dlogX_dlogP_extra(1) ¶
mesh_dlogX_dlogP_full_on(1) ¶
mesh_dlogX_dlogP_full_off(1) ¶
Only increase resolution if logX >= mesh_logX_min_for_extra
.
Make mesh_dlogX_dlogP_extra < 1
for smaller allowed change in logP and hence higher resolution.
Full effect if abs(dlogX/dlogP) >= mesh_dlogX_dlogP_full_on
.
No effect if abs(dlogX/dlogP)) <= mesh_dlogX_dlogP_full_off
.
Up to num_mesh_logX
of these (see star_def
for value of num_mesh_logX
).
Multiply mesh_delta_coeff
near convection zone boundary (czb) by the following factors.
Value < 1 gives increased resolution.
xtra_coef_czb_full_on ¶
xtra_coef_czb_full_off ¶
The center mass fraction of he4 is used to control this extra coefficient. The default settings limit the application to after center he4 is depleted.
 if center he4 <
xtra_coef_czb_full_on
, then use xtra coef's  if center he4 >
xtra_coef_czb_full_off
, then don't use xtra coef's
a more verbose form of these names might be the following:
xtra_coef_czb_full_on_if_center_he4_below_this
xtra_coef_czb_full_off_if_center_he4_above_this
xtra_coef_{above  below}_{lower  upper}_{nonburn  hburn  heburn  zburn}_czb ¶
Make these < 1 to increase resolution.
xtra_dist_{above  below}_{lower  upper}_{nonburn  hburn  heburn  zburn}_czb ¶
Increase resolution up to this distance away from the convective zone boundary, with distance measured in units of the pressure scale height at the boundary.
xtra_coef_scz_above_{nonburn  hburn  heburn  zburn}_cz ¶
Make these < 1 to increase resolution in semiconvective region adjacent to convective region.
e.g., xtra_coef_scz_above_nb_cz
is extra coef for semiconvectize zone above a nonburn convective zone.
Multiply mesh_delta_coeff
in overshooting regions by the following factors.
Value < 1 gives increased resolution.
xtra_coef_os_full_on ¶
xtra_coef_os_full_off ¶
The center mass fraction of he4 is used to control this extra coefficient. The default settings limit the application to after center he4 is depleted.
 if center he4 <
xtra_coef_os_full_on
, then usextra_coef
coef's  if center he4 >
xtra_coef_os_full_off
, then don't usextra_coef
coef's
xtra_coef_os_{above  below}_{nonburn  hburn  heburn  zburn} ¶
Make these < 1 to increase resolution.
xtra_dist_os_{above  below}_{nonburn  hburn  heburn  zburn} ¶
Continue to increase resolution for this distance beyond the edge of the overshooting region, with distance measured in units of the pressure scale height at the edge of the overshooting region. This applies to both edges of the overshooting region.
Increase resolution at points with large abs(dlog_eps/dlogP)
for nuclear power eps (ergs/g/sec).
At any particular location, only use eps nuc category with max local value
e.g., only use mesh_dlog_pp_dlogP_extra
at points where pp is the max burn source.
mesh_dlog_eps_min_for_extra ¶
Only increase resolution if log_eps >= mesh_dlog_eps_min_for_extra
.
mesh_dlog_eps_dlogP_full_on ¶
Full effect if abs(dlog_eps/dlogP) >= mesh_dlog_eps_dlogP_full_on
.
mesh_dlog_eps_dlogP_full_off ¶
No effect if abs(dlog_eps/dlogP)) <= mesh_dlog_eps_dlogP_full_off
.
Multiply the allowed change between adjacent cells by the following factors; (small factor => smaller allowed change => more cells).
pp and cno burning
triple alpha, c, n, and o burning
ne, na, and mg burning
c12+c12. c12+o16, and o16+o16 burning
si to iron alog alpha chain burning
photodisintegration burning
convective_bdy_weight ¶
convective_bdy_dq_limit ¶
convective_bdy_min_dt_yrs ¶
Mesh function to enhance resolution near convective boundaries including regions that are newly nonconvective because of moving boundary. EXPERIMENTAL
trace_mesh_adjust_error_in_conservation ¶
If true, report relative errors for total PE, KE, and IE. (potential, kinetic, internal).
okay_to_remesh ¶
If false, then no remeshing.
remesh_dt_limit ¶
No remesh if dt < remesh_dt_limit
, in seconds.
remesh_log_L_nuc_burn_min ¶
No mesh adjustments when log10(L_nuc_burn_total)
is less than this.
By default, this turns off mesh changes during the early preMS.
use_split_merge_amr ¶
use_split_merge_amr_log_zoning ¶
if true, target is even grid spacing in logr if false, target is even grid spacing in r
split_merge_amr_nz_baseline ¶
split_merge_amr_MaxLong ¶
split cell if ratio of actual/desired dr is > this; ignore if <= 0
split_merge_amr_MaxShort ¶
merge cell if ratio of desired/actual dr is > this; ignore if <= 0
merge_amr_max_abs_du_div_cs ¶
split_merge_amr_dq_min ¶
do not split if dq for cell is < this
split_merge_amr_max_iters ¶
split_merge_amr_okay_to_split_1 ¶
split_merge_amr_okay_to_split_nz ¶
trace_split_merge_amr ¶
nuclear reaction controls ¶
default_net_name ¶
Name of base reaction network.
Each net corresponds to a file in $MESA_DIR/data/net_data/nets
.
Look in that directory to see your network options,
or learn how to create your own net.
screening_mode ¶
 empty string means no screening

'classic'
: DeWitt, Graboske, Cooper, "Screening Factors for Nuclear Reactions. I. General Theory", ApJ, 181:439456, 1973. Graboske, DeWitt, Grossman, Cooper, "Screening Factors for Nuclear Reactions. II. Intermediate Screening and Astrophysical Applications", ApJ, 181:457474, 1973. 
' extended'
: extends the Graboske method using results from Alastuey and Jancovici (1978), along with plasma parameters from Itoh et al (1979) for strong screening. 
'salpeter'
: weak screening only. following Salpeter (1954), with equations (4215) and (4221) of Clayton (1968).
net_logTcut_lo ¶
strong rates are zero logT < logTcut_lo
use default from net if this is <= 0
net_logTcut_lim ¶
strong rates cutoff smoothly for logT < logTcut_lim
use default from net if this is <= 0
max_abar_for_burning ¶
if abar > this, suppress all burning e.g., if want an "inert" core heavy elements, set this to 55 or, if want to turn off the net, set this to 1
dxdt_nuc_factor ¶
Control for abundance changes by burning.
Changes dxdt_nuc
(rate of change of abundances)
without changing the rates or eps_nuc
(rate of energy generation).
weak_rate_factor ¶
all weak rates are multiplied by this factor
reaction_neuQs_factor ¶
all neutrino Q factors are multiplied by this factor
nonlocal_NiCo_kap_gamma ¶
nonlocal_NiCo_decay_heat ¶
if true, do nonlocal deposition of gammaray energy from Ni56 and Co56 decays. only for approx nets including co56. intended for use with stripped envelope supernovae.
dtau_gamma_NiCo_decay_heat ¶
element diffusion ¶
gravitational settling and chemical diffusion.
show_diffusion_info ¶
terminal output for diffusion
show_diffusion_substep_info ¶
terminal output for diffusion
show_diffusion_timing ¶
show time for each call on diffusion
do_element_diffusion ¶
determines whether or not we do element diffusion
diffusion_dt_limit ¶
no element diffusion if dt < this limit (in seconds)
diffusion_use_iben_macdonald ¶
if false, use atomic diffusion coefficients according to Paquette et al. (1986)
if true, similar to Iben & MacDonald (1985)
this was previously called diffusion_use_pure_coulomb
.
diffusion_use_cgs_solver ¶
if false, solve the system of equations descibed by Thoul et al. (1994) if true, solve the unmodified Burgers equations in cgs units
diffusion_do_thermal_diffusion ¶
if true, include the heat flow vector terms in the Burgers equations
when diffusion_use_cgs_solver = .true.
these are problematic when distribution function become nonMaxwellian.
diffusion_min_dq_at_surface ¶
treat at least this much at surface as a single cell for purposes of diffusion
diffusion_min_T_at_surface ¶
treat cells cells at surface with T < this as a single cell for purposes of diffusion default should be large enough to ensure hydrogen ionization
diffusion_min_dq_ratio_at_surface ¶
combine cells at surface until have total mass >= this factor times the next cell below them this helps with surface boundary condition for diffusion by putting large cell at surface
diffusion_dt_div_timescale ¶
dt is at most this fraction of timescale.
Each stellar evolution step can be divided into many substeps for diffusion.
The substep timescale is set by rates of flow in and out for each species in each cell.
The substep size, dt, is initially set to timescale*diffusion_dt_div_timescale
.
diffusion_min_num_substeps ¶
Max substep dt is total time divided by this.
diffusion_max_iters_per_substep ¶
If the substep requires too many iterations, the substep time is decreased for a retry.
diffusion_max_retries_per_substep ¶
If the substep requires too many retries, diffusion fails and forces a retry for the star.
diffusion_tol_correction_max ¶
diffusion_tol_correction_norm ¶
Tolerances for newton iterations. Corrections smaller will be treated as converged. Corrections larger will cause another newton iteration.
diffusion_min_X_hard_limit ¶
tolerance for negative mass fraction errors errors larger will cause retry; errors smaller will be corrected.
diffusion_X_total_atol ¶
diffusion_X_total_rtol ¶
tolerances for errors in total species conservation errors larger will cause retry; errors smaller will be corrected.
diffusion_upwind_abs_v_limit ¶
switch to upwind for i at face k if abs(v(i,k)) > this limit mainly for use with radiative levitation where get very much higher velocities
diffusion_v_max ¶
Max velocity (cm/sec).
We can get extremely large velocities in the extreme outer envelope
that cause problems numerically without really effecting the results,
so we allow a max for the velocities that should help the numerics
without changing the results.
Note: change diffusion_v_max
to at least 1d2 when using radiative levitation.
diffusion_gamma_full_off ¶
diffusion_gamma_full_on ¶
gamma_full_on <= gamma_full_off
Shut off diffusion for large gamma (i.e. for gamma >= gamma_full_off
).
Gradually decrease diffusion as gamma increases from full_on
to full_off
.
Allow normal diffusion for gamma <= gamma_full_on
.
Default is diffusion off when get well into liquid regime.
diffusion_T_full_on ¶
diffusion_T_full_off ¶
T_full_on >= T_full_off
Shut off diffusion for small T (i.e., for T <= T_full_off
)
Gradually decrease diffusion as T decreases from T_full_on
to T_full_off
.
Allow normal diffusion for T >= T_full_on
.
diffusion_calculates_ionization ¶
If diffusion_calculates_ionization
is false, MESA uses
typical charges for a set of representative species as
defined in diffusion_class_typical_charge
and
diffusion_class_representative
for all points rather than
calculating the ionization from the local conditions.
diffusion_nsmooth_typical_charge ¶
smoothing over charge
diffusion_SIG_factor ¶
diffusion_GT_factor ¶
factors for playing with SIG and GT terms for concentration diffusion and advection
diffusion_AD_dm_full_on ¶
diffusion_AD_dm_full_off ¶
diffusion_AD_boost_factor ¶
artificial concentration diffusion near surface (mainly for radiative levitation)
Msun units for full_on
and full_off
boost only used if > 0
diffusion_Vlimit_dm_full_on ¶
diffusion_Vlimit_dm_full_off ¶
in Msun units artificial velocity limitation near surface (mainly for radiative levitation)
diffusion_Vlimit ¶
In units of local cell crossing velocity (only used if > 0).
When full on, limit abs(v) <= Vlimit*dr/dt
, cell size dr, substep time dt.
diffusion_min_T_for_radaccel ¶
diffusion_max_T_for_radaccel ¶
If T between these limits, then include radiative levitation at that location.
Calculation of radiative levitation is costly, so only use it where necessary.
Note: change diffusion_v_max
to at least 1d2 when using radiative levitation.
diffusion_min_Z_for_radaccel ¶
diffusion_max_Z_for_radaccel ¶
If Z between these limits, then include radiative levitation for that element.
Calculation of radiative levitation is costly, so only use it where necessary.
e.g., limit to Fe and Ni by min_Z = 26
and max_Z = 28
diffusion_screening_for_radaccel ¶
Include screening for radiative levitation.
diffusion_num_classes ¶
Number of representative classes of species for diffusion calculations.
diffusion_class_representative(:) ¶
isotope names for diffusion representatives
diffusion_class_A_max(:) ¶
atomic number A. in ascending order. species goes into 1st class with A_max
>= species A
diffusion_class_typical_charge(:) ¶
Typical charges for use if diffusion_calculates_ionization
is false
Use charge 21 for Fe in the sun, from
Thoul, Bahcall, and Loeb (1994), ApJ, 421, 828.
diffusion_class_factor(:) ¶
Arbitrarily enhance or inhibit diffusion effects by class.
parameters for ionization solver ¶
diffusion_use_isolve ¶
Activate iterative solver.
diffusion_rtol_for_isolve ¶
diffusion_atol_for_isolve ¶
Relative and absolute error parameters for iterative solver.
diffusion_maxsteps_for_isolve ¶
Maximum number of steps to take in iterative solver.
diffusion_isolve_solver ¶
Which ode solver to use for iterative.
Options include:
'ros2_solver'
'rose2_solver'
'ros3p_solver'
'ros3pl_solver'
'rodas3_solver'
'rodas4_solver'
'rodasp_solver'
diffusion_dump_call_number ¶
debugging info of diffusion at call number
eos controls ¶
more eos controls can be found in star_job.defaults
use_eosDT_ideal_gas ¶
if true, then eos is ideal gas eos as implemented by HELMEOS
use_eosDT_HELMEOS ¶
if true, then eos is as implemented by HELMEOS alone; no blending.
eosDT_HELMEOS_include_radiation ¶
if use_eosDT_HELMEOS
, then this flag is passed as arg
to control whether include radiation.
eosDT_HELMEOS_always_skip_elec_pos ¶
if use_eosDT_HELMEOS
, then this flag is passed as arg
to control whether skip electrons and positrons.
if true, then always skip them
else skip only for low T, low density situations
eosDT_HELMEOS_always_include_elec_pos ¶
if use_eosDT_HELMEOS
, then this flag is passed as arg
to control whether skip electrons and positrons.
if true, then always include them
else include only for low T, low density situations
use_fixed_XZ_for_eos ¶
for debugging
fixed_X_for_eos ¶
if use_fixed_XZ_for_eos
, then pass this value to eos instead of actual X.
fixed_Z_for_eos ¶
if use_fixed_XZ_for_eos
, then pass this value to eos instead of actual Z.
use_eosDE_get ¶
if use_eosDE_get
, then call eosDE_get
in mesa/eos lib.
else call eosDT_get_T
to search for T to give desired E.
eos_partials_consistency_level ¶
helmeos_max_logRho_neutral ¶
only use this parameter if value is > 99
helmeos_logT_neutral ¶
helmeos_logT_ion ¶
opacity controls ¶
more opacity controls can be found in star_job.defaults
cubic_interpolation_in_X ¶
type of interpolation in X
cubic_interpolation_in_Z ¶
type of interpolation in Z
include_electron_conduction ¶
add conduction opacities to radiative opacities
use_simple_es_for_kap ¶
for experiments with simple electron scattering
if true, opacity = 0.2*(1 + x)
use_Type2_opacities ¶
Type2 opacities for extra C/O during and after He burning. To use Type2 opacities one needs to specify a base metallicity, Zbase, which gives the metal abundances previous to any CO enhancement. In regions where central hydrogen is above a given threshold, or the metallicity is not significantly higher than Zbase, Type1 tables are used instead, with blending regions to smoothly transition from one to the other. Why not just use Type2 all the time? Is it a performance reason to still support Type1s?
No  the Type1 tables cover a wider range of X and have a higher resolution in Z for each X.
The Type1 tables are for (X,Z) pairs from the following sets:
The 10 Type1 X's are 0.0, 0.1, 0.2, 0.35, 0.5, 0.7, 0.8, 0.9, 0.95, 1Z The 13 Type1 Z's are 0.0, 1e4, 3e4, 1e3, 2e3, 4e3, 1e2, 2e2, 3e2, 4e2, 6e2, 8e1, 1e1
The Type2 tables are for (X,Z) pairs from the following more limits sets: The 5 Type2 X's are 0.0, 0.03, 0.10, 0.35, 0.70 The 8 Type2 Z's are 0.00, 0.001, 0.004, 0.01, 0.02, 0.03, 0.05, 0.1
There are 130 (X,Z) combinations for Type1 and only 40 for Type2. So Type2 gives you C/O enhancement at a cost of lower resolution in (X,Z). The Type1 tables also cover the full possible range of X from 0.0 to 1Z, whereas the Type2 tables stop at a max X of 0.70. Extrapolating the Type2 tables to higher X is not reliable, so we switch over to using Type1 data instead. In this case, Type1 opacities are computed using Zbase instead of the actual metallicity.
Zbase ¶
the base metallicity for the Type2 kap evaluations.
use_Zbase_for_Type1_blend ¶
If true, then if use_Type2_opacities = .true.
Type1 opacities will be computed
using Zbase instead of Z. Ignored if use_Type2_opacities = .false.
kap_Type2_full_off_X ¶
kap_Type2_full_on_X ¶
switch to Type1 if X too large
Type2 is full off for X >= kap_Type2_full_off_X
Type2 can be full on for X <= kap_Type2_full_on_X
kap_Type2_full_off_dZ ¶
kap_Type2_full_on_dZ ¶
switch to Type1 if dZ too small (dZ = Z  Zbase)
Type2 is full off for dZ <= kap_Type2_full_off_dZ
Type2 can be full on for dZ >= kap_Type2_full_on_dZ
.
X and dZ terms are multiplied to get actual fraction of Type2.
The fraction of Type2 is calculated for each cell depending on the X and dZ for that cell.
So you can be using Type1 in cells where X is large or dZ is small,
while at the same time you can be using Type2 where X is small and dZ is large.
When frac_Type2
is > 0 and < 1, then both Type1 and Type2 are evaluated and
combined linearly as (1frac_Type2)*kap_type1 + frac_Type2*kap_type2
.
Add kap_frac_Type2
to your profile columns list to see frac_Type2
for each cell.
opacity_max ¶
limit opacities to this value (ignore this is value is < 0)
opacity_factor ¶
opacities are multiplied by this value
min_logT_for_opacity_factor_off ¶
min_logT_for_opacity_factor_on and ¶
max_logT_for_opacity_factor_on ¶
max_logT_for_opacity_factor_off ¶
temperature controls for where the opacity_factor
is applied
if, for example, you only want the opacity factor to apply in the iron bump region
you can give a logT range such as
min_logT_for_opacity_factor_off = 5.2
min_logT_for_opacity_factor_on = 5.3
max_logT_for_opacity_factor_on = 5.7
max_logT_for_opacity_factor_off = 5.8
ignore these if < 0.
if you need cellbycell control of opacity factor,
set the vector "extra_opacity_factor
" using the routine "other_opacity_factor
"
OP mono opacities ¶
The OP_mono
opacities use data and code from the OP website
as modified by Haili Hu. Since the tar.gz file is large (656 MB),
it is not included in the standard mesa download.
You can get OP4STARS_1.3.tar.gz
here
Put it any place you want on your disk.
gunzip OP4STARS_1.3.tar.gz
tar xvf OP4STARS_1.3.tar
Set the inlist controls for the "mono" directory with the data files. For example, in my case it looks like the following, but you can put the directory anywhere you like  it doesn't need to be in the mesa/data directory. And the cache file doesn't need to be in the mono directory.
op_mono_data_path = '/Users/bpaxton/OP4STARS_1.3/mono'
op_mono_data_cache_filename = '/Users/bpaxton/OP4STARS_1.3/mono/op_mono_cache.bin'
op_mono_data_path ¶
if this path is set to the empty string, '', then it defaults to the
environment variable $(MESA_OP_MONO_DATA_PATH)
op_mono_data_cache_filename ¶
if this is set to the empty string, '', then it defaults to the
environment variable $(MESA_OP_MONO_DATA_CACHE_FILENAME)
high_logT_op_mono_full_off ¶
high_logT_op_mono_full_on ¶
low_logT_op_mono_full_off ¶
low_logT_op_mono_full_on ¶
you can select a range of log10T for using op_mono
opacities
outside that range, the code will use standard opacity tables.
for example, you might only use high T limits so that op_mono
is only used in the envelope, or you might set both low and
high T limits so that op_mono
is used around the Fe peak logT
but not for other locations in the star.
high_logT_op_mono_full_off >= high_logT_op_mono_full_on
high_logT_op_mono_full_on >= low_logT_op_mono_full_on
low_logT_op_mono_full_on >= low_logT_op_mono_full_off
op_mono opacities full on if
log10T <= high_logT_op_mono_full_on
and
log10T >= low_logT_op_mono_full_on
op_mono opacities full off if
log10T >= high_logT_op_mono_full_off
or
log10T <= low_logT_op_mono_full_off
partially on for other cases
op_mono_min_X_to_include ¶
skip iso if mass fraction < this
use_op_mono_alt_get_kap ¶
if true, call the op_mono_alt_get_kap
routine instead of op_mono_get_kap
.
see mesa/kap/public/kap_lib.f
for details about these routines.
kap_phot_factor_for_kap_floor ¶
kap_phot_step_factor ¶
min_kap_floor_step_factor ¶
min_for_kap_floor ¶
tau_use_kap_floor ¶
kap_min_Z_0pt02 ¶
kap_min_Z_1pt0 ¶
kap_fac_X_lo ¶
kap_fac_X_lo_fac ¶
kap_fac_X_hi ¶
kap_fac_X_hi_fac ¶
asteroseismology controls ¶
get_delta_nu_from_scaled_solar ¶
use scaled solar values
nu_max_sun ¶
solar value of nu_max
delta_nu_sun ¶
solar value of delta_nu
Teff_sun ¶
solar value of Teff
delta_Pg_mode_freq ¶
uHz. if <=0, use nu_max from scaled solar value
Brunt controls ¶
calculate_Brunt_N2 ¶
Only calculate Brunt_N2
if this is true.
brunt_N2_coefficient ¶
Standard N2 is multiplied by this value.
num_cells_for_smooth_brunt_B ¶
Number of cells on either side to use in weighted smoothing of brunt_B
.
use_brunt_gradmuX_form ¶
For comparison to older codes.
Assumes ideal gas plus radiation for brunt_B
.
Uses hydrogren mass fraction to estimate dlnmu = dX/(X + 0.6).
interpolate_rho_for_pulsation_info ¶
If true, then get rho_face
by interpolating rho at cell center.
If false, then calculate rho_face
by dm/(4*pi*r^2*dr)
.
min_magnitude_brunt_B ¶
If set brunt_B
to 0 if absolute value is < this.
structure equations ¶
velocity_q_upper_bound ¶
Local override for global v_flag
.
If local q > this bound, local v_flag
is set false,
else local v_flag
is set to global v_flag
.
this lets you force v = 0 in outer envelope.
velocity_logT_lower_bound ¶
Local override for global v_flag
.
If local logT < this bound, local v_flag
is set false,
else local v_flag
is set to global v_flag
.
this lets you force v = 0 in outer envelope.
sponge_max_q_full_on ¶
sponge_min_q_full_off ¶
"sponge" soaks up velocities; full on mean velocities forced to zero.
sponge full on for q >= sponge_max_q_full_on
(== velocities full off)
sponge full off for q <= sponge_min_q_full_off
sponge_min_q_full_off < sponge_max_q_full_on
max_dt_yrs_for_velocity_logT_lower_bound ¶
Only apply velocity_logT_lower_bound
when timestep < this limit.
use_dP_dm_rotation_correction ¶
With rotation, multiply dP/dm by fp_rot
if this flag is true.
use_mass_corrections ¶
Gravitational vs baryonic mass corrections. If false, then no distinction between gravitational and baryonic mass. If true, then gravitational mass is calculated using mass corrections. Note: may need to wait for prems model to converged before turning this on.
use_sr_sound_speed ¶
SR correction for sound speed.
use_gr_factors ¶
GR corrections. Currently just for pressure equation.
use_ODE_var_eqn_pairing ¶
changes the pairing of equations and variables helps with numerical issues in hydro matrix solves
use_dvdt_form_of_momentum_eqn ¶
if true, use dv/dt = ... form of momentum equation. this replaces the default pressure gradient form. only when v_flag is true.
use_Paczynski_term_in_dvdt_eqn ¶
if true, then the dv/dt = ... form of momentum equation. includes Paczynski correction term in optically thin regions. B. Paczynski, 1969, Acta Astr., vol. 19
use_dedt_form_of_energy_eqn ¶
if true, use de/dt = ... form of energy equation. this replaces the default dL/dm and eps_grav form.
use_ODE_form_of_density_eqn ¶
if true, use ODE dlnd/dt = ...
if false, use algebraic relation rho = cell_mass/cell_vol
non_nuc_neu_factor ¶
Multiplies power from nonnuclear reaction neutrinos. i.e., thermal neutrinos such as computed by mesa/neu.
eps_nuc_factor ¶
Multiplies eps_nuc
without changing rates or dxdt_nuc
.
Thus controls energy production without modifying the amount of change in abundances.
max_abs_eps_nuc ¶
Limit magnitude of eps_nuc to this.
fe56ec_fake_factor ¶
min_T_for_fe56ec_fake_factor ¶
Multiplier on ni56 electron capture rate to take isotopes in hardwired networks to more neutron rich isotopes.
eps_grav ¶
In mesa, "eps_grav
" means T*dS/dt
which is equivalent to (dE/dt + P*dV/dt)
where S is specific entropy, E is specific internal energy, and V = 1/rho
.
There are several options for how eps_grav
is calculated.
These alternatives are equivalently from the "ideal" physics viewpoint,
but they can be very different numerically depending on the situation.
The standard default forms are used if you don't set any of the following flags. The default when using lnd instead of lnPgas as primary variable is
eps_grav = T*cp*((1grada)*chiT*dlnT_dt  grada*chiRho*dlnd_dt)
When using lnPgas instead of lnd, the default is
eps_grav = T*cp((1grada*4*Prad/P)*dlnT_dt  grada*Pgas/P*dlnPgas_dt)
use_dEdRho_form_for_eps_grav ¶
If true, use eps_grav = (cv*T*dlnT_dt + (rho*dE_dRho  P/rho)*dlnd_dt)
use_dlnd_dt_form_for_eps_grav ¶
If true, use eps_grav = dedt + P/rho*dlnd_dt
.
use_PdVdt_form_for_eps_grav ¶
If true, use eps_grav = (dedt + P*d(1/rho)/dt). [1/rho = V,specific vol.]
With time centering for 1/rho, P*d(1/rho)/dt becomes P*(1/rho  1/rho_start)/dt
use_lnS_for_eps_grav ¶
If true, use eps_grav = T*DS/Dt
.
Note: while this seems like the obvious way to go, it has problems numerically.
lnS is not a basic variable in the way that lnT and lnd (or lnPgas) are.
I.e., we get lnT and lnd from the newton solver directly,
but we get lnS by calling the eos using lnT and lnd as args.
Also, in many cases, the cell mass coordinates don't change for the step,
making it possible to use the solver value for the increment in the lnT or lnd
directly in estimating the Lagrangian time derivative
(e.g., DlnT/dt = eps_grav
. One situation where you need to use the lnS
version is deep in a white dwarf where you can have a phase transition
that the lnS form will take care of but the others won't.
That particular case is handled using Gamma_lnS_eps_grav_full_off
/on.
include_dmu_dt_in_eps_grav ¶
The above do not include the contribution from composition changes.
In most cases, that is okay (at least it is a common practice!),
but for high T, high density situations, you may want to full the full form.
to do that, set include_dmu_dt_in_eps_grav
to true.
This only is relevant when you are not using the lnS form of eps_grav
.
Since when using eps_grav = T*dS/dt
, the composition effects are already included.
otherwise, we calculate the composition term in eps_grav
as dE_dmu*dmu_dt
with mu approximated by abar/(1 + zbar)
corresponding to complete ionization
and dE_dmu
approximated by 3/2*cgas*T/mu^2
(cgas = ideal gas constant; erg/K/mole)
where dmu_dt
is 1st order approximation Lagrangian time derivative, (mu  prev_mu)/dt
,
prev_mu
interpolated at same mass coordinate in startofstep model.
Gamma_lnS_eps_grav_full_off ¶
Gamma_lnS_eps_grav_full_on ¶
Automatic switch to lnS form for regions with high Gamma (plasma interaction parameter).
Set use_lnS_for_eps_grav
false to use these controls.
These are ignored when use_lnS_for_eps_grav
is true.
eps_grav_factor ¶
multiply eps_grav by this factor
eps_grav_dt_use_start_values ¶
set true if must use values for lnT, lnd, or lnP from start of step in d_dt. e.g., if have made significant changes in abundance profiles in diffusion.
eps_grav_time_deriv_separation ¶
Separation (in grid cells) over which eps_grav can be timedifferenced when Mstar changes The mesh has two major regions  an interior region where the cells are Lagrangian and an outer region where they are homologous (constant dq =dm/M). There is also a small transition region between these two. In the Lagrangian region Ds/dt is evaluated with a Lagrangian finite difference in time, while in the homologous region Ds/dt is evaluated with a finite difference in time at constant q plus an advectionlike term accounting for the movement of the q boundaries in mass. In the transition region, these two derivatives are combined. This means that at the edges of the transition region, finite differences may cross cell boundaries. This control determines how the mesh for the end of the current timestep is placed to ensure that finite differences cross no more than this many cell boundaries.
zero_eps_grav_in_just_added_material ¶
If true, set eps_grav(k) = 0
for k < k_below_just_added
.
NOTE: this does not mean that Ds/Dt is forced to be 0 in cell k.
Instead it simply means we ignore Ds/Dt in the cell's energy calculation.
min_dxm_Eulerian_div_dxm_removed ¶
Controls for Eulerian or Lagrangian forms of eps_grav
.
Only for mass loss.
Specifies a minimum value for the ratio of
the mass layer at the surface using Eulerian eps_grav
(dxm_Eulerian
)
divided by the mass removed in the current step.
min_dxm_Eulerian_div_dxm_added ¶
Controls for Eulerian or Lagrangian forms of eps_grav
.
Only for mass gain.
Specifies a minimum value for the ratio of
the mass layer at the surface using Eulerian eps_grav
(dxm_Eulerian
)
divided by the mass added in the current step.
min_cells_for_Eulerian_to_Lagrangian_transition ¶
Width of eulerian to lagrangian transition region.
fix_eps_grav_transition_to_grid ¶
If true, fix the transition region for the computation of eps_grav
to the transition from Lagrangian to constant in q of the grid.
min_del_T_div_dt ¶
Controls for Lagrangian time derivatives in newly added material
only applies to cells with k < k_below_just_added
.
If del_t_for_just_added(k)/dt < this limit
,
then set del_t_for_just_added(k) = dt*this limit
.
max_num_surf_revisions ¶
Max number of forced reconverges for changes in surf_lnS
.
max_abs_rel_change_surf_lnS ¶
Force newton reconverge if surf_lnS changed more than this.
trace_force_another_iteration ¶
If true, report when force another iter.
accel_factor ¶
coefficient for acceleration term in the momentum equation
extra_power_source ¶
erg/g/sec applied uniformly throughout the model
This can be used to push a prems model up the track to lower center temperatures.
Can be used simultaneously with inject_extra_ergs_sec
and inject_uniform_extra_heat
inject_uniform_extra_heat ¶
extra heat in erg g^1 s^1
Added to cells in range min_q_for_uniform_extra_heat
to max.
Can be used simultaneously with inject_extra_ergs_sec
and extra_power_source
.
min_q_for_uniform_extra_heat ¶
sets bottom of region for inject_uniform_extra_heat
max_q_for_uniform_extra_heat ¶
sets top of region for inject_uniform_extra_heat
inject_extra_ergs_sec ¶
added to mass equal to grams_for_inject_extra_core_ergs_sec
can be used simultaneously with extra_power_source
and inject_uniform_extra_heat
base_of_inject_extra_ergs_sec ¶
(units: Msun) sets bottom of region for inject_extra_ergs_sec
note: actual base is at max of this and the center of the model
total_mass_for_inject_extra_ergs_sec ¶
(units: Msun) sets size of region for inject_extra_ergs_sec
start_time_for_inject_extra_ergs_sec ¶
(units: sec) start time for injecting extra ergs/s
duration_for_inject_extra_ergs_sec ¶
(units: sec) length of time for injecting extra ergs/s set to negative value to keep injecting indefinitely or until reach target
inject_until_reach_model_with_total_energy ¶
(units: ergs) target for model total energy
usually want to set duration_for_inject_extra_ergs_sec = 1
for this option.
see also: inject_until_reach_delta_total_energy
continue injecting until total energy of model reaches min of
inject_until_reach_model_with_total_energy
, and
inject_until_reach_delta_total_energy + initial total energy
inject_until_reach_delta_total_energy ¶
(units: ergs) target for change in total energy
stop injecting when total_energy  total_energy_initial > this
.
usually want to set duration_for_inject_extra_ergs_sec = 1
for this option.
see also: inject_until_reach_model_with_total_energy
continue injecting until total energy of model reaches min of
inject_until_reach_model_with_total_energy
, and
inject_until_reach_delta_total_energy + initial total energy
max_inject_velocity_km_per_sec ¶
theta_P ¶
for time weighting P in energy and momentum equations
<P> = theta_P*P + (1  theta_P)*P_start
use_porosity_with_dPrad_dm_form ¶
qmax_zero_non_radiative_luminosity ¶
qmin_freeze_non_radiative_luminosity ¶
use_dPrad_dm_form_of_T_gradient_eqn ¶
use_flux_limiting_with_dPrad_dm_form ¶
These are for alternatives ways to determine the T gradient. The standard form of the equation is
dT/dm = dP/dm * T/P * grad_T, grad_T = dlnT/dlnP from MLT.
use hydrostatic value for dP/dm in this. this is because of limitations of MLT for calculating grad_T. (MLT assumes hydrostatic equilibrium) see comment in K&W chpt 9.1.
The alternatives forms are for dynamic situations where the use of hydrostatic dP/dm is inappropriate. In order of priority,
if q(k) > qmin_freeze_non_radiative_luminosity then
use L_conv from start of step to get L_rad = L  L_conv_start
else if q(k) <= qmax_zero_non_radiative_luminosity then
simply use L_rad = L
else if (use_dPrad_dm_form_of_T_gradient_eqn)
if (gradT < gradr) then
use L_rad = L*gradT/gradr (see, e.g., Cox&Giuli 14.109)
else
use L_rad = L
With the resulting L_rad
, determine the expected dT/dm by
d_Prad/dm = kap*L_rad/(clight*area^2)  see, e.g., K&W (5.12)
eps_visc_factor ¶
multiply the eps_visc term in energy equation by this factor.
center_energy_pulses ¶
pulse_step_inteval ¶
pulse_max_step ¶
pulse_ergs_even_steps ¶
pulse_ergs_odd_steps ¶
for hydro comparison tests (e.g., Sedov)
gamma_law_hydro ¶
off as long as value is <= 0
zero_gravity ¶
if true, then set G to zero
disable_riemann_reconstruction ¶
if true, then set just use bounding cell average P and u at face
constant_L ¶
if true, then L(k) = L_center for all k. disable dlnTdm equation.
drag_per_step ¶
drag_per_second ¶
shock_spread_linear ¶
shock_spread_quadratic ¶
RayleighTaylor Instability ¶
RTI_A ¶
RTI_B ¶
RTI_C ¶
RTI_D ¶
RTI_C_X_factor ¶
RTI_C_X0 ¶
RTI_max_alpha ¶
RTI_min_dm_behind_shock_for_full_on ¶
RTI_dm_for_center_alpha_nondecreasing ¶
RTI_energy_floor ¶
RTI_D_mix_floor ¶
RTI_min_m_for_D_mix_floor ¶
RTI_log_max_boost ¶
RTI_m_full_boost ¶
RTI_m_no_boost ¶
solver controls ¶
the following is from a response on mesausers to a question about controls for solver tolerances:
The "residual" is the left over difference between the left and right hand sides of the equation we are trying to solve. We do iterations to reduce that, but we are limited by the nonlinearity of the problem and the quality of the estimates for the derivatives.
The "correction" is the change in the primary variable that is calculated using goodold Newton's rule in multiple dimensions  so Jacobian and residuals give a correction that would make the next residual vanish if the problem were linear and the Jacobian was exact, neither of which are true. So the best we can hope for is that the corrections will get smaller next time.
The "norm" is the average; the "max" is the max. Sometimes you mainly care about the norm and will accept a few outliers. But sometimes you don't want any really bad outliers, so you want to set a low limit for the max residual or correction as well as the norm.
You might want to try for several iterations with strict tolerances, and then relax them if things are still not converged. For example, you might be willing to live with the larger tolerances, but you'd like to give it a good try at the smaller ones before switching. Also, you might be willing to settle for anyold residual if the corrections have become small enough. You can do that too by relaxing the residual tolerances after a few iterations.
Hope that at least helps with the nomenclature.
I agree with Frank that you should consider the effects of smaller timesteps and more grid points as your main technique  tightening up the tolerances for the solver won't help if you are taking timesteps that are too large or if you have inadequate grid resolution.
tol_correction_norm ¶
tol_max_correction ¶
"Correction" for variable x(i,k) is scaled change, dx(i,k)/xscale(i,k).
tol_correction_high_T_limit ¶
For very late stages of massive star evolution, need to relax tolerances. If max T >= this limit, switch scaling factors.
tol_correction_norm_high_T ¶
tol_max_correction_high_T ¶
Above tol_correction_high_T_limit
use these scaling factors.
tol_correction_extreme_T_limit ¶
For very late stages of massive star evolution, need to relax tolerances. If center T >= this limit, switch scaling factors.
tol_correction_norm_extreme_T ¶
tol_max_correction_extreme_T ¶
For very late stages of massive star evolution, need to relax tolerances. If center T >= this limit, switch scaling factors.
include_L_in_error_est ¶
include_v_in_error_est ¶
include_u_in_error_est ¶
Some variables can be excluded from calculation of correction norm and max.
tol_correction_norm_alt ¶
tol_max_correction_alt ¶
If you have several backups in a row, your run is having a near death experience. So as a last hope, try relaxing the correction tolerances. It might help. The code will use these tolerances after 3 or more backups in a row. Once there is a step without a backup, it goes back to the normal tolerances.
correction_xa_limit ¶
Ignore correction to abundance when calculating correction norm and max if current mass fraction is less than this limit.
xa_scale ¶
Scaling for abundance variables is max(xa_scale, current mass fraction)
.
tol_residual_norm1 ¶
tol_max_residual1 ¶
iter_for_resid_tol2 ¶
"residual" for equation is the difference between left and right sides
use tol_residual_norm1
& tol_max_residual1
at iteration number iter_for_resid_tol2
, switch to next tolerances.
tol_residual_norm2 ¶
tol_max_residual2 ¶
iter_for_resid_tol3 ¶
Use tol_residual_norm2
& tol_max_residual2
these apply starting at iteration number iter_for_resid_tol2
.
at iteration number iter_for_resid_tol3
, switch to next tolerances.
tol_residual_norm3 ¶
tol_max_residual3 ¶
Use tol_residual_norm3
& tol_max_residual3
these apply starting at iteration number iter_for_resid_tol3
.
If things get worse from one iteration to next, give up. The following are the limits that define "getting worse enough to stop".
corr_norm_jump_limit ¶
If correction norm increases by this factor or more, quit.
max_corr_jump_limit ¶
If correction max increases by this factor or more, quit.
resid_norm_jump_limit ¶
If residual norm increases by this factor or more, quit.
max_resid_jump_limit ¶
If residual max increases by this factor or more, quit.
max_iterations_for_jacobian ¶
EXPERIEMENTAL: not working at present. leave at 1. Jacobian is always created fresh for 1st iteration. If this param > 1, then will try to reuse jacobian. After use jacobian this many times, remake it. E.g., if = 2, then will make a new jacobian for every other iteration. This is automatically = 1 immediately following a backup.
convergenceignoreequL_residuals
trace_newton_damping ¶
Send newton damping data to screen.
hydro_decsol_switch ¶
small_mtx_decsol ¶
large_mtx_decsol ¶
If current nvar <= hydro_decsol_switch
, (recall nvar = nvar_hydro + species
)
then use small_mtx_decsol
for current step, else use large_mtx_decsol
.
Options for small_mtx_decsol
are 'block_thomas_dble'
or 'bcyclic_dble'
.
Options for large_mtx_decsol
are 'bcyclic_klu'
.
star_bcyclic_do_pivot ¶
Controls whether or not do pivoting in matrix solves in star bcyclic.
max_tries ¶
Max number newton iterations before give up.
max_tries1 ¶
Max tries on 1st model.
max_tries_for_retry ¶
Normal number of retries.
max_tries_after_5_retries ¶
Increase number of tries after 5 failed ones.
max_tries_after_10_retries ¶
Increase number of tries after 10 failed ones.
max_tries_after_20_retries ¶
Increase number of tries after 20 failed ones.
max_tries_after_backup ¶
Max tries after first backup.
max_tries_after_backup2 ¶
Max tries after second backup.
retry_limit ¶
Only use if > 0. In case the solver fails for some reason, it will retry with a smaller timestep. It does up to this many retries for the current step before doing a backup to the previous step.
redo_limit ¶
Only use if > 0. Do up to this many redo's for the current step before doing a backup to the previous step.
newton_itermin ¶
Use at least this many iterations in newton for hydro solve.
newton_itermin_until_reduce_min_corr_coeff ¶
Use at least this many iterations in newton
before try using small min_corr_coeff
newton_reduced_min_corr_coeff ¶
For use with newton_itermin_for_reduce_min_corr_coeff
.
tiny_corr_coeff_limit ¶
scale_correction_norm ¶
corr_param_factor ¶
scale_max_correction ¶
corr_coeff_limit ¶
tiny_corr_factor ¶
see star/private/star_newton for info about these
min_xa_hard_limit ¶
min_xa_hard_limit_for_highT ¶
If solver produces mass fraction < this limit, then reject the trial solution. Can optionally relax this limit at high T.
logT_max_for_xa_hard_limit ¶
Use min_xa_hard_limit
for center logT <= this.
logT_min_for_xa_hard_limit_for_highT ¶
Use min_xa_hard_limit_for_highT
for center logT >= this.
Linear interpolate in logT for intermediate center temperatures.
sum_xa_hard_limit ¶
sum_xa_hard_limit_for_highT ¶
If solver produces any cell with abs(sum(xa)1) > this limit, then reject the trial solution. Can optionally relax this limit at high T.
logT_max_for_sum_xa_hard_limit ¶
Use sum_xa_hard_limit
for center logT <= this.
logT_min_for_sum_xa_hard_limit_for_highT ¶
Use sum_xa_hard_limit_for_highT
for center logT >= this.
Linear interpolate in logT for intermediate center temperatures.
do_newton_damping_for_neg_xa ¶
If true, uniformly reduce newton corrections if necessary to avoid neg abundances.
min_logT_for_quad ¶
min_chem_eqn_scale ¶
hydro_mtx_max_allowed_{abs}{dlogT  dlogRho  dlogPgas  logT  logRho  logPgas} ¶
Force retry with smaller timestep if hydro solves change T, Rho, or Pgas by too much or make them too large.
split mixing ¶
split_mixing_choice ¶
 0 = no split = mixing coupled to burn and structure.
 1 = mix for full dt before burn+struct
 2 = mix for full dt after burn+struct
 3 = mix for dt/2 before and dt/2 after
reset_mixing_info_before_final_mix ¶
Relevant for split_mixing_choice
options 2 and 3.
op_split_mix_atol ¶
op_split_mix_rtol ¶
Abolute and relative error tolerances.
controls related to split mixing for timesteps
max_fixup_for_mix_limit ¶
If split_mix_fixup
is bigger than this, reduce the next timestep.
max_fixup_for_mix_hard_limit ¶
If split_mix_fixup
is bigger than this, retry.
op_split_mix_trace ¶
op_split_burn ¶
timestep controls ¶
The terminal output during evolution includes a short string for the dt_limit
.
This is to give you some indication of what is limiting the time steps.
Here's a dictionary mapping those terminal strings to the corresponding control parameters.
(There is a similar table in mesa/binary/defaults/binary_controls.defaults
.)
terminal output related parameter
'avg lgE resid' limit_for_avg_lgE_residual
'CpT_absMdot_div_L' CpT_absMdot_div_L_limit
'Lnuc' delta_lgL_nuc_limit
'Lnuc_cat' delta_lgL_nuc_cat_limit
'Lnuc_H' delta_lgL_H_limit
'Lnuc_He' delta_lgL_He_limit
'Lnuc_photo' delta_lgL_photo_limit
'Lnuc_z' delta_lgL_z_limit
'bad_X_sum' (solver found bad mass sum)
'dH' dH_limit
'dH/H' dH_div_H_limit
'dHe' dHe_limit
'dHe/He' dHe_div_He_limit
'dHe3' dHe3_limit
'dHe3/He3' dHe3_div_He3_limit
'dL/L' dL_div_L_limit
'dX' dX_limit
'dX/X' dX_div_X_limit
'dX_nuc_drop' dX_nuc_drop_limit
'd_delR_grow' d_deltaR_grow_limit
'd_delR_shrink' d_deltaR_shrink_limit
'delta Ye' delta_Ye_limit
'delta mdot' delta_mdot_limit
'delta total J' delta_lg_total_J_limit
'delta_HR' delta_HR_limit
'delta_mstar' delta_lg_star_mass_limit
'diff iters' diffusion_iters_limit
'diff steps' diffusion_steps_limit
'min_dr_div_cs' dt_div_min_dr_div_cs_limit
'dt_acoustic' dt_div_dt_acoustic_limit
'dt_collapse' dt_div_dt_cell_collapse_limit
'dt_dynamic' dt_div_dt_dynamic_limit
'dt_mass_loss' dt_div_dt_mass_loss_limit
'dt_thermal' dt_div_dt_thermal_limit
'eps_nuc_cntr' delta_log_eps_nuc_cntr_limit
'error enrg' limit_for_rel_error_in_energy_conservation
'error rate' limit_for_log_rel_rate_in_energy_conservation
'highT del Ye' delta_Ye_highT_limit
'hold' (recent backup, so no increase in dt)
'lgL' delta_lgL_limit
'lgL_phot' delta_lgL_phot_limit
'lgP' delta_lgP_limit
'lgP_cntr' delta_lgP_cntr_limit
'lgR' delta_lgR_limit
'lgRho' delta_lgRho_limit
'lgRho_cntr' delta_lgRho_cntr_limit
'lgRho_max' delta_lgRho_max_limit
'lgT' delta_lgT_limit
'lgT_cntr' delta_lgT_cntr_limit
'lgT_max' delta_lgT_max_limit
'lgTeff' delta_lgTeff_limit
'lg_XC_cntr' delta_lg_XC_cntr_limit
'lg_XH_cntr' delta_lg_XH_cntr_limit
'lg_XHe_cntr' delta_lg_XHe_cntr_limit
'lg_XNe_cntr' delta_lg_XNe_cntr_limit
'lg_XO_cntr' delta_lg_XO_cntr_limit
'lg_XSi_cntr' delta_lg_XSi_cntr_limit
'log_eps_nuc' delta_log_eps_nuc_limit
'max lgE resid' limit_for_max_abs_lgE_residual
'max_dt' max_years_for_timestep
'max dt change' max_timestep_factor
'min dt change' min_timestep_factor
'neg_mass_frac' (solver found neg mass frac)
'newton iters' newton_iterations_limit
'rotation steps' rotation_steps_limit
'v/v_crit' v_div_v_crit_limit
'varcontrol' varcontrol_target
'b_****' see binary/defaults/binary_controls.defaults
max_timestep ¶
In seconds. max_timestep <= 0
means no upper limit.
max_years_for_timestep ¶
max_years_for_timestep <= 0
means no upper limit.
Note: max_timestep
is the control that is used by most of the code.
max_years_for_timestep
is just provided as a convenience.
At the start of each step, the evolve routine checks to see if max_years_for_timestep > 0
,
and if so, it sets max_timestep = max_years_for_timestep*secyer
.
max_timestep_hi_T_limit ¶
If max T >= this
, then switch to hi_T_max_years_for_timestep
.
Ignore if <= 0.
hi_T_max_years_for_timestep ¶
Max years for timestep if max_timestep_hi_T_limit
is active.
min_timestep_factor ¶
Lower limit for ratio of new timestep to previous timestep. i.e., allow dt to get smaller by no more than this factor  0 means no limit.
max_timestep_factor ¶
Upper limit for ratio of new timestep to previous timestep. i.e., allow dt to get larger by no more than this factor  0 means no limit.
timestep_factor_for_retries ¶
Before retry, decrease dt by this.
timestep_factor_for_backups ¶
Before backup, decrease dt by this (or more if multiple backups in a row).
backup_hold ¶
No increases in timestep for backup_hold
steps after a backup.
retry_hold ¶
No increases in timestep for retry_hold
steps after a retry.
neg_mass_fraction_hold ¶
No increases in timestep for neg_mass_fraction_hold
steps after
a retry or backup caused by a negative mass fraction.
timestep_dt_factor = 0.9 ¶
dt reduction factor exceed timestep limits.
dt_limit_ratio_target ¶
Aim for this ratio on dt limited timesteps.
use_dt_low_pass_controller ¶
Enable low pass filter for smoother timestep variations.
varcontrol_target ¶
This is the target value for relative variation in the structure from one model to the next. The default timestep adjustment is to increase or reduce the timestep depending on whether the actual variation was smaller or greater than this value.
varcontrol_dt_limit_ratio_hard_max ¶
varcontrol_dt_limit_ratio
is the actual varcontrol value divided by the target.
if that ratio exceeds this limit, then retry with a smaller timestep.
this let's you prevent large changes from happening in a single step.
relax_hard_limits_after_backup ¶
If true, then don't enforce hard limits immediately after a backup.
relax_hard_limits_after_retry ¶
If true, then don't enforce hard limits immediately after a retry.
limits based on iterations required by various solvers and opsplitting
newton_iterations_limit ¶
If newton solve uses more newton_iterations
than this, reduce the next timestep.
newton_iterations_hard_limit ¶
If uses more iterations than this, retry.
rotation_steps_limit ¶
If rotation solver uses more steps than this, reduce the next timestep.
rotation_steps_hard_limit ¶
If rotation solver uses more steps than this, retry.
diffusion_steps_limit ¶
If diffusion solver uses more steps than this, reduce the next timestep.
diffusion_steps_hard_limit ¶
If diffusion solver uses more steps than this, retry.
diffusion_iters_limit ¶
If use a total number of iters > this, reduce the next timestep.
diffusion_iters_hard_limit ¶
If use a total number of iters > this, retry.
limits based on max decrease in mass fraction at any location in star
dX_mix_dist_limit ¶
Option to ignore decreases in abundance in nonmixed cells near mixing boundaries.
Ignore abundance changes if nearest mixing boundary is closer than this in Msun units.
This applies to dH
, dH_div_H
, dHe
, dHe_d_He
, dX
, and dX_div_X
limits.
Limit on magnitude of decrease in any cell hydrogen abundance during a single timestep.
dH here is abs(xa(h1,k)  xa_old(h1,k))
for any cell k.
Considers all cells except where have convective mixing.
dH_limit_min_H ¶
dH limits only apply where xa(h1,k) >= this limit.
dH_limit ¶
If max dH is greater than this, reduce the next timestep by dH_limit/max_dH
.
dH_hard_limit ¶
If max dH is greater than this, retry with smaller timestep.
dH_decreases_only ¶
If true, then only consider decreases in abundance.
Limit on magnitude of relative decrease in any cell hydrogen abundance.
dH_div_H
here is abs(xa(h1,k)  xa_old(h1,k))/xa(h1,k)
considers all cells except where have convective mixing.
dH_decreases_only
applies to dH_div_H
also.
dH_div_H_limit_min_H ¶
dH_div_H
limits only apply where xa(h1,k) >= this limit.
dH_div_H_limit ¶
If max dH_div_H
is greater than this, reduce the next timestep by dH_limit/max_dH
.
dH_div_H_hard_limit ¶
If max dH_div_H
is greater than this, retry with smaller timestep.
Limit on magnitude of decrease in any cell helium abundance during a single timestep.
dHe here is abs(xa(he4,k)  xa_old(he4,k))
for any cell k.
Considers all cells except where have convective mixing.
dHe_limit_min_He ¶
dHe limits only apply where xa(he4,k) >= this limit.
dHe_limit = 1d99 ¶
If max dHe is greater than this, reduce the next timestep by dHe_limit/max_dHe
.
dHe_hard_limit ¶
If max dHe is greater than this, retry with smaller timestep.
dHe_decreases_only ¶
If true, then only consider decreases in abundance.
dHe_decreases_only
applies to dHe_div_He
also.
Limit on magnitude of relative decrease in any cell helium abundance.
dHe_div_He
here is abs(xa(he4,k)  xa_old(he4,k))/xa(he4,k)
.
Considers all cells except where have convective mixing.
dHe_div_He_limit_min_He ¶
dHe_div_He
limits only apply where xa(he4,k) >= this limit.
dHe_div_He_limit ¶
If max dHe_div_He
is greater than this, reduce the next timestep by dHe_limit/max_dHe
.
dHe_div_He_hard_limit ¶
If max dHe_div_He
is greater than this, retry with smaller timestep.
Limit on magnitude of decrease in any cell helium abundance during a single timestep.
dHe3 here is abs(xa(he4,k)  xa_old(he3,k))
for any cell k.
Considers all cells except where have convective mixing.
dHe3_limit_min_He3 ¶
dHe3 limits only apply where xa(he3,k) >= this limit.
dHe3_limit ¶
If max dHe3 is greater than this, reduce the next timestep by dHe3_limit/max_dHe3
.
dHe3_hard_limit ¶
If max dHe3 is greater than this, retry with smaller timestep.
dHe3_decreases_only ¶
If true, then only consider decreases in abundance.
dHe3_decreases_only
applies to dHe3_div_He3
also.
Limit on magnitude of relative decrease in any cell helium abundance.
dHe3_div_He3
here is abs(xa(he3,k)  xa_old(he3,k))/xa(he3,k)
.
Considers all cells except where have convective mixing.
dHe3_div_He3_limit_min_He3 ¶
dHe3_div_He3
limits only apply where xa(he3,k) >= this limit.
dHe3_div_He3_limit ¶
if max dHe3_div_He3
is greater than this, reduce the next timestep by dHe3_limit/max_dHe3
.
dHe3_div_He3_hard_limit ¶
If max dHe3_div_He3
is greater than this, retry with smaller timestep.
Limit on magnitude of decrease in any cell nonH, nonHe abundance.
dX here is abs(xa(j,k)  xa_old(j,k))
for any cell k and any species j other except hydrogen or helium.
Considers all cells except where have convective mixing.
dX_limit_min_X ¶
dX limits only apply where xa(j,k) >= this limit.
dX_limit ¶
If max dX is greater than this,
reduce the next timestep by dX_limit
/max_dX
.
dX_hard_limit ¶
If max dX is greater than this, retry with smaller timestep.
dX_decreases_only ¶
If true, then only consider decreases in abundance.
dX_decreases_only
applies to dX_div_X
also.
Limit on magnitude of relative decrease in any cell nonH, nonHe abundance.
dX_div_X
here is abs(xa(j,k)  xa_old(j,k))/xa(j,k)
for any cell k and any species j other except hydrogen or helium.
Considers all cells except where have convective mixing.
dX_div_X_limit_min_X ¶
dX_div_X
limits only apply where xa(j,k) >= this limit.
dX_div_X_limit ¶
If max dX_div_X
is greater than this,
reduce the next timestep by dX_limit/max_dX
.
dX_div_X_hard_limit ¶
If max dX_div_X
is greater than this, retry with smaller timestep.
Limits on max drop in abundance mass fraction from burning with possible mixing inflow. This considers both nuclear reactions and offsetting effect of mixing inflow.
dX_nuc_drop_min_X_limit ¶
dX_nuc_drop_limit
only for X > dX_nuc_drop_min_X_limit
.
dX_nuc_drop_max_A_limit ¶
dX_nuc_drop_limit
only for species with A <= dX_nuc_drop_max_A_limit
.
dX_nuc_drop_limit_at_high_T ¶
Negative means use value for dX_nuc_drop_limit
,
else use this limit when center logT > 9.45.
dX_nuc_drop_limit ¶
If max dX_nuc_drop
is greater than dX_nuc_drop_limit
,
reduce the next timestep by dX_nuc_drop_limit
/max_dX_nuc_drop
.
dX_nuc_drop_hard_limit ¶
If max dX_nuc_drop
is greater than dX_nuc_drop_hard_limit
,
retry with smaller timestep.
dX_nuc_drop_min_yrs_for_dt ¶
Don't let dX_nuc_drop
change dt to smaller than this.
limits based on relative changes in variables L, P, Rho, T, R, eps_nuc ¶
limit on magnitude of relative change in L at any grid point
dL_div_L = abs(L(k)  L_old(k))/L(k)
dL_div_L_limit ¶
If max abs dL_div_L
is greater than this, reduce the next timestep.
dL_div_L_hard_limit ¶
If max abs dL_div_L
is greater than this, retry with smaller timestep.
dL_div_L_limit_min_L ¶
In Lsun units.
dL_div_L
limits only apply where L(k) >= Lsun*dL_limit_min_L
delta_lgP_limit ¶
Limit for magnitude of max change in log10 total pressure in any cell.
delta_lgP_hard_limit ¶
If max delta_lgP
is greater than delta_lgP_hard_limit
,
retry with smaller timestep.
delta_lgP_limit_min_lgP ¶
delta_lgP_limit
limits only apply where log10_P(k) >= delta_lgP_limit_min_lgP
delta_lgRho_limit ¶
Limit for magnitude of max change in log10 density in any cell.
delta_lgRho_hard_limit = 1 ¶
If max delta_lgRho
is greater than delta_lgRho_hard_limit
,
retry with smaller timestep.
delta_lgRho_limit_min_lgRho ¶
delta_lgRho_limit
limits only apply where log10_Rho(k) >= delta_lgRho_limit_min_lgRho
.
delta_lgT_limit ¶
Limit for magnitude of max change in log10 temperature in any cell.
delta_lgT_hard_limit ¶
If max delta_lgT
is greater than delta_lgT_hard_limit
,
retry with smaller timestep.
delta_lgT_limit_min_lgT ¶
delta_lgT_limit
limits only apply where log10_T(k) >= delta_lgT_limit_min_lgT
.
delta_lgE_limit ¶
Limit for magnitude of max change in log10 internal energy in any cell.
delta_lgE_hard_limit ¶
If max delta_lgE
is greater than delta_lgE_hard_limit
,
retry with smaller timestep.
delta_lgE_limit_min_lgE ¶
delta_lgE_limit
limits only apply where log10(E(k)) >= delta_lgE_limit_min_lgE
.
delta_lgR_limit ¶
Limit for magnitude of max change in log10 radius at any cell boundary.
delta_lgR_hard_limit ¶
If max delta_lgR
is greater than delta_lgR_hard_limit
,
retry with smaller timestep.
delta_lgR_limit_min_lgR ¶
delta_lgR_limit
limits only apply where log10_R(k) >= delta_lgR_limit_min_lgR
.
delta_Ye_limit ¶
Limit for magnitude of max change in Ye in any cell.
delta_Ye_hard_limit ¶
If max delta_Ye
is greater than delta_Ye_hard_limit
,
retry with smaller timestep.
delta_Ye_highT_limit ¶
Limit for magnitude of max change in Ye in high T cells.
Limit testing for max delta_ye
to cells with T >= minT_for_highT_Ye_limit
If this high T max delta_Ye
is greater than delta_Ye_highT_limit
,
reduce the next timestep by delta_Ye_highT_limit
/max_delta_Ye
.
minT_for_highT_Ye_limit ¶
Limit testing for max delta_ye
to cells with T >= minT_for_highT_Ye_limit
.
If this high T max delta_Ye
is greater than delta_Ye_highT_limit
,
retry with smaller timestep.
delta_log_eps_nuc_limit ¶
Limit for magnitude of max change in log10 eps_nuc
in any cell.
Only applies to increases in nonconvective zones.
delta_log_eps_nuc_hard_limit ¶
If max delta_log_eps_nuc
is greater than delta_log_eps_nuc_hard_limit
,
retry with smaller timestep.
d_deltaR_shrink_limit ¶
Limit for relative decrease in radial thickness of any zone.
d_deltaR_shrink_hard_limit ¶
If max d_deltaR_shrink
is greater than d_deltaR_shrink_hard_limit
,
retry with smaller timestep.
d_deltaR_grow_limit ¶
Limit for relative increase in radial thickness of any zone.
d_deltaR_grow_hard_limit ¶
If max d_deltaR_grow
is greater than d_deltaR_grow_hard_limit
,
retry with smaller timestep.
limits based on integrated power at each point for each category of nuclear reaction ¶
lgL_nuc_cat
= nuclear reaction energy release for a particular category of reaction (Lsun units).
Energy release here excludes neutrinos.
delta_lgL_nuc_cat_limit ¶
Limit for magnitude of change in lgL_nuc
for category.
delta_lgL_nuc_cat_hard_limit ¶
If max delta is greater than delta_lgL_nuc_cat_hard_limit
,
retry with smaller timestep.
lgL_nuc_cat_burn_min ¶
Ignore changes in lgL_nuc
for category if value is less than this.
lgL_nuc_mix_dist_limit ¶
Ignore if nearest boundary is closer than this. Ignore changes in lgL in cells near mixing boundaries.
check_deltalgL_{burning_category} ¶
Flags determining which reaction categories are considered.
c12 + c12, c12 + o16, and o16 + o16
L_H_burn
= integrated power at surface from PP and CNO (in Lsun units)
values for lgL_H
are log10(max(1, L_H_burn))
delta_lgL_H_limit ¶
limit for magnitude of change in lgL_H
delta_lgL_H_hard_limit ¶
if max delta is greater than delta_lgL_H_hard_limit
,
retry with smaller timestep
lgL_H_burn_min ¶
ignore changes in lgL_H
if value is less than this
lgL_H_drop_factor ¶
when L_H
is dropping, multiply limits by this factor
lgL_H_burn_relative_limit ¶
ignore changes in lgL_H
if max(lgL_He,lgL_z)  lgL_H > this
L_He_burn
= integrated power at surface from triple alpha (in Lsun units)
values for lgL_He
are log10(max(1, L_He_burn))
delta_lgL_He_limit ¶
Limit for magnitude of change in lgL_He.
delta_lgL_He_hard_limit ¶
If max delta is greater than delta_lgL_He_hard_limit
,
retry with smaller timestep.
lgL_He_burn_min ¶
Ignore changes in lgL_He
if value is less than this.
lgL_He_drop_factor ¶
When L_He
is dropping, multiply limits by this factor.
lgL_He_burn_relative_limit ¶
Ignore changes in lgL_He
if max(lgL_H,lgL_z)  lgL_He > this
.
L_z_burn
= integrated power at surface from nuclear burning other than H, He, or C (in Lsun units)
excluding photodistintegrations
values for lgL_z
are log10(max(1, L_z_burn))
delta_lgL_z_limit ¶
Limit for magnitude of change in lgL_z
.
delta_lgL_z_hard_limit ¶
If max delta is greater than delta_lgL_z_hard_limit
,
retry with smaller timestep.
lgL_z_burn_min ¶
Ignore changes in lgL_z
if value is less than this.
lgL_z_drop_factor ¶
When L_z
is dropping, multiply limits by this factor.
lgL_z_burn_relative_limit ¶
Ignore changes in lgL_z
if max(lgL_H,lgL_He)  lgL_z > this
.
L_photo_burn
= magnitude of integrated power at surface from photodistintegrations
values for lgL_photo
are based on L_by_category(iphoto)
delta_lgL_photo_limit ¶
Limit for magnitude of change in lgL_photo
.
delta_lgL_photo_hard_limit ¶
If max delta is greater than delta_lgL_photo_hard_limit
,
retry with smaller timestep.
lgL_photo_burn_min ¶
Ignore changes in lgL_photo
if value is less than this.
lgL_photo_drop_factor ¶
When L_photo
is dropping, multiply limits by this factor.
limits based on total integrated power at surface for all nuclear reactions ¶
excluding photodistintegrations
L_nuc
= nuclear reaction total energy release for all nuclear reactions (Lsun units)
delta_lgL_nuc_limit ¶
limit for magnitude of change in lgL_nuc
delta_lgL_nuc_hard_limit ¶
if max delta is greater than delta_lgL_nuc_hard_limit
,
retry with smaller timestep
lgL_nuc_burn_min ¶
ignore changes in lgL_nuc
if value is less than this
lgL_nuc_drop_factor ¶
When L_nuc
is dropping, multiply limits by this factor.
limits based on changes at photosphere
delta_lgTeff_limit ¶
delta_lgTeff_hard_limit ¶
Limit for magnitude of max change in log10 temperature at photosphere.
delta_lgL_limit_L_min ¶
delta_lgL_limit ¶
delta_lgL_hard_limit ¶
Limit for magnitude of change in log10(L/Lsun).
Only apply this limit when L >= delta_lgL_limit_L_min
(in Lsun units).
delta_lgL_phot_limit_L_min ¶
delta_lgL_phot_limit ¶
delta_lgL_phot_hard_limit ¶
Limit for magnitude of change in log10(L_phot
/Lsun).
Only apply this limit when L_phot
>= delta_lgL_phot_limit_L_min
(in Lsun units).
v_div_v_crit_limit ¶
v_div_v_crit_hard_limit ¶
Limit surface rotational velocity div critical velocity (v_div_v_crit_avg_surf
).
dt_div_dt_thermal_limit ¶
dt_div_dt_thermal_hard_limit ¶
limit for dt compared to thermal timescale (negative means no limit)
dt_thermal = (3/4)*G*M^2/(R*L); KelvinHelmholtz time
dt_div_dt_dynamic_limit ¶
dt_div_dt_dynamic_hard_limit ¶
limit for dt compared to dynamic timescale (negative means no limit)
dt_dynamic = 2*Pi*sqrt(R^3/(G*M))
dt_div_dt_acoustic_limit ¶
dt_div_dt_acoustic_hard_limit ¶
limit for dt compared to dt_acoustic (negative means no limit)
dt_acoustic = time for sound from center to photosphere = sum over shells of local sound crossing time dr/csound.
dt_div_dt_mass_loss_limit ¶
dt_div_dt_mass_loss_hard_limit ¶
limit for dt compared to mass loss timescale (negative means no limit)
dt_mass_loss = M/Mdot; only applies when Mdot < 0
dt_div_min_dr_div_cs_limit ¶
dt_div_min_dr_div_cs_hard_limit ¶
limit for dt compared to explicit solver timescale (negative means no limit)
min_dr_div_cs = min over all cells of dr/csound (seconds)
min_q_for_dt_div_min_dr_div_cs_limit ¶
max_q_for_dt_div_min_dr_div_cs_limit ¶
min_abs_du_div_cs_for_dt_div_min_dr_div_cs_limit ¶
only use dt_div_min_dr_div_cs_limit
at cells where
abs_du_div_cs
> this limit.
allow focus on regions near shock face.
dt_div_dt_cell_collapse_limit ¶
dt_div_dt_cell_collapse_hard_limit ¶
limit for dt compared to cell_collapse timescale (negative means no limit)
dt_cell_collapse = min over shells k that have v(k+1) > v(k) of
(r(k)r(k+1))/(v(k+1)v(k)), the time for the cell to collapse
to zero thickness at current velocities.
limits based on changes in location on HR diagram
delta_HR_ds_L ¶
delta_HR_ds_Teff ¶
dlgL = log10(L/L_prev)
dlgTeff = log10(Teff/Teff_prev)
delta_HR_limit ¶
delta_HR_hard_limit ¶
limit for dHR (negative means no limit)
dHR = sqrt((delta_HR_ds_L*dlgL)**2 + (delta_HR_ds_Teff*dlgTeff)**2)
limits based on change in max temperature or density
delta_lgT_max_limit ¶
delta_lgT_max_hard_limit ¶
limit for magnitude of change in log10 max temperature
delta_lgRho_max_limit ¶
delta_lgRho_max_hard_limit ¶
limit for magnitude of change in log10 max density
limits based on changes at center
delta_lgT_cntr_limit ¶
delta_lgT_cntr_hard_limit ¶
limit for magnitude of change in log10 temperature at center
delta_lgP_cntr_limit ¶
delta_lgP_cntr_hard_limit ¶
limit for magnitude of change in log10 pressure at center
delta_lgRho_cntr_limit ¶
delta_lgRho_cntr_hard_limit ¶
limit for magnitude of change in log10 density at center
delta_log_eps_nuc_cntr_limit ¶
delta_log_eps_nuc_cntr_hard_limit ¶
Limit for magnitude of change in log10 eps_nuc
at center.
Only applies to increase in eps_nuc
in nonconvective core..
This can help to catch the start of core convection..
lg_XH_cntr
is log10(h1 mass fraction at center).
Small timesteps as the center hydrogen is exhausted.
delta_lg_XH_cntr_min ¶
Ignore changes in lg_XH_cntr
if value is less than this.
delta_lg_XH_cntr_max ¶
Ignore changes in lg_XH_cntr
if value is more than this.
delta_lg_XH_cntr_limit ¶
If max delta is greater than this,
reduce the next timestep by delta_lg_XH_cntr_limit
/max_delta
.
delta_lg_XH_cntr_hard_limit ¶
If max delta is greater than delta_lg_XH_cntr_hard_limit
,
retry with smaller timestep.
lg_XHe_cntr
is log10(he4 mass fraction at center)
small timesteps as the center helium is exausted.
delta_lg_XHe_cntr_min ¶
Ignore changes in lg_XHe_cntr
if value is less than this.
delta_lg_XHe_cntr_max ¶
Ignore changes in lg_XHe_cntr
if value is more than this.
delta_lg_XHe_cntr_limit ¶
If max delta is greater than delta_lg_XHe_cntr_limit
,
reduce the next timestep by delta_lg_XHe_cntr_limit
/max_delta
.
delta_lg_XHe_cntr_hard_limit ¶
If max delta is greater than delta_lg_XHe_cntr_hard_limit
,
retry with smaller timestep.
lg_XC_cntr
is log10(c12 mass fraction at center).
Small timesteps as the center carbon is exausted.
delta_lg_XC_cntr_min ¶
Ignore changes in lg_XC_cntr
if value is less than this.
delta_lg_XC_cntr_max ¶
Ignore changes in lg_XC_cntr
if value is more than this.
delta_lg_XC_cntr_limit ¶
If max delta is greater than delta_lg_XC_cntr_limit
,
reduce the next timestep by delta_lg_XC_cntr_limit
/max_delta
.
delta_lg_XC_cntr_hard_limit ¶
If max delta is greater than delta_lg_XC_cntr_hard_limit
,
retry with smaller timestep.
lg_XNe_cntr
is log10(ne20 mass fraction at center)
Small timesteps as the center neon is exausted.
delta_lg_XNe_cntr_min ¶
Ignore changes in lg_XNe_cntr
if value is less than this.
delta_lg_XNe_cntr_max ¶
Ignore changes in lg_XNe_cntr
if value is more than this.
delta_lg_XNe_cntr_limit ¶
If max delta is greater than delta_lg_XNe_cntr_limit
,
reduce the next timestep by delta_lg_XNe_cntr_limit
/max_delta
.
delta_lg_XNe_cntr_hard_limit ¶
If max delta is greater than delta_lg_XNe_cntr_hard_limit
,
retry with smaller timestep.
lg_XO_cntr
is log10(o16 mass fraction at center)
Small timesteps as the center oxygen is exausted.
delta_lg_XO_cntr_min ¶
Ignore changes in lg_XO_cntr
if value is less than this.
delta_lg_XO_cntr_max ¶
Ignore changes in lg_XO_cntr
if value is more than this.
delta_lg_XO_cntr_limit ¶
If max delta is greater than delta_lg_XO_cntr_limit
,
reduce the next timestep by delta_lg_XO_cntr_limit
/max_delta
.
delta_lg_XO_cntr_hard_limit ¶
If max delta is greater than delta_lg_XO_cntr_hard_limit
,
retry with smaller timestep.
lg_XSi_cntr
is log10(si28 mass fraction at center)
Small timesteps as the center silicon is exausted.
delta_lg_XSi_cntr_min ¶
Ignore changes in lg_XSi_cntr
if value is less than this.
delta_lg_XSi_cntr_max ¶
Ignore changes in lg_XSi_cntr
if value is more than this.
delta_lg_XSi_cntr_limit ¶
If max delta is greater than delta_lg_XSi_cntr_limit
,
reduce the next timestep by delta_lg_XSi_cntr_limit
/max_delta
.
delta_lg_XSi_cntr_hard_limit ¶
If max delta is greater than delta_lg_XSi_cntr_hard_limit
,
retry with smaller timestep.
limits based on changes in mass of the star ¶
delta_lg_star_mass_limit ¶
delta_lg_star_mass_hard_limit ¶
Limit for magnitude of change in log10(M/Msun).
limit for change in mdot in Msun/yr
+ delta_mdot_atol
tolerance for absolute changes
+ delta_mdot_rtol
tolerance for relative changes
delta_mdot_limit ¶
delta_mdot_hard_limit ¶
delta_mot = abs(mdot  mdot_old)/ (delta_mdot_atol*Msun/secyer + &
delta_mdot_rtol*max(abs(mdot),abs(mdot_old)))
ignore if < 0
factor_for_test_CpT_absMdot_div_L ¶
Limit on ratio Cp(k)*T(k)*abs(mstar_dot)/L(k)
at k = k_for_CpT_absMdot_div_L
.
Cell index k_for_CpT_absMdot_div_L
is set by the adjust_mass
routine as follows:
Let delta_m
be mdot*dt
, the change in mass for this step.
Let delta_m_for_limit = abs(delta_m)*factor_for_test_CpT_absMdot_div_L
.
Then k_for_CpT_absMdot_div_L
is the outermost cell boundary k,
where the mass exterior to k is >= delta_m_for_limit
.
CpT_absMdot_div_L_limit ¶
Only use if > 0. Reduce next timestep if ratio is greater than this limit.
CpT_absMdot_div_L_hard_limit ¶
Only use if > 0. Retry if ratio exceeds this limit.
limits based on changes in log total angular momentum ¶
delta_lg_total_J_limit ¶
If max delta is greater than delta_lg_total_J_limit
,
reduce the next timestep by delta_lg_total_J_limit
/max_delta
.
delta_lg_total_J_hard_limit ¶
If max delta is greater than delta_lg_total_J_hard_limit
,
retry with smaller timestep.
limit_for_rel_error_in_energy_conservation ¶
hard_limit_for_rel_error_in_energy_conservation ¶
rel_error_in_energy_conservation = abs(error_in_energy_conservation/total_energy)
limit_for_rel_rate_in_energy_conservation ¶
hard_limit_for_rel_rate_in_energy_conservation ¶
rel_rate_in_energy_conservation = abs(error_in_energy_conservation/total_energy)/dt
with dt in seconds.
limit_for_avg_lgE_residual ¶
hard_limit_for_avg_lgE_residual ¶
avg_lgE_residual = abs(dot_product(s% dq(1:s% nz),s% lnE_residual(1:s% nz)))/ln10
limit_for_max_abs_lgE_residual ¶
hard_limit_for_max_abs_lgE_residual ¶
max_abs_lgE_residual = maxval(abs(s% lnE_residual(1:s% nz)))/ln10
limit_for_avg_v_residual ¶
hard_limit_for_avg_v_residual ¶
avg_v_residual = abs(dot_product(s% dq(1:s% nz),s% v_residual(1:s% nz)))
limit_for_max_abs_v_residual ¶
hard_limit_for_max_abs_v_residual ¶
max_abs_v_residual = maxval(abs(s% v_residual(1:s% nz)))
limit_for_abs_rel_E_err ¶
hard_limit_for_abs_rel_E_err ¶
absrelEerr = maxval(abs(s% relE_err(1:s% nz)))
report_why_dt_limits ¶
If true, produce terminal output about choice of timestep.
report_all_dt_limits ¶
If true, produce terminal output about all influences for choice of timestep.
report_hydro_dt_info ¶
If true, produce terminal output about choice of timestep based on varcontrol_target
.
report_dX_nuc_drop_dt_limits ¶
If true, report timestep limits from drop in abundance from nuclear reactions.
debugging controls ¶
report_hydro_solver_progress ¶
Set true to see info about newton iterations.
report_ierr ¶
If true, produce terminal output when have some internal error.
stop_for_NaNs ¶
If true and report_ierr is also true, then stop for NaNs.
trace_newton_bcyclic_solve_input ¶
Input is "B" j k iter B(j,k).
trace_newton_bcyclic_solve_output ¶
Output is "X" j k iter X(j,k).
trace_newton_bcyclic_matrix_input ¶
Matrix before factor.
trace_newton_bcyclic_matrix_output ¶
Matrix after factor.
trace_newton_bcyclic_steplo ¶
1st model number to trace.
trace_newton_bcyclic_stephi ¶
Last model number to trace.
trace_newton_bcyclic_iterlo ¶
1st newton iter to trace.
trace_newton_bcyclic_iterhi ¶
Last newton iter to trace.
trace_newton_bcyclic_nzlo ¶
1st cell to trace.
trace_newton_bcyclic_nzhi ¶
Last cell to trace; if < 0, then use nz as nzhi.
trace_newton_bcyclic_jlo ¶
1st var to trace.
trace_newton_bcyclic_jhi ¶
Last var to trace; if < 0, then use nvar as jhi.
To get info about the mesh set
show_mesh_changes = .true.
.
Restart and get the mesh_call_number
from terminal output.
Set mesh_dump_call_number = mesh_call_number
.
Restart and it will write data files to mesh_plot_data
.
view with test/mesh.rb
and test/mesh_plan.rb
.
show_mesh_changes ¶
When show_mesh_changes
is true, the terminal output includes the mesh_call_number
.
mesh_dump_call_number ¶
When mesh_call_number == mesh_dump_call_number
, various plotting information is written..
trace_evolve ¶
Send evolve output to screen.
variety of output from the hydro solver
hydro solver
xa_clip_limit ¶
Abundances smaller than this limit are set to 0.
trace_k ¶
Print out trace information about cell with number = trace_k
.
fill_arrays_with_NaNs ¶
initialize arrays with NaNs to trap reads of uninitialized entries.
zero_when_allocate ¶
initialize arrays with zeros.
miscellaneous controls ¶
relax_dY ¶
Change Y by this amount per step when relaxing Y.
relax_dlnZ ¶
Change lnZ by this amount per step when relaxing Z. Default is ln10/10.
zams_filename ¶
Default is for Z=0.02, Y=0.28.
use_other_{hook} ¶
Logicals to deploy the use_other routines.
mixing diffusion coeffs ¶
sig_term_limit ¶
Limit on coefficients in convective mixing equations. Consider a diffusion eqn of form:
x(k)  x0(k) = c1*(x(k1)  x(k))  c2*(x(k)  x(k+1))
Simplify for c1=c2=c, x(k1)=x(k+1)=x0(k)=x0, x(k)=x0+dx Then eqn becomes
(1+2*c)*(x0+dx)  2*c*x0 = x0
If 2*c >> 1
, then eqn becomes illconditioned,
so we enforce c <= sig_term_limit
In physical terms c is dt*sig/dm
, where
sig = (4 pi r^2 rho)^2*D
and D = diffusion coeff (cm^2/s),
so c can get large when dt/dm is large.
am_sig_term_limit ¶
Limit on coefficients in angular momentum transport equations.
Necessary for numerical stability.
Plays same role as sig_term_limit
for material mixing.
sig_min_factor_for_high_Tcenter ¶
High center T limit to avoid negative mass fractions.
If Tcenter >= Tcenter_min_for_sig_min_factor_full_on
,
then okay to reduce sig by as much as this factor
as needed to prevent causing negative abundances.
Inactive when >= 1d0.
Tcenter_min_for_sig_min_factor_full_on ¶
If Tcenter >= this, factor = sig_min_factor_for_neg_abundances
,
this should be > Tcenter_max_for_sig_min_factor_full_off
.
Tcenter_max_for_sig_min_factor_full_off ¶
If Tcenter <= this, factor = 1, so has no effect
this should be < Tcenter_min_for_sig_min_factor_full_on
.
For T > full_off
and < full_on
, factor changes linearly with Tcenter.
max_delta_m_to_bdy_for_sig_min_factor ¶
sig_min factor goes to 1 as distance (in Msun units) from boundary of mixing region reaches this value
delta_m_upper_for_sig_min_factor ¶
okay to change sig min factor to 1 for mix region larger than this
delta_m_lower_for_sig_min_factor ¶
don't change sig min factor for mix region smaller than this
Tcenter_max_for_dble_bcyclic ¶
if Tcenter <= this, use dble precision version of bcyclic. if Tcenter > this, use quad precision.
extra params as a convenience for developing new features
note: the parameter num_x_ctrls
is defined in star_def.inc
One can split controls inlist into pieces using the following parameters. BTW: it works recursively, so the extras can read extras too.
read_extra_controls_inlist1 ¶
extra_controls_inlist1_name ¶
If read_extra_controls_inlist1
is true, then read &controls from this namelist file.
If you try one of the following prebuilt extras,
you must also set read_extra_star_job_inlist1
true
and change the extra_star_job_inlist1_name
to match extra_controls_inlist1_name
.
evolve 1 Msun from prems to white dwarf
read_extra_controls_inlist1 = .true.
extra_controls_inlist1_name = 'inlist_extras_1M_lifecycle'
for debugging
extra_controls_inlist1_name = 'inlist_debug'
read_extra_controls_inlist2 ¶
extra_controls_inlist2_name ¶
If read_extra_controls_inlist2
is true, then read &controls from this namelist file.
read_extra_controls_inlist3 ¶
extra_controls_inlist3_name ¶
If read_extra_controls_inlist3
is true, then read &controls from this namelist file.
read_extra_controls_inlist4 ¶
extra_controls_inlist4_name ¶
If read_extra_controls_inlist4
is true, then read &controls from this namelist file.
read_extra_controls_inlist5 ¶
extra_controls_inlist5_name ¶
If read_extra_controls_inlist5
is true, then read &controls from this namelist file.