diff --git a/star/Makefile b/star/Makefile
index c248e3d6b2..23cde982dc 100644
--- a/star/Makefile
+++ b/star/Makefile
@@ -202,6 +202,8 @@ SRCS += \
private/pgstar_profile_panels.f90 \
private/pgstar_grid.f90 \
private/pgstar_network.f90 \
+ private/pgstar_equation_residuals.f90 \
+ private/pgstar_kipp_residuals.f90 \
other/sample_pgstar_plot.f90 \
private/pgstar_full.f90
EXTERNAL_DEPENDS_ON := pgplot
@@ -237,11 +239,13 @@ MODULES += pgstar_abundance.mod \
pgstar_decorator.mod \
pgstar_dpg_dnu.mod \
pgstar_dynamo.mod \
+ pgstar_equation_residuals.mod \
pgstar_grid.mod \
pgstar_history_panels.mod \
pgstar_hist_track.mod \
pgstar_hr.mod \
pgstar_kipp.mod \
+ pgstar_kipp_residuals.mod \
pgstar_logg_logt.mod \
pgstar_logg_teff.mod \
pgstar_logl_r.mod \
diff --git a/star/defaults/pgstar.defaults b/star/defaults/pgstar.defaults
index 3460095015..341c90d7b5 100644
--- a/star/defaults/pgstar.defaults
+++ b/star/defaults/pgstar.defaults
@@ -7814,6 +7814,66 @@
Grid9_file_width = -1
Grid9_file_aspect_ratio = -1
+
+ ! Max_eq_resid
+ ! ------------
+
+ ! ::
+
+ Max_eq_resid_win_flag = .false.
+ Max_eq_resid_win_width = 7
+ Max_eq_resid_win_aspect_ratio = 5d-1
+
+ Max_eq_resid_xleft = 0.15
+ Max_eq_resid_xright = 0.85
+ Max_eq_resid_ybot = 0.15
+ Max_eq_resid_ytop = 0.85
+ Max_eq_resid_txt_scale = 1
+ Max_eq_resid_title = 'Max equation residuals'
+ Max_eq_resid_max_width = -1
+
+ ! **File output**
+
+ ! ::
+
+ Max_eq_resid_file_flag = .false.
+ Max_eq_resid_file_dir = 'png'
+ Max_eq_resid_file_prefix = 'max_eq_resid_'
+ Max_eq_resid_file_width = -1
+ Max_eq_resid_file_aspect_ratio = -1
+
+
+ ! Kipp_residuals
+ ! ------------
+
+ ! ::
+
+ Kipp_residuals_win_flag = .false.
+ Kipp_residuals_win_width = 9
+ Kipp_residuals_win_aspect_ratio = 6d-1
+
+ ! ::
+
+ Kipp_residuals_xleft = 0.15
+ Kipp_residuals_xright = 0.85
+ Kipp_residuals_ybot = 0.15
+ Kipp_residuals_ytop = 0.85
+ Kipp_residuals_txt_scale = 1
+ Kipp_residuals_title = 'Kippenhahn residuals'
+ Kipp_residuals_max_width = -1
+ Kipp_residuals_yaxis_name = 'mass'
+
+ ! **File output**
+
+ ! ::
+
+ Kipp_residuals_file_flag = .false.
+ Kipp_residuals_file_dir = 'png'
+ Kipp_residuals_file_prefix = 'kipp_residuals_'
+ Kipp_residuals_file_width = -1
+ Kipp_residuals_file_aspect_ratio = -1
+
+
! Annotation
! ==========
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/.gitignore b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/.gitignore
new file mode 100644
index 0000000000..38bfcb5ddd
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/.gitignore
@@ -0,0 +1,9 @@
+*.mod
+*.data
+*.dat
+png/*
+LOGS*/*
+photos/*
+*cache*
+build/*
+output.txt
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/Makefile b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/Makefile
new file mode 100644
index 0000000000..6bcac01ccf
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/Makefile
@@ -0,0 +1,21 @@
+ifeq ($(MESA_DIR),)
+ $(error MESA_DIR environment variable is not set)
+endif
+
+include $(MESA_DIR)/make/defaults-module.mk
+
+MODULE_NAME := binary
+SRCS := \
+ src/binary_run.f90 \
+ src/run_star_extras.f90 \
+ src/run_binary_extras.f90 \
+ $(MESA_DIR)/binary/job/run_binary.f90
+
+include $(MAKE_DIR)/work.mk
+
+run: $(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+ @$(OBJ_OUT)
+ @date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+.PHONY: run
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/README.md b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/README.md
new file mode 100644
index 0000000000..05020520b1
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/README.md
@@ -0,0 +1,47 @@
+# MESA setup for Stripped Envelope Supernova Progenitor
+
+Developed for the [TARDIS connector workshop 2025](https://kasukabedefenceforce.github.io/tardis-con/2025) at CCA/Flatiron.
+
+The setup template is in <./template_binary>. It computes the
+evolution of a 15M☉ donor star + 12M☉ point-mass
+companion with an initial period of 20 days through case B (post
+donor-main-sequence) fully conservative mass transfer until carbon
+core depletion and core-collapse.
+
+Originally developed for [Renzo et al.
+2021](https://ui.adsabs.harvard.edu/abs/2021ApJ...923..277R/abstract),
+[2023](https://ui.adsabs.harvard.edu/abs/2023ApJ...942L..32R/abstract),
+ported to MESA `r24.03.1` or later by
+[@neevshah101](https://github.com/neevshah101). The post-carbon
+depletion evolution (see below) is based on a template inlist provided
+by [@Debraheem](https://github.com/Debraheem). These have been
+iterated upon by trial-and-error until viable models run.
+
+Output files generated by using this setup are saved in the
+runoutputs dir for each directory.
+
+
+# Note on evolution beyond C depletion
+
+At carbon depletion ($X_{center}(^{12}C)_{} <0.01$, defined in
+`extras_finish_step` in `run_star_extras.f90`) we read on-the-fly a
+`star_job` and `controls` from an inlist whose path is **hard coded**.
+This inlist lives in
+[inlisttocc](./template_binary/inlist_to_cc).
+and it helps to reach the onset of core collapse.
+
+As usual, most computing time is spent post-carbon depletion. This
+model uses `use_drag = .true.` post-carbon depletion to successfully go
+to core-collapse without spurious envelope velocities. It also uses
+`op_split = .true.` for T≥4×109 K, and changes overshooting parameters
+for late burning (this has been found to be necessary through a
+non-systematic but extensive experimentation).
+
+
+# TODO
+
+- test it reaches onset of core-collapse with MESA `r24.08.1`
+ - [X] 22 iso network
+ - [ ] large network (work in progress in separate folder/branches)
+- [ ] check CPUh cost: ∼ 3h on 12 cores
+
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/clean b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/clean
new file mode 100755
index 0000000000..74f37b9ce4
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/clean
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make clean
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/history_columns.list b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/history_columns.list
new file mode 100644
index 0000000000..10a60812c0
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/history_columns.list
@@ -0,0 +1,1071 @@
+! history_columns.list -- determines the contents of star history logs
+! you can use a non-standard version by setting history_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as history_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! blank lines and comments can be used freely.
+! if a column name appears more than once in the list, only the first occurrence is used.
+
+! if you need to have something added to the list of options, let me know....
+
+
+! the first few lines of the log file contain a few items:
+
+ ! version_number -- for the version of mesa being used
+ ! burn_min1 -- 1st limit for reported burning, in erg/g/s
+ ! burn_min2 -- 2nd limit for reported burning, in erg/g/s
+
+
+!# other files
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+! the following lines of the log file contain info about 1 model per row
+
+!----------------------------------------------------------------------------------------------
+
+!# general info about the model
+
+ model_number ! counting from the start of the run
+ num_zones ! number of zones in the model
+
+ !## age
+
+ star_age ! elapsed simulated time in years since the start of the run
+ star_age_sec ! elapsed simulated time in seconds since the start of the run
+ star_age_min ! elapsed simulated time in minutes since the start of the run
+ star_age_hr ! elapsed simulated time in hours since the start of the run
+ star_age_day ! elapsed simulated time in days since the start of the run
+ !day ! elapsed simulated time in days since the start of the run
+
+ !log_star_age
+ !log_star_age_sec
+
+ !## timestep
+
+ time_step ! timestep in years since previous model
+ time_step_sec ! timestep in seconds since previous model
+ time_step_days
+ log_dt ! log10 time_step in years
+ log_dt_sec ! log10 time_step in seconds
+ log_dt_days ! log10 time_step in days
+
+ !## mass
+
+ star_mass ! in Msun units
+ !log_star_mass
+
+ !star_gravitational_mass ! star_mass is baryonic mass
+ !star_mass_grav_div_mass
+
+ !delta_mass ! star_mass - initial_mass in Msun units
+ log_xmstar ! log10 mass exterior to M_center (grams)
+
+ !## mass change
+
+ !star_mdot ! d(star_mass)/dt (in msolar per year)
+ log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+
+ !## imposed surface conditions
+ !Tsurf_factor
+ !tau_factor
+ !tau_surface
+
+ !## imposed center conditions
+ !m_center
+ !m_center_gm
+ !r_center
+ !r_center_cm
+ !r_center_km
+ !L_center
+ !log_L_center
+ !log_L_center_ergs_s
+ !v_center
+ !v_center_kms
+
+ !logt_max
+
+!----------------------------------------------------------------------------------------------
+
+!# mixing and convection
+
+ !max_conv_vel_div_csound
+ !max_gradT_div_grada
+ !max_gradT_sub_grada
+ !min_log_mlt_Gamma
+
+
+ !## mixing regions
+
+ mass_conv_core ! (Msun) mass coord of top of convective core. 0 if core is not convective
+
+ ! mx1 refers to the largest (by mass) convective region.
+ ! mx2 is the 2nd largest.
+
+ ! conv_mx1_top and conv_mx1_bot are the region where mixing_type == convective_mixing.
+ ! mx1_top and mx1_bot are the extent of all kinds of mixing, convective and other.
+
+ ! values are m/Mstar
+ conv_mx1_top
+ conv_mx1_bot
+ conv_mx2_top
+ conv_mx2_bot
+ mx1_top
+ mx1_bot
+ mx2_top
+ mx2_bot
+
+ ! radius -- values are radii in Rsun units
+ !conv_mx1_top_r
+ !conv_mx1_bot_r
+ !conv_mx2_top_r
+ !conv_mx2_bot_r
+ !mx1_top_r
+ !mx1_bot_r
+ !mx2_top_r
+ !mx2_bot_r
+
+ ! you might want to get a more complete list of mixing regions by using the following
+
+ !mixing_regions ! note: this includes regions where the mixing type is no_mixing.
+
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives the mixing type as defined in const/public/const_def.f90.
+
+ ! the second column for a region gives the m/mstar location of the top of the region
+ ! entries for extra columns after the last region in the star will have an invalid mixing_type value of -1.
+ ! mstar is the total mass of the star, so these locations range from 0 to 1
+ ! all regions are include starting from the center, so the bottom of one region
+ ! is the top of the previous one. since we start at the center, the bottom of the 1st region is 0.
+
+ ! the columns in the log file will have names like 'mix_type_1' and 'mix_qtop_1'
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+
+ !mix_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'mix_relr_type_1' and 'mix_relr_top_1'
+
+
+ !## conditions at base of largest convection zone (by mass)
+ !cz_bot_mass ! mass coordinate of base (Msun)
+ !cz_mass ! mass coordinate of base (Msun) -- same as cz_bot_mass
+ !cz_log_xmass ! mass exterior to base (g)
+ !cz_log_xmsun ! mass exterior to base (Msun)
+ !cz_xm ! mass exterior to base (Msun)
+ !cz_logT
+ !cz_logRho
+ !cz_logP
+ !cz_bot_radius ! Rsun
+ !cz_log_column_depth
+ !cz_log_radial_depth
+ !cz_luminosity ! Lsun
+ !cz_opacity
+ !cz_log_tau
+ !cz_eta
+ !cz_log_eps_nuc ! log10(ergs/g/s)
+ !cz_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_csound
+ !cz_scale_height
+ !cz_grav
+
+ !cz_omega
+ !cz_omega_div_omega_crit
+
+ !cz_zone
+
+ ! mass fractions at base of largest convection zone (by mass)
+ !cz_log_xa h1
+ !cz_log_xa he4
+
+ !## conditions at top of largest convection zone (by mass)
+ !cz_top_mass ! mass coordinate of top (Msun)
+ !cz_top_log_xmass ! mass exterior to top (g)
+ !cz_top_log_xmsun ! mass exterior to top (Msun)
+ !cz_top_xm ! mass exterior to top (Msun)
+ !cz_top_logT
+ !cz_top_logRho
+ !cz_top_logP
+ !cz_top_radius ! Rsun
+ !cz_top_log_column_depth
+ !cz_top_log_radial_depth
+ !cz_top_luminosity ! Lsun
+ !cz_top_opacity
+ !cz_top_log_tau
+ !cz_top_eta
+ !cz_top_log_eps_nuc ! log10(ergs/g/s)
+ !cz_top_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_top_csound
+ !cz_top_scale_height
+ !cz_top_grav
+
+ !cz_top_omega
+ !cz_top_omega_div_omega_crit
+
+ !cz_top_zone
+ !cz_top_zone_logdq
+
+ ! mass fractions at top of largest convection zone (by mass)
+ !cz_top_log_xa h1
+ !cz_top_log_xa he4
+
+!----------------------------------------------------------------------------------------------
+
+!# nuclear reactions
+
+ !## integrated quantities
+
+ !power_h_burn ! total thermal power from PP and CNO, excluding neutrinos (in Lsun units)
+ !power_he_burn ! total thermal power from triple-alpha, excluding neutrinos (in Lsun units)
+ !power_photo
+ !power_z_burn
+ !log_power_nuc_burn ! total thermal power from all burning, excluding photodisintegrations
+ log_LH ! log10 power_h_burn
+ log_LHe ! log10 power_he_burn
+ log_LZ ! log10 total burning power including LC, but excluding LH and LHe and photodisintegrations
+ log_Lnuc ! log(LH + LHe + LZ)
+ !log_Lnuc_ergs_s
+ !log_Lnuc_sub_log_L
+ !lnuc_photo
+
+ !extra_L ! integral of extra_heat in Lsun units
+ !log_extra_L ! log10 extra_L
+
+ !## neutrino losses
+ log_Lneu ! log10 power emitted in neutrinos, nuclear and thermal (in Lsun units)
+ log_Lneu_nuc ! log10 power emitted in neutrinos, nuclear sources only (in Lsun units)
+ log_Lneu_nonnuc ! log10 power emitted in neutrinos, thermal sources only (in Lsun units)
+
+ !mass_loc_of_max_eps_nuc ! (in Msun units)
+ !mass_ext_to_max_eps_nuc ! (in Msun units)
+ !eps_grav_integral ! (in Lsun units)
+ !log_abs_Lgrav ! log10 abs(eps_grav_integral) (in Lsun units)
+
+ !## information about reactions (by category)
+
+ ! log10 total luminosity for reaction categories (Lsun units)
+
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ !## information about individual reactions
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for thier rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+
+
+ !## nuclear reactions at center
+
+ ! center log10 burn erg/g/s for reaction categories
+
+ !c_log_eps_burn cno
+ !c_log_eps_burn tri_alfa
+
+ ! center d_eps_nuc_dlnd for reaction categories
+
+ !c_d_eps_dlnd cno
+ !c_d_eps_dlnd tri_alfa
+
+ ! center d_eps_nuc_dlnT for reaction categories
+
+ !c_d_eps_dlnT cno
+ !c_d_eps_dlnT tri_alfa
+
+ !## regions of strong nuclear burning
+
+ ! 2 zones where eps_nuc > burn_min1 erg/g/s
+ ! for each zone have 4 numbers: start1, start2, end2, end1
+ ! start1 is mass of inner edge where first goes > burn_min1 (or -20 if none such)
+ ! start2 is mass of inner edge where first zone reaches burn_min2 erg/g/sec (or -20 if none such)
+ ! end2 is mass of outer edge where first zone drops back below burn_min2 erg/g/s
+ ! end1 is mass of outer edge where first zone ends (i.e. eps_nuc < burn_min1)
+ ! similar for the second zone
+
+ epsnuc_M_1 ! start1 for 1st zone
+ epsnuc_M_2 ! start2
+ epsnuc_M_3 ! end2
+ epsnuc_M_4 ! end1
+
+ epsnuc_M_5 ! start1 for 2nd zone
+ epsnuc_M_6 ! start2
+ epsnuc_M_7 ! end2
+ epsnuc_M_8 ! end1
+
+
+ ! you might want to get a more complete list of burning regions by using the following
+
+ !burning_regions
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives int(sign(val)*log10(max(1,abs(val))))
+ ! where val = ergs/gm/sec nuclear energy minus all neutrino losses.
+ ! the second column for a region gives the q location of the top of the region
+ ! entries for extra columns after the last region in the star will have a value of -9999
+ ! all regions are included starting from the center, so the bottom of one region
+ ! is the top of the previous one.
+ ! since we start at the center, the bottom of the 1st region is q=0 and top of last is q=1.
+
+ ! the columns in the log file will have names like 'burn_type_1' and 'burn_qtop_1'
+
+ !burn_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'burn_relr_type_1' and 'burn_relr_top_1'
+
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+!----------------------------------------------------------------------------------------------
+
+!# information about core and envelope
+
+ !## helium core
+ he_core_mass
+ !he_core_radius
+ !he_core_lgT
+ !he_core_lgRho
+ !he_core_L
+ !he_core_v
+ !he_core_omega
+ !he_core_omega_div_omega_crit
+ !he_core_k
+
+ !## CO core
+ co_core_mass
+ !CO_core
+ !co_core_radius
+ !co_core_lgT
+ !co_core_lgRho
+ !co_core_L
+ !co_core_v
+ !co_core_omega
+ !co_core_omega_div_omega_crit
+ !co_core_k
+
+ !## ONe core
+ one_core_mass
+ !one_core_radius
+ !one_core_lgT
+ !one_core_lgRho
+ !one_core_L
+ !one_core_v
+ !one_core_omega
+ !one_core_omega_div_omega_crit
+ !one_core_k
+
+ !## iron core
+ fe_core_mass
+ !fe_core_radius
+ !fe_core_lgT
+ !fe_core_lgRho
+ !fe_core_L
+ !fe_core_v
+ !fe_core_omega
+ !fe_core_omega_div_omega_crit
+ !fe_core_k
+
+ !## neuton rich core
+ neutron_rich_core_mass
+ !neutron_rich_core_radius
+ !neutron_rich_core_lgT
+ !neutron_rich_core_lgRho
+ !neutron_rich_core_L
+ !neutron_rich_core_v
+ !neutron_rich_core_omega
+ !neutron_rich_core_omega_div_omega_crit
+ !neutron_rich_core_k
+
+ !## envelope
+
+ !envelope_mass ! = star_mass - he_core_mass
+ !envelope_fraction_left ! = envelope_mass / (initial_mass - he_core_mass)
+
+ !h_rich_layer_mass ! = star_mass - he_core_mass
+ !he_rich_layer_mass ! = he_core_mass - c_core_mass
+ !co_rich_layer_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# timescales
+
+ !dynamic_timescale ! dynamic timescale (seconds) -- estimated by 2*pi*sqrt(r^3/(G*m))
+ kh_timescale ! kelvin-helmholtz timescale (years)
+ !mdot_timescale ! star_mass/abs(star_mdot) (years)
+ !kh_div_mdot_timescales ! kh_timescale/mdot_timescale
+ !nuc_timescale ! nuclear timescale (years) -- proportional to mass divided by luminosity
+
+ !dt_cell_collapse ! min time for any cell to collapse at current velocities
+ !dt_div_dt_cell_collapse
+
+ !dt_div_max_tau_conv ! dt/ maximum conv timescale
+ !dt_div_min_tau_conv ! dt/ minimum conv timescale
+
+
+ !min_dr_div_cs ! min over all cells of dr/csound (seconds)
+ !min_dr_div_cs_k ! location of min
+ !log_min_dr_div_cs ! log10 min dr_div_csound (seconds)
+ !min_dr_div_cs_yr ! min over all cells of dr/csound (years)
+ !log_min_dr_div_cs_yr ! log10 min dr_div_csound (years)
+ !dt_div_min_dr_div_cs
+ !log_dt_div_min_dr_div_cs
+
+ !min_t_eddy ! minimum value of scale_height/conv_velocity
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions at or near the surface of the model
+
+ !## conditions at the photosphere
+ effective_T
+ !Teff
+ log_Teff ! log10 effective temperature
+ ! Teff is calculated using Stefan-Boltzmann relation L = 4 pi R^2 sigma Teff^4,
+ ! where L and R are evaluated at the photosphere (tau_factor < 1)
+ ! or surface of the model (tau_factor >= 1) when photosphere is not inside the model.
+
+ !photosphere_black_body_T
+ !photosphere_cell_T ! temperature at model location closest to the photosphere, not necessarily Teff
+ !photosphere_cell_log_T
+ !photosphere_cell_density
+ !photosphere_cell_log_density
+ !photosphere_cell_opacity
+ !photosphere_cell_log_opacity
+ !photosphere_L ! Lsun units
+ !photosphere_log_L ! Lsun units
+ !photosphere_r ! Rsun units
+ !photosphere_log_r ! Rsun units
+ !photosphere_m ! Msun units
+ !photosphere_v_km_s
+ !photosphere_cell_k
+ !photosphere_column_density
+ !photosphere_csound
+ !photosphere_log_column_density
+ !photosphere_opacity
+ !photosphere_v_div_cs
+ !photosphere_xm
+ !photosphere_cell_free_e
+ !photosphere_cell_log_free_e
+ !photosphere_logg
+ !photosphere_T
+
+ !## conditions at or near the surface of the model (outer edge of outer cell)
+
+ luminosity ! luminosity in Lsun units
+ !luminosity_ergs_s ! luminosity in cgs units
+ log_L ! log10 luminosity in Lsun units
+ !log_L_ergs_s ! log10 luminosity in cgs units
+ radius ! Rsun
+ log_R ! log10 radius in Rsun units
+ !radius_cm
+ !log_R_cm
+
+ log_g ! log10 gravity
+ !gravity
+ !log_Ledd
+ log_L_div_Ledd ! log10(L/Leddington)
+ lum_div_Ledd
+ !log_surf_optical_depth
+ !surface_optical_depth
+
+ !log_surf_cell_opacity ! old name was log_surf_opacity
+ !log_surf_cell_P ! old name was log_surf_P
+ !log_surf_cell_pressure ! old name was log_surf_pressure
+ !log_surf_cell_density ! old name was log_surf_density
+ !log_surf_cell_temperature ! old name was log_surf_temperature
+ !surface_cell_temperature ! old name was surface_temperature
+ !log_surf_cell_z ! old name was log_surf_z
+ !surface_cell_entropy ! in units of kerg per baryon
+ ! old name was surface_entropy
+
+ !v_surf ! (cm/s)
+ v_surf_km_s ! (km/s)
+ v_div_csound_surf ! velocity divided by sound speed at outermost grid point
+ !v_div_csound_max ! max value of velocity divided by sound speed at face
+ !v_div_vesc
+ !v_phot_km_s
+ !v_surf_div_escape_v
+
+ !v_surf_div_v_kh ! v_surf/(photosphere_r/kh_timescale)
+
+ surf_avg_j_rot
+ surf_avg_omega
+ surf_avg_omega_crit
+ surf_avg_omega_div_omega_crit
+ surf_avg_v_rot ! km/sec rotational velocity at equator
+ surf_avg_v_crit ! critical rotational velocity at equator
+ surf_avg_v_div_v_crit
+ surf_avg_Lrad_div_Ledd
+ !surf_avg_logT
+ !surf_avg_logRho
+ !surf_avg_opacity
+
+ ! Gravity Darkening, reports the surface averaged L/Lsun and Teff (K) caused by
+ ! gravity darkening in rotating stars. Based on the model of Espinosa Lara & Rieutord (2011)
+ ! 'polar' refers to the line of sight being directed along the rotation axis of the star
+ ! 'equatorial' refers to the line of sight coincident with the stellar equator
+ !grav_dark_L_polar !Lsun
+ !grav_dark_Teff_polar !K
+ !grav_dark_L_equatorial !Lsun
+ !grav_dark_Teff_equatorial !K
+
+ !surf_escape_v ! cm/s
+
+ !v_wind_Km_per_s ! Km/s
+ ! = 1d-5*s% opacity(1)*max(0d0,-s% mstar_dot)/ &
+ ! (4*pi*s% photosphere_r*Rsun*s% tau_base)
+ ! Lars says:
+ ! wind_mdot = 4*pi*R^2*rho*v_wind
+ ! tau = integral(opacity*rho*dr) from R to infinity
+ ! so tau = opacity*wind_mdot/(4*pi*R*v_wind) at photosphere
+ ! or v_wind = opacity*wind_mdot/(4*pi*R*tau) at photosphere
+
+ !rotational_mdot_boost ! factor for increase in mass loss mdot due to rotation
+ log_rotational_mdot_boost ! log factor for increase in mass loss mdot due to rotation
+ !surf_r_equatorial_div_r_polar
+ !surf_r_equatorial_div_r
+ !surf_r_polar_div_r
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions near center
+
+ log_center_T ! temperature
+ log_center_Rho ! density
+ !log_center_P ! pressure
+
+ ! shorter names for above
+ log_cntr_P
+ log_cntr_Rho
+ log_cntr_T
+
+ center_T ! temperature
+ center_Rho ! density
+ !center_P ! pressure
+
+ !center_degeneracy ! the electron chemical potential in units of k*T
+ !center_gamma ! plasma interaction parameter
+ center_mu
+ center_ye
+ center_abar
+ !center_zbar
+
+ !center_eps_grav
+
+ !center_non_nuc_neu
+ !center_eps_nuc
+ !d_center_eps_nuc_dlnT
+ !d_center_eps_nuc_dlnd
+ !log_center_eps_nuc
+
+ center_entropy ! in units of kerg per baryon
+ !max_entropy ! in units of kerg per baryon
+ !fe_core_infall
+ !non_fe_core_infall
+ !non_fe_core_rebound
+ !max_infall_speed
+
+ !compactness_parameter ! (m/Msun)/(R(m)/1000km) for m = 2.5 Msun
+ !compactness
+ !m4 ! Mass co-ordinate where entropy=4
+ ! mu4 is sensitive to the choice of how much dm/dr you average over, thus we average dm and dr over M(entropy=4) and M(entropy=4)+0.3Msun
+ !mu4 ! dM(Msun)/dr(1000km) where entropy=4
+
+
+ center_omega
+ center_omega_div_omega_crit
+
+!----------------------------------------------------------------------------------------------
+
+!# abundances
+
+ !species ! size of net
+
+ !## mass fractions near center
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_center_abundances
+ !add_log_center_abundances
+
+ ! individual central mass fractions (as many as desired)
+ center h1
+ center he4
+ center c12
+ center o16
+
+ ! individual log10 central mass fractions (as many as desired)
+ !log_center h1
+ !log_center he4
+ ! etc.
+
+
+ !## mass fractions near surface
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_surface_abundances
+ !add_log_surface_abundances
+
+ ! individual surface mass fractions (as many as desired)
+ surface h1
+ surface he4
+ surface c12
+ surface o16
+ ! etc.
+
+ ! individual log10 surface mass fractions (as many as desired)
+
+ !log_surface h1
+ !log_surface he4
+
+
+ !## mass fractions for entire star
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_average_abundances
+ !add_log_average_abundances
+
+ ! individual average mass fractions (as many as desired)
+ !average h1
+ !average he4
+ ! etc.
+
+ ! individual log10 average mass fractions (as many as desired)
+ !log_average h1
+ !log_average he4
+ ! etc.
+
+
+ !## mass totals for entire star (in Msun units)
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_total_mass
+ !add_log_total_mass
+
+ ! individual mass totals for entire star (as many as desired)
+ total_mass h1
+ total_mass he4
+ ! etc.
+
+ ! individial log10 mass totals for entire star (in Msun units)
+ !log_total_mass h1
+ !log_total_mass he4
+ ! etc.
+
+!----------------------------------------------------------------------------------------------
+
+!# info at specific locations
+
+ !## info at location of max temperature
+ !max_T
+ log_max_T
+
+
+!----------------------------------------------------------------------------------------------
+
+!# information about shocks
+
+ !## info about outermost outward moving shock
+ ! excluding locations with q > max_q_for_outer_mach1_location
+ ! returns values at location of max velocity
+ !shock_mass ! baryonic (Msun)
+ !shock_mass_gm ! baryonic (grams)
+ !shock_q
+ !shock_radius ! (Rsun)
+ !shock_radius_cm ! (cm)
+ !shock_velocity
+ !shock_csound
+ !shock_v_div_cs
+ !shock_lgT
+ !shock_lgRho
+ !shock_lgP
+ !shock_gamma1
+ !shock_entropy
+ !shock_tau
+ !shock_k
+ !shock_pre_lgRho
+
+!----------------------------------------------------------------------------------------------
+
+!# asteroseismology
+
+ !delta_nu ! large frequency separation for p-modes (microHz)
+ ! 1e6/(seconds for sound to cross diameter of star)
+ !delta_Pg ! g-mode period spacing for l=1 (seconds)
+ ! sqrt(2) pi^2/(integral of brunt_N/r dr)
+ !log_delta_Pg
+ !nu_max ! estimate from scaling relation (microHz)
+ ! nu_max = nu_max_sun * M/Msun / ((R/Rsun)^2 (Teff/astero_Teff_sun)^0.5)
+ !nu_max_3_4th_div_delta_nu ! nu_max^0.75/delta_nu
+ !acoustic_cutoff ! 0.5*g*sqrt(gamma1*rho/P) at surface
+ !acoustic_radius ! integral of dr/csound (seconds)
+ !ng_for_nu_max ! = 1 / (nu_max*delta_Pg)
+ ! period for g-mode with frequency nu_max = nu_max_ng*delta_Pg
+ !gs_per_delta_nu ! delta_nu / (nu_max**2*delta_Pg)
+ ! number of g-modes per delta_nu at nu_max
+
+ !int_k_r_dr_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=1
+ !int_k_r_dr_2pt0_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=1
+ !int_k_r_dr_0pt5_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=1
+ !int_k_r_dr_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=2
+ !int_k_r_dr_2pt0_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=2
+ !int_k_r_dr_0pt5_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=2
+ !int_k_r_dr_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=3
+ !int_k_r_dr_2pt0_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=3
+ !int_k_r_dr_0pt5_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=3
+
+!----------------------------------------------------------------------------------------------
+
+!# energy information
+
+ total_energy ! at end of step
+ log_total_energy ! log(abs(total_energy))
+ !total_energy_after_adjust_mass ! after mass adjustments
+
+ ! shorter versions of above
+ !tot_E
+ !log_tot_E
+
+
+ !total_gravitational_energy
+ !log_total_gravitational_energy ! log(abs(total_gravitational_energy))
+ !total_gravitational_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_PE
+ !log_tot_PE
+
+ !total_internal_energy
+ !log_total_internal_energy
+ !total_internal_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_IE
+ !log_tot_IE
+
+ !total_radial_kinetic_energy
+ !log_total_radial_kinetic_energy
+ !total_radial_kinetic_energy_after_adjust_mass
+
+ ! shorter versions of above (does not include rot KE)
+ !tot_KE
+ !log_tot_KE
+
+ !total_turbulent_energy
+ !log_total_turbulent_energy
+ !total_turbulent_energy_after_adjust_mass
+ !tot_Et
+ !log_tot_Et
+
+ total_energy_foe
+
+ !tot_IE_div_IE_plus_KE
+ !total_IE_div_IE_plus_KE
+
+ !total_entropy
+ !total_eps_grav
+
+ !total_energy_sources_and_sinks ! for this step
+ !total_nuclear_heating
+ !total_non_nuc_neu_cooling
+ !total_irradiation_heating
+ !total_extra_heating ! extra heat integrated over the model times dt (erg)
+ !total_WD_sedimentation_heating
+
+ !rel_run_E_err
+
+ rel_E_err
+ !abs_rel_E_err
+ log_rel_E_err
+
+ !tot_e_equ_err
+ !tot_e_err
+
+
+ !error_in_energy_conservation ! for this step
+ ! = total_energy - (total_energy_start + total_energy_sources_and_sinks)
+ !cumulative_energy_error ! = sum over all steps of abs(error_in_energy_conservation)
+ !rel_cumulative_energy_error ! = cumulative_energy_error/total_energy
+ !log_rel_cumulative_energy_error ! = log10 of rel_cumulative_energy_error
+ log_rel_run_E_err ! shorter name for rel_cumulative_energy_error
+
+ !rel_error_in_energy_conservation ! = error_in_energy_conservation/total_energy
+ !log_rel_error_in_energy_conservation
+
+ !virial_thm_P_avg
+ !virial_thm_rel_err
+ !work_inward_at_center
+ !work_outward_at_surface
+
+
+!----------------------------------------------------------------------------------------------
+
+ !# rotation
+
+ !total_angular_momentum
+ log_total_angular_momentum
+ !i_rot_total ! moment of inertia
+
+ !total_rotational_kinetic_energy
+ !log_total_rotational_kinetic_energy
+ !total_rotational_kinetic_energy_after_adjust_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# velocities
+
+ !avg_abs_v_div_cs
+ !log_avg_abs_v_div_cs
+ !max_abs_v_div_cs
+ !log_max_abs_v_div_cs
+
+ !avg_abs_v
+ !log_avg_abs_v
+ !max_abs_v
+ !log_max_abs_v
+
+ !u_surf
+ !u_surf_km_s
+ !u_div_csound_surf
+ !u_div_csound_max
+
+ !infall_div_cs
+
+!----------------------------------------------------------------------------------------------
+
+!# misc
+
+ !e_thermal ! sum over all zones of Cp*T*dm
+
+ !## eos
+ !logQ_max ! logQ = logRho - 2*logT + 12
+ !logQ_min
+ gamma1_min
+
+ !## core mixing
+ !mass_semiconv_core
+
+ !## H-He boundary
+
+ !diffusion_time_H_He_bdy
+ !temperature_H_He_bdy
+
+
+ !## optical depth and opacity
+
+ !one_div_yphot
+ !log_one_div_yphot
+
+ !log_min_opacity
+ !min_opacity
+
+ !log_tau_center
+
+ !log_max_tau_conv
+ !max_tau_conv
+ !log_min_tau_conv
+ !min_tau_conv
+
+ !tau_qhse_yrs
+
+ !## other
+
+ !Lsurf_m
+ !dlnR_dlnM
+ !h1_czb_mass ! location (in Msun units) of base of 1st convection zone above he core
+ !kh_mdot_limit
+ !log_cntr_dr_cm
+ !min_Pgas_div_P
+ !surf_c12_minus_o16 ! this is useful for seeing effects of dredge up on AGB
+ !surf_num_c12_div_num_o16
+
+ !phase_of_evolution ! Integer mapping to the type of evolution see star_data/public/star_data_def.inc for definitions
+
+ !## MLT++
+ !gradT_excess_alpha
+ !gradT_excess_min_beta
+ !gradT_excess_max_lambda
+
+ !max_L_rad_div_Ledd
+ !max_L_rad_div_Ledd_div_phi_Joss
+
+
+ !## RTI
+ !rti_regions
+
+ !## Ni & Co
+ !total_ni_co_56
+
+
+ !## internal structure constants
+
+ ! this is evaluated assuming a spherical star and does not account for rotation
+ !apsidal_constant_k2
+
+
+!----------------------------------------------------------------------------------------------
+
+!# accretion
+
+ !k_below_const_q
+ !q_below_const_q
+ !logxq_below_const_q
+
+ !k_const_mass
+ !q_const_mass
+ !logxq_const_mass
+
+ !k_below_just_added
+ !q_below_just_added
+ !logxq_below_just_added
+
+ !k_for_test_CpT_absMdot_div_L
+ !q_for_test_CpT_absMdot_div_L
+ !logxq_for_test_CpT_absMdot_div_L
+
+!----------------------------------------------------------------------------------------------
+
+!# Color output
+
+ ! Outputs the bolometric correction (bc) for the star in filter band ``filter'' (case sensitive)
+ !bc filter
+
+ ! Outputs the absolute magnitude for the star in filter band ``filter'' (case sensitive)
+ !abs_mag filter
+
+ ! Adds all the bc's to the output
+ !add_bc
+
+ ! Adds all the absolute magnitudes to the output
+ !add_abs_mag
+
+ ! Outputs luminosity in filter band ``filter'' (erg s^-1) (case sensitive)
+ ! lum_band filter
+
+ ! Adds all the filter band luminosities to the output (erg s^-1)
+ ! add_lum_band
+
+ ! Outputs log luminosity in filter band ``filter'' (log erg s^-1) (case sensitive)
+ ! log_lum_band filter
+
+ ! Adds all the filter band luminosities to the output (log erg s^-1)
+ ! add_log_lum_band
+
+!----------------------------------------------------------------------------------------------
+
+!# RSP
+
+ !rsp_DeltaMag ! absolute magnitude difference between minimum and maximum light (mag)
+ !rsp_DeltaR ! R_max - R_min difference in the max and min radius (Rsun)
+ !rsp_GREKM ! fractional growth of the kinetic energy per pulsation period ("nonlinear growth rate") - see equation 5 in MESA5
+ !rsp_num_periods ! Count of the number of pulsation cycles completed
+ !rsp_period_in_days ! Running period, ie., period between two consecutive values of R_max (days)
+ !rsp_phase ! Running pulsation phase for a cycle
+
+!----------------------------------------------------------------------------------------------
+!# debugging
+
+ !## retries
+ num_retries ! total during the run
+
+ !## solver iterations
+
+ num_iters ! same as num_solver_iterations
+ num_solver_iterations ! iterations at this step
+ !total_num_solver_iterations ! total iterations during the run
+ !avg_num_solver_iters
+
+ !rotation_solver_steps
+
+ !diffusion_solver_steps
+ !diffusion_solver_iters
+
+ !avg_setvars_per_step
+ !avg_skipped_setvars_per_step
+ !avg_solver_setvars_per_step
+
+ !burn_solver_maxsteps
+
+ !total_num_solver_calls_converged
+ !total_num_solver_calls_failed
+ !total_num_solver_calls_made
+ !total_num_solver_relax_calls_converged
+ !total_num_solver_relax_calls_failed
+ !total_num_solver_relax_calls_made
+ !total_num_solver_relax_iterations
+
+ !total_step_attempts
+ !total_step_redos
+ !total_step_retries
+ !total_steps_finished
+ !total_steps_taken
+
+ !TDC_num_cells
+
+ !## Relaxation steps
+ !total_relax_step_attempts
+ !total_relax_step_redos
+ !total_relax_step_retries
+ !total_relax_steps_finished
+ !total_relax_steps_taken
+
+ !## conservation during mesh adjust
+ !log_mesh_adjust_IE_conservation
+ !log_mesh_adjust_KE_conservation
+ !log_mesh_adjust_PE_conservation
+
+ !## amr
+ !num_hydro_merges
+ !num_hydro_splits
+
+ !## timing
+ !elapsed_time ! time since start of run (seconds)
+
+ !## Extras
+ burning_regions 80
+ mixing_regions 80
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist1 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist1
new file mode 100644
index 0000000000..0ad71706ec
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist1
@@ -0,0 +1,53 @@
+&star_job
+
+read_extra_star_job_inlist(1) = .true.
+extra_star_job_inlist_name(1) = 'inlist_both'
+
+save_model_filename = 'donor_final.mod'
+
+!pgstar_flag = .true.
+
+/ ! end of star_job namelist
+
+&eos
+
+read_extra_eos_inlist(1) = .true.
+extra_eos_inlist_name(1) = 'inlist_both'
+
+/ ! end of eos namelist
+
+
+&kap
+
+read_extra_kap_inlist(1) = .true.
+extra_kap_inlist_name(1) = 'inlist_both'
+
+/ ! end of kap namelist
+
+
+&controls
+
+read_extra_controls_inlist(1) = .true.
+extra_controls_inlist_name(1) = 'inlist_both'
+
+! set this to .true. to continue post-C depl
+! otherwise see stopping condition in inlist_both or run_star_extras.f
+x_logical_ctrl(1) = .true.
+
+log_directory = 'LOGS1'
+max_model_number = 1
+
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+read_extra_pgstar_inlist(1) = .true.
+extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+
+! filenames to avoid overlap with accretor: not needed if using pgbinary
+! HR_file_prefix = 'hr_donor_'
+! Grid2_file_prefix = 'donor_'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist2 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist2
new file mode 100644
index 0000000000..3545fff4d2
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist2
@@ -0,0 +1,68 @@
+&star_job
+
+read_extra_star_job_inlist(1) = .true.
+extra_star_job_inlist_name(1) = 'inlist_both'
+
+save_model_filename = 'accretor_final.mod'
+
+!pgstar_flag = .true.
+
+/ ! end of star_job namelist
+
+&eos
+
+read_extra_eos_inlist(1) = .true.
+extra_eos_inlist_name(1) = 'inlist_both'
+
+/ ! end of eos namelist
+
+
+&kap
+
+read_extra_kap_inlist(1) = .true.
+extra_kap_inlist_name(1) = 'inlist_both'
+
+/ ! end of kap namelist
+
+
+&controls
+
+read_extra_controls_inlist(1) = .true.
+extra_controls_inlist_name(1) = 'inlist_both'
+
+! extra_terminal_output_file = 'log2'
+log_directory = 'LOGS2'
+
+
+! If doing accretor star models without rotation
+! the settings below will enforce non-conservative evolution
+! If also having rotation, these will help with convergence
+! assuming rotationally-limited accretion efficienty
+
+! max_mdot_redo_cnt = 100
+! min_years_dt_for_redo_mdot = 1d-2
+! !surf_w_div_w_crit_limit = 0.95d0
+! !surf_w_div_w_crit_tol = 0.05d0
+! rotational_mdot_boost_fac = 1.2d10
+! rotational_mdot_kh_fac = 1d10
+! mdot_revise_factor = 1.2
+! implicit_mdot_boost = 0.1
+! max_mdot_jump_for_rotation = 10d0
+
+!max_num_profile_models = 100000
+!profile_interval = 100
+!photo_interval = 500
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+read_extra_pgstar_inlist(1) = .true.
+extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+
+! ! filenames to avoid overlap with accretor
+! HR_file_prefix = 'hr_accretor_'
+! Grid2_file_prefix = 'accretor_'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_binary b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_binary
new file mode 100644
index 0000000000..38b1c435b7
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_binary
@@ -0,0 +1,91 @@
+&binary_job
+
+inlist_names(1) = 'inlist1'
+inlist_names(2) = 'inlist2'
+
+evolve_both_stars = .false.
+pgbinary_flag = .true.
+
+/ ! end of binary_job namelist
+
+&binary_controls
+
+m1 = 15.0d0 ! donor mass in Msun
+m2 = 12.0d0 ! companion mass in Msun
+initial_period_in_days = 20.0d0
+
+limit_retention_by_mdot_edd = .false. ! this is for BH secondaries
+mass_transfer_alpha = 0.0d0
+mass_transfer_beta = 0.0d0
+mass_transfer_delta = 0.0d0
+mass_transfer_gamma = 0.0d0
+
+mdot_scheme = "Kolb" ! !"Ritter" !
+initial_change_factor = 1.2d0
+change_factor_fraction = 0.8d0
+min_mdot_for_implicit = 1d-10
+implicit_scheme_tiny_factor = 1d-6
+! report_rlo_solver_progress = .true.
+do_tidal_sync = .true.
+do_j_accretion = .false. ! if .true. use A.3.3 of de Mink et al. 2013, ApJ, 764, 166
+! be 100% sure MB is always off
+do_jdot_mb = .false.
+do_jdot_missing_wind = .true.
+
+! ! timestep controls
+varcontrol_case_a = 1d-4
+varcontrol_case_b = 2.5d-4
+varcontrol_ms = 1d-3
+varcontrol_post_ms = 5d-3
+
+fr = 1d-2
+fr_limit = 0.025d0
+fr_dt_limit = 10d0
+fa = 0.01d0
+fa_hard = 0.02d0
+fm = 0.01d0
+fm_limit = 1d-1
+fj = 0.001d0
+fj_hard = 1d-2
+dt_softening_factor = 0.1d0
+
+implicit_scheme_tolerance = 2.5d-4
+max_tries_to_achieve = 200
+min_change_factor = 1.02d0
+max_change_factor = 1.2d0
+initial_change_factor = 1.2d0
+change_factor_fraction = 0.8d0
+implicit_lambda = 0.4d0
+
+min_mdot_for_implicit = 1d-10
+
+sync_mode_1 = "Uniform"
+sync_type_1 = "Hut_rad"
+Ftid_1 = 1
+sync_mode_2 = "Uniform"
+sync_type_2 = "Hut_rad"
+Ftid_2 = 1
+do_initial_orbit_sync_1 = .true.
+do_initial_orbit_sync_2 = .true.
+
+accretor_overflow_terminate = 2d0
+
+photo_interval = 200
+!photo_digits = 8
+append_to_star_history = .false.
+
+! terminal output
+write_header_frequency = 100 !1
+history_interval = 1
+terminal_interval = 10
+
+
+
+
+/ ! end of binary_controls namelist
+
+
+&pgbinary
+read_extra_pgbinary_inlist(1) = .true.
+extra_pgbinary_inlist_name(1) = 'inlist_pgbinary'
+/ ! end of pgbinary namelist
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_both b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_both
new file mode 100644
index 0000000000..19bdfe007a
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_both
@@ -0,0 +1,323 @@
+&star_job
+
+! local directories data: this is done to use some custom rates, see rate_tables/rate_list.txt
+! Specifically we adopt the median c12(a,g)o16 rate from deBoer+17, other estimates
+! are available in $MESA_DIR/data/rates_data/rate_tables
+rate_tables_dir = './rate_tables'
+rates_cache_dir = './rates_cache'
+eosDT_cache_dir = './eosDT_cache'
+kap_cache_dir = './kap_cache'
+
+! messages and info
+echo_at_start = 'MESA model has begun running'
+echo_at_end = 'MESA model has finished running'
+show_retry_counts_when_terminate = .true.
+
+
+
+
+show_log_description_at_start = .false.
+show_timestep_limit_counts_when_terminate = .true.
+save_model_when_terminate = .false.
+
+! initial model: we do not generate a pre_ms model here.
+load_saved_model = .false.
+! load_model_filename = 'zams.mod'
+
+! change initial Z but don't relax.
+change_initial_Z = .true.
+new_Z = 0.02d0
+
+! network
+! change_net = .true.
+! change_initial_net = .true.
+! new_net_name = "approx21_plus_co56.net" ! 'mesa_206.net' ! 'approx21_cr60_plus_co56.net' ! ! "mesa_128.net" ! 'mesa_206.net'
+!dump_missing_metals_into_heaviest = .true.
+
+
+
+! show_net_species_info = .true.
+
+
+! we want to use weaklib all the time, so we toggle at lowT.
+T9_weaklib_full_off = 0.0001d0
+T9_weaklib_full_on = 0.00011d0
+
+change_v_flag = .true.
+change_initial_v_flag = .true.
+new_v_flag = .false.
+center_ye_limit_for_v_flag = 0.1d0 ! prevent hydro turning on
+
+set_initial_age = .true.
+initial_age = 0
+
+set_initial_model_number = .true.
+initial_model_number = 0
+
+! rotation
+! change_rotation_flag = .true.
+! change_initial_rotation_flag = .true.
+! new_rotation_flag = .true.
+
+! set_omega_div_omega_crit = .true.
+! set_initial_omega_div_omega_crit = .true.
+! new_omega_div_omega_crit = 0
+
+show_retry_counts_when_terminate = .true.
+show_timestep_limit_counts_when_terminate = .true.
+
+pgstar_flag = .true.
+save_pgstar_files_when_terminate = .true.
+
+/ ! end of star_job namelist
+
+
+&eos
+
+mass_fraction_limit_for_Skye = 1d-16
+
+/ ! end of eos namelist
+
+
+&kap
+
+! MESA offers newer opacity tables for differing abundances, see kap controls.
+kap_file_prefix = 'gs98' ! 'oplib_gs98'
+kap_CO_prefix = 'gs98_co' ! 'gs98_co'
+kap_lowT_prefix = 'lowT_fa05_gs98'
+use_Type2_opacities = .true.
+Zbase = 0.02
+
+! Zbase set in inlist_extra
+/
+
+&controls
+
+fix_d_eos_dxa_partials = .false.
+
+
+! set approx22 fake factor to reproduce Ye ~ 0.43-0.44 at CC.
+fe56ec_fake_factor = 1d-4
+min_T_for_fe56ec_fake_factor = 3d9
+
+! to stop at C depletion
+x_logical_ctrl(2) = .true.
+max_model_number = 50000 ! if true above, and the binary detaches, this will be overwritten in run_star_extras.f90
+redo_limit = 300
+
+
+! atmosphere
+! 1 for isotropic radiation field, and 1.5 for radial radiation field?
+Pextra_factor = 2 ! <= 1.5 to stay physical
+atm_option = 'T_tau'
+atm_T_tau_relation = 'Eddington'
+atm_T_tau_opacity = 'fixed' ! next best is 'iterated'
+
+!wind
+hot_wind_scheme = 'Dutch'
+cool_wind_RGB_scheme = 'Dutch'
+cool_wind_AGB_scheme = 'Dutch'
+Dutch_scaling_factor = 1.0 ! this is LARGE, should try <0.8 (probably 0.5-0.3)
+max_T_center_for_any_mass_loss = 1.1d9
+
+! if doing rotation, uncomment below for rotational boost
+! mdot_omega_power = 0.43d0
+! max_tries_for_implicit_wind = 10
+
+! mlt
+MLT_option = 'TDC'
+mixing_length_alpha = 1.5d0
+
+! mixing
+use_ledoux_criterion = .true.
+alpha_semiconvection = 1.0d0
+thermohaline_coeff = 1.0d0
+semiconvection_option = 'Langer_85 mixing; gradT = gradr'
+thermohaline_option = 'Kippenhahn'
+
+!! superadiabatic convection routines, it's a choice:
+! superadiabatic reduction, implicit, new
+use_superad_reduction = .true.
+superad_reduction_Gamma_limit = 0.5d0 ! default is 0.5d0
+superad_reduction_Gamma_limit_scale = 5d0
+superad_reduction_Gamma_inv_scale = 5d0
+superad_reduction_limit = -1d0
+superad_reduction_diff_grads_limit = 1d-2 ! default is 1d-3
+
+! MLT ++, explicit, well tested
+okay_to_reduce_gradT_excess = .false.
+gradT_excess_f1 = 1d-4
+gradT_excess_f2 = 1d-2
+gradT_excess_lambda1 = -1d0 ! full on
+
+! drag to prevent the development of radial pulses.
+use_drag_energy = .false.
+drag_coefficient = 0.9d0
+min_q_for_drag = 0.8d0
+
+! overshoot controls , lowest (#) take priority
+overshoot_scheme(1) = 'exponential'
+overshoot_zone_type(1) = 'any'
+overshoot_zone_loc(1) = 'core'
+overshoot_bdy_loc(1) = 'any'
+overshoot_f(1) = 4.15d-2
+overshoot_f0(1) = 0.008d0
+
+overshoot_scheme(2) = 'exponential'
+overshoot_zone_type(2) = 'any'
+overshoot_zone_loc(2) = 'any'
+overshoot_bdy_loc(2) = 'any'
+overshoot_f(2) = 0.005d0
+overshoot_f0(2) = 0.001d0
+
+! Alternative overshooting: step function similar to Brott+11
+! overshoot_scheme(1) = 'step'
+! overshoot_zone_type(1) = 'any'
+! overshoot_zone_loc(1) = 'core'
+! overshoot_bdy_loc(1) = 'any'
+! overshoot_f(1) = 0.345d0
+! overshoot_f0(1) = 0.01d0
+
+dX_nuc_drop_limit = 1d-2 ! 1d-3 for production
+dX_nuc_drop_limit_at_high_T = 2d-2 ! 1d-2 for production ! for center logT > 9.45
+dX_nuc_drop_min_X_limit = 1d-4 !1d-3 ! try decreasing to 1d-4 or 1d-5 in a production run
+dX_nuc_drop_max_A_limit = 70 ! try increasing beyond 60 in a big network run
+dX_nuc_drop_hard_limit = 1d99
+
+delta_Ye_highT_limit = 1d-3
+
+! Ignore cumulative energy residuals for the entire run to avoid premature exits
+hard_limit_for_rel_error_in_energy_conservation = -1d0
+! MESA will still warn if it grows above ~1%
+max_abs_rel_run_E_err = 1d-2 ! maximum energy error before model is terminated.
+
+
+! The following controls below for rotation are untested in these inlists
+! but they should work in theory, if one turns them on and turns on rotation
+! in starjob.
+! ! rotation and mixing:
+! ! rotation is initialized by orbital synchronization
+! am_nu_ST_factor = 1.0 !! 1.0 !default
+! D_visc_factor = 0.0
+! am_nu_SH_factor = 0.0
+! D_ST_factor = 0.0
+! D_SH_factor = 0.0
+! D_GSF_factor = 1.0
+! D_ES_factor = 1.0
+! D_SSI_factor = 1.0
+! D_DSI_factor = 1.0
+! am_D_mix_factor = 0.03333d0
+! am_gradmu_factor = 0.1d0
+! premix_omega = .true.
+! remove_small_D_limit = 1d-10
+! mixing_D_limit_for_log = 1d-10
+! max_mdot_jump_for_rotation = 1d99
+
+! max_mdot_redo_cnt = 100
+! min_years_dt_for_redo_mdot = 1d-2
+! !surf_w_div_w_crit_limit = 0.95d0
+! !surf_w_div_w_crit_tol = 0.05d0
+! rotational_mdot_boost_fac = 1.2d10
+! rotational_mdot_kh_fac = 1d10
+! mdot_revise_factor = 1.2
+! implicit_mdot_boost = 0.1
+! max_mdot_jump_for_rotation = 10d0
+
+! mesh
+max_dq = 5d-3!1d-3 ! lower for production runs
+max_allowed_nz = 50000
+mesh_delta_coeff = 1.5d0 ! 1.0 for a production.
+mesh_delta_coeff_for_highT = 1.5d0 !1.5 ! try 1.0 or below in production run
+logT_max_for_standard_mesh_delta_coeff = 9.0
+logT_min_for_highT_mesh_delta_coeff = 9.5
+
+! timesteps
+time_delta_coeff = 1d0
+min_timestep_limit = 1e-20 !sec ! 1e-10 !to be able to reach CC
+varcontrol_target = 1d-3 !1d-4
+max_timestep_factor = 1.05d0
+retry_hold = 2
+min_J_div_delta_J = 5d0
+
+! time step resolution on fuel depletion
+delta_lg_XH_cntr_limit = 0.01d0
+delta_lg_XH_cntr_max = 0.0d0
+delta_lg_XH_cntr_min = -4.0d0
+delta_lg_XH_cntr_hard_limit = 0.02d0
+delta_lg_XHe_cntr_limit = 0.01d0
+delta_lg_XHe_cntr_max = 0.0d0
+delta_lg_XHe_cntr_min = -4.0d0
+delta_lg_XHe_cntr_hard_limit = 0.02d0
+delta_lg_XC_cntr_limit = 0.02d0
+delta_lg_XC_cntr_max = 0.2d0
+delta_lg_XC_cntr_min = -2.0d0 ! -3.0d0
+delta_lg_XC_cntr_hard_limit = 0.02d0
+delta_lg_XO_cntr_limit = 0.01d0
+delta_lg_XO_cntr_max = 0.0d0
+delta_lg_XO_cntr_min = -3.0d0
+delta_lg_XO_cntr_hard_limit = 0.02d0
+
+delta_lgL_limit = 0.01d0
+delta_lgL_hard_limit = 0.1d0
+
+delta_lgTeff_limit = 0.008d0
+delta_lgTeff_hard_limit = 0.01d0
+
+
+! Recommend decreasing all three Rho, T, Tmax
+! to 1d-3 or lower in production runs
+delta_lgRho_cntr_limit = 2.5d-3 !0.03 ! 1d-3
+delta_lgRho_cntr_hard_limit = 0.1
+delta_lgRho_limit = 0.1
+
+delta_lgT_cntr_limit_only_after_near_zams = .true.
+delta_lgT_cntr_limit = 2d-3 !0.002 ! 1d-3
+delta_lgT_cntr_hard_limit = 0.1
+
+delta_lgT_max_limit_only_after_near_zams = .true.
+delta_lgT_max_limit = 2d-3 !0.002 ! 1d-3
+delta_lgT_max_hard_limit = 0.1
+
+delta_lgT_limit = 0.025d0 ! default 0.5
+delta_lgRho_limit = 0.5d0 ! default 1.0
+
+delta_lgL_He_limit = 0.01d0
+delta_lgL_He_hard_limit = 0.025d0
+delta_HR_ds_Teff = 1d-5
+
+delta_lgL_H_limit = 0.01d0
+delta_lgL_H_hard_limit = 0.025d0
+
+! spatial increase resolution during He core burning
+!T_function2_weight = 100d0
+!T_function2_param = 2.4d8
+
+! increase resolution for omega
+! omega_function_weight = 100d0
+
+! Jim Fuller's suggestion
+set_min_D_mix = .true.
+min_D_mix =1d-2
+
+! solver controls
+energy_eqn_option = 'dedt'
+
+! gold solver
+use_gold_tolerances = .true.
+tol_correction_high_T_limit = 1d9 ! Switch to lower tol at high temp for large Mass
+solver_iters_timestep_limit = 20
+gold_solver_iters_timestep_limit = 20
+
+convergence_ignore_equL_residuals = .true.
+make_gradr_sticky_in_solver_iters = .true.
+xa_scale = 1d-5
+
+! output
+photo_interval = -1 ! photos are saved from inlist_binary
+profile_interval = 1000
+max_num_profile_models = 52
+history_interval = 1
+write_header_frequency = 10
+terminal_interval = 10
+
+/ ! end of controls namelist
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_pgbinary b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_pgbinary
new file mode 100644
index 0000000000..5cee49060e
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_pgbinary
@@ -0,0 +1,106 @@
+&pgbinary
+
+! this only updates the right panel for the binary, not the star panels
+pgbinary_interval = 10
+
+!pause = .true.
+
+pgbinary_age_disp = 1.7
+pgbinary_age_fjust = -0.5
+pgbinary_model_disp = 1.7
+pgbinary_model_fjust = 1.4
+
+pgbinary_grid_title_disp = 0.2
+pgbinary_title_disp = 0.2
+
+
+Orbit_win_flag = .true.
+Orbit_win_width = 8
+
+
+Grid1_win_flag = .true.
+
+Grid1_win_width = 13
+Grid1_win_aspect_ratio = 0.58
+
+Grid1_xleft = 0.0
+Grid1_xright = 1.0
+Grid1_ybot = 0.0
+Grid1_ytop = 0.95
+Grid1_title = ''
+
+Grid1_num_cols = 5
+Grid1_num_rows = 3
+Grid1_num_plots = 4
+
+Grid1_plot_name(1) = 'Star1'
+Grid1_plot_col(1) = 1
+Grid1_plot_colspan(1) = 2
+Grid1_plot_row(1) = 1
+Grid1_plot_rowspan(1) = 3
+Grid1_plot_pad_left(1) = 0.02
+Grid1_plot_pad_right(1) = 0.02
+Grid1_plot_pad_bot(1) = 0.01
+Grid1_plot_pad_top(1) = 0.00
+Grid1_txt_scale_factor(1) = 0.9
+Star1_plot_name = 'Grid2'
+do_star1_box = .true.
+star1_box_pad_left = -0.02
+star1_box_pad_right = 0.02
+star1_box_pad_bot = 0.0
+star1_box_pad_top = 0.001
+
+Grid1_plot_name(2) = 'Star2'
+Grid1_plot_col(2) = 3
+Grid1_plot_colspan(2) = 2
+Grid1_plot_row(2) = 1
+Grid1_plot_rowspan(2) = 3
+Grid1_plot_pad_left(2) = 0.02
+Grid1_plot_pad_right(2) = 0.02
+Grid1_plot_pad_bot(2) = 0.01
+Grid1_plot_pad_top(2) = 0.00
+Grid1_txt_scale_factor(2) = 0.9
+Star2_plot_name = 'Grid2'
+do_star2_box = .true.
+star2_box_pad_left = -0.018
+star2_box_pad_right = 0.02
+star2_box_pad_bot = 0.0
+star2_box_pad_top = 0.001
+
+Grid1_plot_name(3) = 'history_panels1'
+Grid1_plot_col(3) = 5
+Grid1_plot_colspan(3) = 1
+Grid1_plot_row(3) = 2
+Grid1_plot_rowspan(3) = 2
+Grid1_plot_pad_left(3) = 0.04
+Grid1_plot_pad_right(3) = 0.04
+Grid1_plot_pad_bot(3) = 0.04
+Grid1_plot_pad_top(3) = 0.00
+Grid1_txt_scale_factor(3) = 0.4
+
+History_panels1_title = ''
+History_panels1_num_panels = 2
+History_panels1_xaxis_name = 'model_number'
+History_panels1_yaxis_name(1) = 'rl_relative_overflow_1'
+History_panels1_other_yaxis_name(1) = 'rl_relative_overflow_2'
+History_panels1_yaxis_name(2) = 'period_days'
+History_panels1_other_yaxis_name(2) = 'lg_mtransfer_rate'
+History_panels1_other_ymin(2) = -10
+History_panels1_max_width = -1
+
+Grid1_plot_name(4) = 'Orbit'
+Grid1_plot_col(4) = 5
+Grid1_plot_colspan(4) = 1
+Grid1_plot_row(4) = 1
+Grid1_plot_rowspan(4) = 1
+Grid1_plot_pad_left(4) = 0.04
+Grid1_plot_pad_right(4) = 0.04
+Grid1_plot_pad_bot(4) = 0.03
+Grid1_plot_pad_top(4) = 0.00
+Grid1_txt_scale_factor(4) = 0.4
+
+Grid1_file_flag = .true.
+Grid1_file_interval = 10
+Grid1_file_width = 27
+Grid1_file_aspect_ratio = -1
+/ ! end of pgbinary namelist
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_pgstar b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_pgstar
new file mode 100644
index 0000000000..deb0ded088
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_pgstar
@@ -0,0 +1,356 @@
+&pgstar
+
+! this updates the panels for each star but not the binary panel on the right, see inlist_pgbinary
+pgstar_interval = 10
+!pause = .true.
+
+pgstar_age_disp = 2.5
+pgstar_model_disp = 2.5
+
+!### scale for axis labels
+pgstar_xaxis_label_scale = 1.
+pgstar_left_yaxis_label_scale = 1.
+pgstar_right_yaxis_label_scale = 1.
+
+Grid2_num_cols = 4 ! divide plotting region into this many equal width cols
+Grid2_num_rows = 8 ! divide plotting region into this many equal height rows
+
+Grid2_num_plots = 7 ! <= 10
+
+Grid2_plot_name(1) = 'Profile_Panels1'
+Grid2_plot_row(1) = 1 ! number from 1 at top
+Grid2_plot_rowspan(1) = 2 ! plot spans this number of rows
+Grid2_plot_col(1) = 1 ! number from 1 at left
+Grid2_plot_colspan(1) = 2 ! plot spans this number of columns
+Grid2_plot_pad_left(1) = 0.01 ! fraction of full window width for padding on left
+Grid2_plot_pad_right(1) = 0.05 ! fraction of full window width for padding on right
+Grid2_plot_pad_top(1) = 0.01 ! fraction of full window height for padding at top
+Grid2_plot_pad_bot(1) = 0.02 ! fraction of full window height for padding at bottom
+Grid2_txt_scale_factor(1) = 0.7 ! multiply txt_scale for subplot by this
+
+Profile_Panels1_title = ''
+Profile_Panels1_num_panels = 1
+Profile_Panels1_xaxis_name = 'zone'!'mass' ! 'logtau'
+Profile_Panels1_yaxis_name(1) = 'vel_km_per_s' !'vel_km_per_s' ! 'opacity'
+Profile_Panels1_other_yaxis_name(1) = 'logdq'!'v_div_csound' !'conv_L_div_L'
+Profile_Panels1_xaxis_reversed = .true. ! .false.
+Profile_Panels1_dymin(1) = 0.05
+Profile_Panels1_other_dymin(1) = 0.01
+
+
+!Profile_Panels1_other_yaxis_name(2) = 'Y_mass_fraction_He'
+! Profile_Panels1_yaxis_name(3) = 'log'
+! Profile_Panels1_other_yaxis_name(3) = 'ft_rot'
+
+
+Grid2_plot_name(2) = 'Kipp'
+Grid2_plot_row(2) = 3 ! number from 1 at top
+Grid2_plot_rowspan(2) = 3 ! plot spans this number of rows
+Grid2_plot_col(2) = 1 ! number from 1 at left
+Grid2_plot_colspan(2) = 2 ! plot spans this number of columns
+Grid2_plot_pad_left(2) = 0.01 ! fraction of full window width for padding on left
+Grid2_plot_pad_right(2) = 0.05 ! fraction of full window width for padding on right
+Grid2_plot_pad_top(2) = 0.03 ! fraction of full window height for padding at top
+Grid2_plot_pad_bot(2) = 0.04 ! fraction of full window height for padding at bottom
+Grid2_txt_scale_factor(2) = 0.7 ! multiply txt_scale for subplot by this
+
+
+!------------------------------------------------------------------------------------
+
+! Kippenhahn diagram history plot
+
+Kipp_win_flag = .false.
+
+! window properties
+Kipp_win_width = 16
+Kipp_win_aspect_ratio = 0.75
+Kipp_txt_scale = 0.9
+Kipp_title = ''
+
+! y axis limits
+Kipp_mass_max = -101d0
+Kipp_mass_min = 0
+Kipp_show_mass_boundaries = .true.
+
+! x axis limits
+Kipp_xmax = -101 ! maximum step number. negative means use default.
+Kipp_xmin = 0 ! minimum step number. negative means use default.
+Kipp_max_width = 2000 ! only used if > 0. causes xmin to move with xmax.
+
+Kipp_show_mixing = .true.
+Kipp_show_burn = .true.
+Kipp_show_luminosities = .true.
+Kipp_mix_interval = 4
+
+! file output
+Kipp_file_flag = .false.
+Kipp_file_dir = 'kipp_png'
+Kipp_file_prefix = 'kipp_'
+Kipp_file_interval = 10 ! output when mod(model_number,file_interval)==0
+!Kipp_file_width = -1 ! (inches) negative means use same value as for window
+Kipp_file_width = 16 ! (inches) negative means use same value as for window
+Kipp_file_aspect_ratio = -1 ! negative means use same value as for window
+
+
+!------------------------------------------------------------------------------------
+
+
+
+
+
+
+!Mixing_title = ''
+
+Grid2_plot_name(3) = 'TRho_profile'
+Grid2_plot_row(3) = 6 ! number from 1 at top
+Grid2_plot_rowspan(3) = 2 ! plot spans this number of rows
+Grid2_plot_col(3) = 1 ! number from 1 at left
+Grid2_plot_colspan(3) = 2 ! plot spans this number of columns
+Grid2_plot_pad_left(3) = 0.01 ! fraction of full window width for padding on left
+Grid2_plot_pad_right(3) = 0.03 ! fraction of full window width for padding on right
+Grid2_plot_pad_top(3) = 0.01 ! fraction of full window height for padding at top
+Grid2_plot_pad_bot(3) = 0.02 ! fraction of full window height for padding at bottom
+Grid2_txt_scale_factor(3) = 0.7 ! multiply txt_scale for subplot by this
+
+TRho_Profile_title = ''
+
+! TRho axis limits
+TRho_Profile_xmin = -12.0
+TRho_Profile_xmax = 10.0
+TRho_Profile_ymin = 3.0
+TRho_Profile_ymax = 10.0
+
+
+
+Grid2_plot_name(5) = 'HR'
+HR_title = ''
+Grid2_plot_row(5) = 6 ! number from 1 at top
+Grid2_plot_rowspan(5) = 2 ! plot spans this number of rows
+Grid2_plot_col(5) = 3 ! number from 1 at left
+Grid2_plot_colspan(5) = 2 ! plot spans this number of columns
+Grid2_plot_pad_left(5) = 0.01 ! fraction of full window width for padding on left
+Grid2_plot_pad_right(5) = 0.01 ! fraction of full window width for padding on right
+Grid2_plot_pad_top(5) = 0.01 ! fraction of full window height for padding at top
+Grid2_plot_pad_bot(5) = 0.02 ! fraction of full window height for padding at bottom
+Grid2_txt_scale_factor(5) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid2_plot_name(4) = 'TRho'!'History_Panels1'
+Grid2_plot_row(4) = 1 ! number from 1 at top
+Grid2_plot_rowspan(4) = 2 ! plot spans this number of rows
+Grid2_plot_col(4) = 3 ! number from 1 at left
+Grid2_plot_colspan(4) = 2 ! plot spans this number of columns
+Grid2_plot_pad_left(4) = 0.01 ! fraction of full window width for padding on left
+Grid2_plot_pad_right(4) = 0.01 ! fraction of full window width for padding on right
+Grid2_plot_pad_top(4) = 0.01 ! fraction of full window height for padding at top
+Grid2_plot_pad_bot(4) = 0.02 ! fraction of full window height for padding at bottom
+Grid2_txt_scale_factor(4) = 0.7 ! multiply txt_scale for subplot by this
+
+History_Panels1_title = ''
+History_Panels1_num_panels = 1
+History_Panels1_max_width = -1
+History_Panels1_xaxis_name = 'model_number'
+
+History_Panels1_yaxis_name(1) = 'surface_h1'!'log_R'
+History_Panels1_other_yaxis_name(1) = 'surface_he4'! 'log_L'
+History_Panels1_ymin(1) = 0.9
+History_Panels1_ymax(1) = 0
+History_Panels1_other_ymin(1) = 0.9
+History_Panels1_other_ymax(1) = 0
+
+
+!History_Panels1_yaxis_name(2) = 'surface_h1'
+!History_Panels1_other_yaxis_name(2) = 'surface_he4'
+
+Grid2_plot_name(6) = 'Text_Summary1'
+Grid2_plot_row(6) = 8 ! number from 1 at top
+Grid2_plot_rowspan(6) = 1 ! plot spans this number of rows
+Grid2_plot_col(6) = 1 ! number from 1 at left
+Grid2_plot_colspan(6) = 4 ! plot spans this number of columns
+Grid2_plot_pad_left(6) = -0.01 ! fraction of full window width for padding on left
+Grid2_plot_pad_right(6) = -0.01 ! fraction of full window width for padding on right
+Grid2_plot_pad_top(6) = 0.01 ! fraction of full window height for padding at top
+Grid2_plot_pad_bot(6) = 0.00 ! fraction of full window height for padding at bottom
+Grid2_txt_scale_factor(6) = 0.2 ! multiply txt_scale for subplot by this
+
+
+
+
+
+! abundance plots
+Grid2_plot_name(7) = 'Abundance'
+
+Grid2_plot_row(7) = 3 ! number from 1 at top
+Grid2_plot_rowspan(7) = 3 ! plot spans this number of rows
+Grid2_plot_col(7) = 3 ! number from 1 at left
+Grid2_plot_colspan(7) = 2 ! plot spans this number of columns
+Grid2_plot_pad_left(7) = 0.01 ! fraction of full window width for padding on left
+Grid2_plot_pad_right(7) = 0.01 ! fraction of full window width for padding on right
+Grid2_plot_pad_top(7) = 0.01 ! fraction of full window height for padding at top
+Grid2_plot_pad_bot(7) = 0.02 ! fraction of full window height for padding at bottom
+Grid2_txt_scale_factor(7) = 0.7 ! multiply txt_scale for subplot by this
+
+
+
+
+!------------------------------------------------------------------------------------
+
+! Abundance profile plot
+
+Abundance_win_flag = .false.
+
+! window properties
+Abundance_win_width = 10
+Abundance_win_aspect_ratio = 0.75
+
+Abundance_xleft = 0.15
+Abundance_xright = 0.85
+Abundance_ybot = 0.15
+Abundance_ytop = 0.85
+Abundance_txt_scale = 0.8
+Abundance_title = ''
+
+! isotopes to plot
+
+Abundance_num_isos_to_show = 20
+
+Abundance_which_isos_to_show(1) = 'h1'
+Abundance_which_isos_to_show(2) = 'he3'
+Abundance_which_isos_to_show(3) = 'he4'
+Abundance_which_isos_to_show(4) = 'c12'
+Abundance_which_isos_to_show(5) = 'n14'
+Abundance_which_isos_to_show(6) = 'o16'
+Abundance_which_isos_to_show(7) = 'ne20'
+Abundance_which_isos_to_show(8) = 'mg24'
+Abundance_which_isos_to_show(9) = 'si28'
+Abundance_which_isos_to_show(10) = 's32'
+Abundance_which_isos_to_show(11) = 'ar36'
+Abundance_which_isos_to_show(12) = 'ca40'
+Abundance_which_isos_to_show(13) = 'ti44'
+Abundance_which_isos_to_show(14) = 'cr48'
+Abundance_which_isos_to_show(15) = 'cr56'
+Abundance_which_isos_to_show(16) = 'fe52'
+Abundance_which_isos_to_show(17) = 'fe54'
+Abundance_which_isos_to_show(18) = 'fe56'
+Abundance_which_isos_to_show(19) = 'ni56'
+Abundance_which_isos_to_show(20) = 'neut'
+!Abundance_which_isos_to_show(22) = 'ne22'
+
+!Abundance_which_isos_to_show(1) = 'h1'
+!Abundance_which_isos_to_show(2) = 'h2'
+!Abundance_which_isos_to_show(3) = 'he3'
+!Abundance_which_isos_to_show(4) = 'he4'
+!Abundance_which_isos_to_show(5) = 'li7'
+!Abundance_which_isos_to_show(6) = 'be7'
+!Abundance_which_isos_to_show(7) = 'be9'
+!Abundance_which_isos_to_show(8) = 'be10'
+!Abundance_which_isos_to_show(9) = 'b8'
+!Abundance_which_isos_to_show(10) = 'c12'
+!Abundance_which_isos_to_show(11) = 'c12'
+!Abundance_which_isos_to_show(12) = 'c13'
+!Abundance_which_isos_to_show(13) = 'n13'
+!Abundance_which_isos_to_show(14) = 'n14'
+!Abundance_which_isos_to_show(15) = 'n15'
+!Abundance_which_isos_to_show(16) = 'o14'
+!Abundance_which_isos_to_show(17) = 'o15'
+!Abundance_which_isos_to_show(18) = 'o16'
+!Abundance_which_isos_to_show(19) = 'o17'
+!Abundance_which_isos_to_show(20) = 'o18'
+!Abundance_which_isos_to_show(21) = 'ne22'
+!Abundance_which_isos_to_show(21) = 'ne20'
+!Abundance_which_isos_to_show(22) = 'mg24'
+
+
+!Abundance_which_isos_to_show(1) = 'neut'
+!Abundance_which_isos_to_show(2) = 'h1'
+!Abundance_which_isos_to_show(3) = 'h2'
+!Abundance_which_isos_to_show(4) = 'he3'
+!Abundance_which_isos_to_show(5) = 'he4'
+!Abundance_which_isos_to_show(6) = 'li7'
+!Abundance_which_isos_to_show(7) = 'be7'
+!Abundance_which_isos_to_show(8) = 'be9'
+!Abundance_which_isos_to_show(9) = 'be10'
+!Abundance_which_isos_to_show(10) = 'b8'
+!Abundance_which_isos_to_show(11) = 'c12'
+!Abundance_which_isos_to_show(12) = 'c13'
+!Abundance_which_isos_to_show(13) = 'n13'
+!Abundance_which_isos_to_show(14) = 'n14'
+!Abundance_which_isos_to_show(15) = 'n15'
+!Abundance_which_isos_to_show(16) = 'o14'
+!Abundance_which_isos_to_show(17) = 'o15'
+!Abundance_which_isos_to_show(18) = 'o16'
+!Abundance_which_isos_to_show(19) = 'o17'
+!Abundance_which_isos_to_show(20) = 'o18'
+!Abundance_which_isos_to_show(21) = 'f17'
+!Abundance_which_isos_to_show(22) = 'f18'
+!Abundance_which_isos_to_show(23) = 'f19'
+!Abundance_which_isos_to_show(24) = 'ne18'
+!Abundance_which_isos_to_show(25) = 'ne19'
+!Abundance_which_isos_to_show(26) = 'ne20'
+!Abundance_which_isos_to_show(27) = 'ne21'
+!Abundance_which_isos_to_show(28) = 'ne22'
+!Abundance_which_isos_to_show(29) = 'na21'
+!Abundance_which_isos_to_show(30) = 'na22'
+!Abundance_which_isos_to_show(31) = 'na23'
+!Abundance_which_isos_to_show(32) = 'na24'
+!Abundance_which_isos_to_show(33) = 'mg23'
+!Abundance_which_isos_to_show(34) = 'mg24'
+!Abundance_which_isos_to_show(35) = 'mg25'
+!Abundance_which_isos_to_show(36) = 'mg26'
+!Abundance_which_isos_to_show(37) = 'al25'
+!Abundance_which_isos_to_show(38) = 'al26'
+!Abundance_which_isos_to_show(39) = 'al27'
+!Abundance_which_isos_to_show(40) = 'si27'
+!Abundance_which_isos_to_show(41) = 'si28'
+!Abundance_which_isos_to_show(42) = 'p30'
+!Abundance_which_isos_to_show(43) = 'p31'
+!Abundance_which_isos_to_show(44) = 's31'
+!Abundance_which_isos_to_show(45) = 's32'
+
+
+
+
+! number and size of isotope labels along curves
+num_abundance_line_labels = 4
+Abundance_line_txt_scale_factor = 0.8
+
+
+! number and size of isotopes on legend
+Abundance_legend_max_cnt = 0
+Abundance_legend_txt_scale_factor = 0.6
+
+! xaxis name and orientation
+Abundance_xaxis_name = 'mass'
+Abundance_xaxis_reversed = .false.
+
+! xaxis limits
+Abundance_xmin = 0.0
+Abundance_xmax = -101d0
+
+! yaxis limits
+Abundance_log_mass_frac_min = -4.0
+Abundance_log_mass_frac_max = 0.3
+
+
+! file output
+Abundance_file_flag = .false.
+Abundance_file_dir = 'abund_png'
+Abundance_file_prefix = 'abund_'
+Abundance_file_interval = 10 ! output when mod(model_number,file_interval)==0
+!Abundance_file_width = -1 ! (inches) negative means use same value as for window
+Abundance_file_width = 16 ! (inches) negative means use same value as for window
+Abundance_file_aspect_ratio = -1 ! negative means use same value as for window
+
+! TRho window
+! history of central temperature vs. density
+
+TRho_txt_scale = 0.7
+TRho_title = ''
+
+TRho_logT_min = 8.8d0
+TRho_logT_max = 10.2d0
+TRho_logRho_min = 5d0
+TRho_logRho_max = 10d0
+show_TRho_degeneracy_line = .true.
+
+
+/
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_to_cc b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_to_cc
new file mode 100644
index 0000000000..90012bda08
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/inlist_to_cc
@@ -0,0 +1,204 @@
+! the contents of this are set to match the needs of pre_ms_to_cc_12_20
+! so local inlist_common files show differences from what is used for that case.
+
+&star_job
+
+save_model_when_terminate = .true.
+save_model_filename = 'CC.mod'
+
+!! You can change the nuclear reaction network from here this will
+!! only act after this inlist is read, that is at "C depletion"
+!! defined as center_c12 < 0.01, see extras_start_step in
+!! src/run_star_extras.f90. Example ccsn network for properly
+!! capturing the energy generation rate and deleptonization during all
+!! stages requires users to lower op_split_burn_min_T threshold for
+!! decoupling.
+!change_net_net = .true.
+!new_net_name = 'mesa_206.net'
+!dump_missing_metals_into_heaviest = .false.
+
+! If not already on, turn on hydrodynamics by uncommenting these
+! change_v_flag = .true.
+! new_v_flag = .true.
+
+
+/ ! end of star_job namelist
+
+&eos
+mass_fraction_limit_for_Skye = 1d-16
+
+/
+
+&controls
+
+! stopping condition reimplemented in src/run_star_extras.f90 extras_finish_step
+! Be careful trying to enforce a 1000 km/s infall condition for larger
+! nuclear reaction networks. You might need to relax to 600-800 km/s to
+! avoid difficult numerics.
+x_ctrl(1) = 1000d0 ! km/s infall.
+fe_core_infall_limit = 1d99
+non_fe_core_infall_limit = 1d99
+
+! Suggested by Jim Fuller, can be useful for convergence see also (Farag et al. 2022).
+set_min_D_mix = .true.
+min_D_mix = 1d-2
+
+! Can be helpful to decrease op_split_burn_min_T
+! 4d9 has been well tested with the approx21 network
+! lower to 2.5d9 or worst case 1d9 for large networks to help with
+! numerical stability and speed, see MESA VI (Jermyn 2023)
+op_split_burn = .false.
+! op_split_burn_min_T = 4d9
+! burn_steps_limit = 150
+! burn_steps_hard_limit = 250
+
+! tightening either of the two controls below will substantially increase the runtime,
+! but should improve the network accuracy.
+op_split_burn_eps = 1d-5 ! prefer 1d-6 or 1d-7 for production
+op_split_burn_odescal = 1d-5 ! prefer 1d-7 or 1d-8 for production
+
+! artificial viscosity , might not be necessary but just in case.
+use_Pvsc_art_visc = .true.
+Pvsc_cq = 4.0d0
+Pvsc_zsh = 0.1d0
+
+! drag to prevent the development of radial pulses.
+use_drag_energy = .false. ! means don't include energy from drag in energy equation
+drag_coefficient = 1.0d0
+min_q_for_drag = 0.8d0
+
+! wind
+! no winds in this. see inlist_both
+
+! atmosphere
+! if you run into issues, you can increase Pextra
+! extra pressure helps stabilize the atmosphere during core He burning +
+! We switch the pressure boundary condition to a hydrodynamic one after
+! core-Si burning in the run_star_extras.
+Pextra_factor = 2 ! easy to lower with mass loss ! ideally 1.5 is most physical
+atm_option = 'T_tau'
+atm_T_tau_relation = 'Eddington'
+atm_T_tau_opacity = 'fixed' ! next best is 'iterated'
+
+! can be important for preventing huge energy deposition in small
+! cell at the surface from an incoming wave.
+max_surface_cell_dq = 1d0 !1d-12 is MESA default for hydrostatic models.
+
+! turn off thermohaline mixing
+thermohaline_coeff = 0
+mlt_make_surface_no_mixing = .true.
+
+! allow for stronger superadiabaticity_reduction
+superad_reduction_diff_grads_limit = 5d-2 ! default is 1d-3
+
+! timesteps
+min_timestep_limit = 1d-20 !(seconds)
+time_delta_coeff = 1.0
+varcontrol_target = 1d-3
+
+min_timestep_factor = 0.8d0
+max_timestep_factor = 1.05d0
+timestep_factor_for_retries = 0.75
+
+limit_for_rel_error_in_energy_conservation = 1d2!1d-7
+hard_limit_for_rel_error_in_energy_conservation = 1d2!1d-6
+
+min_xa_hard_limit = -1d-5
+min_xa_hard_limit_for_highT = -3d-5
+
+delta_lgTeff_limit = 1d-1!0.01
+delta_lgL_limit = 0.1
+delta_lgL_He_limit = 0.1
+delta_lgR_limit = 1d-2
+
+! tighten to 1d-3 in a production run. See inlist_both.
+!delta_lgT_cntr_limit = 0.002
+!delta_lgT_max_limit = 0.002
+
+dX_div_X_limit(2) = -1 ! for he4
+
+delta_XSi_cntr_hard_limit = -1!0.02
+delta_XSi_cntr_limit = 0.0025
+delta_lg_XH_cntr_min = 0.5d0
+delta_lg_XO_cntr_min = 0.5d0
+delta_lg_XC_cntr_min = 0.5d0
+delta_lg_XHe_cntr_min = 0.5d0
+
+! for evolving to cc, turn off hard limits.
+never_skip_hard_limits = .true. ! this can bomb a run.
+delta_lgTeff_hard_limit = -1
+delta_lgL_hard_limit = -1
+delta_lg_XH_cntr_hard_limit = -1
+delta_lg_XHe_cntr_hard_limit = -1
+delta_lg_XC_cntr_hard_limit = -1
+delta_lg_XO_cntr_hard_limit = -1
+delta_lgL_He_hard_limit = -1
+delta_lgL_H_hard_limit = -1
+delta_lgL_nuc_limit = -1 ! see controls.defaults before changing this
+! if splitting error is an issue, you can relax the below three items to -1.
+delta_lgT_cntr_hard_limit = 0.1
+delta_lgT_max_hard_limit = 0.1
+delta_lgRho_hard_limit = 0.1
+
+! mesh, other defaults are in inlist_both.
+R_function_weight = 40
+R_function3_weight = 40
+M_function_weight = 40
+log_tau_function_weight = 40
+
+! Fixing the position of the Lagrangian region of the mesh helps
+! convergence near the Eddington limit -- you can try turning these off
+max_logT_for_k_below_const_q = 100
+max_q_for_k_below_const_q = 0.99
+min_q_for_k_below_const_q = 0.99
+max_logT_for_k_const_mass = 100
+max_q_for_k_const_mass = 0.98
+min_q_for_k_const_mass = 0.98
+
+! solver and Equations
+! damped newton and structure only
+! scale_max_correction = 0.1d0
+ignore_species_in_max_correction = .false.
+fix_d_eos_dxa_partials = .false.
+
+xa_scale = 1d-5
+
+use_gold_tolerances = .true.
+tol_correction_high_T_limit = 1d9 ! Switch to lower tol at high temp for large Mass
+solver_iters_timestep_limit = 20
+gold_solver_iters_timestep_limit = 20
+
+use_gold2_tolerances = .false.
+gold_iter_for_resid_tol3 = 10
+gold_tol_residual_norm3 = 1d-5
+gold_tol_max_residual3 = 1d-3
+
+
+
+!defaults
+when_to_stop_rtol = 1d-3
+when_to_stop_atol = 1d-3
+
+! defaults
+sig_min_factor_for_high_Tcenter = 0.01
+Tcenter_min_for_sig_min_factor_full_on = 3.2d9
+Tcenter_max_for_sig_min_factor_full_off = 2.8d9
+
+num_trace_history_values = 4
+trace_history_value_name(1) = 'Fe_core'
+trace_history_value_name(2) = 'rel_E_err'
+trace_history_value_name(3) = 'log_rel_run_E_err'
+trace_history_value_name(4) = 'dt_div_max_tau_conv'
+
+! output
+terminal_show_log_dt = .false.
+
+! debugging
+!report_solver_progress = .false. ! set true to see info about solver iterations
+!report_ierr = .true. ! if true, produce terminal output when have some internal error
+
+/
+
+&pgstar
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/mk b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/mk
new file mode 100755
index 0000000000..d9eae582fa
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/mk
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/photos/1_x800 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/photos/1_x800
new file mode 100644
index 0000000000..6c099ba233
Binary files /dev/null and b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/photos/1_x800 differ
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/photos/b_x800 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/photos/b_x800
new file mode 100644
index 0000000000..0650864c72
Binary files /dev/null and b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/photos/b_x800 differ
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/profile_columns.list b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/profile_columns.list
new file mode 100644
index 0000000000..7f6c0749ca
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/profile_columns.list
@@ -0,0 +1,962 @@
+! profile_columns.list -- determines the contents of star model profiles
+! you can use a non-standard version by setting profile_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as profile_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! if you need to have something added to the list of options, let me know....
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described at the end of this file.
+
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+
+! the following lines of the profile contain info for 1 zone per row, surface to center.
+
+! minimal set of enabled columns:
+
+ zone ! numbers start with 1 at the surface
+ mass ! m/Msun. mass coordinate of outer boundary of cell.
+ logR ! log10(radius/Rsun) at outer boundary of zone
+ logT ! log10(temperature) at center of zone
+ logRho ! log10(density) at center of zone
+ logP ! log10(pressure) at center of zone
+ x_mass_fraction_H
+ y_mass_fraction_He
+ z_mass_fraction_metals
+
+
+! everything below this line is deactivated
+
+
+!# Structure
+ !logM ! log10(m/Msun)
+ !log_mass
+ dm ! cell mass (grams)
+ !dm_bar ! boundary mass (grams) average of adjacent dm's
+ logdq ! log10(dq)
+ !log_dq
+ dq_ratio ! dq(k-1)/dq(k)
+ q ! fraction of star mass interior to outer boundary of this zone
+ !log_q ! log10(q)
+ !xq
+
+ !grav ! gravitational acceleration (cm sec^2)
+ !log_g ! log10 gravitational acceleration (cm sec^2)
+ !g_div_r ! grav/radius (sec^2)
+ !r_div_g ! radius/grav (sec^-2)
+ !cgrav_factor ! = cgrav(k)/standard_cgrav
+ vel_km_per_s ! velocity at outer boundary of zone (km/s) -- 0 if no velocity variable
+
+ radius ! radius at outer boundary of zone (in Rsun units)
+ radius_cm ! radius at outer boundary of zone (in centimeters)
+ !radius_km ! radius at outer boundary of zone (in kilometers)
+ logR_cm ! log10 radius at outer boundary of zone (in centimeters)
+ rmid ! radius at center by mass of zone (in Rsun units)
+ !r_div_R ! fraction of total radius
+
+ velocity ! velocity at outer boundary of zone (cm/s) -- 0 if no velocity variable
+ v_div_r ! velocity divided by radius
+ !v_times_t_div_r
+ !rho_times_r3 ! at face
+ !log_rho_times_r3 ! at face
+ !scale_height ! in Rsun units
+ pressure_scale_height ! in Rsun units
+
+ !m_div_r ! gm/cm
+ !dmbar_m_div_r
+ !log_dmbar_m_div_r
+ !mass_grams ! mass coordinate of outer boundary of cell in grams
+ mmid ! mass at midpoint of cell (average of mass coords of the cell boundaries) Msun units.
+
+ !m_grav ! total enclosed gravitational mass. Msun units.
+ !m_grav_div_m_baryonic ! mass_gravitational/mass at cell boundary
+ !mass_correction_factor ! dm_gravitational/dm (dm is baryonic mass of cell)
+
+ !xm ! mass exterior to point (Msun units)
+ !dq ! mass of zone as a fraction of total star mass
+ logxq ! log10(1-q)
+ !logxm ! log10(xm)
+
+ !xr ! radial distance from point to surface (Rsun)
+ !xr_cm ! radial distance from point to surface (cm)
+ !xr_div_R ! radial distance from point to surface in units of star radius
+ !log_xr ! log10 radial distance from point to surface (Rsun)
+ !log_xr_cm ! log10 radial distance from point to surface (cm)
+ !log_xr_div_R ! log10 radial distance from point to surface in units of star radius
+
+ dr ! r(outer edge) - r(inner edge); radial extent of cell in cm.
+ log_dr ! log10 cell width (cm)
+ !dv ! v(inner edge) - v(outer edge); rate at which delta_r is shrinking (cm/sec).
+
+ !dt_dv_div_dr ! dt*dv/dr; need to have this << 1 for every cell
+ !dr_div_R ! cell width divided by star R
+ !log_dr_div_R ! log10 cell width divided by star R
+ !dr_div_rmid ! cell width divided by rmid
+ !log_dr_div_rmid ! log(dr_div_rmid)
+
+ dr_div_cs ! cell sound crossing time (sec)
+ log_dr_div_cs ! log10 cell sound crossing time (sec)
+ !dr_div_cs_yr ! cell sound crossing time (years)
+ !log_dr_div_cs_yr ! log10 cell sound crossing time (years)
+
+ !acoustic_radius ! sound time from center to outer cell boundary (sec)
+ !log_acoustic_radius ! log10(acoustic_radius) (sec)
+ acoustic_depth ! sound time from surface to outer cell boundary (sec)
+ !log_acoustic_depth ! log10(acoustic_depth) (sec)
+ !acoustic_r_div_R_phot
+
+ !cell_collapse_time ! only set if doing explicit hydro
+ ! time (seconds) for cell inner edge to catch cell outer edge at current velocities
+ ! 0 if distance between inner and outer is increasing
+ log_cell_collapse_time ! log of cell_collapse_time
+
+ !compression_gradient
+
+
+
+!# Thermodynamics
+ temperature ! temperature at center of zone
+ !logT_face ! log10(temperature) at outer boundary of zone
+ !logT_bb ! log10(black body temperature) at outer boundary of zone
+ !logT_face_div_logT_bb
+
+ energy ! internal energy (ergs/g)
+ logE ! log10(specific internal energy) at center of zone
+ rho ! density
+ !density ! rho
+
+ entropy ! specific entropy divided by (avo*kerg)
+ !logS ! log10(specific entropy)
+ !logS_per_baryon ! log10(specific entropy per baryon / kerg)
+
+ pressure ! total pressure at center of zone (pgas + prad)
+ !prad ! radiation pressure at center of zone
+ !pgas ! gas pressure at center of zone (electrons and ions)
+ logPgas ! log10(pgas)
+ pgas_div_ptotal ! pgas/pressure
+
+ eta ! electron degeneracy parameter (eta >> 1 for significant degeneracy)
+ mu ! mean molecular weight per gas particle (ions + free electrons)
+
+ grada ! dlnT_dlnP at constant S
+ !dE_dRho ! at constant T
+ !cv ! specific heat at constant volume
+ !cp ! specific heat at constant total pressure
+
+ !log_CpT
+ gamma1 ! dlnP_dlnRho at constant S
+ !gamma3 ! gamma3 - 1 = dlnT_dlnRho at constant S
+ !gam ! plasma interaction parameter (> 160 or so means starting crystallization)
+ free_e ! free_e is mean number of free electrons per nucleon
+ !logfree_e ! log10(free_e), free_e is mean number of free electrons per nucleon
+ !chiRho ! dlnP_dlnRho at constant T
+ !chiT ! dlnP_dlnT at constant Rho
+
+ csound ! sound speed
+ log_csound
+ !csound_face ! sound speed (was previously called csound_at_face)
+ !cs_at_cell_bdy ! sound speed at cell boundary (csound is at cell center)
+ !v_div_cs ! velocity divided by sound speed
+ v_div_csound ! velocity divided by sound speed
+ !div_v
+
+ !thermal_time_to_surface ! in seconds
+ !log_thermal_time_to_surface
+ !t_rad
+ !log_t_rad
+ !log_t_sound
+ !log_t_thermal
+
+ !eos_phase
+ !eos_frac_OPAL_SCVH
+ !eos_frac_HELM
+ !eos_frac_Skye
+ !eos_frac_PC
+ !eos_frac_FreeEOS
+ !eos_frac_CMS
+ !eos_frac_ideal
+
+ !pgas_div_p
+ !prad_div_pgas
+ !prad_div_pgas_div_L_div_Ledd
+ !pressure_scale_height_cm
+
+ !eps_grav_composition_term
+ !eps_grav_plus_eps_mdot
+
+ !chiRho_for_partials
+ !chiT_for_partials
+ !rel_diff_chiRho_for_partials
+ !rel_diff_chiT_for_partials
+
+ !latent_ddlnRho
+ !latent_ddlnT
+
+ !log_P_face
+ !log_Ptrb
+ !log_cp_T_div_t_sound
+
+ !QQ
+
+
+!# Mass accretion
+ eps_grav ! -T*ds/dt (negative for expansion)
+ !log_abs_eps_grav_dm_div_L
+ !log_abs_v ! log10(abs(velocity)) (cm/s)
+ !log_mdot_cs
+ !log_mdot_v
+ !eps_mdot
+ !env_eps_grav
+ !xm_div_delta_m
+ !log_xm_div_delta_m
+
+
+!# Nuclear energy generation
+ !signed_log_eps_grav ! sign(eps_grav)*log10(max(1,abs(eps_grav)))
+ !signed_log_eps_nuc
+ !net_nuclear_energy ! erg/gm/s from nuclear reactions minus all neutrino losses
+ ! The value plotted is net_nuclear_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy minus all neutrino losses.
+ !net_energy ! net_energy + eps_grav.
+ ! The value plotted is net_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy plus eps_grav minus all neutrino losses.
+ !eps_nuc_plus_nuc_neu
+ !eps_nuc_minus_non_nuc_neu
+ !eps_nuc_start
+
+ eps_nuc ! ergs/g/sec from nuclear reactions (including losses to reaction neutrinos)
+ !log_abs_eps_nuc
+ !d_lnepsnuc_dlnd
+ !d_epsnuc_dlnd
+ !deps_dlnd_face
+ ! (was previously called deps_dlnd_at_face)
+ !d_lnepsnuc_dlnT
+ !d_epsnuc_dlnT
+ !deps_dlnT_face
+ ! (was previously called deps_dlnT_at_face)
+ !eps_nuc_neu_total ! erg/gm/sec as neutrinos from nuclear reactions
+
+ non_nuc_neu ! non-nuclear-reaction neutrino losses
+ !nonnucneu_plas ! plasmon neutrinos (for collective reactions like gamma_plasmon => nu_e + nubar_e)
+ !nonnucneu_brem ! bremsstrahlung (for reactions like e- + (z,a) => e- + (z,a) + nu + nubar)
+ !nonnucneu_phot ! photon neutrinos (for reactions like e- + gamma => e- + nu_e + nubar_e)
+ !nonnucneu_pair ! pair production (for reactions like e+ + e- => nu_e + nubar_e)
+ !nonnucneu_reco ! recombination neutrinos (for reactions like e- (continuum) => e- (bound) + nu_e + nubar_e)
+
+ ! ergs/g/sec for reaction categories
+ add_reaction_categories ! this adds all the reaction categories
+ ! NOTE: you can list specific categories by giving their names (from chem_def)
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for thier rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+ burn_num_iters ! Number of split_burn iterations taken
+ !burn_avg_epsnuc
+ !log_burn_avg_epsnuc
+
+!# Composition
+ !x_mass_fraction_H
+ !y_mass_fraction_He
+ !z_mass_fraction_metals
+ abar ! average atomic weight (g/mole)
+ zbar ! average charge
+ z2bar ! average charge^2
+ ye ! average charge per baryon = proton fraction
+
+ x ! hydrogen mass fraction
+ !log_x
+ y ! helium mass fraction
+ !log_y
+ z ! metallicity
+ log_z ! metallicity
+
+ add_abundances ! this adds all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !h1
+ !he3
+ !he4
+ !c12
+ !n14
+ !o16
+
+ add_log_abundances ! this adds log10 of all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !log h1
+ !log he3
+ !log he4
+ !log c12
+ !log n14
+ !log o16
+
+ ! log concentration of species
+ ! concentration = number density / number density of electrons
+ ! Ci = (Xi/Ai) / sum(Zi*Xi/Ai) [see Thoul et al, ApJ 421:828-842, 1994]
+ !log_concentration h1
+ !log_concentration he4
+
+
+ ! typical charge for given species
+ ! (used by diffusion)
+ !typical_charge he4
+ !typical_charge c12
+ !typical_charge fe52
+
+ ! ionization state for given species
+ ! (same as typical charge, except that it's unsmoothed)
+ !ionization he4
+ !ionization c12
+ !ionization fe52
+
+ !cno_div_z ! abundance of c12, n14, and o16 as a fraction of total z
+
+
+
+
+!# Opacity
+ opacity ! opacity measured at center of zone
+ log_opacity ! log10(opacity)
+ !dkap_dlnrho_face ! partial derivative of opacity wrt. ln rho (at T=const) at outer edge of cell
+ ! (was previously called dkap_dlnrho_at_face)
+ !dkap_dlnT_face ! partial derivative of opacity wrt. ln T (at rho=const) at outer edge of cell
+ ! (was previously called dkap_dlnT_at_face)
+ !kap_frac_lowT ! fraction of opacity from lowT tables
+ !kap_frac_highT ! fraction of opacity from highT tables
+ !kap_frac_Type2 ! fraction of opacity from Type2 tables
+ !kap_frac_Compton ! fraction of opacity from Compton_Opacity
+ !kap_frac_op_mono ! fraction of opacity from OP mono
+
+ !log_kap
+ log_kap_times_factor
+
+ !log_c_div_tau
+ !xtau
+ !xlogtau
+ !logtau_sub_xlogtau
+
+!# Luminosity
+ luminosity ! luminosity at outer boundary of zone (in Lsun units)
+ logL ! log10(max(1d-2,L/Lsun))
+ !log_Lrad
+ !log_Ledd ! log10(Leddington/Lsun) -- local Ledd, 4 pi clight G m / kap
+ log_L_div_Ledd ! log10(max(1d-12,L/Leddington))
+ !log_Lrad_div_Ledd
+ !log_Lrad_div_L
+ !signed_log_power ! sign(L)*log10(max(1,abs(L)))
+
+ lum_adv
+ lum_conv
+ !lum_conv_MLT
+ !lum_div_Ledd
+ lum_erg_s
+ lum_plus_lum_adv
+ lum_rad
+
+ !log_L_div_CpTMdot
+ log_abs_lum_erg_s
+
+ !L
+ !Lc
+ !Lc_div_L
+ !Lr
+ !Lr_div_L
+ !Lt
+ !Lt_div_L
+
+!# Energetics
+ total_energy ! specific total energy of cell (ergs/g). internal+potential+kinetic+rotation.
+ !cell_specific_IE
+ !cell_specific_KE
+ !cell_IE_div_IE_plus_KE
+ !cell_KE_div_IE_plus_KE
+
+ !cell_ie_div_star_ie
+ !cell_internal_energy_fraction
+ !cell_internal_energy_fraction_start
+ !cell_specific_PE
+
+ !log_cell_ie_div_star_ie
+ !log_cell_specific_IE
+
+ !ergs_eps_grav_plus_eps_mdot
+ !ergs_error
+ !ergs_error_integral
+ !ergs_mdot
+ !ergs_rel_error_integral
+ !dm_eps_grav
+
+ !dE
+
+ !etrb
+ !log_etrb
+ !extra_grav
+ !log_rel_E_err
+
+ !total_energy_sign
+
+!# Convection
+ mlt_mixing_length ! mixing length for mlt (cm)
+ !mlt_mixing_type ! value returned by mlt
+ !mlt_Pturb
+ !alpha_mlt
+
+ conv_vel ! convection velocity (cm/sec)
+ log_conv_vel ! log10 convection velocity (cm/sec)
+
+ conv_L_div_L
+ log_conv_L_div_L
+ !lum_conv_div_lum_rad
+ !lum_rad_div_L_Edd
+ !lum_conv_div_lum_Edd
+ !lum_conv_div_L
+ !lum_rad_div_L
+ !lum_rad_div_L_Edd_sub_fourPrad_div_PchiT ! density increases outward if this is > 0
+ ! see Joss, Salpeter, and Ostriker, "Critical Luminosity", ApJ 181:429-438, 1973.
+
+ gradT ! mlt value for required temperature gradient dlnT/dlnP
+
+ gradr ! dlnT/dlnP required for purely radiative transport
+ !grad_temperature ! smoothed dlnT/dlnP at cell boundary
+ !grad_density ! smoothed dlnRho/dlnP at cell boundary
+
+ !gradL ! gradient for Ledoux criterion for convection
+ !sch_stable ! 1 if grada > gradr, 0 otherwise
+ !ledoux_stable ! 1 if gradL > gradr, 0 otherwise
+
+ !grada_sub_gradT
+ gradT_sub_grada ! gradT-grada at cell boundary
+ !gradT_div_grada ! gradT/grada at cell boundary
+
+ !gradr_sub_gradT
+ !gradT_sub_gradr ! gradT-gradr at cell boundary
+ !gradT_div_gradr ! gradT/gradr at cell boundary
+
+ !log_gradT_div_gradr ! log10 gradT/gradr at cell boundary
+ !log_mlt_Gamma ! convective efficiency
+ conv_vel_div_csound ! convection velocity divided by sound speed
+ !conv_vel_div_L_vel ! L_vel is velocity needed to carry L by convection; L = 4*pi*r^2*rho*vel**3
+ log_mlt_D_mix ! log10 diffusion coefficient for mixing from mlt (cm^2/sec)
+
+ !gradr_div_grada ! gradr/grada_face; > 1 => Schwarzschild unstable for convection
+ !gradr_sub_grada ! gradr - grada_face; > 0 => Schwarzschild unstable for convection
+
+ !gradL_sub_gradr
+ !gradP_div_rho
+ !gradT_excess_effect
+ !gradT_rel_err
+ !gradT_sub_a
+ !grada_face
+ !grada_sub_gradr
+ !diff_grads
+ !log_diff_grads
+
+ !mlt_D
+ !mlt_Gamma
+ !mlt_Y_face
+ !mlt_Zeta
+ !mlt_gradT
+ !mlt_log_abs_Y
+ !mlt_vc
+ !log_mlt_vc
+ !dvc_dt_TDC_div_g
+
+ !superad_reduction_factor
+ !conv_vel_div_mlt_vc
+
+ !log_Lconv
+ !log_Lconv_div_L
+
+!# Mixing
+ !mixing_type ! mixing types are defined in mesa/const/public/const_def
+ log_D_mix ! log10 diffusion coefficient for mixing in units of cm^2/second (Eulerian)
+ !log_D_mix_non_rotation
+ !log_D_mix_rotation
+
+ log_D_conv ! D_mix for regions where mix_type = convective_mixing
+ !log_D_leftover ! D_mix for regions where mix_type = leftover_convective_mixing
+ log_D_semi ! D_mix for regions where mix_type = semiconvective_mixing
+ log_D_ovr ! D_mix for regions where mix_type = overshoot_mixing
+ log_D_thrm ! D_mix for regions where mix_type = thermohaline_mixing
+ log_D_minimum ! D_mix for regions where mix_type = minimum_mixing
+ log_D_rayleigh_taylor ! D_mix for regions where mix_type = rayleigh_taylor_mixing
+ !log_D_anon ! D_mix for regions where mix_type = anonymous_mixing
+ log_D_omega
+
+ log_sig_mix ! sig(k) is mixing flow across face k in (gm sec^1)
+ ! sig(k) = D_mix*(4*pi*r(k)**2*rho_face)**2/dmavg
+
+ !dominant_isoA_for_thermohaline
+ !dominant_isoZ_for_thermohaline
+ !gradL_composition_term
+
+ mix_type
+
+
+
+!# Optical Depth
+ tau ! optical depth
+ !log_column_depth ! log10 column depth, exterior mass / area (g cm^-2)
+ !log_radial_depth ! log10 radial distance to surface (cm)
+ logtau ! log10(optical depth) at cell face
+ !tau_eff ! tau that gives the local P == P_atm if this location at surface
+ ! tau_eff = kap*(P/g - Pextra_factor*(L/M)/(6*pi*clight*cgrav))
+ !tau_eff_div_tau
+
+
+
+!# Rotation
+ omega ! angular velocity = j_rot/i_rot
+ log_omega
+ log_j_rot
+ log_J_div_M53 ! J is j*1e-15 integrated from center; M53 is m^(5/3)
+ log_J_inside ! J_inside is j_rot integrated from center
+ !shear ! -dlnomega/dlnR
+ log_abs_shear ! log10(abs(dlnomega/dlnR))
+ !richardson_number
+ i_rot ! specific moment of inertia at cell boundary
+ j_rot ! specific angular momentum at cell boundary
+ v_rot ! rotation velocity at cell boundary (km/sec)
+ !w_div_w_crit_roche !ratio of rotational velocity to keplerian at the equator
+ !without the contribution from the Eddington factor
+ fp_rot ! rotation factor for pressure
+ ft_rot ! rotation factor for temperature
+ !ft_rot_div_fp_rot ! gradr factor
+
+ !log_am_nu_non_rot ! log10(am_nu_non_rot)
+ !log_am_nu_rot ! log10(am_nu_rot)
+ log_am_nu ! log10(am_nu_non_rot + am_nu_rot)
+
+ r_polar ! (Rsun)
+ log_r_polar ! log10 (Rsun)
+ r_equatorial ! (Rsun)
+ log_r_equatorial ! log10 (Rsun)
+ r_e_div_r_p ! equatorial/r_polar
+ omega_crit ! breakup angular velocity = sqrt(G M / equatorial^3)
+ omega_div_omega_crit
+
+ !am_log_nu_omega ! for diffusion of omega
+ !am_log_nu_j ! for diffusion of angular momentum
+
+ !am_log_nu_rot ! diffusion of angular momentum driven by rotation
+ !am_log_nu_non_rot ! diffusion driven by other sources, e.g. convection
+
+ !am_log_sig_omega ! for diffusion of omega
+ !am_log_sig_j ! for diffusion of angular momentum
+ am_log_sig ! == am_log_sig_omega
+
+ !am_log_D_visc ! diffusion coeff for kinematic viscosity
+ am_log_D_DSI ! diffusion coeff for dynamical shear instability
+ am_log_D_SH ! diffusion coeff for Solberg-Hoiland instability
+ am_log_D_SSI ! diffusion coeff for secular shear instability
+ am_log_D_ES ! diffusion coeff for Eddington-Sweet circulation
+ am_log_D_GSF ! diffusion coeff for Goldreich-Schubert-Fricke instability
+ am_log_D_ST ! Spruit dynamo mixing diffusivity
+ am_log_nu_ST ! Spruit dynamo effective viscosity
+
+ dynamo_log_B_r ! (Gauss)
+ dynamo_log_B_phi ! (Gauss)
+
+ !am_domega_dlnR
+ !log_abs_dlnR_domega
+
+ !w_div_w_crit_roche2
+
+
+!# Diffusion
+ ! electric field from element diffusion calculation
+ !e_field
+ !log_e_field
+
+ ! gravitational field from element diffusion calculation
+ !g_field_element_diffusion
+ !log_g_field_element_diffusion
+
+ !eE_div_mg_element_diffusion
+ !log_eE_div_mg_element_diffusion
+
+ ! element diffusion velocity for species
+ !edv h1
+ !edv he4
+ !edv o16
+
+ ! Energy generated by Ne22 sedimentation.
+ !eps_WD_sedimentation
+ !log_eps_WD_sedimentation
+
+ !eps_diffusion
+ !log_eps_diffusion
+
+ !diffusion_D h1 ! self diffusion coeff
+ !diffusion_dX h1 ! change in h1 mass fraction from diffusion
+ !diffusion_dX he4 ! change in he4 mass fraction from diffusion
+ !diffusion_dX n20 ! change in n20 mass fraction from diffusion
+
+ !v_rad h1 ! velocity from radiative levitation
+ !v_rad he4 ! velocity from radiative levitation
+ !v_rad ne20 ! velocity from radiative levitation
+
+ !log_g_rad h1 ! log10 acceleration from radiative levitation
+ !log_g_rad he4 ! log10 acceleration from radiative levitation
+ !log_g_rad ne20 ! log10 acceleration from radiative levitation
+
+!# Phase Separation
+ !eps_phase_separation
+
+!# Oscillations
+ !brunt_N2 ! brunt-vaisala frequency squared
+ !brunt_N2_structure_term
+ !brunt_N2_composition_term
+ !log_brunt_N2_structure_term
+ !log_brunt_N2_composition_term
+ !brunt_A ! = N^2*r/g
+ !brunt_A_div_x2 ! x = r(k)/r(1)
+ !brunt_N2_dimensionless ! N2 in units of 3GM/R^3
+ !brunt_N_dimensionless ! N in units of sqrt(3GM/R^3)
+ !brunt_frequency ! cycles per day
+ !brunt_N ! sqrt(abs(brunt_N2))
+ !log_brunt_N ! log10(brunt_N)
+ !log_brunt_N2 ! log10(brunt_N2)
+ !log_brunt_N2_dimensionless ! log10(brunt_N2_dimensionless)
+
+ !brunt_B ! smoothed numerical difference
+ !brunt_nonB ! = grada - gradT
+ !log_brunt_B ! smoothed numerical difference
+ !log_brunt_nonB ! = grada - gradT
+
+ !sign_brunt_N2 ! sign of brunt_N2 (+1 for Ledoux stable; -1 for Ledoux unstable)
+ !brunt_nu ! brunt_frequency in microHz
+ !log_brunt_nu ! brunt_frequency in microHz
+
+ !lamb_S ! lamb frequency for l=1: S = sqrt(2)*csound/r (rad/s)
+ !lamb_S2 ! squared lamb frequency for l=1: S2 = 2*(csound/r)^2 (rad^2/s^2)
+
+ !lamb_Sl1 ! lamb frequency for l=1; = sqrt(2)*csound/r (microHz)
+ !lamb_Sl2 ! lamb frequency for l=2; = sqrt(6)*csound/r (microHz)
+ !lamb_Sl3 ! lamb frequency for l=3; = sqrt(12)*csound/r (microHz)
+ !lamb_Sl10 ! lamb frequency for l=10; = sqrt(110)*csound/r (microHz)
+
+ !log_lamb_Sl1 ! log10(lamb_Sl1)
+ !log_lamb_Sl2 ! log10(lamb_Sl2)
+ !log_lamb_Sl3 ! log10(lamb_Sl3)
+ !log_lamb_Sl10 ! log10(lamb_Sl10)
+
+ !brunt_N_div_r_integral ! integral from center of N*dr/r
+ !k_r_integral ! integral from center of k_r*dr
+ !brunt_N2_sub_omega2
+ !sl2_sub_omega2
+
+
+!# RSP
+
+ !rsp_Chi ! dlnP_dlnRho
+ !rsp_Et ! Specific turbulent energy
+ !rsp_logEt ! Log specific turbulent energy
+ !rsp_erad ! Specific internal (radiative) energy
+ !rsp_log_erad ! Log specific internal (radiative) energy
+ !rsp_Hp_face ! Pressure scale height at cell face
+ !rsp_Lc ! Convective luminosity
+ !rsp_Lc_div_L ! Convective luminosity div total luminosity
+ !rsp_Lr ! Radiative luminosity
+ !rsp_Lr_div_L ! Radiative luminosity div total luminosity
+ !rsp_Lt ! Turbulent luminosity
+ !rsp_Lt_div_L ! Turbulent luminosity div total luminosity
+ !rsp_Pt ! Turbulent pressure, p_t, see Table 1 in MESA5
+ !rsp_Uq ! Viscous momentum transfer rate, U_q, see Table 1 in MESA5
+ !rsp_Eq ! Viscous energy transfer rate, epsilon_q, see Table 1 in MESA5
+ !rsp_Pvsc ! Artificial viscosity, p_av, see Table 1 in MESA5
+ !rsp_gradT ! Temperature gradient
+ !rsp_Y_face ! Superadiabatic gradient at cell face, Y_sag, see Table 1 in MESA5
+ !rsp_damp ! Turbulent dissipation, D, see Table 1 in MESA5
+ !rsp_dampR ! Radiative cooling, D_r, see Table 1 in MESA5
+ !rsp_sink ! Sum of turbulent dissipation and radiative cooling terms
+ !rsp_src ! Source function, S, see Table 1 in MESA5
+ !rsp_src_snk ! Convective coupling, C, see Table 1 in MESA5
+ !rsp_heat_exchange_timescale ! 1d0/(clight * opacity * density)
+ !rsp_log_heat_exchange_timescale
+ !rsp_log_dt_div_heat_exchange_timescale ! Ratio of time step to heat exchange timescale
+ !w
+ !log_w
+
+ !COUPL
+ !DAMP
+ !DAMPR
+ !SOURCE
+ !Chi
+ !Eq
+ !Hp_face
+ !PII_face
+ !Ptrb
+ !Pvsc
+ !Uq
+ !Y_face
+
+!# RTI
+
+ RTI_du_diffusion_kick
+ alpha_RTI
+ boost_for_eta_RTI
+ dedt_RTI
+ dudt_RTI
+ eta_RTI
+ log_alpha_RTI
+ !log_boost_for_eta_RTI
+ log_eta_RTI
+ !log_etamid_RTI
+ log_lambda_RTI_div_Hrho
+ log_sig_RTI
+ !log_sigmid_RTI
+ !log_source_RTI
+ log_source_minus_alpha_RTI
+ log_source_plus_alpha_RTI
+ !source_minus_alpha_RTI
+ !source_plus_alpha_RTI
+ lambda_RTI
+
+!# Hydrodynamics
+
+
+ !v
+ v_div_v_escape
+ !v_div_vesc
+ !v_kms
+ !log_v_escape
+
+ u
+ u_face
+
+ P_face
+
+
+!# Extras
+ extra_heat
+ !extra_L ! extra_heat integrated from center (Lsun)
+ !log_extra_L ! log10 integrated from center (Lsun)
+ !log_irradiation_heat
+
+ !extra_jdot ! set in other_torque routine
+ !extra_omegadot ! set in other_torque routine
+
+ extra_opacity_factor ! set in other_opacity_factor routine
+
+ ! diffusion factor profile for species, set in other_diffusion_factor routine
+ !extra_diffusion_factor h1
+ !extra_diffusion_factor he4
+ !extra_diffusion_factor o16
+
+
+
+!# Miscellaneous
+
+ !dlog_h1_dlogP ! (log(h1(k)) - log(h1(k-1)))/(log(P(k)) - log(P(k-1)))
+ !dlog_he3_dlogP
+ !dlog_he4_dlogP
+ !dlog_c12_dlogP
+ !dlog_c13_dlogP
+ !dlog_n14_dlogP
+ !dlog_o16_dlogP
+ !dlog_ne20_dlogP
+ !dlog_mg24_dlogP
+ !dlog_si28_dlogP
+
+ !dlog_pp_dlogP
+ !dlog_cno_dlogP
+ !dlog_3alf_dlogP
+
+ !dlog_burn_c_dlogP
+ !dlog_burn_n_dlogP
+ !dlog_burn_o_dlogP
+
+ !dlog_burn_ne_dlogP
+ !dlog_burn_na_dlogP
+ !dlog_burn_mg_dlogP
+
+ !dlog_cc_dlogP
+ !dlog_co_dlogP
+ !dlog_oo_dlogP
+
+ !dlog_burn_si_dlogP
+ !dlog_burn_s_dlogP
+ !dlog_burn_ar_dlogP
+ !dlog_burn_ca_dlogP
+ !dlog_burn_ti_dlogP
+ !dlog_burn_cr_dlogP
+ !dlog_burn_fe_dlogP
+
+ !dlog_pnhe4_dlogP
+ !dlog_photo_dlogP
+ !dlog_other_dlogP
+
+ !logR_kap ! logR = logRho - 3*logT + 18 ; used in kap tables
+ !logW ! logW = logPgas - 4*logT
+ !logQ ! logQ = logRho - 2*logT + 12
+ !logV ! logV = logRho - 0.7*logE + 20
+
+ !log_CpT_absMdot_div_L ! log10(s% Cp(k)*s% T(k)*abs(s% mstar_dot)/s% L(k))
+
+ !delta_r ! r - r_start, change during step
+ !delta_L ! L - L_start, change during step
+ !delta_cell_vol ! cell_vol - cell_vol_start, change during step
+ !delta_entropy ! entropy - entropy_start, change during step (does not include effects of diffusion)
+ !delta_T ! T - T_start, change during step
+ !delta_rho ! rho - rho_start, change during step
+ !delta_eps_nuc ! eps_nuc - eps_nuc_start, change during step
+ !delta_mu ! mu - mu_start, change during step
+
+ zFe ! mass fraction of "Fe" = Fe+Co+Ni
+ !log_zFe
+ dPdr_dRhodr_info
+ !log_sig_raw_mix
+
+ !d_u_div_rmid
+ !d_u_div_rmid_start
+ !d_v_div_r_dm
+ !d_v_div_r_dr
+
+ !dlnP_dlnR
+ !dlnRho_dlnR
+ !dlnRho_dr
+ !dlnX_dr
+ !dlnY_dr
+ dlogR
+ !dPdr_div_grav
+ dPdr_info
+ dRhodr_info
+ !dRstar_div_dr
+ !dr_ratio
+ !dm_eps_grav
+ !dr_ratio
+ !dt_cs_div_dr
+ !dt_div_tau_conv
+ !dt_times_conv_vel_div_mixing_length
+ !log_dt_cs_div_dr
+ !log_dt_div_tau_conv
+ !log_dt_times_conv_vel_div_mixing_length
+ log_du_kick_div_du
+ !du
+ !dvdt_dPdm
+ !dvdt_grav
+
+ !tau_conv
+ !tau_cool
+ !tau_epsnuc
+ !tau_qhse
+
+ !max_abs_xa_corr
+
+ !tdc_num_iters
+
+ !k
+
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described here.
+
+ ! initial mass and Z
+ ! initial_mass
+ ! initial_z
+ ! general properties of the current state
+ ! model_number
+ ! num_zones
+ ! star_age
+ ! time_step
+ ! properties at the photosphere
+ ! Teff
+ ! photosphere_L
+ ! photosphere_r
+ ! properties at the outermost zone of the model
+ ! log_surface_L
+ ! log_surface_radius
+ ! log_surface_temp
+ ! properties near the center of the model
+ ! log_center_temp
+ ! log_center_density
+ ! log_center_P
+ ! center_eta
+ ! abundances near the center
+ ! center_h1
+ ! center_he3
+ ! center_he4
+ ! center_c12
+ ! center_n14
+ ! center_o16
+ ! center_ne20
+ ! information about total mass
+ ! star_mass
+ ! star_mdot
+ ! star_mass_h1
+ ! star_mass_he3
+ ! star_mass_he4
+ ! star_mass_c12
+ ! star_mass_n14
+ ! star_mass_o16
+ ! star_mass_ne20
+ ! locations of abundance transitions
+ ! he_core_mass
+ ! c_core_mass
+ ! o_core_mass
+ ! si_core_mass
+ ! fe_core_mass
+ ! location of optical depths 10 and 100
+ ! tau10_mass
+ ! tau10_radius
+ ! tau100_mass
+ ! tau100_radius
+ ! time scales
+ ! dynamic_time
+ ! kh_timescale
+ ! nuc_timescale
+ ! various kinds of total power
+ ! power_nuc_burn
+ ! power_h_burn
+ ! power_he_burn
+ ! power_neu
+ ! a few control parameter values
+ ! h1_boundary_limit
+ ! he4_boundary_limit
+ ! c12_boundary_limit
+ ! burn_min1
+ ! burn_min2
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/rate_tables/S13_r_be7_wk_li7.h5 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/rate_tables/S13_r_be7_wk_li7.h5
new file mode 100644
index 0000000000..6f7af4e658
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/rate_tables/S13_r_be7_wk_li7.h5
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d7a4c9e995eda50a568be968a5b3fa953711e09f695b12c71370d07b1f40b5ef
+size 93208
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/re b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/re
new file mode 100755
index 0000000000..f659875222
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/re
@@ -0,0 +1,28 @@
+#!/usr/bin/env bash
+
+shopt -u expand_aliases
+
+photo_directory=photos
+
+function most_recent_photo {
+ bp=$(ls -tp "$photo_directory/"b_* | head -1)
+ echo ${bp#"$photo_directory/"b_}
+}
+
+if [ $# -eq 0 ]
+then
+ photo=$(most_recent_photo)
+else
+ photo=$1
+fi
+
+if [ -z "$photo" ] || ! [ -f "$photo_directory/b_$photo" ] || ! [ -f "$photo_directory/1_$photo" ]
+then
+ echo "Not all specified photos exist: $photo"
+ exit 1
+fi
+
+echo "restart from $photo"
+echo "$photo" > .restart
+
+make run
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/rn b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/rn
new file mode 100755
index 0000000000..fcfc31730b
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/rn
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+rm -f .restart
+
+make run
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/binary_run.f90 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/binary_run.f90
new file mode 100644
index 0000000000..5b373ef2e6
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/binary_run.f90
@@ -0,0 +1,11 @@
+ program binary_run
+ use binary_lib, only: run1_binary
+ use run_star_extras
+ use run_binary_extras
+
+ integer :: ierr
+
+ call run1_binary(.true., extras_controls, extras_binary_controls, &
+ ierr, 'inlist_binary')
+
+ end program
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/run_binary_extras.f90 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/run_binary_extras.f90
new file mode 100644
index 0000000000..50d163492f
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/run_binary_extras.f90
@@ -0,0 +1,401 @@
+! ***********************************************************************
+!
+! Copyright (C) 2012-2019 Bill Paxton & The MESA Team
+!
+! this file is part of mesa.
+!
+! mesa is free software; you can redistribute it and/or modify
+! it under the terms of the gnu general library public license as published
+! by the free software foundation; either version 2 of the license, or
+! (at your option) any later version.
+!
+! mesa is distributed in the hope that it will be useful,
+! but without any warranty; without even the implied warranty of
+! merchantability or fitness for a particular purpose. see the
+! gnu library general public license for more details.
+!
+! you should have received a copy of the gnu library general public license
+! along with this software; if not, write to the free software
+! foundation, inc., 59 temple place, suite 330, boston, ma 02111-1307 usa
+!
+! ***********************************************************************
+module run_binary_extras
+
+ use star_lib
+ use star_def
+ use const_def
+ use const_def
+ use chem_def
+ use num_lib
+ use binary_def
+ use math_lib
+
+ implicit none
+
+contains
+
+ subroutine extras_binary_controls(binary_id, ierr)
+ integer :: binary_id
+ integer, intent(out) :: ierr
+ type (binary_info), pointer :: b
+ ierr = 0
+
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then
+ write(*,*) 'failed in binary_ptr'
+ return
+ end if
+
+ ! Set these function pointers to point to the functions you wish to use in
+ ! your run_binary_extras. Any which are not set, default to a null_ version
+ ! which does nothing.
+ b% how_many_extra_binary_history_header_items => how_many_extra_binary_history_header_items
+ b% data_for_extra_binary_history_header_items => data_for_extra_binary_history_header_items
+ b% how_many_extra_binary_history_columns => how_many_extra_binary_history_columns
+ b% data_for_extra_binary_history_columns => data_for_extra_binary_history_columns
+
+ b% extras_binary_startup=> extras_binary_startup
+ b% extras_binary_start_step=> extras_binary_start_step
+ b% extras_binary_check_model=> extras_binary_check_model
+ b% extras_binary_finish_step => extras_binary_finish_step
+ b% extras_binary_after_evolve=> extras_binary_after_evolve
+
+ ! Once you have set the function pointers you want, then uncomment this (or set it in your star_job inlist)
+ ! to disable the printed warning message,
+ b% warn_binary_extra =.false.
+ end subroutine extras_binary_controls
+
+ integer function how_many_extra_binary_history_header_items(binary_id)
+ use binary_def, only: binary_info
+ integer, intent(in) :: binary_id
+ how_many_extra_binary_history_header_items = 0
+ end function how_many_extra_binary_history_header_items
+
+
+ subroutine data_for_extra_binary_history_header_items( &
+ binary_id, n, names, vals, ierr)
+ type (binary_info), pointer :: b
+ integer, intent(in) :: binary_id, n
+ character (len=maxlen_binary_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer, intent(out) :: ierr
+ ierr = 0
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then
+ write(*,*) 'failed in binary_ptr'
+ return
+ end if
+ end subroutine data_for_extra_binary_history_header_items
+
+
+ integer function how_many_extra_binary_history_columns(binary_id)
+ use binary_def, only: binary_info
+ integer, intent(in) :: binary_id
+ how_many_extra_binary_history_columns = 0
+ end function how_many_extra_binary_history_columns
+
+
+ subroutine data_for_extra_binary_history_columns(binary_id, n, names, vals, ierr)
+ type (binary_info), pointer :: b
+ integer, intent(in) :: binary_id
+ integer, intent(in) :: n
+ character (len=maxlen_binary_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer, intent(out) :: ierr
+ ierr = 0
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then
+ write(*,*) 'failed in binary_ptr'
+ return
+ end if
+
+
+ end subroutine data_for_extra_binary_history_columns
+
+
+ integer function extras_binary_startup(binary_id,restart,ierr)
+ type (binary_info), pointer :: b
+ integer, intent(in) :: binary_id
+ integer, intent(out) :: ierr
+ logical, intent(in) :: restart
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then ! failure in binary_ptr
+ return
+ end if
+
+ if (.not. restart) then
+ b% lxtra(1) = .false. ! flag for end of donor's main sequence
+ b% lxtra(2) = .false. ! flag for beginning RLOF
+ b% lxtra(3) = .false. ! flag for end of accretor's main sequence
+ ! initialize some quantitites
+ b% xtra(1) = -1d99 ! donor radius at TAMS
+ ! extras are used to store the two tidal sychronization timescales (rad/conv) for each star.
+ ! -1 if they are point masses
+ if (b% point_mass_i /= 1) then
+ b% s1% xtra(2) = -1.0d0 ! t_sync_conv_1
+ b% s1% xtra(3) = -1.0d0 ! t_sync_rad_1
+ end if
+ if (b% point_mass_i /= 2) then
+ b% s2% xtra(2) = -1.0d0 ! t_sync_conv_2
+ b% s2% xtra(3) = -1.0d0 ! t_sync_rad_2
+ end if
+ b% xtra(4) = -1d99 ! radius at onset RLOF
+ end if
+ extras_binary_startup = keep_going
+ end function extras_binary_startup
+
+ integer function extras_binary_start_step(binary_id,ierr)
+ type (binary_info), pointer :: b
+ integer, intent(in) :: binary_id
+ integer, intent(out) :: ierr
+
+ extras_binary_start_step = keep_going
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then ! failure in binary_ptr
+ return
+ end if
+ end function extras_binary_start_step
+
+ !Return either keep_going, retry or terminate
+ integer function extras_binary_check_model(binary_id)
+ type (binary_info), pointer :: b
+ integer, intent(in) :: binary_id
+ integer:: i_don, i_acc
+ real(dp) :: r_l2, d_l2, TAMS_h1_treshold
+ real(dp) :: q
+ integer :: ierr
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then ! failure in binary_ptr
+ return
+ end if
+ extras_binary_check_model = keep_going
+
+ TAMS_h1_treshold = 1d-2
+
+ if (b% point_mass_i /= 1) then !Check for L2 overflow for primary when not in MS
+ if (b% s1% center_h1 < TAMS_h1_treshold) then ! Misra et al. 2020 L2 overflow check starts only after TAMS of one of the two stars. Before we use Marchant et al. 2016 L2 overflow check implemented already in MESA
+ i_don = 1
+ i_acc = 2
+ if (b% m(i_don) .gt. b% m(i_acc)) then !mdon>macc, q<1
+ q = b% m(i_acc) / b% m(i_don)
+ r_l2 = b% rl(i_don) * (0.784_dp * pow(q,1.05_dp) * exp(-0.188_dp*q) + 1.004_dp)
+ d_l2 = b% rl(i_don) * (3.334_dp * pow(q, 0.514_dp) * exp(-0.052_dp*q) + 1.308_dp)
+ !Condition to stop when star overflows L2
+ if (b% r(i_don) .ge. (r_l2)) then
+ ! extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (R_L2) surface for q(=Macc/Mdon)<1, donor is star 1'
+ ! return
+ end if
+ if (b% r(i_don) .ge. (d_l2)) then
+ ! extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (D_L2) distance for q(=Macc/Mdon)<1, donor is star 1'
+ !return
+ end if
+
+ else !mdonor1
+ q = b% m(i_acc) / b% m(i_don)
+ r_l2 = b% rl(i_don) * (0.29066811_dp * pow(q, 0.82788069_dp) * exp(-0.01572339_dp*q) + 1.36176161_dp)
+ d_l2 = b% rl(i_don) * (-0.04029713_dp * pow(q, 0.862143_dp) * exp(-0.04049814_dp*q) + 1.88325644_dp)
+ if (b% r(i_don) .ge. (r_l2)) then
+ ! extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (R_L2) surface for q(=Macc/Mdon)>1, donor is star 1'
+ ! return
+ end if
+ if (b% r(i_don) .ge. (d_l2)) then
+ !extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (D_L2) distance for q(=Macc/Mdon)>1, donor is star 1'
+ !return
+ end if
+ end if
+ end if
+ end if
+
+ if (b% point_mass_i /= 2) then !Check for L2 overflow for primary when not in MS
+ if (b% s2% center_h1 < TAMS_h1_treshold) then ! Misra et al. 2020 L2 overflow check starts only after TAMS of one of the two stars. Before we use Marchant et al. 2016 L2 overflow check implemented already in MESA
+ i_don = 2
+ i_acc = 1
+ if (b% m(i_don) .gt. b% m(i_acc)) then !mdon>macc, q<1
+ q = b% m(i_acc) / b% m(i_don)
+ r_l2 = b% rl(i_don) * (0.784_dp * pow(q, 1.05_dp) * exp(-0.188_dp * q) + 1.004_dp)
+ d_l2 = b% rl(i_don) * (3.334_dp * pow(q, 0.514_dp) * exp(-0.052_dp * q) + 1.308_dp)
+ !Condition to stop when star overflows L2
+ if (b% r(i_don) .ge. (r_l2)) then
+ !extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (R_L2) surface for q(=Macc/Mdon)<1, donor is star 2'
+ ! return
+ end if
+ if (b% r(i_don) .ge. (d_l2)) then
+ !extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (D_L2) distance for q(=Macc/Mdon)<1, donor is star 2'
+ ! return
+ end if
+
+ else !mdonor1
+ q = b% m(i_acc) / b% m(i_don)
+ r_l2 = b% rl(i_don) * (0.29066811_dp * pow(q, 0.82788069_dp) * exp(-0.01572339_dp*q) + 1.36176161_dp)
+ d_l2 = b% rl(i_don) * (-0.04029713_dp * pow(q, 0.862143_dp) * exp(-0.04049814_dp*q) + 1.88325644_dp)
+ if (b% r(i_don) .ge. (r_l2)) then
+ !extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (R_L2) surface for q(=Macc/Mdon)>1, donor is star 2'
+ !return
+ end if
+ if (b% r(i_don) .ge. (d_l2)) then
+ !extras_binary_check_model = terminate
+ write(*,'(g0)') 'termination code: overflow from L2 (D_L2) distance for q(=Macc/Mdon)>1, donor is star 2'
+ !return
+ end if
+ end if
+ end if
+ end if
+
+ if (b% point_mass_i/=0 .and. ((b% rl_relative_gap(1) .ge. 0.d0) &
+ .or. (abs(b% mtransfer_rate/(Msun/secyer)) .ge. 1.0d-10))) then
+ if (b% point_mass_i/=1) then
+ i_don = 1
+ else
+ i_don = 2
+ end if
+ end if
+
+ end function extras_binary_check_model
+
+
+ ! returns either keep_going or terminate.
+ ! note: cannot request retry; extras_check_model can do that.
+ integer function extras_binary_finish_step(binary_id)
+ use chem_def, only: ih1
+ use binary_lib, only: binary_set_separation_eccentricity
+ type (binary_info), pointer :: b
+ integer, intent(in) :: binary_id
+ integer :: star_id, ierr
+ character (len=200) :: fname
+ real(dp) :: q, mdot_limit_low, mdot_limit_high, &
+ center_h1, center_h1_old, center_he4, center_he4_old, &
+ rl23,rl2_1,trap_rad, mdot_edd, mdot_edd_eta, TAMS_h1_treshold
+ logical :: is_ne_biggest
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then ! failure in binary_ptr
+ return
+ end if
+ extras_binary_finish_step = keep_going
+
+ ! abundance threshold for center_h1 defining TAMS
+ TAMS_h1_treshold = 1d-2
+
+ ! find donor's TAMS
+ if ((b% lxtra(1) .eqv. .false.) .and. &
+ (b% s1% xa(b% s1% net_iso(ih1), b% s1% nz) < TAMS_h1_treshold)) then
+ b% lxtra(1) = .true.
+ b% xtra(1) = b% s1% r(1)
+ print *, "saved donor radius at TAMS", b% xtra(1)/Rsun
+ write(fname, fmt="(a14)") 'donor_TAMS.mod'
+ call star_write_model(b% star_ids(1), fname, ierr)
+ write(fname, fmt="(a15)") 'donor_TAMS.data'
+ call star_write_profile_info(b% star_ids(1), trim(b% s1% log_directory)//'/'//trim(fname), ierr)
+ end if
+
+ ! find beginning RLOF
+ if (b% lxtra(2) .eqv. .false.) then
+ ! RLOF has not started before
+ if (b% rl_relative_gap(b% d_i) > 0) then
+ write(fname, fmt="(a20)") 'donor_onset_RLOF.mod'
+ call star_write_model(b% star_ids(1), fname, ierr)
+ if (b% point_mass_i /= 2) then
+ write(fname, fmt="(a23)") 'accretor_onset_RLOF.mod'
+ call star_write_model(b% star_ids(2), fname, ierr)
+ end if
+ b% lxtra(2) = .true.
+ b% xtra(4) = b% s_donor% r(1)
+ end if
+ end if
+
+ ! if RLOF ended detach and switch to single star evolutuon
+ if ((b% lxtra(2) .eqv. .true.) .and. & ! RLOF has started before
+ (b% rl_relative_gap(1) < 0) .and. & ! donor is detached
+ (b% s1% r(1) <= min(b% xtra(4), b% xtra(1))) .and. & ! donor smaller than R_roche_lobe at onset RLOF and R_TAMS
+ (b% job% evolve_both_stars .eqv. .true.)) then
+ print *, "save models after RLOF"
+ write(fname, fmt="(a18)") 'donor_postRLOF.mod'
+ call star_write_model(b% star_ids(1), fname, ierr)
+ if (ierr /= 0) return
+ if (b% point_mass_i == 2) then
+ write(fname, fmt="(a21)") 'accretor_postRLOF.mod'
+ call star_write_model(b% star_ids(2), fname, ierr)
+ if (ierr /= 0) return
+ end if
+ b% lxtra(2) = .false. ! so we dont' get back in here
+ end if
+
+ ! find accretor TAMS if you are evolving it
+ if ((b% lxtra(3) .eqv. .false.) .and. & ! not accretor TAMS yet
+ (b% point_mass_i /= 2)) then ! computing the accretor
+ if (b% s2 % xa(b% s2% net_iso(ih1), b% s2% nz) < TAMS_h1_treshold) then
+ write(fname, fmt="(a17)") 'accretor_TAMS.mod'
+ call star_write_model(b% star_ids(2), fname, ierr)
+ write(fname, fmt="(a18)") 'accretor_TAMS.data'
+ call star_write_profile_info(b% star_ids(2), trim(b% s2% log_directory)//'/'//trim(fname), ierr)
+ b% lxtra(3) = .true.
+ end if
+ end if
+
+
+ if (b% point_mass_i == 0) then
+ ! Check for simultaneous RLOF from both stars after TAMS of one star
+ if (b% s2% center_h1 < TAMS_h1_treshold .or. b% s1% center_h1 < TAMS_h1_treshold) then
+ if (b% rl_relative_gap(1) > 0.0_dp .and. b% rl_relative_gap(2) > 0.0_dp) then
+ extras_binary_finish_step = terminate
+ write(*,'(g0)') "termination code: Both stars fill their Roche Lobe and at least one of them is off MS"
+ end if
+ end if
+ end if
+
+ !check if mass transfer rate reached maximun, assume unstable regime if it happens
+ if (abs(b% mtransfer_rate/(Msun/secyer)) >= 1d-1) then !stop when larger than 0.1 Msun/yr
+ extras_binary_finish_step = terminate
+ write(*,'(g0)') "termination code: Reached maximum mass transfer rate: 1d-1"
+ end if
+
+ ! check for L2 overflow after ZAMS, but before TAMS
+ if(.not. b% ignore_rlof_flag .and. extras_binary_finish_step /= terminate .and. (b% point_mass_i == 0)) then ! only when we evolve both stars in MS
+ if (b% s1% center_h1 > TAMS_h1_treshold .and. b% s2% center_h1 > TAMS_h1_treshold) then
+ if (b% m(1) > b% m(2)) then
+ q = b% m(2) / b% m(1)
+ star_id = 2
+ else
+ q = b% m(1) / b% m(2)
+ star_id = 1
+ end if
+ if (b% rl_relative_gap(star_id) > 0.29858997d0*atan(1.83530121d0*pow(q,0.39661426d0))) then
+ write(*,'(g0)') "termination code: Terminate due to L2 overflow during case A"
+ extras_binary_finish_step = terminate
+ end if
+ end if
+ end if
+ end function extras_binary_finish_step
+
+ subroutine extras_binary_after_evolve(binary_id, ierr)
+ type (binary_info), pointer :: b
+ integer, intent(in) :: binary_id
+ integer, intent(out) :: ierr
+ call binary_ptr(binary_id, b, ierr)
+ if (ierr /= 0) then ! failure in binary_ptr
+ return
+ end if
+ ! save profiles even if crashed MANOS: this should be checking if
+ !s1 is a point mass, but in minimum timestep cases, it is
+ !behaving like becoming a point mass.. So for now it is assuming
+ !it it is not a point mass, not sure if it works with compact
+ !object binaries.
+ call star_write_profile_info(b% s1% id, "LOGS1/final_profile.data", ierr)
+ if (ierr /= 0) then
+ STOP "failed to save profile for star 1"
+ end if
+ if (b% point_mass_i /= 2) then
+ call star_write_profile_info(b% s2% id, "LOGS2/final_profile.data", ierr)
+ end if
+ if (ierr /= 0) then
+ STOP "failed to save profile for star 2"
+ end if
+ end subroutine extras_binary_after_evolve
+
+end module run_binary_extras
diff --git a/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/run_star_extras.f90 b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/run_star_extras.f90
new file mode 100644
index 0000000000..f1746bca6e
--- /dev/null
+++ b/star/dev_cases_massive_stars/15M_binary_stripped_envelope/src/run_star_extras.f90
@@ -0,0 +1,314 @@
+! ***********************************************************************
+!
+! Copyright (C) 2012 Bill Paxton
+!
+! this file is part of mesa.
+!
+! mesa is free software; you can redistribute it and/or modify
+! it under the terms of the gnu general library public license as published
+! by the free software foundation; either version 2 of the license, or
+! (at your option) any later version.
+!
+! mesa is distributed in the hope that it will be useful,
+! but without any warranty; without even the implied warranty of
+! merchantability or fitness for a particular purpose. see the
+! gnu library general public license for more details.
+!
+! you should have received a copy of the gnu library general public license
+! along with this software; if not, write to the free software
+! foundation, inc., 59 temple place, suite 330, boston, ma 02111-1307 usa
+!
+! ***********************************************************************
+
+module run_star_extras
+
+ use star_lib
+ use star_def
+ use const_def
+ use math_lib
+ use chem_def
+ use num_lib
+ use binary_def
+ use ionization_def
+
+ implicit none
+
+ ! these routines are called by the standard run_star check_model
+
+contains
+
+
+ subroutine extras_controls(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ ! this is the place to set any procedure pointers you want to change
+ ! e.g., other_wind, other_mixing, other_energy (see star_data.inc)
+
+
+ ! the extras functions in this file will not be called
+ ! unless you set their function pointers as done below.
+ ! otherwise we use a null_ version which does nothing (except warn).
+
+ s% extras_startup => extras_startup
+ s% extras_start_step => extras_start_step
+ s% extras_check_model => extras_check_model
+ s% extras_finish_step => extras_finish_step
+ s% extras_after_evolve => extras_after_evolve
+ s% how_many_extra_history_columns => how_many_extra_history_columns
+ s% data_for_extra_history_columns => data_for_extra_history_columns
+ s% how_many_extra_profile_columns => how_many_extra_profile_columns
+ s% data_for_extra_profile_columns => data_for_extra_profile_columns
+
+ s% how_many_extra_history_header_items => how_many_extra_history_header_items
+ s% data_for_extra_history_header_items => data_for_extra_history_header_items
+ s% how_many_extra_profile_header_items => how_many_extra_profile_header_items
+ s% data_for_extra_profile_header_items => data_for_extra_profile_header_items
+
+ end subroutine extras_controls
+
+ subroutine extras_startup(id, restart, ierr)
+ integer, intent(in) :: id
+ logical, intent(in) :: restart
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ ! Initialize variables on startup.
+ s% lxtra(11) = .true. ! do we still need to read inlist_to_CC? -> yes.
+
+ end subroutine extras_startup
+
+
+ integer function extras_start_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ integer :: binary_id
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_start_step = 0
+
+ ! these two if statements below could be combined. -EbF
+ if ((s% center_h1 < 1.0d-2) .and. &
+ (s% center_he4 < 1.0d-4 .or. s% log_center_temperature >= 9.3d0) &
+ .and. (s% center_c12 < 2.0d-2)) then
+
+ if(s% x_logical_ctrl(1) .and. s% lxtra(11)) then !check for central carbon depletion, only in case we run single stars.
+ print *, "*** Single star depleted carbon ***"
+ print *, "read inlist_to_CC"
+ call read_star_job(s, "inlist_to_cc", ierr)
+ if (ierr /= 0) then
+ print *, "Failed reading star_job in inlist_to_CC"
+ return
+ end if
+ print *, "read star_job from inlist_to_CC"
+
+ call star_read_controls(id, "inlist_to_cc", ierr)
+ if (ierr /= 0) then
+ print *, "Failed reading controls in inlist_to_CC"
+ return
+ end if
+ print *, "read controls from inlist_to_CC"
+ s% lxtra(11) = .false. ! avoid re-entering here
+ end if
+
+ end if
+
+ ! We can also soften the surface BC by switching to a hydrodynamic BC.
+ if (s% log_center_temperature >= 9.5d0 .and. s% center_si28 <1d-3) then
+ s% use_compression_outer_BC = .true.
+ end if
+
+ end function extras_start_step
+
+
+ ! returns either keep_going, retry, backup, or terminate.
+ integer function extras_check_model(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ real(dp) :: error, atol, rtol
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_check_model = keep_going
+
+
+ ! by default, indicate where (in the code) MESA terminated
+ if (extras_check_model == terminate) s% termination_code = t_extras_check_model
+ end function extras_check_model
+
+
+ integer function how_many_extra_history_columns(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_history_columns = 1
+ end function how_many_extra_history_columns
+
+
+ subroutine data_for_extra_history_columns(id, n, names, vals, ierr)
+ use chem_def, only: chem_isos
+ integer, intent(in) :: id, n
+ character (len=maxlen_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer :: k
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ names(1) = 'fe_core_infall_speed'
+
+ k = 0
+ if (s% fe_core_mass > 0.0d0) then
+ k = s% nz
+ do while (s% m(k) <= s% fe_core_mass * Msun)
+ k = k-1 ! loop outwards
+ end do
+ ! We multiply by -1, since v is negative. This yields a positive infall speed, e.g. 50 km/s.
+ vals(1) = - min(0d0, minval(s%v(k:s%nz))/1d5)
+ else
+ vals(1) = 0d0
+ end if
+
+ end subroutine data_for_extra_history_columns
+
+
+ integer function how_many_extra_profile_columns(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_profile_columns = 0
+ end function how_many_extra_profile_columns
+
+
+ subroutine data_for_extra_profile_columns(id, n, nz, names, vals, ierr)
+ integer, intent(in) :: id, n, nz
+ character (len=maxlen_profile_column_name) :: names(n)
+ real(dp) :: vals(nz,n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ end subroutine data_for_extra_profile_columns
+
+
+ integer function how_many_extra_history_header_items(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_history_header_items = 0
+ end function how_many_extra_history_header_items
+
+
+ subroutine data_for_extra_history_header_items(id, n, names, vals, ierr)
+ integer, intent(in) :: id, n
+ character (len=maxlen_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ type(star_info), pointer :: s
+ integer, intent(out) :: ierr
+ integer :: i
+ end subroutine data_for_extra_history_header_items
+
+
+ integer function how_many_extra_profile_header_items(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_profile_header_items = 0
+ end function how_many_extra_profile_header_items
+
+
+ subroutine data_for_extra_profile_header_items(id, n, names, vals, ierr)
+ integer, intent(in) :: id, n
+ character (len=maxlen_profile_column_name) :: names(n)
+ real(dp) :: vals(n)
+ type(star_info), pointer :: s
+ integer, intent(out) :: ierr
+ ierr = 0
+ call star_ptr(id,s,ierr)
+ if(ierr/=0) return
+ end subroutine data_for_extra_profile_header_items
+
+
+ ! returns either keep_going or terminate.
+ ! note: cannot request retry or backup; extras_check_model can do that.
+ integer function extras_finish_step(id)
+ integer, intent(in) :: id
+ integer :: ierr, k
+ real(dp) :: fe_core_infall_limit, current_fe_core_infall
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_finish_step = keep_going
+
+ ! Initialize variables
+ k = 0
+ current_fe_core_infall = 0
+ fe_core_infall_limit = max(500d0,s% x_ctrl(1)) ! in case s% x_ctrl(1) is not read on restart.
+ ! exit condition for star #2
+ if (.not. s% x_logical_ctrl(1)) then ! stop
+ print *, "*** Single star depleted carbon ***"
+ extras_finish_step = terminate
+ end if
+
+! Custom Fe core collapse condition from Mathieu Renzo.
+ if (s% fe_core_mass > 0.0d0) then
+ k = s% nz
+ do while (s% m(k) <= s% fe_core_mass * Msun)
+ k = k-1 ! loop outwards
+ end do
+ ! k is now the outer index of the fe core
+ current_fe_core_infall = - min(0d0, minval(s%v(k:s%nz))/1d5)
+ if (current_fe_core_infall > 2d0) then ! avoid print out until the infall speed exceeds 2 km/s
+ write(*,*) 'fe_core_infall = ', current_fe_core_infall, 'km/s'! (-)
+ write (*,*) 'fe_core_infall limit', fe_core_infall_limit, 'km/s'
+ if (current_fe_core_infall >= fe_core_infall_limit) then
+ s% termination_code = t_fe_core_infall_limit
+ write(*, '(/,a,/, 99e20.10)') &
+ 'stop because fe_core_infall > fe_core_infall_limit', &
+ current_fe_core_infall, fe_core_infall_limit
+ print *, "treshold v used", maxval(abs(s%v(k:s%nz)))
+ extras_finish_step = terminate
+ end if
+ end if
+ end if
+
+ if (extras_finish_step == terminate) s% termination_code = t_extras_finish_step
+ end function extras_finish_step
+
+
+ subroutine extras_after_evolve(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ end subroutine extras_after_evolve
+end module run_star_extras
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/Makefile b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/Makefile
new file mode 100644
index 0000000000..c779b9d6d8
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/README.rst b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/README.rst
new file mode 100644
index 0000000000..67d0d50503
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/README.rst
@@ -0,0 +1,34 @@
+.. _20M_pre_ms_to_cc:
+
+*****************
+20M_pre_ms_to_cc
+*****************
+
+This dev case is copied from ``star/test_suite/20M_pre_ms_to_core_collapse``.
+It keeps a main ``inlist`` for the final evolution to core collapse,
+starting from ``standard_lgTmax.mod``, with pgstar settings in
+``inlist_pgstar``.
+
+The source test suite contains seven parts from pre-main sequence to core
+collapse. This dev case flattens the shared settings, mass/Z settings,
+and final core-collapse settings into the main ``inlist``. The pgstar
+configuration is kept separately in ``inlist_pgstar``.
+
+This case works with ``split_burn``, not without.
+
+For production science we recommend adopting tighter mesh and timestep controls, such as those suggested in the comments of ``inlist``.
+
+Physical checks
+===============
+
+None
+
+Inlists
+=======
+
+This dev case has two inlist files.
+
+* ``inlist`` loads ``standard_lgTmax.mod`` and evolves until ``fe_core_infall_limit``.
+* ``inlist_pgstar`` contains the pgstar plot settings loaded by ``inlist``.
+
+Last-Updated: 12May2026
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/ck b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/ck
new file mode 100755
index 0000000000..78ca63a8c1
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/ck
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+# this provides the definition of check_one
+# check_one
+source "${MESA_DIR}/star/test_suite/test_suite_helpers"
+
+check_one
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/clean b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/clean
new file mode 100755
index 0000000000..74f37b9ce4
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/clean
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make clean
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/history_columns.list b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/history_columns.list
new file mode 100644
index 0000000000..4801dcc0e7
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/history_columns.list
@@ -0,0 +1,1066 @@
+! history_columns.list -- determines the contents of star history logs
+! you can use a non-standard version by setting history_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as history_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! blank lines and comments can be used freely.
+! if a column name appears more than once in the list, only the first occurrence is used.
+
+! if you need to have something added to the list of options, let me know....
+
+
+! the first few lines of the log file contain a few items:
+
+ ! version_number -- for the version of mesa being used
+ ! burn_min1 -- 1st limit for reported burning, in erg/g/s
+ ! burn_min2 -- 2nd limit for reported burning, in erg/g/s
+
+
+!# other files
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+! the following lines of the log file contain info about 1 model per row
+
+!----------------------------------------------------------------------------------------------
+
+!# general info about the model
+
+ model_number ! counting from the start of the run
+ num_zones ! number of zones in the model
+
+ !## age
+
+ star_age ! elapsed simulated time in years since the start of the run
+ star_age_sec ! elapsed simulated time in seconds since the start of the run
+ star_age_min ! elapsed simulated time in minutes since the start of the run
+ star_age_hr ! elapsed simulated time in hours since the start of the run
+ star_age_day ! elapsed simulated time in days since the start of the run
+ !day ! elapsed simulated time in days since the start of the run
+
+ !log_star_age
+ !log_star_age_sec
+
+ !## timestep
+
+ time_step ! timestep in years since previous model
+ time_step_sec ! timestep in seconds since previous model
+ time_step_days
+ log_dt ! log10 time_step in years
+ log_dt_sec ! log10 time_step in seconds
+ log_dt_days ! log10 time_step in days
+
+ !## mass
+
+ star_mass ! in Msun units
+ !log_star_mass
+
+ !star_gravitational_mass ! star_mass is baryonic mass
+ !star_mass_grav_div_mass
+
+ !delta_mass ! star_mass - initial_mass in Msun units
+ log_xmstar ! log10 mass exterior to M_center (grams)
+
+ !## mass change
+
+ !star_mdot ! d(star_mass)/dt (in msolar per year)
+ log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+
+ !## imposed surface conditions
+ !tau_factor
+ !tau_surface
+
+ !## imposed center conditions
+ !m_center
+ !m_center_gm
+ !r_center
+ !r_center_cm
+ !r_center_km
+ !L_center
+ !log_L_center
+ !log_L_center_ergs_s
+ !v_center
+ !v_center_kms
+
+ !logt_max
+
+!----------------------------------------------------------------------------------------------
+
+!# mixing and convection
+
+ !max_conv_vel_div_csound
+ !max_gradT_div_grada
+ !max_gradT_sub_grada
+ !min_log_mlt_Gamma
+
+
+ !## mixing regions
+
+ mass_conv_core ! (Msun) mass coord of top of convective core. 0 if core is not convective
+
+ ! mx1 refers to the largest (by mass) convective region.
+ ! mx2 is the 2nd largest.
+
+ ! conv_mx1_top and conv_mx1_bot are the region where mixing_type == convective_mixing.
+ ! mx1_top and mx1_bot are the extent of all kinds of mixing, convective and other.
+
+ ! values are m/Mstar
+ conv_mx1_top
+ conv_mx1_bot
+ conv_mx2_top
+ conv_mx2_bot
+ mx1_top
+ mx1_bot
+ mx2_top
+ mx2_bot
+
+ ! radius -- values are radii in Rsun units
+ !conv_mx1_top_r
+ !conv_mx1_bot_r
+ !conv_mx2_top_r
+ !conv_mx2_bot_r
+ !mx1_top_r
+ !mx1_bot_r
+ !mx2_top_r
+ !mx2_bot_r
+
+ ! you might want to get a more complete list of mixing regions by using the following
+
+ !mixing_regions ! note: this includes regions where the mixing type is no_mixing.
+
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives the mixing type as defined in const/public/const_def.f90.
+
+ ! the second column for a region gives the m/mstar location of the top of the region
+ ! entries for extra columns after the last region in the star will have an invalid mixing_type value of -1.
+ ! mstar is the total mass of the star, so these locations range from 0 to 1
+ ! all regions are include starting from the center, so the bottom of one region
+ ! is the top of the previous one. since we start at the center, the bottom of the 1st region is 0.
+
+ ! the columns in the log file will have names like 'mix_type_1' and 'mix_qtop_1'
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+
+ !mix_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'mix_relr_type_1' and 'mix_relr_top_1'
+
+
+ !## conditions at base of largest convection zone (by mass)
+ !cz_bot_mass ! mass coordinate of base (Msun)
+ !cz_mass ! mass coordinate of base (Msun) -- same as cz_bot_mass
+ !cz_log_xmass ! mass exterior to base (g)
+ !cz_log_xmsun ! mass exterior to base (Msun)
+ !cz_xm ! mass exterior to base (Msun)
+ !cz_logT
+ !cz_logRho
+ !cz_logP
+ !cz_bot_radius ! Rsun
+ !cz_log_column_depth
+ !cz_log_radial_depth
+ !cz_luminosity ! Lsun
+ !cz_opacity
+ !cz_log_tau
+ !cz_eta
+ !cz_log_eps_nuc ! log10(ergs/g/s)
+ !cz_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_csound
+ !cz_scale_height
+ !cz_grav
+
+ !cz_omega
+ !cz_omega_div_omega_crit
+
+ !cz_zone
+
+ ! mass fractions at base of largest convection zone (by mass)
+ !cz_log_xa h1
+ !cz_log_xa he4
+
+ !## conditions at top of largest convection zone (by mass)
+ !cz_top_mass ! mass coordinate of top (Msun)
+ !cz_top_log_xmass ! mass exterior to top (g)
+ !cz_top_log_xmsun ! mass exterior to top (Msun)
+ !cz_top_xm ! mass exterior to top (Msun)
+ !cz_top_logT
+ !cz_top_logRho
+ !cz_top_logP
+ !cz_top_radius ! Rsun
+ !cz_top_log_column_depth
+ !cz_top_log_radial_depth
+ !cz_top_luminosity ! Lsun
+ !cz_top_opacity
+ !cz_top_log_tau
+ !cz_top_eta
+ !cz_top_log_eps_nuc ! log10(ergs/g/s)
+ !cz_top_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_top_csound
+ !cz_top_scale_height
+ !cz_top_grav
+
+ !cz_top_omega
+ !cz_top_omega_div_omega_crit
+
+ !cz_top_zone
+ !cz_top_zone_logdq
+
+ ! mass fractions at top of largest convection zone (by mass)
+ !cz_top_log_xa h1
+ !cz_top_log_xa he4
+
+!----------------------------------------------------------------------------------------------
+
+!# nuclear reactions
+
+ !## integrated quantities
+
+ !power_h_burn ! total thermal power from PP and CNO, excluding neutrinos (in Lsun units)
+ !power_he_burn ! total thermal power from triple-alpha, excluding neutrinos (in Lsun units)
+ !power_photo
+ !power_z_burn
+ !log_power_nuc_burn ! total thermal power from all burning, excluding photodisintegrations
+ log_LH ! log10 power_h_burn
+ log_LHe ! log10 power_he_burn
+ log_LZ ! log10 total burning power including LC, but excluding LH and LHe and photodisintegrations
+ log_Lnuc ! log(LH + LHe + LZ)
+ !log_Lnuc_ergs_s
+ !log_Lnuc_sub_log_L
+ !lnuc_photo
+
+ !extra_L ! integral of extra_heat in Lsun units
+ !log_extra_L ! log10 extra_L
+
+ !## neutrino losses
+ log_Lneu ! log10 power emitted in neutrinos, nuclear and thermal (in Lsun units)
+ log_Lneu_nuc ! log10 power emitted in neutrinos, nuclear sources only (in Lsun units)
+ log_Lneu_nonnuc ! log10 power emitted in neutrinos, thermal sources only (in Lsun units)
+
+ !mass_loc_of_max_eps_nuc ! (in Msun units)
+ !mass_ext_to_max_eps_nuc ! (in Msun units)
+ !eps_grav_integral ! (in Lsun units)
+ !log_abs_Lgrav ! log10 abs(eps_grav_integral) (in Lsun units)
+
+ !## information about reactions (by category)
+
+ ! log10 total luminosity for reaction categories (Lsun units)
+
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ !## information about individual reactions
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+
+
+ !## nuclear reactions at center
+
+ ! center log10 burn erg/g/s for reaction categories
+
+ !c_log_eps_burn cno
+ !c_log_eps_burn tri_alfa
+
+ ! center d_eps_nuc_dlnd for reaction categories
+
+ !c_d_eps_dlnd cno
+ !c_d_eps_dlnd tri_alfa
+
+ ! center d_eps_nuc_dlnT for reaction categories
+
+ !c_d_eps_dlnT cno
+ !c_d_eps_dlnT tri_alfa
+
+ !## regions of strong nuclear burning
+
+ ! 2 zones where eps_nuc > burn_min1 erg/g/s
+ ! for each zone have 4 numbers: start1, start2, end2, end1
+ ! start1 is mass of inner edge where first goes > burn_min1 (or -20 if none such)
+ ! start2 is mass of inner edge where first zone reaches burn_min2 erg/g/sec (or -20 if none such)
+ ! end2 is mass of outer edge where first zone drops back below burn_min2 erg/g/s
+ ! end1 is mass of outer edge where first zone ends (i.e. eps_nuc < burn_min1)
+ ! similar for the second zone
+
+ epsnuc_M_1 ! start1 for 1st zone
+ epsnuc_M_2 ! start2
+ epsnuc_M_3 ! end2
+ epsnuc_M_4 ! end1
+
+ epsnuc_M_5 ! start1 for 2nd zone
+ epsnuc_M_6 ! start2
+ epsnuc_M_7 ! end2
+ epsnuc_M_8 ! end1
+
+
+ ! you might want to get a more complete list of burning regions by using the following
+
+ !burning_regions
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives int(sign(val)*log10(max(1,abs(val))))
+ ! where val = ergs/gm/sec nuclear energy minus all neutrino losses.
+ ! the second column for a region gives the q location of the top of the region
+ ! entries for extra columns after the last region in the star will have a value of -9999
+ ! all regions are included starting from the center, so the bottom of one region
+ ! is the top of the previous one.
+ ! since we start at the center, the bottom of the 1st region is q=0 and top of last is q=1.
+
+ ! the columns in the log file will have names like 'burn_type_1' and 'burn_qtop_1'
+
+ !burn_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'burn_relr_type_1' and 'burn_relr_top_1'
+
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+!----------------------------------------------------------------------------------------------
+
+!# information about core and envelope
+
+ !## helium core
+ he_core_mass
+ !he_core_radius
+ !he_core_lgT
+ !he_core_lgRho
+ !he_core_L
+ !he_core_v
+ !he_core_omega
+ !he_core_omega_div_omega_crit
+ !he_core_k
+
+ !## CO core
+ co_core_mass
+ !CO_core
+ !co_core_radius
+ !co_core_lgT
+ !co_core_lgRho
+ !co_core_L
+ !co_core_v
+ !co_core_omega
+ !co_core_omega_div_omega_crit
+ !co_core_k
+
+ !## ONe core
+ one_core_mass
+ !one_core_radius
+ !one_core_lgT
+ !one_core_lgRho
+ !one_core_L
+ !one_core_v
+ !one_core_omega
+ !one_core_omega_div_omega_crit
+ !one_core_k
+
+ !## iron core
+ fe_core_mass
+ !fe_core_radius
+ !fe_core_lgT
+ !fe_core_lgRho
+ !fe_core_L
+ !fe_core_v
+ !fe_core_omega
+ !fe_core_omega_div_omega_crit
+ !fe_core_k
+
+ !## neutron rich core
+ neutron_rich_core_mass
+ !neutron_rich_core_radius
+ !neutron_rich_core_lgT
+ !neutron_rich_core_lgRho
+ !neutron_rich_core_L
+ !neutron_rich_core_v
+ !neutron_rich_core_omega
+ !neutron_rich_core_omega_div_omega_crit
+ !neutron_rich_core_k
+
+ !## envelope
+
+ !envelope_mass ! = star_mass - he_core_mass
+ !envelope_fraction_left ! = envelope_mass / (initial_mass - he_core_mass)
+
+ !h_rich_layer_mass ! = star_mass - he_core_mass
+ !he_rich_layer_mass ! = he_core_mass - c_core_mass
+ !co_rich_layer_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# timescales
+
+ !dynamic_timescale ! dynamic timescale (seconds) -- estimated by 2*pi*sqrt(r^3/(G*m))
+ kh_timescale ! kelvin-helmholtz timescale (years)
+ !mdot_timescale ! star_mass/abs(star_mdot) (years)
+ !kh_div_mdot_timescales ! kh_timescale/mdot_timescale
+ !nuc_timescale ! nuclear timescale (years) -- proportional to mass divided by luminosity
+
+ !dt_cell_collapse ! min time for any cell to collapse at current velocities
+ !dt_div_dt_cell_collapse
+
+ !min_dr_div_cs ! min over all cells of dr/csound (seconds)
+ !min_dr_div_cs_k ! location of min
+ !log_min_dr_div_cs ! log10 min dr_div_csound (seconds)
+ !min_dr_div_cs_yr ! min over all cells of dr/csound (years)
+ !log_min_dr_div_cs_yr ! log10 min dr_div_csound (years)
+ !dt_div_min_dr_div_cs
+ !log_dt_div_min_dr_div_cs
+
+ !min_t_eddy ! minimum value of scale_height/conv_velocity
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions at or near the surface of the model
+
+ !## conditions at the photosphere
+ effective_T
+ !Teff
+ log_Teff ! log10 effective temperature
+ ! Teff is calculated using Stefan-Boltzmann relation L = 4 pi R^2 sigma Teff^4,
+ ! where L and R are evaluated at the photosphere (tau_factor < 1)
+ ! or surface of the model (tau_factor >= 1) when photosphere is not inside the model.
+
+ !photosphere_black_body_T
+ !photosphere_cell_T ! temperature at model location closest to the photosphere, not necessarily Teff
+ !photosphere_cell_log_T
+ !photosphere_cell_density
+ !photosphere_cell_log_density
+ !photosphere_cell_opacity
+ !photosphere_cell_log_opacity
+ !photosphere_L ! Lsun units
+ !photosphere_log_L ! Lsun units
+ !photosphere_r ! Rsun units
+ !photosphere_log_r ! Rsun units
+ !photosphere_m ! Msun units
+ !photosphere_v_km_s
+ !photosphere_cell_k
+ !photosphere_column_density
+ !photosphere_csound
+ !photosphere_log_column_density
+ !photosphere_opacity
+ !photosphere_v_div_cs
+ !photosphere_xm
+ !photosphere_cell_free_e
+ !photosphere_cell_log_free_e
+ !photosphere_logg
+ !photosphere_T
+
+ !## conditions at or near the surface of the model (outer edge of outer cell)
+
+ luminosity ! luminosity in Lsun units
+ !luminosity_ergs_s ! luminosity in cgs units
+ log_L ! log10 luminosity in Lsun units
+ !log_L_ergs_s ! log10 luminosity in cgs units
+ radius ! Rsun
+ log_R ! log10 radius in Rsun units
+ !radius_cm
+ !log_R_cm
+
+ log_g ! log10 gravity
+ !gravity
+ !log_Ledd
+ log_L_div_Ledd ! log10(L/Leddington)
+ lum_div_Ledd
+ !log_surf_optical_depth
+ !surface_optical_depth
+
+ !log_surf_cell_opacity ! old name was log_surf_opacity
+ !log_surf_cell_P ! old name was log_surf_P
+ !log_surf_cell_pressure ! old name was log_surf_pressure
+ !log_surf_cell_density ! old name was log_surf_density
+ !log_surf_cell_temperature ! old name was log_surf_temperature
+ !surface_cell_temperature ! old name was surface_temperature
+ !log_surf_cell_z ! old name was log_surf_z
+ !surface_cell_entropy ! in units of kerg per baryon
+ ! old name was surface_entropy
+
+ !v_surf ! (cm/s)
+ v_surf_km_s ! (km/s)
+ v_div_csound_surf ! velocity divided by sound speed at outermost grid point
+ !v_div_csound_max ! max value of velocity divided by sound speed at face
+ !v_div_vesc
+ !v_phot_km_s
+ !v_surf_div_escape_v
+
+ !v_surf_div_v_kh ! v_surf/(photosphere_r/kh_timescale)
+
+ surf_avg_j_rot
+ surf_avg_omega
+ surf_avg_omega_crit
+ surf_avg_omega_div_omega_crit
+ surf_avg_v_rot ! km/sec rotational velocity at equator
+ surf_avg_v_crit ! critical rotational velocity at equator
+ surf_avg_v_div_v_crit
+ surf_avg_Lrad_div_Ledd
+ !surf_avg_logT
+ !surf_avg_logRho
+ !surf_avg_opacity
+
+ ! Gravity Darkening, reports the surface averaged L/Lsun and Teff (K) caused by
+ ! gravity darkening in rotating stars. Based on the model of Espinosa Lara & Rieutord (2011)
+ ! 'polar' refers to the line of sight being directed along the rotation axis of the star
+ ! 'equatorial' refers to the line of sight coincident with the stellar equator
+ !grav_dark_L_polar !Lsun
+ !grav_dark_Teff_polar !K
+ !grav_dark_L_equatorial !Lsun
+ !grav_dark_Teff_equatorial !K
+
+ !surf_escape_v ! cm/s
+
+ !v_wind_Km_per_s ! Km/s
+ ! = 1d-5*s% opacity(1)*max(0d0,-s% mstar_dot)/ &
+ ! (4*pi*s% photosphere_r*Rsun*s% tau_base)
+ ! Lars says:
+ ! wind_mdot = 4*pi*R^2*rho*v_wind
+ ! tau = integral(opacity*rho*dr) from R to infinity
+ ! so tau = opacity*wind_mdot/(4*pi*R*v_wind) at photosphere
+ ! or v_wind = opacity*wind_mdot/(4*pi*R*tau) at photosphere
+
+ !rotational_mdot_boost ! factor for increase in mass loss mdot due to rotation
+ log_rotational_mdot_boost ! log factor for increase in mass loss mdot due to rotation
+ !surf_r_equatorial_div_r_polar
+ !surf_r_equatorial_div_r
+ !surf_r_polar_div_r
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions near center
+
+ log_center_T ! temperature
+ log_center_Rho ! density
+ !log_center_P ! pressure
+
+ ! shorter names for above
+ log_cntr_P
+ log_cntr_Rho
+ log_cntr_T
+
+ center_T ! temperature
+ center_Rho ! density
+ !center_P ! pressure
+
+ !center_degeneracy ! the electron chemical potential in units of k*T
+ !center_gamma ! plasma interaction parameter
+ center_mu
+ center_ye
+ center_abar
+ !center_zbar
+
+ !center_eps_grav
+
+ !center_non_nuc_neu
+ !center_eps_nuc
+ !d_center_eps_nuc_dlnT
+ !d_center_eps_nuc_dlnd
+ !log_center_eps_nuc
+
+ center_entropy ! in units of kerg per baryon
+ !max_entropy ! in units of kerg per baryon
+ !fe_core_infall
+ !non_fe_core_infall
+ !non_fe_core_rebound
+ !max_infall_speed
+
+ !compactness_parameter ! (m/Msun)/(R(m)/1000km) for m = 2.5 Msun
+ !compactness
+ !m4 ! Mass co-ordinate where entropy=4
+ ! mu4 is sensitive to the choice of how much dm/dr you average over, thus we average dm and dr over M(entropy=4) and M(entropy=4)+0.3Msun
+ !mu4 ! dM(Msun)/dr(1000km) where entropy=4
+
+
+ center_omega
+ center_omega_div_omega_crit
+
+!----------------------------------------------------------------------------------------------
+
+!# abundances
+
+ !species ! size of net
+
+ !## mass fractions near center
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_center_abundances
+ !add_log_center_abundances
+
+ ! individual central mass fractions (as many as desired)
+ center h1
+ center he4
+ center c12
+ center o16
+
+ ! individual log10 central mass fractions (as many as desired)
+ !log_center h1
+ !log_center he4
+ ! etc.
+
+
+ !## mass fractions near surface
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_surface_abundances
+ !add_log_surface_abundances
+
+ ! individual surface mass fractions (as many as desired)
+ !surface h1
+ !surface he4
+ surface c12
+ surface o16
+ ! etc.
+
+ ! individual log10 surface mass fractions (as many as desired)
+
+ !log_surface h1
+ !log_surface he4
+
+
+ !## mass fractions for entire star
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_average_abundances
+ !add_log_average_abundances
+
+ ! individual average mass fractions (as many as desired)
+ !average h1
+ !average he4
+ ! etc.
+
+ ! individual log10 average mass fractions (as many as desired)
+ !log_average h1
+ !log_average he4
+ ! etc.
+
+
+ !## mass totals for entire star (in Msun units)
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_total_mass
+ !add_log_total_mass
+
+ ! individual mass totals for entire star (as many as desired)
+ total_mass h1
+ total_mass he4
+ ! etc.
+
+ ! individual log10 mass totals for entire star (in Msun units)
+ !log_total_mass h1
+ !log_total_mass he4
+ ! etc.
+
+!----------------------------------------------------------------------------------------------
+
+!# info at specific locations
+
+ !## info at location of max temperature
+ !max_T
+ log_max_T
+
+
+!----------------------------------------------------------------------------------------------
+
+!# information about shocks
+
+ !## info about outermost outward moving shock
+ ! excluding locations with q > max_q_for_outer_mach1_location
+ ! returns values at location of max velocity
+ !shock_mass ! baryonic (Msun)
+ !shock_mass_gm ! baryonic (grams)
+ !shock_q
+ !shock_radius ! (Rsun)
+ !shock_radius_cm ! (cm)
+ !shock_velocity
+ !shock_csound
+ !shock_v_div_cs
+ !shock_lgT
+ !shock_lgRho
+ !shock_lgP
+ !shock_gamma1
+ !shock_entropy
+ !shock_tau
+ !shock_k
+ !shock_pre_lgRho
+
+!----------------------------------------------------------------------------------------------
+
+!# asteroseismology
+
+ !delta_nu ! large frequency separation for p-modes (microHz)
+ ! 1e6/(seconds for sound to cross diameter of star)
+ !delta_Pg ! g-mode period spacing for l=1 (seconds)
+ ! sqrt(2) pi^2/(integral of brunt_N/r dr)
+ !log_delta_Pg
+ !nu_max ! estimate from scaling relation (microHz)
+ ! nu_max = nu_max_sun * M/Msun / ((R/Rsun)^2 (Teff/astero_Teff_sun)^0.5)
+ !nu_max_3_4th_div_delta_nu ! nu_max^0.75/delta_nu
+ !acoustic_cutoff ! 0.5*g*sqrt(gamma1*rho/P) at surface
+ !acoustic_radius ! integral of dr/csound (seconds)
+ !ng_for_nu_max ! = 1 / (nu_max*delta_Pg)
+ ! period for g-mode with frequency nu_max = nu_max_ng*delta_Pg
+ !gs_per_delta_nu ! delta_nu / (nu_max**2*delta_Pg)
+ ! number of g-modes per delta_nu at nu_max
+
+ !int_k_r_dr_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=1
+ !int_k_r_dr_2pt0_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=1
+ !int_k_r_dr_0pt5_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=1
+ !int_k_r_dr_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=2
+ !int_k_r_dr_2pt0_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=2
+ !int_k_r_dr_0pt5_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=2
+ !int_k_r_dr_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=3
+ !int_k_r_dr_2pt0_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=3
+ !int_k_r_dr_0pt5_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=3
+
+!----------------------------------------------------------------------------------------------
+
+!# energy information
+
+ total_energy ! at end of step
+ log_total_energy ! log(abs(total_energy))
+ !total_energy_after_adjust_mass ! after mass adjustments
+
+ ! shorter versions of above
+ !tot_E
+ !log_tot_E
+
+
+ !total_gravitational_energy
+ !log_total_gravitational_energy ! log(abs(total_gravitational_energy))
+ !total_gravitational_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_PE
+ !log_tot_PE
+
+ !total_internal_energy
+ !log_total_internal_energy
+ !total_internal_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_IE
+ !log_tot_IE
+
+ !total_radial_kinetic_energy
+ !log_total_radial_kinetic_energy
+ !total_radial_kinetic_energy_after_adjust_mass
+
+ ! shorter versions of above (does not include rot KE)
+ !tot_KE
+ !log_tot_KE
+
+ !total_turbulent_energy
+ !log_total_turbulent_energy
+ !total_turbulent_energy_after_adjust_mass
+ !tot_Et
+ !log_tot_Et
+
+ total_energy_foe
+
+ !tot_IE_div_IE_plus_KE
+ !total_IE_div_IE_plus_KE
+
+ !total_entropy
+ !total_eps_grav
+
+ !total_energy_sources_and_sinks ! for this step
+ !total_nuclear_heating
+ !total_non_nuc_neu_cooling
+ !total_irradiation_heating
+ !total_extra_heating ! extra heat integrated over the model times dt (erg)
+ !total_WD_sedimentation_heating
+
+ !rel_run_E_err
+
+ rel_E_err
+ !abs_rel_E_err
+ log_rel_E_err
+
+ !tot_e_equ_err
+ !tot_e_err
+
+
+ !error_in_energy_conservation ! for this step
+ ! = total_energy - (total_energy_start + total_energy_sources_and_sinks)
+ !cumulative_energy_error ! = sum over all steps of abs(error_in_energy_conservation)
+ !rel_cumulative_energy_error ! = cumulative_energy_error/total_energy
+ !log_rel_cumulative_energy_error ! = log10 of rel_cumulative_energy_error
+ log_rel_run_E_err ! shorter name for rel_cumulative_energy_error
+
+ !rel_error_in_energy_conservation ! = error_in_energy_conservation/total_energy
+ !log_rel_error_in_energy_conservation
+
+ !virial_thm_P_avg
+ !virial_thm_rel_err
+ !work_inward_at_center
+ !work_outward_at_surface
+
+
+!----------------------------------------------------------------------------------------------
+
+ !# rotation
+
+ !total_angular_momentum
+ log_total_angular_momentum
+ !i_rot_total ! moment of inertia
+
+ !total_rotational_kinetic_energy
+ !log_total_rotational_kinetic_energy
+ !total_rotational_kinetic_energy_after_adjust_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# velocities
+
+ !avg_abs_v_div_cs
+ !log_avg_abs_v_div_cs
+ !max_abs_v_div_cs
+ !log_max_abs_v_div_cs
+
+ !avg_abs_v
+ !log_avg_abs_v
+ !max_abs_v
+ !log_max_abs_v
+
+ !u_surf
+ !u_surf_km_s
+ !u_div_csound_surf
+ !u_div_csound_max
+
+ !infall_div_cs
+
+!----------------------------------------------------------------------------------------------
+
+!# misc
+
+ !e_thermal ! sum over all zones of Cp*T*dm
+
+ !## eos
+ !logQ_max ! logQ = logRho - 2*logT + 12
+ !logQ_min
+ gamma1_min
+
+ !## core mixing
+ !mass_semiconv_core
+
+ !## H-He boundary
+
+ !diffusion_time_H_He_bdy
+ !temperature_H_He_bdy
+
+
+ !## optical depth and opacity
+
+ !one_div_yphot
+ !log_one_div_yphot
+
+ !log_min_opacity
+ !min_opacity
+
+ !log_tau_center
+
+ !log_max_tau_conv
+ !max_tau_conv
+ !log_min_tau_conv
+ !min_tau_conv
+
+ !tau_qhse_yrs
+
+ !## other
+
+ !Lsurf_m
+ !dlnR_dlnM
+ !h1_czb_mass ! location (in Msun units) of base of 1st convection zone above he core
+ !kh_mdot_limit
+ !log_cntr_dr_cm
+ !min_Pgas_div_P
+ !surf_c12_minus_o16 ! this is useful for seeing effects of dredge up on AGB
+ !surf_num_c12_div_num_o16
+
+ !phase_of_evolution ! Integer mapping to the type of evolution see star_data/public/star_data_def.inc for definitions
+
+ !## MLT++
+ !gradT_excess_alpha
+ !gradT_excess_min_beta
+ !gradT_excess_max_lambda
+
+ !max_L_rad_div_Ledd
+ !max_L_rad_div_Ledd_div_phi_Joss
+
+
+ !## RTI
+ !rti_regions
+
+ !## Ni & Co
+ !total_ni_co_56
+
+
+ !## internal structure constants
+
+ ! this is evaluated assuming a spherical star and does not account for rotation
+ !apsidal_constant_k2
+
+
+!----------------------------------------------------------------------------------------------
+
+!# accretion
+
+ !k_below_const_q
+ !q_below_const_q
+ !logxq_below_const_q
+
+ !k_const_mass
+ !q_const_mass
+ !logxq_const_mass
+
+ !k_below_just_added
+ !q_below_just_added
+ !logxq_below_just_added
+
+ !k_for_test_CpT_absMdot_div_L
+ !q_for_test_CpT_absMdot_div_L
+ !logxq_for_test_CpT_absMdot_div_L
+
+!----------------------------------------------------------------------------------------------
+
+!# Color output
+
+ ! Outputs the bolometric correction (bc) for the star in filter band ``filter'' (case sensitive)
+ !bc filter
+
+ ! Outputs the absolute magnitude for the star in filter band ``filter'' (case sensitive)
+ !abs_mag filter
+
+ ! Adds all the bc's to the output
+ !add_bc
+
+ ! Adds all the absolute magnitudes to the output
+ !add_abs_mag
+
+ ! Outputs luminosity in filter band ``filter'' (erg s^-1) (case sensitive)
+ ! lum_band filter
+
+ ! Adds all the filter band luminosities to the output (erg s^-1)
+ ! add_lum_band
+
+ ! Outputs log luminosity in filter band ``filter'' (log erg s^-1) (case sensitive)
+ ! log_lum_band filter
+
+ ! Adds all the filter band luminosities to the output (log erg s^-1)
+ ! add_log_lum_band
+
+!----------------------------------------------------------------------------------------------
+
+!# RSP
+
+ !rsp_DeltaMag ! absolute magnitude difference between minimum and maximum light (mag)
+ !rsp_DeltaR ! R_max - R_min difference in the max and min radius (Rsun)
+ !rsp_GREKM ! fractional growth of the kinetic energy per pulsation period ("nonlinear growth rate") - see equation 5 in MESA5
+ !rsp_num_periods ! Count of the number of pulsation cycles completed
+ !rsp_period_in_days ! Running period, ie., period between two consecutive values of R_max (days)
+ !rsp_phase ! Running pulsation phase for a cycle
+
+!----------------------------------------------------------------------------------------------
+!# debugging
+
+ !## retries
+ num_retries ! total during the run
+
+ !## solver iterations
+
+ num_iters ! same as num_solver_iterations
+ num_solver_iterations ! iterations at this step
+ !total_num_solver_iterations ! total iterations during the run
+ !avg_num_solver_iters
+
+ !rotation_solver_steps
+
+ !diffusion_solver_steps
+ !diffusion_solver_iters
+
+ !avg_setvars_per_step
+ !avg_skipped_setvars_per_step
+ !avg_solver_setvars_per_step
+
+ !burn_solver_maxsteps
+
+ !total_num_solver_calls_converged
+ !total_num_solver_calls_failed
+ !total_num_solver_calls_made
+ !total_num_solver_relax_calls_converged
+ !total_num_solver_relax_calls_failed
+ !total_num_solver_relax_calls_made
+ !total_num_solver_relax_iterations
+
+ !total_step_attempts
+ !total_step_redos
+ !total_step_retries
+ !total_steps_finished
+ !total_steps_taken
+
+ !TDC_num_cells
+
+ !## Relaxation steps
+ !total_relax_step_attempts
+ !total_relax_step_redos
+ !total_relax_step_retries
+ !total_relax_steps_finished
+ !total_relax_steps_taken
+
+ !## conservation during mesh adjust
+ !log_mesh_adjust_IE_conservation
+ !log_mesh_adjust_KE_conservation
+ !log_mesh_adjust_PE_conservation
+
+ !## amr
+ !num_hydro_merges
+ !num_hydro_splits
+
+ !## timing
+ !elapsed_time ! time since start of run (seconds)
+
+ !## Extras
+ burning_regions 80
+ mixing_regions 40
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/inlist b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/inlist
new file mode 100644
index 0000000000..e649a14139
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/inlist
@@ -0,0 +1,288 @@
+! 20M_pre_ms_to_cc
+! Main evolution inlist flattened from 20M_pre_ms_to_core_collapse.
+! This active inlist starts from standard_lgTmax.mod and evolves to core collapse.
+
+&star_job
+ show_log_description_at_start = .false.
+
+ load_saved_model = .true.
+ load_model_filename = 'standard_lgTmax.mod'
+ !create_pre_main_sequence_model = .true.
+ !pre_ms_relax_to_start_radiative_core = .true.
+
+ change_net = .true.
+ new_net_name = 'approx21_cr60_plus_co56.net'
+ dump_missing_metals_into_heaviest = .false.
+
+ ! Example ccsn network for properly capturing the energy generation rate during all stages
+ !change_net_net = .true.
+ !new_net_name = 'mesa_206.net'
+ !dump_missing_metals_into_heaviest = .false.
+
+ ! turn on hydrodynamics
+ change_v_flag = .true.
+ new_v_flag = .true.
+
+ ! If using a big network, comment out and use a local rate_tables directory
+ num_special_rate_factors = 2
+ reaction_for_special_factor(1) = 'r_c12_ag_o16'
+ special_rate_factor(1) = 1
+ filename_of_special_rate(1) = 'c12ag_deboer_sigma_0p0_2000_Tgrid.dat'
+
+ reaction_for_special_factor(2) = 'r_he4_he4_he4_to_c12'
+ special_rate_factor(2) = 1
+ filename_of_special_rate(2) = 'r_he4_he4_he4_to_c12_cf88.txt'
+
+ show_retry_counts_when_terminate = .true.
+ show_timestep_limit_counts_when_terminate = .true.
+
+ ! pgstar is recommended for diagnosing issues and understanding the evolution
+ pgstar_flag = .true.
+ save_pgstar_files_when_terminate = .true.
+
+ new_Z = 1.42d-2
+ initial_zfracs = 6 ! set to asplund 2009 abundance fractions
+
+ save_model_when_terminate = .true.
+ save_model_filename = 'final.mod'
+ required_termination_code_string = 'fe_core_infall_limit'
+
+/ ! end of star_job namelist
+
+&eos
+ use_Skye = .true.
+ mass_fraction_limit_for_Skye = 1d-10
+
+/ ! end of eos namelist
+
+&kap
+ ! OPAL asplund 2009 opacities, Zbase set in inlist_mass_Z_wind_rotation
+ kap_file_prefix = 'a09' ! 'gs98' 'a09' 'OP_a09' 'OP_gs98'
+ kap_CO_prefix = 'a09_co' ! 'gs98_co' 'a09_co'
+ kap_lowT_prefix = 'lowT_fa05_a09p'
+ use_Type2_opacities = .true.
+
+ Zbase = 1.42d-2
+/ ! end of kap namelist
+
+&controls
+
+! initial model
+ initial_mass = 20
+ initial_z = 1.42d-2 ! solar
+ initial_y = 0.2703d0 ! from asplund et al. 2009, solar.
+
+! stopping
+ fe_core_infall_limit = 1d7
+ ! limit max_model_number as part of test_suite
+ max_model_number = 6000
+ !max_number_retries = 37
+
+! wind
+ !Dutch_scaling_factor = 0.4d0
+
+ cool_wind_full_on_T = 0.8d4
+ hot_wind_full_on_T = 1.2d4
+ cool_wind_RGB_scheme = 'Dutch'
+ cool_wind_AGB_scheme = 'Dutch'
+ hot_wind_scheme = 'Dutch'
+ Dutch_wind_lowT_scheme = 'de Jager'
+
+ max_T_center_for_any_mass_loss = 1.1d9
+ max_tries_for_implicit_wind = 0
+
+! atmosphere
+ atm_option = 'T_tau'
+ atm_T_tau_relation = 'Eddington'
+ atm_T_tau_opacity = 'fixed'
+ Pextra_factor = 2
+
+! mlt
+ mixing_length_alpha = 1.5
+ MLT_option = 'TDC'
+ use_Ledoux_criterion = .true.
+
+ use_other_alpha_mlt = .true. ! implemented in run_star_extras
+ x_ctrl(21) = 3.0 ! alpha_H
+ x_ctrl(22) = 1.5 ! alpha_other
+ x_ctrl(23) = 0.5 ! ! use alpha_H if cell X >= H_limit; else use alpha_other
+ x_ctrl(24) = 9d0 ! ! use other_alpha_mlt only if star_mass >= this limit.
+
+ thermohaline_option = 'Kippenhahn'
+ thermohaline_coeff = 0
+
+ semiconvection_option = 'Langer_85 mixing; gradT = gradr'
+ alpha_semiconvection = 1d-2
+
+ mlt_make_surface_no_mixing = .true.
+
+! superadiabatic convection routines:
+
+ use_superad_reduction = .false.
+ superad_reduction_Gamma_limit = 0.3d0 ! default is 0.5d0
+ superad_reduction_Gamma_limit_scale = 5d0
+ superad_reduction_Gamma_inv_scale = 5d0
+ superad_reduction_diff_grads_limit = 1d-2 ! default is 1d-3
+ superad_reduction_limit = -1d0
+
+ okay_to_reduce_gradT_excess = .false.
+ gradT_excess_f1 = 1d-4
+ gradT_excess_f2 = 1d-2
+ gradT_excess_lambda1 = -1d0 ! full on
+
+! mixing
+ !set_min_D_mix = .true.
+ !min_D_mix = 1d-2
+
+ ! we use step overshooting in H core
+ overshoot_scheme(1) = 'step'
+ overshoot_zone_type(1) = 'burn_H'
+ overshoot_zone_loc(1) = 'core'
+ overshoot_bdy_loc(1) = 'top'
+ overshoot_f(1) = 0.345 ! for M>10
+ !overshoot_f(1) = 0.21 ! For M<10
+ overshoot_f0(1) = 0.01
+
+ ! exponential in the H core
+ overshoot_scheme(2) = 'exponential'
+ overshoot_zone_type(2) = 'burn_He'
+ overshoot_zone_loc(2) = 'core'
+ overshoot_bdy_loc(2) = 'top'
+ overshoot_f(2) = 0.01
+ overshoot_f0(2) = 0.005
+
+ ! we don't want to deal with He/CO core mergers
+ ! and there is reason to believe there is little
+ ! inward overshooting in the shell across compositions boundaries
+ overshoot_scheme(3) = 'none'
+ overshoot_zone_type(3) = 'burn_He'
+ overshoot_zone_loc(3) = 'shell'
+ overshoot_bdy_loc(3) = 'bottom'
+
+ ! a small amount of overshooting on top of any other convective core
+ ! avoid spurious numerical behavior
+ ! perfect amount for degenerate flames
+ overshoot_scheme(4) = 'exponential'
+ overshoot_zone_type(4) = 'any'
+ overshoot_zone_loc(4) = 'any'
+ overshoot_bdy_loc(4) = 'any'
+ overshoot_f(4) = 0.005d0
+ overshoot_f0(4) = 0.001d0
+
+! timesteps
+ time_delta_coeff = 1.0
+ min_timestep_factor = 0.8d0
+ max_timestep_factor = 1.05d0
+ timestep_factor_for_retries = 0.75
+
+ limit_for_rel_error_in_energy_conservation = 1d-3
+ hard_limit_for_rel_error_in_energy_conservation = 1d-2
+
+ never_skip_hard_limits = .true.
+ min_xa_hard_limit = -1d-5
+ min_xa_hard_limit_for_highT = -3d-5
+
+ delta_lgTeff_limit = 0.01
+ delta_lgL_limit = 0.1
+ delta_lgL_He_limit = 0.1
+
+ ! Recommend decreasing all three Rho, T, Tmax
+ ! to 1d-3 or lower in production runs
+ delta_lgRho_cntr_limit = 0.03
+ delta_lgRho_cntr_hard_limit = 0.1
+ delta_lgRho_limit = 0.1
+
+ delta_lgT_cntr_limit_only_after_near_zams = .true.
+ delta_lgT_cntr_limit = 0.002
+ delta_lgT_cntr_hard_limit = 0.1
+
+ delta_lgT_max_limit_only_after_near_zams = .true.
+ delta_lgT_max_limit = 0.002
+ delta_lgT_max_hard_limit = 0.1
+
+ dX_div_X_limit(2) = -1 ! for he4
+
+ ! On the changes in total abundance of each isotope
+ ! one of the most useful timestep controls, period
+ dX_nuc_drop_limit = 2d-2 ! Recommend decreasing to 1d-3 or lower in a production run
+ dX_nuc_drop_limit_at_high_T = 2d-2 ! default = -1 = same as dX_nuc_drop_limit
+ dX_nuc_drop_min_X_limit = 1d-3 ! try decreasing to 1d-4 or 1d-5 in a production run
+ dX_nuc_drop_max_A_limit = 70 ! try increasing beyond 60 in a big network run
+ dX_nuc_drop_hard_limit = 1d99
+
+ delta_lg_XH_cntr_limit = 0.01d0
+ delta_lg_XH_cntr_max = 0.0d0
+ delta_lg_XH_cntr_min = 0.5d0
+
+ delta_lg_XHe_cntr_limit = 0.01d0
+ delta_lg_XHe_cntr_max = 0.0d0
+ delta_lg_XHe_cntr_min = 0.5d0
+
+ delta_XSi_cntr_limit = 0.0025
+ delta_XSi_cntr_hard_limit = -1!0.02
+ delta_Ye_highT_limit = 1d-3
+
+! mesh
+ !max_dq= 1d-3 ! or lower
+ mesh_delta_coeff = 2.5 ! try 1.0 or below in production run
+ mesh_delta_coeff_for_highT = 1.5 ! try 1.0 or below in production run
+ logT_max_for_standard_mesh_delta_coeff = 9.0
+ logT_min_for_highT_mesh_delta_coeff = 9.5
+ !min_dq_for_xa = 1d-4 ! avoid over-resolving composition changes, bad for bit for bit convergence?
+
+! solver
+
+ ! damped newton and structure only
+ scale_max_correction = 0.1d0
+ ignore_species_in_max_correction = .true.
+
+ use_gold2_tolerances = .true.
+ use_gold_tolerances = .true.
+ gold_solver_iters_timestep_limit = 20
+
+ max_abs_rel_run_E_err = 1d-2
+ energy_eqn_option = 'dedt'
+
+ convergence_ignore_equL_residuals = .true.
+ make_gradr_sticky_in_solver_iters = .true.
+ min_logT_for_make_gradr_sticky_in_solver_iters = 8d0
+ xa_scale = 1d-5
+ min_timestep_limit = 1d-12 ! (seconds) ! 1d-20 if things are sticky
+
+ when_to_stop_rtol = 1d-3
+ when_to_stop_atol = 1d-3
+
+ op_split_burn = .true.
+ op_split_burn_min_T = 1d9
+ burn_steps_limit = 150
+ burn_steps_hard_limit = 250
+ op_split_burn_eps = 1d-5
+ op_split_burn_odescal = 1d-5
+
+! output
+
+ !max_model_number = 4000000
+
+ num_trace_history_values = 4
+ trace_history_value_name(1) = 'Fe_core'
+ trace_history_value_name(2) = 'fe_core_infall'
+ trace_history_value_name(3) = 'rel_E_err'
+ trace_history_value_name(4) = 'log_rel_run_E_err'
+
+ photo_interval = 200
+ photo_digits = 8
+ profile_interval = 100
+ max_num_profile_models = 400000
+ history_interval = 1
+ write_header_frequency = 10
+ terminal_interval = 10
+
+ !report_solver_progress = .true. ! set true to see info about solver iterations
+ !report_ierr = .true. ! if true, produce terminal output when have some internal error
+
+/ ! end of controls namelist
+
+&pgstar
+ read_extra_pgstar_inlist(1) = .true.
+ extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/inlist_pgstar b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/inlist_pgstar
new file mode 100644
index 0000000000..be0295550d
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/inlist_pgstar
@@ -0,0 +1,677 @@
+&pgstar
+
+!pause_flag = .true.
+
+pgstar_interval = 1
+pgstar_show_age_in_years = .true.
+pgstar_show_age_in_seconds = .false.
+pgstar_sleep = 0.0
+
+! some global grid plot settings at end
+
+pgstar_show_model_number = .false.
+pgstar_show_age = .false.
+
+!------------------------------------------------------------------------------------
+
+Grid1_win_flag = .true.
+Grid1_win_width = 12
+Grid1_win_aspect_ratio = 0.666
+
+! file output
+Grid1_file_flag = .true.
+Grid1_file_dir = 'png'
+Grid1_file_prefix = 'Grid1_'
+Grid1_file_interval = 25 ! output when mod(model_number,Grid1_file_interval)==0
+Grid1_file_width = 27 ! (inches) negative means use same value as for window
+Grid1_file_aspect_ratio = -1 ! negative means use same value as for window
+
+! reset the defaults
+
+Grid1_plot_name(:) = ''
+Grid1_plot_row(:) = 1 ! number from 1 at top
+Grid1_plot_rowspan(:) = 1 ! plot spans this number of rows
+Grid1_plot_col(:) = 1 ! number from 1 at left
+Grid1_plot_colspan(:) = 1 ! plot spans this number of columns
+Grid1_plot_pad_left(:) = 0.0 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(:) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(:) = 0.0 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(:) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(:) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_title = ''
+
+Grid1_num_cols = 3 ! divide plotting region into this many equal width cols
+Grid1_num_rows = 5 ! divide plotting region into this many equal height rows
+Grid1_num_plots = 6 ! <= 10
+
+Grid1_plot_name(1) = 'Text_Summary1'
+Grid1_plot_row(1) = 1 ! number from 1 at top
+Grid1_plot_rowspan(1) = 1 ! plot spans this number of rows
+Grid1_plot_col(1) = 1 ! number from 1 at left
+Grid1_plot_colspan(1) = 3 ! plot spans this number of columns
+
+Grid1_plot_pad_left(1) = -0.03 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(1) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(1) = -0.06 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(1) = 0.07 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(1) = 1 ! 0.8 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(3) = 'TRho'
+Grid1_plot_row(3) = 2 ! number from 1 at top
+Grid1_plot_rowspan(3) = 1 ! plot spans this number of rows
+Grid1_plot_col(3) = 1 ! number from 1 at left
+Grid1_plot_colspan(3) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(3) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(3) = 0.08 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(3) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(3) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(3) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(5) = 'Profile_Panels1'
+Grid1_plot_row(5) = 3 ! number from 1 at top
+Grid1_plot_rowspan(5) = 3 ! plot spans this number of rows
+Grid1_plot_col(5) = 1 ! number from 1 at left
+Grid1_plot_colspan(5) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(5) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(5) = 0.10 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(5) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(5) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(5) = 0.6 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(2) = 'TRho_Profile'
+Grid1_plot_row(2) = 2 ! number from 1 at top
+Grid1_plot_rowspan(2) = 1 ! plot spans this number of rows
+Grid1_plot_col(2) = 2 ! number from 1 at left
+Grid1_plot_colspan(2) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(2) = -0.01 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(2) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(2) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(2) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(2) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(4) = 'History_Panels1'
+Grid1_plot_row(4) = 3 ! number from 1 at top
+Grid1_plot_rowspan(4) = 3 ! plot spans this number of rows
+Grid1_plot_col(4) = 2 ! number from 1 at left
+Grid1_plot_colspan(4) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(4) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(4) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(4) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(4) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(4) = 0.6 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(6) = 'Profile_Panels3'
+Grid1_plot_row(6) = 2 ! number from 1 at top
+Grid1_plot_rowspan(6) = 4 ! plot spans this number of rows
+Grid1_plot_col(6) = 3 ! Number from 1 at left
+Grid1_plot_colspan(6) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(6) = 0.04 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(6) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(6) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(6) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(6) = 0.6 ! multiply txt_scale for subplot by this
+
+!------------------------------------------------------------------------------------
+
+Profile_Panels3_win_flag = .false.
+
+Profile_Panels3_title = ''
+
+Profile_Panels3_num_panels = 5
+
+Profile_Panels3_yaxis_name(1) = 'Abundance'
+
+Profile_Panels3_yaxis_name(2) = 'Power'
+
+Profile_Panels3_yaxis_name(3) = 'Mixing'
+Mixing_legend_txt_scale_factor = 0.9
+
+Profile_Panels3_yaxis_name(4) = 'logRho'
+Profile_Panels3_other_yaxis_name(4) = 'v_div_cs' ! 'vel_km_per_s' ! 'entropy'
+Profile_Panels3_other_dymin(4) = 0.14
+
+Profile_Panels3_yaxis_name(5) = 'logT'
+Profile_Panels3_other_yaxis_name(5) = 'burn_num_iters'
+
+! x-axis limits and properties
+Profile_Panels3_xaxis_name = 'mass'
+Profile_Panels3_xmin = 0.0
+Profile_Panels3_xmax = -101d0 ! 2.2
+Profile_Panels3_xaxis_reversed = .false.
+
+Profile_Panels3_txt_scale = 0.7
+
+!Profile_Panels3_xaxis_name = 'zone'
+!Profile_Panels3_xmin = 800
+!Profile_Panels3_xmax = 1100
+!Profile_Panels3_xaxis_reversed = .true.
+
+!Profile_Panels3_show_grid = .true.
+Profile_Panels3_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+!Profile_Panels1_win_flag = .true.
+!Profile_Panels1_file_flag = .true.
+ Profile_Panels1_file_dir = 'png'
+ Profile_Panels1_file_prefix = 'profile_panels1_'
+ Profile_Panels1_file_interval = 1
+ Profile_Panels1_file_width = -1
+ Profile_Panels1_file_aspect_ratio = -1
+
+Profile_Panels1_title = ''
+
+Profile_Panels1_txt_scale = 0.7
+Profile_Panels1_num_panels = 4
+
+Profile_Panels1_yaxis_name(1) = 'logRho'
+Profile_Panels1_dymin(1) = 0.14
+Profile_Panels1_other_yaxis_name(1) = 'logT'
+Profile_Panels1_other_dymin(1) = 0.14
+
+Profile_Panels1_yaxis_name(2) = 'entropy'
+Profile_Panels1_other_yaxis_name(2) = 'pgas_div_p'
+
+Profile_Panels1_yaxis_name(3) = 'gradT'
+Profile_Panels1_other_yaxis_name(3) = 'grada'
+Profile_Panels1_same_yaxis_range(3) = .true.
+Profile_Panels1_other_dymin(3) = 0.08
+
+Profile_Panels1_yaxis_name(4) = 'log_opacity'
+Profile_Panels1_dymin(1) = 0.14
+Profile_Panels1_other_yaxis_name(4) = 'gradr'
+Profile_Panels1_other_dymin(1) = 0.14
+
+! x-axis limits and properties
+Profile_Panels1_xaxis_name = 'logtau'
+Profile_Panels1_xmin = -101d0
+Profile_Panels1_xmax = 8.1
+Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_xaxis_name = 'zone'
+!Profile_Panels1_xmin = 15
+!Profile_Panels1_xmax = 270
+!Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_show_grid = .true.
+Profile_Panels1_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+!TRho_Profile_win_flag = .true.
+TRho_Profile_win_width = 8
+TRho_Profile_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+! file output
+!TRho_Profile_file_flag = .true.
+TRho_Profile_file_dir = 'TRho'
+TRho_Profile_file_prefix = 'trho_'
+TRho_Profile_file_interval = 10 ! output when `mod(model_number,TRho_Profile_file_interval)==0`
+TRho_Profile_file_width = -1 ! (inches) negative means use same value as for window
+TRho_Profile_file_aspect_ratio = -1 ! negative means use same value as for window
+
+TRho_Profile_xleft = 0.15
+TRho_Profile_xright = 0.85
+TRho_Profile_ybot = 0.15
+TRho_Profile_ytop = 0.85
+TRho_Profile_txt_scale = 0.7
+TRho_Profile_title = ' '
+
+TRho_switch_to_Column_Depth = .false.
+TRho_switch_to_mass = .false.
+
+show_TRho_Profile_legend = .false.
+ TRho_Profile_legend_coord = 0.07
+ TRho_Profile_legend_fjust = 0.0
+ TRho_Profile_legend_disp1 = -2.0
+ TRho_Profile_legend_del_disp = -1.3
+ TRho_Profile_legend_txt_scale = 1.1
+
+show_TRho_Profile_text_info = .false.
+ TRho_Profile_text_info_xfac = 0.77 ! controls x location
+ TRho_Profile_text_info_dxfac = 0.02 ! controls x spacing to value from text
+ TRho_Profile_text_info_yfac = 0.6 ! controls y location of 1st line
+ TRho_Profile_text_info_dyfac = -0.04 ! controls line spacing
+
+show_TRho_Profile_mass_locs = .false.
+show_TRho_accretion_mesh_borders = .false.
+show_TRho_Profile_kap_regions = .false.
+show_TRho_Profile_gamma1_4_3rd = .true.
+show_TRho_Profile_eos_regions = .false.
+show_TRho_Profile_degeneracy_line = .true.
+show_TRho_Profile_Pgas_Prad_line = .true.
+show_TRho_Profile_burn_lines = .true.
+show_TRho_Profile_burn_labels = .true.
+
+! axis limits
+TRho_Profile_xmin = -12.0
+TRho_Profile_xmax = 10.0
+TRho_Profile_ymin = 3.0
+TRho_Profile_ymax = 10.0
+
+! these are shown if show_TRho_Profile_mass_locs = .true.
+! set all the entries
+profile_mass_point_q = -1
+profile_mass_point_color_index = 1
+profile_mass_point_symbol = -6
+profile_mass_point_symbol_scale = 1.7
+profile_mass_point_str = ''
+profile_mass_point_str_clr = 1
+profile_mass_point_str_scale = 1.0
+
+! set defaults
+num_profile_mass_points = 3 ! max is defined in star_def (max_num_profile_mass_points)
+
+profile_mass_point_q(1) = 0.5
+profile_mass_point_color_index(1) = 1
+profile_mass_point_symbol(1) = -6
+profile_mass_point_str(1) = ' 0.5 M\d\(0844)\u'
+profile_mass_point_str_clr(1) = 1
+
+profile_mass_point_q(2) = 0.95
+profile_mass_point_color_index(2) = 1
+profile_mass_point_symbol(2) = -6
+profile_mass_point_str(2) = ' 0.95 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+profile_mass_point_q(3) = 0.999
+profile_mass_point_color_index(3) = 1
+profile_mass_point_symbol(3) = -6
+profile_mass_point_str(3) = ' 0.999 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+!------------------------------------------------------------------------------------
+
+! Text_Summary windows
+
+Text_Summary1_win_flag = .false.
+Text_Summary1_win_width = 10
+Text_Summary1_win_aspect_ratio = 0.15
+
+Text_Summary1_xleft = 0.01
+Text_Summary1_xright = 0.99
+Text_Summary1_ybot = 0.0
+Text_Summary1_ytop = 1.0
+Text_Summary1_txt_scale = 0.95
+Text_Summary1_title = ''
+
+Text_Summary1_num_rows = 6 ! <= 20
+Text_Summary1_num_cols = 5 ! <= 20
+Text_Summary1_name(:,:) = ''
+
+Text_Summary1_name(1,1) = 'model_number'
+Text_Summary1_name(1,2) = 'log_dt'
+Text_Summary1_name(1,3) = 'Mass'
+Text_Summary1_name(1,4) = 'H_cntr'
+Text_Summary1_name(1,5) = 'H_rich'
+
+Text_Summary1_name(2,1) = 'non_fe_core_infall'
+Text_Summary1_name(2,2) = 'star_age'
+Text_Summary1_name(2,3) = 'lg_Mdot'
+Text_Summary1_name(2,4) = 'He_cntr'
+Text_Summary1_name(2,5) = 'He_core'
+
+Text_Summary1_name(3,1) = 'fe_core_infall'
+Text_Summary1_name(3,2) = 'gamma1_min'
+Text_Summary1_name(3,3) = 'eta_cntr'
+Text_Summary1_name(3,4) = 'C_cntr'
+Text_Summary1_name(3,5) = 'CO_core'
+
+Text_Summary1_name(4,1) = 'log_max_T'
+Text_Summary1_name(4,2) = 'log_LH'
+Text_Summary1_name(4,3) = 'lg_Lnuc_tot'
+Text_Summary1_name(4,4) = 'O_cntr'
+Text_Summary1_name(4,5) = 'Fe_core'
+
+Text_Summary1_name(5,1) = 'log_cntr_T'
+Text_Summary1_name(5,2) = 'log_LHe'
+Text_Summary1_name(5,3) = 'lg_Lneu'
+Text_Summary1_name(5,4) = 'Ne_cntr'
+Text_Summary1_name(5,5) = 'zones'
+
+Text_Summary1_name(6,1) = 'log_cntr_Rho'
+Text_Summary1_name(6,2) = 'log_LZ'
+Text_Summary1_name(6,3) = 'lg_Lphoto'
+Text_Summary1_name(6,4) = 'Si_cntr'
+Text_Summary1_name(6,5) = 'retries'
+
+!------------------------------------------------------------------------------------
+
+! Abundance profile plot
+
+Abundance_win_flag = .false.
+
+! window properties
+Abundance_win_width = 10
+Abundance_win_aspect_ratio = 0.75
+
+Abundance_xleft = 0.15
+Abundance_xright = 0.85
+Abundance_ybot = 0.15
+Abundance_ytop = 0.85
+Abundance_txt_scale = 1.1
+Abundance_title = ''
+
+! isotopes to plot
+
+Abundance_num_isos_to_show = 20
+
+Abundance_which_isos_to_show(1) = 'h1'
+Abundance_which_isos_to_show(2) = 'he3'
+Abundance_which_isos_to_show(3) = 'he4'
+Abundance_which_isos_to_show(4) = 'c12'
+Abundance_which_isos_to_show(5) = 'n14'
+Abundance_which_isos_to_show(6) = 'o16'
+Abundance_which_isos_to_show(7) = 'ne20'
+Abundance_which_isos_to_show(8) = 'mg24'
+Abundance_which_isos_to_show(9) = 'si28'
+Abundance_which_isos_to_show(10) = 's32'
+Abundance_which_isos_to_show(11) = 'ar36'
+Abundance_which_isos_to_show(12) = 'ca40'
+Abundance_which_isos_to_show(13) = 'ti44'
+Abundance_which_isos_to_show(14) = 'cr48'
+Abundance_which_isos_to_show(15) = 'cr56'
+Abundance_which_isos_to_show(16) = 'fe52'
+Abundance_which_isos_to_show(17) = 'fe54'
+Abundance_which_isos_to_show(18) = 'fe56'
+Abundance_which_isos_to_show(19) = 'ni56'
+Abundance_which_isos_to_show(20) = 'neut'
+!Abundance_which_isos_to_show(22) = 'ne22'
+
+! number and size of isotope labels along curves
+num_abundance_line_labels = 4
+Abundance_line_txt_scale_factor = 1.1
+
+! number and size of isotopes on legend
+Abundance_legend_max_cnt = 10
+Abundance_legend_txt_scale_factor = 1.3
+
+! yaxis limits
+Abundance_log_mass_frac_min = -4!-6.4 ! -3.5
+Abundance_log_mass_frac_max = 0.3
+
+! file output
+Abundance_file_flag = .false.
+Abundance_file_dir = 'Abundance'
+Abundance_file_prefix = 'abund_'
+Abundance_file_width = -1 ! (inches) negative means use same value as for window
+Abundance_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!------------------------------------------------------------------------------------
+
+! power plot
+
+Power_win_flag = .false.
+Power_win_width = 10
+Power_win_aspect_ratio = 0.75
+Power_title = ''
+
+Power_xleft = 0.15
+Power_xright = 0.85
+Power_ybot = 0.15
+Power_ytop = 0.85
+Power_txt_scale = 1.1
+Power_title = ' '
+
+Power_legend_max_cnt = 10
+Power_legend_txt_scale_factor = 1.3 ! relative to other text
+
+! power yaxis limits -- to override system default selections
+Power_ymin = -5.0 ! -101d0 ! only used if /= -101d0
+Power_ymax = 25.0 ! -101d0 ! only used if /= -101d0
+
+! file output
+Power_file_flag = .false.
+Power_file_dir = 'png'
+Power_file_prefix = 'power_'
+Power_file_interval = 5 ! output when mod(model_number,Power_file_interval)==0
+Power_file_width = -1 ! (inches) negative means use same value as for window
+Power_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!------------------------------------------------------------------------------------
+
+! mixing plot
+
+Mixing_xmin = 0.0
+Mixing_xmax = 1.6 ! -101d0
+Mixing_legend_txt_scale_factor = 1.4 ! relative to other text
+
+Mixing_show_rotation_details = .false.
+
+!Mixing_win_flag = .true.
+!Mixing_file_flag = .true.
+Mixing_file_dir = 'png'
+Mixing_file_prefix = 'mixing_'
+Mixing_file_interval = 1 ! output when `mod(model_number,Mixing_file_interval)==0`
+Mixing_file_width = -1 ! (inches) negative means use same value as for window
+Mixing_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!-----------------------------------------------------------------------
+
+! TRho window
+ ! history of central temperature vs. density
+
+ TRho_txt_scale = 0.7
+ TRho_title = ''
+
+ TRho_logT_min = -101d0
+ TRho_logT_max = -101d0
+ TRho_logRho_min = -101d0
+ TRho_logRho_max = -101d0
+ show_TRho_degeneracy_line = .true.
+
+!-----------------------------------------------------------------------
+
+ !# HR window
+ ! history of `lg_L` vs. `lg_Teff`
+
+ HR_win_flag = .true.
+
+ HR_win_width = 6
+ HR_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+ HR_xleft = 0.15
+ HR_xright = 0.85
+ HR_ybot = 0.15
+ HR_ytop = 0.85
+ HR_txt_scale = 0.7 !1.0
+ HR_title = ''
+
+ ! axis limits -- to override system default selections
+ HR_logT_min = -101d0 ! only used if /= -101d0
+ HR_logT_max = -101d0 ! only used if /= -101d0
+ HR_logL_min = -101d0 ! only used if /= -101d0
+ HR_logL_max = -101d0 ! only used if /= -101d0
+
+ HR_logL_margin = 0.1
+ HR_logT_margin = 0.1
+ HR_dlogT_min = -1
+ HR_dlogL_min = -1
+
+ HR_step_min = -1 ! only plot models with model number >= this
+ HR_step_max = -1 ! only plot models with model number <= this
+
+ show_HR_classical_instability_strip = .true.
+ show_HR_Mira_instability_region = .false.
+ show_HR_WD_instabilities = .false.
+
+ show_HR_target_box = .false.
+ HR_target_n_sigma = -3 ! -n means show sig 1..n
+ HR_target_logL = 0
+ HR_target_logL_sigma = 0
+ HR_target_logT = 0
+ HR_target_logT_sigma = 0
+
+ show_HR_annotation1 = .false.
+ show_HR_annotation2 = .false.
+ show_HR_annotation3 = .false.
+
+ HR_fname = '' ! file name for extra HR data
+
+ ! Enables calling a subroutine to add extra information to a plot
+ ! see `$MESA_DIR/star/other/pgstar_decorator.f90`
+ HR_use_decorator = .false.
+
+ ! file output
+ HR_file_flag = .false.
+ HR_file_dir = 'png'
+ HR_file_prefix = 'hr_'
+ HR_file_interval = 5 ! output when `mod(model_number,HR_file_interval)==0`
+ HR_file_width = -1 ! (inches) negative means use same value as for window
+ HR_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!-----------------------------------------------------------------------
+
+ History_Panels1_title = ''
+
+ History_Panels1_xaxis_name = 'model_number'
+ History_Panels1_max_width = -1
+
+ !History_Panels1_xaxis_name = 'star_age'
+ !History_Panels1_max_width = 10
+
+ History_Panels1_txt_scale = 0.75
+ History_Panels1_xmin = -101d0
+ History_Panels1_xmax = -101d0
+ History_Panels1_dxmin = -1
+ History_Panels1_xaxis_reversed = .false.
+ History_Panels1_xaxis_log = .false.
+ History_Panels1_xmargin = 0.0
+
+ ! ::
+
+ History_Panels1_num_panels = 4
+
+ ! ::
+
+ History_Panels1_yaxis_name(1) = 'log_L'
+ History_Panels1_yaxis_reversed(1) = .false.
+ History_Panels1_ymin(1) = -101d0
+ History_Panels1_ymax(1) = -101d0
+ History_Panels1_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(1) = 'log_Teff'
+ History_Panels1_other_yaxis_reversed(1) = .false.
+ History_Panels1_other_ymin(1) = -101d0
+ History_Panels1_other_ymax(1) = -101d0
+ History_Panels1_other_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(2) = 'lum_div_Ledd'
+ History_Panels1_yaxis_reversed(2) = .false.
+ History_Panels1_ymin(2) = -101d0
+ History_Panels1_ymax(2) = -101d0
+ History_Panels1_dymin(2) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(2) = 'log_max_T' ! 'v_surf_km_s'
+ History_Panels1_other_yaxis_reversed(2) = .false.
+ History_Panels1_other_ymin(2) = -101d0
+ History_Panels1_other_ymax(2) = -101d0
+ History_Panels1_other_dymin(2) = 0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(3) = 'radius'
+ History_Panels1_yaxis_reversed(3) = .false.
+ History_Panels1_ymin(3) = -101d0
+ History_Panels1_ymax(3) = -101d0
+ History_Panels1_dymin(3) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(3) = 'log_cntr_Rho'
+ History_Panels1_other_yaxis_reversed(3) = .false.
+ History_Panels1_other_ymin(3) = -101d0
+ History_Panels1_other_ymax(3) = -101d0
+ History_Panels1_other_dymin(3) = 0.14
+ ! ::
+
+ History_Panels1_yaxis_name(4) = 'log_dt'
+ History_Panels1_yaxis_reversed(4) = .false.
+ History_Panels1_ymin(4) = -101d0
+ History_Panels1_ymax(4) = -101d0
+ History_Panels1_dymin(4) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(4) = ''
+ History_Panels1_other_yaxis_reversed(4) = .false.
+ History_Panels1_other_ymin(4) = -101d0
+ History_Panels1_other_ymax(4) = -101d0
+ History_Panels1_other_dymin(4) = 0.14
+
+!-----------------------------------------------------------------------
+
+! some global grid plot settings
+
+pgstar_grid_show_title = .true.
+pgstar_grid_title_scale = 1.0
+pgstar_grid_title_lw = 3
+pgstar_grid_title_disp = 2.5 ! 1.8
+pgstar_grid_title_coord = 0.5
+pgstar_grid_title_fjust = 0.5
+
+pgstar_age_scale = 0.8
+pgstar_age_disp = 3.0
+pgstar_age_coord = 0.0
+pgstar_age_fjust = 0.0
+
+pgstar_xaxis_label_scale = 1.3
+pgstar_left_yaxis_label_scale = 1.3
+pgstar_xaxis_label_disp = 2.2
+pgstar_left_yaxis_label_disp = 3.1
+pgstar_right_yaxis_label_disp = 4.1
+
+pgstar_model_scale = 0.8
+pgstar_model_disp = 3.0
+pgstar_model_coord = 1.0
+pgstar_model_fjust = 1.0
+
+! white_on_black flags -- true means white foreground color on black background
+file_white_on_black_flag = .true.
+file_device = 'png' ! options 'png' and 'vcps' for png and postscript respectively
+
+kipp_win_flag=.true.
+kipp_file_flag=.true.
+Kipp_mix_interval = 1
+Kipp_show_luminosities = .true.
+
+!Grid1_file_flag = .true.
+
+!pause_flag = .true.
+
+Profile_Panels3_xaxis_name = 'mass'
+Profile_Panels3_xmin = 0 ! -101d0
+Profile_Panels3_xmax = 5 !
+Profile_Panels3_xaxis_reversed = .false.
+
+Profile_Panels3_yaxis_name(4) = 'gamma1'
+Profile_Panels3_dymin(4) = 0.14
+Profile_Panels3_other_yaxis_name(4) = 'vel_km_per_s'
+Profile_Panels3_dymin(4) = 0.14
+
+TRho_Profile_xmin = -15 !3.0
+TRho_Profile_xmax = 10
+TRho_Profile_ymin = 3.35 !8.5
+TRho_Profile_ymax = 10.1
+
+TRho_logT_min = 9.2d0
+TRho_logRho_min = 6d0
+TRho_logRho_max = 10d0
+TRho_logT_max = 10d0
+
+Text_Summary1_name(1,2) = 'time_step_sec'
+Text_Summary1_name(2,2) = 'star_age_sec'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/mk b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/mk
new file mode 100755
index 0000000000..d9eae582fa
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/mk
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/profile_columns.list b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/profile_columns.list
new file mode 100644
index 0000000000..f05af0c378
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/profile_columns.list
@@ -0,0 +1,962 @@
+! profile_columns.list -- determines the contents of star model profiles
+! you can use a non-standard version by setting profile_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as profile_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! if you need to have something added to the list of options, let me know....
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described at the end of this file.
+
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+
+! the following lines of the profile contain info for 1 zone per row, surface to center.
+
+! minimal set of enabled columns:
+
+ zone ! numbers start with 1 at the surface
+ mass ! m/Msun. mass coordinate of outer boundary of cell.
+ logR ! log10(radius/Rsun) at outer boundary of zone
+ logT ! log10(temperature) at center of zone
+ logRho ! log10(density) at center of zone
+ logP ! log10(pressure) at center of zone
+ x_mass_fraction_H
+ y_mass_fraction_He
+ z_mass_fraction_metals
+
+
+! everything below this line is deactivated
+
+
+!# Structure
+ !logM ! log10(m/Msun)
+ !log_mass
+ dm ! cell mass (grams)
+ !dm_bar ! boundary mass (grams) average of adjacent dm's
+ logdq ! log10(dq)
+ !log_dq
+ dq_ratio ! dq(k-1)/dq(k)
+ q ! fraction of star mass interior to outer boundary of this zone
+ !log_q ! log10(q)
+ !xq
+
+ !grav ! gravitational acceleration (cm sec^2)
+ !log_g ! log10 gravitational acceleration (cm sec^2)
+ !g_div_r ! grav/radius (sec^2)
+ !r_div_g ! radius/grav (sec^-2)
+ !cgrav_factor ! = cgrav(k)/standard_cgrav
+ vel_km_per_s ! velocity at outer boundary of zone (km/s) -- 0 if no velocity variable
+
+ radius ! radius at outer boundary of zone (in Rsun units)
+ radius_cm ! radius at outer boundary of zone (in centimeters)
+ !radius_km ! radius at outer boundary of zone (in kilometers)
+ logR_cm ! log10 radius at outer boundary of zone (in centimeters)
+ rmid ! radius at center by mass of zone (in Rsun units)
+ !r_div_R ! fraction of total radius
+
+ velocity ! velocity at outer boundary of zone (cm/s) -- 0 if no velocity variable
+ v_div_r ! velocity divided by radius
+ !v_times_t_div_r
+ !rho_times_r3 ! at face
+ !log_rho_times_r3 ! at face
+ !scale_height ! in Rsun units
+ pressure_scale_height ! in Rsun units
+
+ !m_div_r ! gm/cm
+ !dmbar_m_div_r
+ !log_dmbar_m_div_r
+ !mass_grams ! mass coordinate of outer boundary of cell in grams
+ mmid ! mass at midpoint of cell (average of mass coords of the cell boundaries) Msun units.
+
+ !m_grav ! total enclosed gravitational mass. Msun units.
+ !m_grav_div_m_baryonic ! mass_gravitational/mass at cell boundary
+ !mass_correction_factor ! dm_gravitational/dm (dm is baryonic mass of cell)
+
+ !xm ! mass exterior to point (Msun units)
+ !dq ! mass of zone as a fraction of total star mass
+ logxq ! log10(1-q)
+ !logxm ! log10(xm)
+
+ !xr ! radial distance from point to surface (Rsun)
+ !xr_cm ! radial distance from point to surface (cm)
+ !xr_div_R ! radial distance from point to surface in units of star radius
+ !log_xr ! log10 radial distance from point to surface (Rsun)
+ !log_xr_cm ! log10 radial distance from point to surface (cm)
+ !log_xr_div_R ! log10 radial distance from point to surface in units of star radius
+
+ dr ! r(outer edge) - r(inner edge); radial extent of cell in cm.
+ log_dr ! log10 cell width (cm)
+ !dv ! v(inner edge) - v(outer edge); rate at which delta_r is shrinking (cm/sec).
+
+ !dt_dv_div_dr ! dt*dv/dr; need to have this << 1 for every cell
+ !dr_div_R ! cell width divided by star R
+ !log_dr_div_R ! log10 cell width divided by star R
+ !dr_div_rmid ! cell width divided by rmid
+ !log_dr_div_rmid ! log(dr_div_rmid)
+
+ dr_div_cs ! cell sound crossing time (sec)
+ log_dr_div_cs ! log10 cell sound crossing time (sec)
+ !dr_div_cs_yr ! cell sound crossing time (years)
+ !log_dr_div_cs_yr ! log10 cell sound crossing time (years)
+
+ !acoustic_radius ! sound time from center to outer cell boundary (sec)
+ !log_acoustic_radius ! log10(acoustic_radius) (sec)
+ acoustic_depth ! sound time from surface to outer cell boundary (sec)
+ !log_acoustic_depth ! log10(acoustic_depth) (sec)
+ !acoustic_r_div_R_phot
+
+ !cell_collapse_time ! only set if doing explicit hydro
+ ! time (seconds) for cell inner edge to catch cell outer edge at current velocities
+ ! 0 if distance between inner and outer is increasing
+ log_cell_collapse_time ! log of cell_collapse_time
+
+ !compression_gradient
+
+
+
+!# Thermodynamics
+ temperature ! temperature at center of zone
+ !logT_face ! log10(temperature) at outer boundary of zone
+ !logT_bb ! log10(black body temperature) at outer boundary of zone
+ !logT_face_div_logT_bb
+
+ energy ! internal energy (ergs/g)
+ logE ! log10(specific internal energy) at center of zone
+ rho ! density
+ !density ! rho
+
+ entropy ! specific entropy divided by (avo*kerg)
+ !logS ! log10(specific entropy)
+ !logS_per_baryon ! log10(specific entropy per baryon / kerg)
+
+ pressure ! total pressure at center of zone (pgas + prad)
+ !prad ! radiation pressure at center of zone
+ !pgas ! gas pressure at center of zone (electrons and ions)
+ logPgas ! log10(pgas)
+ pgas_div_ptotal ! pgas/pressure
+
+ eta ! electron degeneracy parameter (eta >> 1 for significant degeneracy)
+ mu ! mean molecular weight per gas particle (ions + free electrons)
+
+ grada ! dlnT_dlnP at constant S
+ !dE_dRho ! at constant T
+ !cv ! specific heat at constant volume
+ !cp ! specific heat at constant total pressure
+
+ !log_CpT
+ gamma1 ! dlnP_dlnRho at constant S
+ !gamma3 ! gamma3 - 1 = dlnT_dlnRho at constant S
+ !gam ! plasma interaction parameter (> 160 or so means starting crystallization)
+ free_e ! free_e is mean number of free electrons per nucleon
+ !logfree_e ! log10(free_e), free_e is mean number of free electrons per nucleon
+ !chiRho ! dlnP_dlnRho at constant T
+ !chiT ! dlnP_dlnT at constant Rho
+
+ csound ! sound speed
+ log_csound
+ !csound_face ! sound speed (was previously called csound_at_face)
+ !cs_at_cell_bdy ! sound speed at cell boundary (csound is at cell center)
+ !v_div_cs ! velocity divided by sound speed
+ v_div_csound ! velocity divided by sound speed
+ !div_v
+
+ !thermal_time_to_surface ! in seconds
+ !log_thermal_time_to_surface
+ !t_rad
+ !log_t_rad
+ !log_t_sound
+ !log_t_thermal
+
+ !eos_phase
+ !eos_frac_OPAL_SCVH
+ !eos_frac_HELM
+ !eos_frac_Skye
+ !eos_frac_PC
+ !eos_frac_FreeEOS
+ !eos_frac_CMS
+ !eos_frac_ideal
+
+ !pgas_div_p
+ !prad_div_pgas
+ !prad_div_pgas_div_L_div_Ledd
+ !pressure_scale_height_cm
+
+ !eps_grav_composition_term
+ !eps_grav_plus_eps_mdot
+
+ !chiRho_for_partials
+ !chiT_for_partials
+ !rel_diff_chiRho_for_partials
+ !rel_diff_chiT_for_partials
+
+ !latent_ddlnRho
+ !latent_ddlnT
+
+ !log_P_face
+ !log_Ptrb
+ !log_cp_T_div_t_sound
+
+ !QQ
+
+
+!# Mass accretion
+ eps_grav ! -T*ds/dt (negative for expansion)
+ !log_abs_eps_grav_dm_div_L
+ !log_abs_v ! log10(abs(velocity)) (cm/s)
+ !log_mdot_cs
+ !log_mdot_v
+ !eps_mdot
+ !env_eps_grav
+ !xm_div_delta_m
+ !log_xm_div_delta_m
+
+
+!# Nuclear energy generation
+ !signed_log_eps_grav ! sign(eps_grav)*log10(max(1,abs(eps_grav)))
+ !signed_log_eps_nuc
+ !net_nuclear_energy ! erg/gm/s from nuclear reactions minus all neutrino losses
+ ! The value plotted is net_nuclear_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy minus all neutrino losses.
+ !net_energy ! net_energy + eps_grav.
+ ! The value plotted is net_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy plus eps_grav minus all neutrino losses.
+ !eps_nuc_plus_nuc_neu
+ !eps_nuc_minus_non_nuc_neu
+ !eps_nuc_start
+
+ eps_nuc ! ergs/g/sec from nuclear reactions (including losses to reaction neutrinos)
+ !log_abs_eps_nuc
+ !d_lnepsnuc_dlnd
+ !d_epsnuc_dlnd
+ !deps_dlnd_face
+ ! (was previously called deps_dlnd_at_face)
+ !d_lnepsnuc_dlnT
+ !d_epsnuc_dlnT
+ !deps_dlnT_face
+ ! (was previously called deps_dlnT_at_face)
+ !eps_nuc_neu_total ! erg/gm/sec as neutrinos from nuclear reactions
+
+ non_nuc_neu ! non-nuclear-reaction neutrino losses
+ !nonnucneu_plas ! plasmon neutrinos (for collective reactions like gamma_plasmon => nu_e + nubar_e)
+ !nonnucneu_brem ! bremsstrahlung (for reactions like e- + (z,a) => e- + (z,a) + nu + nubar)
+ !nonnucneu_phot ! photon neutrinos (for reactions like e- + gamma => e- + nu_e + nubar_e)
+ !nonnucneu_pair ! pair production (for reactions like e+ + e- => nu_e + nubar_e)
+ !nonnucneu_reco ! recombination neutrinos (for reactions like e- (continuum) => e- (bound) + nu_e + nubar_e)
+
+ ! ergs/g/sec for reaction categories
+ add_reaction_categories ! this adds all the reaction categories
+ ! NOTE: you can list specific categories by giving their names (from chem_def)
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+ burn_num_iters ! Number of split_burn iterations taken
+ !burn_avg_epsnuc
+ !log_burn_avg_epsnuc
+
+!# Composition
+ !x_mass_fraction_H
+ !y_mass_fraction_He
+ !z_mass_fraction_metals
+ abar ! average atomic weight (g/mole)
+ zbar ! average charge
+ z2bar ! average charge^2
+ ye ! average charge per baryon = proton fraction
+
+ x ! hydrogen mass fraction
+ !log_x
+ y ! helium mass fraction
+ !log_y
+ z ! metallicity
+ log_z ! metallicity
+
+ add_abundances ! this adds all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !h1
+ !he3
+ !he4
+ !c12
+ !n14
+ !o16
+
+ add_log_abundances ! this adds log10 of all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !log h1
+ !log he3
+ !log he4
+ !log c12
+ !log n14
+ !log o16
+
+ ! log concentration of species
+ ! concentration = number density / number density of electrons
+ ! Ci = (Xi/Ai) / sum(Zi*Xi/Ai) [see Thoul et al, ApJ 421:828-842, 1994]
+ !log_concentration h1
+ !log_concentration he4
+
+
+ ! typical charge for given species
+ ! (used by diffusion)
+ !typical_charge he4
+ !typical_charge c12
+ !typical_charge fe52
+
+ ! ionization state for given species
+ ! (same as typical charge, except that it's unsmoothed)
+ !ionization he4
+ !ionization c12
+ !ionization fe52
+
+ !cno_div_z ! abundance of c12, n14, and o16 as a fraction of total z
+
+
+
+
+!# Opacity
+ opacity ! opacity measured at center of zone
+ log_opacity ! log10(opacity)
+ !dkap_dlnrho_face ! partial derivative of opacity wrt. ln rho (at T=const) at outer edge of cell
+ ! (was previously called dkap_dlnrho_at_face)
+ !dkap_dlnT_face ! partial derivative of opacity wrt. ln T (at rho=const) at outer edge of cell
+ ! (was previously called dkap_dlnT_at_face)
+ !kap_frac_lowT ! fraction of opacity from lowT tables
+ !kap_frac_highT ! fraction of opacity from highT tables
+ !kap_frac_Type2 ! fraction of opacity from Type2 tables
+ !kap_frac_Compton ! fraction of opacity from Compton_Opacity
+ !kap_frac_op_mono ! fraction of opacity from OP mono
+
+ !log_kap
+ log_kap_times_factor
+
+ !log_c_div_tau
+ !xtau
+ !xlogtau
+ !logtau_sub_xlogtau
+
+!# Luminosity
+ luminosity ! luminosity at outer boundary of zone (in Lsun units)
+ logL ! log10(max(1d-2,L/Lsun))
+ !log_Lrad
+ !log_Ledd ! log10(Leddington/Lsun) -- local Ledd, 4 pi clight G m / kap
+ log_L_div_Ledd ! log10(max(1d-12,L/Leddington))
+ !log_Lrad_div_Ledd
+ !log_Lrad_div_L
+ !signed_log_power ! sign(L)*log10(max(1,abs(L)))
+
+ lum_adv
+ lum_conv
+ !lum_conv_MLT
+ !lum_div_Ledd
+ lum_erg_s
+ lum_plus_lum_adv
+ lum_rad
+
+ !log_L_div_CpTMdot
+ log_abs_lum_erg_s
+
+ !L
+ !Lc
+ !Lc_div_L
+ !Lr
+ !Lr_div_L
+ !Lt
+ !Lt_div_L
+
+!# Energetics
+ total_energy ! specific total energy of cell (ergs/g). internal+potential+kinetic+rotation.
+ !cell_specific_IE
+ !cell_specific_KE
+ !cell_IE_div_IE_plus_KE
+ !cell_KE_div_IE_plus_KE
+
+ !cell_ie_div_star_ie
+ !cell_internal_energy_fraction
+ !cell_internal_energy_fraction_start
+ !cell_specific_PE
+
+ !log_cell_ie_div_star_ie
+ !log_cell_specific_IE
+
+ !ergs_eps_grav_plus_eps_mdot
+ !ergs_error
+ !ergs_error_integral
+ !ergs_mdot
+ !ergs_rel_error_integral
+ !dm_eps_grav
+
+ !dE
+
+ !etrb
+ !log_etrb
+ !extra_grav
+ !log_rel_E_err
+
+ !total_energy_sign
+
+!# Convection
+ mlt_mixing_length ! mixing length for mlt (cm)
+ !mlt_mixing_type ! value returned by mlt
+ !mlt_Pturb
+ !alpha_mlt
+
+ conv_vel ! convection velocity (cm/sec)
+ log_conv_vel ! log10 convection velocity (cm/sec)
+
+ conv_L_div_L
+ log_conv_L_div_L
+ !lum_conv_div_lum_rad
+ !lum_rad_div_L_Edd
+ !lum_conv_div_lum_Edd
+ !lum_conv_div_L
+ !lum_rad_div_L
+ !lum_rad_div_L_Edd_sub_fourPrad_div_PchiT ! density increases outward if this is > 0
+ ! see Joss, Salpeter, and Ostriker, "Critical Luminosity", ApJ 181:429-438, 1973.
+
+ gradT ! mlt value for required temperature gradient dlnT/dlnP
+
+ gradr ! dlnT/dlnP required for purely radiative transport
+ !grad_temperature ! smoothed dlnT/dlnP at cell boundary
+ !grad_density ! smoothed dlnRho/dlnP at cell boundary
+
+ !gradL ! gradient for Ledoux criterion for convection
+ !sch_stable ! 1 if grada > gradr, 0 otherwise
+ !ledoux_stable ! 1 if gradL > gradr, 0 otherwise
+
+ !grada_sub_gradT
+ gradT_sub_grada ! gradT-grada at cell boundary
+ !gradT_div_grada ! gradT/grada at cell boundary
+
+ !gradr_sub_gradT
+ !gradT_sub_gradr ! gradT-gradr at cell boundary
+ !gradT_div_gradr ! gradT/gradr at cell boundary
+
+ !log_gradT_div_gradr ! log10 gradT/gradr at cell boundary
+ !log_mlt_Gamma ! convective efficiency
+ conv_vel_div_csound ! convection velocity divided by sound speed
+ !conv_vel_div_L_vel ! L_vel is velocity needed to carry L by convection; L = 4*pi*r^2*rho*vel**3
+ log_mlt_D_mix ! log10 diffusion coefficient for mixing from mlt (cm^2/sec)
+
+ !gradr_div_grada ! gradr/grada_face; > 1 => Schwarzschild unstable for convection
+ !gradr_sub_grada ! gradr - grada_face; > 0 => Schwarzschild unstable for convection
+
+ !gradL_sub_gradr
+ !gradP_div_rho
+ !gradT_excess_effect
+ !gradT_rel_err
+ !gradT_sub_a
+ !grada_face
+ !grada_sub_gradr
+ !diff_grads
+ !log_diff_grads
+
+ !mlt_D
+ !mlt_Gamma
+ !mlt_Y_face
+ !mlt_Zeta
+ !mlt_gradT
+ !mlt_log_abs_Y
+ !mlt_vc
+ !log_mlt_vc
+ !dvc_dt_TDC_div_g
+
+ !superad_reduction_factor
+ !conv_vel_div_mlt_vc
+
+ !log_Lconv
+ !log_Lconv_div_L
+
+!# Mixing
+ !mixing_type ! mixing types are defined in mesa/const/public/const_def
+ log_D_mix ! log10 diffusion coefficient for mixing in units of cm^2/second (Eulerian)
+ !log_D_mix_non_rotation
+ !log_D_mix_rotation
+
+ log_D_conv ! D_mix for regions where mix_type = convective_mixing
+ !log_D_leftover ! D_mix for regions where mix_type = leftover_convective_mixing
+ log_D_semi ! D_mix for regions where mix_type = semiconvective_mixing
+ log_D_ovr ! D_mix for regions where mix_type = overshoot_mixing
+ log_D_thrm ! D_mix for regions where mix_type = thermohaline_mixing
+ log_D_minimum ! D_mix for regions where mix_type = minimum_mixing
+ log_D_rayleigh_taylor ! D_mix for regions where mix_type = rayleigh_taylor_mixing
+ !log_D_anon ! D_mix for regions where mix_type = anonymous_mixing
+ log_D_omega
+
+ log_sig_mix ! sig(k) is mixing flow across face k in (gm sec^1)
+ ! sig(k) = D_mix*(4*pi*r(k)**2*rho_face)**2/dmavg
+
+ !dominant_isoA_for_thermohaline
+ !dominant_isoZ_for_thermohaline
+ !gradL_composition_term
+
+ mix_type
+
+
+
+!# Optical Depth
+ tau ! optical depth
+ !log_column_depth ! log10 column depth, exterior mass / area (g cm^-2)
+ !log_radial_depth ! log10 radial distance to surface (cm)
+ logtau ! log10(optical depth) at cell face
+ !tau_eff ! tau that gives the local P == P_atm if this location at surface
+ ! tau_eff = kap*(P/g - Pextra_factor*(L/M)/(6*pi*clight*cgrav))
+ !tau_eff_div_tau
+
+
+
+!# Rotation
+ omega ! angular velocity = j_rot/i_rot
+ log_omega
+ log_j_rot
+ log_J_div_M53 ! J is j*1e-15 integrated from center; M53 is m^(5/3)
+ log_J_inside ! J_inside is j_rot integrated from center
+ !shear ! -dlnomega/dlnR
+ log_abs_shear ! log10(abs(dlnomega/dlnR))
+ !richardson_number
+ i_rot ! specific moment of inertia at cell boundary
+ j_rot ! specific angular momentum at cell boundary
+ v_rot ! rotation velocity at cell boundary (km/sec)
+ !w_div_w_crit_roche !ratio of rotational velocity to keplerian at the equator
+ !without the contribution from the Eddington factor
+ fp_rot ! rotation factor for pressure
+ ft_rot ! rotation factor for temperature
+ !ft_rot_div_fp_rot ! gradr factor
+
+ !log_am_nu_non_rot ! log10(am_nu_non_rot)
+ !log_am_nu_rot ! log10(am_nu_rot)
+ log_am_nu ! log10(am_nu_non_rot + am_nu_rot)
+
+ r_polar ! (Rsun)
+ log_r_polar ! log10 (Rsun)
+ r_equatorial ! (Rsun)
+ log_r_equatorial ! log10 (Rsun)
+ r_e_div_r_p ! equatorial/r_polar
+ omega_crit ! breakup angular velocity = sqrt(G M / equatorial^3)
+ omega_div_omega_crit
+
+ !am_log_nu_omega ! for diffusion of omega
+ !am_log_nu_j ! for diffusion of angular momentum
+
+ !am_log_nu_rot ! diffusion of angular momentum driven by rotation
+ !am_log_nu_non_rot ! diffusion driven by other sources, e.g. convection
+
+ !am_log_sig_omega ! for diffusion of omega
+ !am_log_sig_j ! for diffusion of angular momentum
+ am_log_sig ! == am_log_sig_omega
+
+ !am_log_D_visc ! diffusion coeff for kinematic viscosity
+ am_log_D_DSI ! diffusion coeff for dynamical shear instability
+ am_log_D_SH ! diffusion coeff for Solberg-Hoiland instability
+ am_log_D_SSI ! diffusion coeff for secular shear instability
+ am_log_D_ES ! diffusion coeff for Eddington-Sweet circulation
+ am_log_D_GSF ! diffusion coeff for Goldreich-Schubert-Fricke instability
+ am_log_D_ST ! Spruit dynamo mixing diffusivity
+ am_log_nu_ST ! Spruit dynamo effective viscosity
+
+ dynamo_log_B_r ! (Gauss)
+ dynamo_log_B_phi ! (Gauss)
+
+ !am_domega_dlnR
+ !log_abs_dlnR_domega
+
+ !w_div_w_crit_roche2
+
+
+!# Diffusion
+ ! electric field from element diffusion calculation
+ !e_field
+ !log_e_field
+
+ ! gravitational field from element diffusion calculation
+ !g_field_element_diffusion
+ !log_g_field_element_diffusion
+
+ !eE_div_mg_element_diffusion
+ !log_eE_div_mg_element_diffusion
+
+ ! element diffusion velocity for species
+ !edv h1
+ !edv he4
+ !edv o16
+
+ ! Energy generated by Ne22 sedimentation.
+ !eps_WD_sedimentation
+ !log_eps_WD_sedimentation
+
+ !eps_diffusion
+ !log_eps_diffusion
+
+ !diffusion_D h1 ! self diffusion coeff
+ !diffusion_dX h1 ! change in h1 mass fraction from diffusion
+ !diffusion_dX he4 ! change in he4 mass fraction from diffusion
+ !diffusion_dX n20 ! change in n20 mass fraction from diffusion
+
+ !v_rad h1 ! velocity from radiative levitation
+ !v_rad he4 ! velocity from radiative levitation
+ !v_rad ne20 ! velocity from radiative levitation
+
+ !log_g_rad h1 ! log10 acceleration from radiative levitation
+ !log_g_rad he4 ! log10 acceleration from radiative levitation
+ !log_g_rad ne20 ! log10 acceleration from radiative levitation
+
+!# Phase Separation
+ !eps_phase_separation
+
+!# Oscillations
+ !brunt_N2 ! brunt-vaisala frequency squared
+ !brunt_N2_structure_term
+ !brunt_N2_composition_term
+ !log_brunt_N2_structure_term
+ !log_brunt_N2_composition_term
+ !brunt_A ! = N^2*r/g
+ !brunt_A_div_x2 ! x = r(k)/r(1)
+ !brunt_N2_dimensionless ! N2 in units of 3GM/R^3
+ !brunt_N_dimensionless ! N in units of sqrt(3GM/R^3)
+ !brunt_frequency ! cycles per day
+ !brunt_N ! sqrt(abs(brunt_N2))
+ !log_brunt_N ! log10(brunt_N)
+ !log_brunt_N2 ! log10(brunt_N2)
+ !log_brunt_N2_dimensionless ! log10(brunt_N2_dimensionless)
+
+ !brunt_B ! smoothed numerical difference
+ !brunt_nonB ! = grada - gradT
+ !log_brunt_B ! smoothed numerical difference
+ !log_brunt_nonB ! = grada - gradT
+
+ !sign_brunt_N2 ! sign of brunt_N2 (+1 for Ledoux stable; -1 for Ledoux unstable)
+ !brunt_nu ! brunt_frequency in microHz
+ !log_brunt_nu ! brunt_frequency in microHz
+
+ !lamb_S ! lamb frequency for l=1: S = sqrt(2)*csound/r (rad/s)
+ !lamb_S2 ! squared lamb frequency for l=1: S2 = 2*(csound/r)^2 (rad^2/s^2)
+
+ !lamb_Sl1 ! lamb frequency for l=1; = sqrt(2)*csound/r (microHz)
+ !lamb_Sl2 ! lamb frequency for l=2; = sqrt(6)*csound/r (microHz)
+ !lamb_Sl3 ! lamb frequency for l=3; = sqrt(12)*csound/r (microHz)
+ !lamb_Sl10 ! lamb frequency for l=10; = sqrt(110)*csound/r (microHz)
+
+ !log_lamb_Sl1 ! log10(lamb_Sl1)
+ !log_lamb_Sl2 ! log10(lamb_Sl2)
+ !log_lamb_Sl3 ! log10(lamb_Sl3)
+ !log_lamb_Sl10 ! log10(lamb_Sl10)
+
+ !brunt_N_div_r_integral ! integral from center of N*dr/r
+ !k_r_integral ! integral from center of k_r*dr
+ !brunt_N2_sub_omega2
+ !sl2_sub_omega2
+
+
+!# RSP
+
+ !rsp_Chi ! dlnP_dlnRho
+ !rsp_Et ! Specific turbulent energy
+ !rsp_logEt ! Log specific turbulent energy
+ !rsp_erad ! Specific internal (radiative) energy
+ !rsp_log_erad ! Log specific internal (radiative) energy
+ !rsp_Hp_face ! Pressure scale height at cell face
+ !rsp_Lc ! Convective luminosity
+ !rsp_Lc_div_L ! Convective luminosity div total luminosity
+ !rsp_Lr ! Radiative luminosity
+ !rsp_Lr_div_L ! Radiative luminosity div total luminosity
+ !rsp_Lt ! Turbulent luminosity
+ !rsp_Lt_div_L ! Turbulent luminosity div total luminosity
+ !rsp_Pt ! Turbulent pressure, p_t, see Table 1 in MESA5
+ !rsp_Uq ! Viscous momentum transfer rate, U_q, see Table 1 in MESA5
+ !rsp_Eq ! Viscous energy transfer rate, epsilon_q, see Table 1 in MESA5
+ !rsp_Pvsc ! Artificial viscosity, p_av, see Table 1 in MESA5
+ !rsp_gradT ! Temperature gradient
+ !rsp_Y_face ! Superadiabatic gradient at cell face, Y_sag, see Table 1 in MESA5
+ !rsp_damp ! Turbulent dissipation, D, see Table 1 in MESA5
+ !rsp_dampR ! Radiative cooling, D_r, see Table 1 in MESA5
+ !rsp_sink ! Sum of turbulent dissipation and radiative cooling terms
+ !rsp_src ! Source function, S, see Table 1 in MESA5
+ !rsp_src_snk ! Convective coupling, C, see Table 1 in MESA5
+ !rsp_heat_exchange_timescale ! 1d0/(clight * opacity * density)
+ !rsp_log_heat_exchange_timescale
+ !rsp_log_dt_div_heat_exchange_timescale ! Ratio of time step to heat exchange timescale
+ !w
+ !log_w
+
+ !COUPL
+ !DAMP
+ !DAMPR
+ !SOURCE
+ !Chi
+ !Eq
+ !Hp_face
+ !PII_face
+ !Ptrb
+ !Pvsc
+ !Uq
+ !Y_face
+
+!# RTI
+
+ RTI_du_diffusion_kick
+ alpha_RTI
+ boost_for_eta_RTI
+ dedt_RTI
+ dudt_RTI
+ eta_RTI
+ log_alpha_RTI
+ !log_boost_for_eta_RTI
+ log_eta_RTI
+ !log_etamid_RTI
+ log_lambda_RTI_div_Hrho
+ log_sig_RTI
+ !log_sigmid_RTI
+ !log_source_RTI
+ log_source_minus_alpha_RTI
+ log_source_plus_alpha_RTI
+ !source_minus_alpha_RTI
+ !source_plus_alpha_RTI
+ lambda_RTI
+
+!# Hydrodynamics
+
+
+ !v
+ v_div_v_escape
+ !v_div_vesc
+ !v_kms
+ !log_v_escape
+
+ u
+ u_face
+
+ P_face
+
+
+!# Extras
+ extra_heat
+ !extra_L ! extra_heat integrated from center (Lsun)
+ !log_extra_L ! log10 integrated from center (Lsun)
+ !log_irradiation_heat
+
+ !extra_jdot ! set in other_torque routine
+ !extra_omegadot ! set in other_torque routine
+
+ extra_opacity_factor ! set in other_opacity_factor routine
+
+ ! diffusion factor profile for species, set in other_diffusion_factor routine
+ !extra_diffusion_factor h1
+ !extra_diffusion_factor he4
+ !extra_diffusion_factor o16
+
+
+
+!# Miscellaneous
+
+ !dlog_h1_dlogP ! (log(h1(k)) - log(h1(k-1)))/(log(P(k)) - log(P(k-1)))
+ !dlog_he3_dlogP
+ !dlog_he4_dlogP
+ !dlog_c12_dlogP
+ !dlog_c13_dlogP
+ !dlog_n14_dlogP
+ !dlog_o16_dlogP
+ !dlog_ne20_dlogP
+ !dlog_mg24_dlogP
+ !dlog_si28_dlogP
+
+ !dlog_pp_dlogP
+ !dlog_cno_dlogP
+ !dlog_3alf_dlogP
+
+ !dlog_burn_c_dlogP
+ !dlog_burn_n_dlogP
+ !dlog_burn_o_dlogP
+
+ !dlog_burn_ne_dlogP
+ !dlog_burn_na_dlogP
+ !dlog_burn_mg_dlogP
+
+ !dlog_cc_dlogP
+ !dlog_co_dlogP
+ !dlog_oo_dlogP
+
+ !dlog_burn_si_dlogP
+ !dlog_burn_s_dlogP
+ !dlog_burn_ar_dlogP
+ !dlog_burn_ca_dlogP
+ !dlog_burn_ti_dlogP
+ !dlog_burn_cr_dlogP
+ !dlog_burn_fe_dlogP
+
+ !dlog_pnhe4_dlogP
+ !dlog_photo_dlogP
+ !dlog_other_dlogP
+
+ !logR_kap ! logR = logRho - 3*logT + 18 ; used in kap tables
+ !logW ! logW = logPgas - 4*logT
+ !logQ ! logQ = logRho - 2*logT + 12
+ !logV ! logV = logRho - 0.7*logE + 20
+
+ !log_CpT_absMdot_div_L ! log10(s% Cp(k)*s% T(k)*abs(s% mstar_dot)/s% L(k))
+
+ !delta_r ! r - r_start, change during step
+ !delta_L ! L - L_start, change during step
+ !delta_cell_vol ! cell_vol - cell_vol_start, change during step
+ !delta_entropy ! entropy - entropy_start, change during step (does not include effects of diffusion)
+ !delta_T ! T - T_start, change during step
+ !delta_rho ! rho - rho_start, change during step
+ !delta_eps_nuc ! eps_nuc - eps_nuc_start, change during step
+ !delta_mu ! mu - mu_start, change during step
+
+ zFe ! mass fraction of "Fe" = Fe+Co+Ni
+ !log_zFe
+ dPdr_dRhodr_info
+ !log_sig_raw_mix
+
+ !d_u_div_rmid
+ !d_u_div_rmid_start
+ !d_v_div_r_dm
+ !d_v_div_r_dr
+
+ !dlnP_dlnR
+ !dlnRho_dlnR
+ !dlnRho_dr
+ !dlnX_dr
+ !dlnY_dr
+ dlogR
+ !dPdr_div_grav
+ dPdr_info
+ dRhodr_info
+ !dRstar_div_dr
+ !dr_ratio
+ !dm_eps_grav
+ !dr_ratio
+ !dt_cs_div_dr
+ !dt_div_tau_conv
+ !dt_times_conv_vel_div_mixing_length
+ !log_dt_cs_div_dr
+ !log_dt_div_tau_conv
+ !log_dt_times_conv_vel_div_mixing_length
+ log_du_kick_div_du
+ !du
+ !dvdt_dPdm
+ !dvdt_grav
+
+ !tau_conv
+ !tau_cool
+ !tau_epsnuc
+ !tau_qhse
+
+ !max_abs_xa_corr
+
+ !tdc_num_iters
+
+ !k
+
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described here.
+
+ ! initial mass and Z
+ ! initial_mass
+ ! initial_z
+ ! general properties of the current state
+ ! model_number
+ ! num_zones
+ ! star_age
+ ! time_step
+ ! properties at the photosphere
+ ! Teff
+ ! photosphere_L
+ ! photosphere_r
+ ! properties at the outermost zone of the model
+ ! log_surface_L
+ ! log_surface_radius
+ ! log_surface_temp
+ ! properties near the center of the model
+ ! log_center_temp
+ ! log_center_density
+ ! log_center_P
+ ! center_eta
+ ! abundances near the center
+ ! center_h1
+ ! center_he3
+ ! center_he4
+ ! center_c12
+ ! center_n14
+ ! center_o16
+ ! center_ne20
+ ! information about total mass
+ ! star_mass
+ ! star_mdot
+ ! star_mass_h1
+ ! star_mass_he3
+ ! star_mass_he4
+ ! star_mass_c12
+ ! star_mass_n14
+ ! star_mass_o16
+ ! star_mass_ne20
+ ! locations of abundance transitions
+ ! he_core_mass
+ ! c_core_mass
+ ! o_core_mass
+ ! si_core_mass
+ ! fe_core_mass
+ ! location of optical depths 10 and 100
+ ! tau10_mass
+ ! tau10_radius
+ ! tau100_mass
+ ! tau100_radius
+ ! time scales
+ ! dynamic_time
+ ! kh_timescale
+ ! nuc_timescale
+ ! various kinds of total power
+ ! power_nuc_burn
+ ! power_h_burn
+ ! power_he_burn
+ ! power_neu
+ ! a few control parameter values
+ ! h1_boundary_limit
+ ! he4_boundary_limit
+ ! c12_boundary_limit
+ ! burn_min1
+ ! burn_min2
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/re b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/re
new file mode 100755
index 0000000000..7093783a31
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/re
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+shopt -u expand_aliases
+
+photo_directory=photos
+
+function most_recent_photo {
+ ls -tp "$photo_directory" | grep -v / | head -1
+}
+
+if [ $# -eq 0 ]
+then
+ photo=$(most_recent_photo)
+else
+ photo=$1
+fi
+
+if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
+then
+ echo "specified photo ($photo) does not exist"
+ exit 1
+fi
+
+echo "restart from $photo"
+if ! cp "$photo_directory/$photo" restart_photo
+then
+ echo "failed to copy photo ($photo)"
+ exit 1
+fi
+
+make run
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/rn b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/rn
new file mode 100755
index 0000000000..68233efd1d
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/rn
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+make run
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+echo 'finished'
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/rn1 b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/rn1
new file mode 100755
index 0000000000..f4ce7695fe
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/rn1
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+rm -f restart_photo
+
+make run
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/src/run.f90 b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/src/run.f90
new file mode 100644
index 0000000000..76d423f1af
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/src/run.f90
@@ -0,0 +1,15 @@
+program run
+ use run_star_support, only: do_read_star_job
+ use run_star, only: do_run_star
+
+ implicit none
+
+ integer :: ierr
+
+ ierr = 0
+ call do_read_star_job('inlist', ierr)
+ if (ierr /= 0) stop 1
+
+ call do_run_star
+
+end program run
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/src/run_star_extras.f90 b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/src/run_star_extras.f90
new file mode 100644
index 0000000000..a745a5e679
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/src/run_star_extras.f90
@@ -0,0 +1,231 @@
+! ***********************************************************************
+!
+! Copyright (C) 2010 The MESA Team
+!
+! This program is free software: you can redistribute it and/or modify
+! it under the terms of the GNU Lesser General Public License
+! as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+! See the GNU Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public License
+! along with this program. If not, see .
+!
+! ***********************************************************************
+
+ module run_star_extras
+
+ use star_lib
+ use star_def
+ use const_def
+ use math_lib
+ use auto_diff
+
+ implicit none
+
+ include "test_suite_extras_def.inc"
+
+! here are the x controls used below
+
+!alpha_mlt_routine
+ !alpha_H = s% x_ctrl(21)
+ !alpha_other = s% x_ctrl(22)
+ !H_limit = s% x_ctrl(23)
+
+! Example of one extra value to preserve across photo restarts.
+! real(dp) :: example_photo_value
+
+ contains
+
+ include "test_suite_extras.inc"
+
+
+ subroutine extras_controls(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ s% extras_startup => extras_startup
+ s% extras_check_model => extras_check_model
+ s% extras_finish_step => extras_finish_step
+ s% extras_after_evolve => extras_after_evolve
+ s% how_many_extra_history_columns => how_many_extra_history_columns
+ s% data_for_extra_history_columns => data_for_extra_history_columns
+ s% how_many_extra_profile_columns => how_many_extra_profile_columns
+ s% data_for_extra_profile_columns => data_for_extra_profile_columns
+ s% other_photo_read => extras_photo_read
+ s% other_photo_write => extras_photo_write
+ s% other_alpha_mlt => alpha_mlt_routine
+ end subroutine extras_controls
+
+
+ subroutine extras_photo_read(id, iounit, ierr)
+ integer, intent(in) :: id, iounit
+ integer, intent(out) :: ierr
+ ierr = 0
+ !read(iounit, iostat=ierr) example_photo_value
+ end subroutine extras_photo_read
+
+
+ subroutine extras_photo_write(id, iounit)
+ integer, intent(in) :: id, iounit
+ !write(iounit) example_photo_value
+ end subroutine extras_photo_write
+
+
+ subroutine alpha_mlt_routine(id, ierr)
+ use chem_def, only: ih1
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k, h1
+ real(dp) :: alpha_H, alpha_other, H_limit
+ include 'formats'
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ alpha_H = s% x_ctrl(21)
+ alpha_other = s% x_ctrl(22)
+ H_limit = s% x_ctrl(23)
+ h1 = s% net_iso(ih1)
+ !write(*,1) 'alpha_H', alpha_H
+ !write(*,1) 'alpha_other', alpha_other
+ !write(*,1) 'H_limit', H_limit
+ !write(*,2) 'h1', h1
+ !write(*,2) 's% nz', s% nz
+ if (alpha_H <= 0 .or. alpha_other <= 0 .or. h1 <= 0) return
+ do k=1,s% nz
+ if (s% xa(h1,k) >= H_limit) then
+ s% alpha_mlt(k) = alpha_H
+ else
+ s% alpha_mlt(k) = alpha_other
+ end if
+ !write(*,2) 'alpha_mlt', k, s% alpha_mlt(k),
+ end do
+ !stop
+ end subroutine alpha_mlt_routine
+
+
+ subroutine extras_startup(id, restart, ierr)
+ integer, intent(in) :: id
+ logical, intent(in) :: restart
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ call test_suite_startup(s, restart, ierr)
+
+ end subroutine extras_startup
+
+
+ subroutine extras_after_evolve(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ include 'formats'
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ write(*,'(A)')
+ ! put target info in TestHub output
+ testhub_extras_names(1) = 'fe_core_mass'; testhub_extras_vals(1) = s% fe_core_mass
+
+ if(s% fe_core_mass < 1d0) then
+ write(*,1) "Bad fe_core_mass", s%fe_core_mass
+ else
+ if(s% fe_core_infall > s% fe_core_infall_limit) then
+ write(*,'(a)') 'all values are within tolerance'
+ else
+ write(*,'(a)') "Bad fe core infall"
+ end if
+ end if
+ call test_suite_after_evolve(s, ierr)
+ end subroutine extras_after_evolve
+
+
+ ! returns either keep_going, retry, or terminate.
+ integer function extras_check_model(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_check_model = keep_going
+ end function extras_check_model
+
+
+ integer function how_many_extra_history_columns(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_history_columns = 0
+ end function how_many_extra_history_columns
+
+
+ subroutine data_for_extra_history_columns(id, n, names, vals, ierr)
+ integer, intent(in) :: id, n
+ character (len=maxlen_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ end subroutine data_for_extra_history_columns
+
+
+ integer function how_many_extra_profile_columns(id)
+ use star_def, only: star_info
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_profile_columns = 1
+ end function how_many_extra_profile_columns
+
+
+ subroutine data_for_extra_profile_columns(id, n, nz, names, vals, ierr)
+ use star_def, only: star_info, maxlen_profile_column_name
+ use const_def, only: dp
+ integer, intent(in) :: id, n, nz
+ character (len=maxlen_profile_column_name) :: names(n)
+ real(dp) :: vals(nz,n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ names(1) = 'zbar_div_abar'
+ do k=1,s% nz
+ vals(k,1) = s% zbar(k)/s% abar(k)
+ end do
+ end subroutine data_for_extra_profile_columns
+
+ ! returns either keep_going or terminate.
+ integer function extras_finish_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_finish_step = keep_going
+ if (extras_finish_step == terminate) &
+ s% termination_code = t_extras_finish_step
+ end function extras_finish_step
+
+ end module run_star_extras
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/standard_lgTmax.mod b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/standard_lgTmax.mod
new file mode 100644
index 0000000000..543e1555d7
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/standard_lgTmax.mod
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:808de00ef2b333e36afbbf0a8dda7ebc146e78560f8faf79a8b12ce6288e4acf
+size 1428461
diff --git a/star/dev_cases_massive_stars/20M_pre_ms_to_cc/testhub.yml b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/testhub.yml
new file mode 100644
index 0000000000..2b486a02cb
--- /dev/null
+++ b/star/dev_cases_massive_stars/20M_pre_ms_to_cc/testhub.yml
@@ -0,0 +1,15 @@
+ runtime_minutes: 16.71
+ model_number: 2344
+ star_age: 1.0136396734299462E+07
+ num_retries: 11
+ log_rel_run_E_err: -4.5194878652040105
+ steps: 266
+ retries: 11
+ redos: 0
+ solver_calls_made: 277
+ solver_calls_failed: 11
+ solver_iterations: 2052
+ extra_testhub_names:
+ - 'fe_core_mass'
+ extra_testhub_vals:
+ - 1.6762420545401346E+00
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/Makefile b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/Makefile
new file mode 100644
index 0000000000..c779b9d6d8
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/README.rst b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/README.rst
new file mode 100644
index 0000000000..9c5cea1643
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/README.rst
@@ -0,0 +1,21 @@
+.. _40M_carbon_burning_envelope_issues:
+
+************************************
+40M_carbon_burning_envelope_issues
+************************************
+
+(To do) Example massive star with dynamical envelope issues during carbon
+burning.
+
+This dev case starts from a ZAMS model, relaxes the initial composition, and
+evolves a 40 |Msun| model with pgstar settings in ``inlist_pgstar``.
+
+Inlists
+=======
+
+This dev case has two inlist files.
+
+* ``inlist`` contains the model setup and evolution controls.
+* ``inlist_pgstar`` contains the pgstar plot settings loaded by ``inlist``.
+
+Last-Updated: 12May2026
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/ck b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/ck
new file mode 100755
index 0000000000..78ca63a8c1
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/ck
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+# this provides the definition of check_one
+# check_one
+source "${MESA_DIR}/star/test_suite/test_suite_helpers"
+
+check_one
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/clean b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/clean
new file mode 100755
index 0000000000..74f37b9ce4
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/clean
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make clean
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/history_columns.list b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/history_columns.list
new file mode 100644
index 0000000000..4801dcc0e7
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/history_columns.list
@@ -0,0 +1,1066 @@
+! history_columns.list -- determines the contents of star history logs
+! you can use a non-standard version by setting history_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as history_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! blank lines and comments can be used freely.
+! if a column name appears more than once in the list, only the first occurrence is used.
+
+! if you need to have something added to the list of options, let me know....
+
+
+! the first few lines of the log file contain a few items:
+
+ ! version_number -- for the version of mesa being used
+ ! burn_min1 -- 1st limit for reported burning, in erg/g/s
+ ! burn_min2 -- 2nd limit for reported burning, in erg/g/s
+
+
+!# other files
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+! the following lines of the log file contain info about 1 model per row
+
+!----------------------------------------------------------------------------------------------
+
+!# general info about the model
+
+ model_number ! counting from the start of the run
+ num_zones ! number of zones in the model
+
+ !## age
+
+ star_age ! elapsed simulated time in years since the start of the run
+ star_age_sec ! elapsed simulated time in seconds since the start of the run
+ star_age_min ! elapsed simulated time in minutes since the start of the run
+ star_age_hr ! elapsed simulated time in hours since the start of the run
+ star_age_day ! elapsed simulated time in days since the start of the run
+ !day ! elapsed simulated time in days since the start of the run
+
+ !log_star_age
+ !log_star_age_sec
+
+ !## timestep
+
+ time_step ! timestep in years since previous model
+ time_step_sec ! timestep in seconds since previous model
+ time_step_days
+ log_dt ! log10 time_step in years
+ log_dt_sec ! log10 time_step in seconds
+ log_dt_days ! log10 time_step in days
+
+ !## mass
+
+ star_mass ! in Msun units
+ !log_star_mass
+
+ !star_gravitational_mass ! star_mass is baryonic mass
+ !star_mass_grav_div_mass
+
+ !delta_mass ! star_mass - initial_mass in Msun units
+ log_xmstar ! log10 mass exterior to M_center (grams)
+
+ !## mass change
+
+ !star_mdot ! d(star_mass)/dt (in msolar per year)
+ log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+
+ !## imposed surface conditions
+ !tau_factor
+ !tau_surface
+
+ !## imposed center conditions
+ !m_center
+ !m_center_gm
+ !r_center
+ !r_center_cm
+ !r_center_km
+ !L_center
+ !log_L_center
+ !log_L_center_ergs_s
+ !v_center
+ !v_center_kms
+
+ !logt_max
+
+!----------------------------------------------------------------------------------------------
+
+!# mixing and convection
+
+ !max_conv_vel_div_csound
+ !max_gradT_div_grada
+ !max_gradT_sub_grada
+ !min_log_mlt_Gamma
+
+
+ !## mixing regions
+
+ mass_conv_core ! (Msun) mass coord of top of convective core. 0 if core is not convective
+
+ ! mx1 refers to the largest (by mass) convective region.
+ ! mx2 is the 2nd largest.
+
+ ! conv_mx1_top and conv_mx1_bot are the region where mixing_type == convective_mixing.
+ ! mx1_top and mx1_bot are the extent of all kinds of mixing, convective and other.
+
+ ! values are m/Mstar
+ conv_mx1_top
+ conv_mx1_bot
+ conv_mx2_top
+ conv_mx2_bot
+ mx1_top
+ mx1_bot
+ mx2_top
+ mx2_bot
+
+ ! radius -- values are radii in Rsun units
+ !conv_mx1_top_r
+ !conv_mx1_bot_r
+ !conv_mx2_top_r
+ !conv_mx2_bot_r
+ !mx1_top_r
+ !mx1_bot_r
+ !mx2_top_r
+ !mx2_bot_r
+
+ ! you might want to get a more complete list of mixing regions by using the following
+
+ !mixing_regions ! note: this includes regions where the mixing type is no_mixing.
+
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives the mixing type as defined in const/public/const_def.f90.
+
+ ! the second column for a region gives the m/mstar location of the top of the region
+ ! entries for extra columns after the last region in the star will have an invalid mixing_type value of -1.
+ ! mstar is the total mass of the star, so these locations range from 0 to 1
+ ! all regions are include starting from the center, so the bottom of one region
+ ! is the top of the previous one. since we start at the center, the bottom of the 1st region is 0.
+
+ ! the columns in the log file will have names like 'mix_type_1' and 'mix_qtop_1'
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+
+ !mix_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'mix_relr_type_1' and 'mix_relr_top_1'
+
+
+ !## conditions at base of largest convection zone (by mass)
+ !cz_bot_mass ! mass coordinate of base (Msun)
+ !cz_mass ! mass coordinate of base (Msun) -- same as cz_bot_mass
+ !cz_log_xmass ! mass exterior to base (g)
+ !cz_log_xmsun ! mass exterior to base (Msun)
+ !cz_xm ! mass exterior to base (Msun)
+ !cz_logT
+ !cz_logRho
+ !cz_logP
+ !cz_bot_radius ! Rsun
+ !cz_log_column_depth
+ !cz_log_radial_depth
+ !cz_luminosity ! Lsun
+ !cz_opacity
+ !cz_log_tau
+ !cz_eta
+ !cz_log_eps_nuc ! log10(ergs/g/s)
+ !cz_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_csound
+ !cz_scale_height
+ !cz_grav
+
+ !cz_omega
+ !cz_omega_div_omega_crit
+
+ !cz_zone
+
+ ! mass fractions at base of largest convection zone (by mass)
+ !cz_log_xa h1
+ !cz_log_xa he4
+
+ !## conditions at top of largest convection zone (by mass)
+ !cz_top_mass ! mass coordinate of top (Msun)
+ !cz_top_log_xmass ! mass exterior to top (g)
+ !cz_top_log_xmsun ! mass exterior to top (Msun)
+ !cz_top_xm ! mass exterior to top (Msun)
+ !cz_top_logT
+ !cz_top_logRho
+ !cz_top_logP
+ !cz_top_radius ! Rsun
+ !cz_top_log_column_depth
+ !cz_top_log_radial_depth
+ !cz_top_luminosity ! Lsun
+ !cz_top_opacity
+ !cz_top_log_tau
+ !cz_top_eta
+ !cz_top_log_eps_nuc ! log10(ergs/g/s)
+ !cz_top_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_top_csound
+ !cz_top_scale_height
+ !cz_top_grav
+
+ !cz_top_omega
+ !cz_top_omega_div_omega_crit
+
+ !cz_top_zone
+ !cz_top_zone_logdq
+
+ ! mass fractions at top of largest convection zone (by mass)
+ !cz_top_log_xa h1
+ !cz_top_log_xa he4
+
+!----------------------------------------------------------------------------------------------
+
+!# nuclear reactions
+
+ !## integrated quantities
+
+ !power_h_burn ! total thermal power from PP and CNO, excluding neutrinos (in Lsun units)
+ !power_he_burn ! total thermal power from triple-alpha, excluding neutrinos (in Lsun units)
+ !power_photo
+ !power_z_burn
+ !log_power_nuc_burn ! total thermal power from all burning, excluding photodisintegrations
+ log_LH ! log10 power_h_burn
+ log_LHe ! log10 power_he_burn
+ log_LZ ! log10 total burning power including LC, but excluding LH and LHe and photodisintegrations
+ log_Lnuc ! log(LH + LHe + LZ)
+ !log_Lnuc_ergs_s
+ !log_Lnuc_sub_log_L
+ !lnuc_photo
+
+ !extra_L ! integral of extra_heat in Lsun units
+ !log_extra_L ! log10 extra_L
+
+ !## neutrino losses
+ log_Lneu ! log10 power emitted in neutrinos, nuclear and thermal (in Lsun units)
+ log_Lneu_nuc ! log10 power emitted in neutrinos, nuclear sources only (in Lsun units)
+ log_Lneu_nonnuc ! log10 power emitted in neutrinos, thermal sources only (in Lsun units)
+
+ !mass_loc_of_max_eps_nuc ! (in Msun units)
+ !mass_ext_to_max_eps_nuc ! (in Msun units)
+ !eps_grav_integral ! (in Lsun units)
+ !log_abs_Lgrav ! log10 abs(eps_grav_integral) (in Lsun units)
+
+ !## information about reactions (by category)
+
+ ! log10 total luminosity for reaction categories (Lsun units)
+
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ !## information about individual reactions
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+
+
+ !## nuclear reactions at center
+
+ ! center log10 burn erg/g/s for reaction categories
+
+ !c_log_eps_burn cno
+ !c_log_eps_burn tri_alfa
+
+ ! center d_eps_nuc_dlnd for reaction categories
+
+ !c_d_eps_dlnd cno
+ !c_d_eps_dlnd tri_alfa
+
+ ! center d_eps_nuc_dlnT for reaction categories
+
+ !c_d_eps_dlnT cno
+ !c_d_eps_dlnT tri_alfa
+
+ !## regions of strong nuclear burning
+
+ ! 2 zones where eps_nuc > burn_min1 erg/g/s
+ ! for each zone have 4 numbers: start1, start2, end2, end1
+ ! start1 is mass of inner edge where first goes > burn_min1 (or -20 if none such)
+ ! start2 is mass of inner edge where first zone reaches burn_min2 erg/g/sec (or -20 if none such)
+ ! end2 is mass of outer edge where first zone drops back below burn_min2 erg/g/s
+ ! end1 is mass of outer edge where first zone ends (i.e. eps_nuc < burn_min1)
+ ! similar for the second zone
+
+ epsnuc_M_1 ! start1 for 1st zone
+ epsnuc_M_2 ! start2
+ epsnuc_M_3 ! end2
+ epsnuc_M_4 ! end1
+
+ epsnuc_M_5 ! start1 for 2nd zone
+ epsnuc_M_6 ! start2
+ epsnuc_M_7 ! end2
+ epsnuc_M_8 ! end1
+
+
+ ! you might want to get a more complete list of burning regions by using the following
+
+ !burning_regions
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives int(sign(val)*log10(max(1,abs(val))))
+ ! where val = ergs/gm/sec nuclear energy minus all neutrino losses.
+ ! the second column for a region gives the q location of the top of the region
+ ! entries for extra columns after the last region in the star will have a value of -9999
+ ! all regions are included starting from the center, so the bottom of one region
+ ! is the top of the previous one.
+ ! since we start at the center, the bottom of the 1st region is q=0 and top of last is q=1.
+
+ ! the columns in the log file will have names like 'burn_type_1' and 'burn_qtop_1'
+
+ !burn_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'burn_relr_type_1' and 'burn_relr_top_1'
+
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+!----------------------------------------------------------------------------------------------
+
+!# information about core and envelope
+
+ !## helium core
+ he_core_mass
+ !he_core_radius
+ !he_core_lgT
+ !he_core_lgRho
+ !he_core_L
+ !he_core_v
+ !he_core_omega
+ !he_core_omega_div_omega_crit
+ !he_core_k
+
+ !## CO core
+ co_core_mass
+ !CO_core
+ !co_core_radius
+ !co_core_lgT
+ !co_core_lgRho
+ !co_core_L
+ !co_core_v
+ !co_core_omega
+ !co_core_omega_div_omega_crit
+ !co_core_k
+
+ !## ONe core
+ one_core_mass
+ !one_core_radius
+ !one_core_lgT
+ !one_core_lgRho
+ !one_core_L
+ !one_core_v
+ !one_core_omega
+ !one_core_omega_div_omega_crit
+ !one_core_k
+
+ !## iron core
+ fe_core_mass
+ !fe_core_radius
+ !fe_core_lgT
+ !fe_core_lgRho
+ !fe_core_L
+ !fe_core_v
+ !fe_core_omega
+ !fe_core_omega_div_omega_crit
+ !fe_core_k
+
+ !## neutron rich core
+ neutron_rich_core_mass
+ !neutron_rich_core_radius
+ !neutron_rich_core_lgT
+ !neutron_rich_core_lgRho
+ !neutron_rich_core_L
+ !neutron_rich_core_v
+ !neutron_rich_core_omega
+ !neutron_rich_core_omega_div_omega_crit
+ !neutron_rich_core_k
+
+ !## envelope
+
+ !envelope_mass ! = star_mass - he_core_mass
+ !envelope_fraction_left ! = envelope_mass / (initial_mass - he_core_mass)
+
+ !h_rich_layer_mass ! = star_mass - he_core_mass
+ !he_rich_layer_mass ! = he_core_mass - c_core_mass
+ !co_rich_layer_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# timescales
+
+ !dynamic_timescale ! dynamic timescale (seconds) -- estimated by 2*pi*sqrt(r^3/(G*m))
+ kh_timescale ! kelvin-helmholtz timescale (years)
+ !mdot_timescale ! star_mass/abs(star_mdot) (years)
+ !kh_div_mdot_timescales ! kh_timescale/mdot_timescale
+ !nuc_timescale ! nuclear timescale (years) -- proportional to mass divided by luminosity
+
+ !dt_cell_collapse ! min time for any cell to collapse at current velocities
+ !dt_div_dt_cell_collapse
+
+ !min_dr_div_cs ! min over all cells of dr/csound (seconds)
+ !min_dr_div_cs_k ! location of min
+ !log_min_dr_div_cs ! log10 min dr_div_csound (seconds)
+ !min_dr_div_cs_yr ! min over all cells of dr/csound (years)
+ !log_min_dr_div_cs_yr ! log10 min dr_div_csound (years)
+ !dt_div_min_dr_div_cs
+ !log_dt_div_min_dr_div_cs
+
+ !min_t_eddy ! minimum value of scale_height/conv_velocity
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions at or near the surface of the model
+
+ !## conditions at the photosphere
+ effective_T
+ !Teff
+ log_Teff ! log10 effective temperature
+ ! Teff is calculated using Stefan-Boltzmann relation L = 4 pi R^2 sigma Teff^4,
+ ! where L and R are evaluated at the photosphere (tau_factor < 1)
+ ! or surface of the model (tau_factor >= 1) when photosphere is not inside the model.
+
+ !photosphere_black_body_T
+ !photosphere_cell_T ! temperature at model location closest to the photosphere, not necessarily Teff
+ !photosphere_cell_log_T
+ !photosphere_cell_density
+ !photosphere_cell_log_density
+ !photosphere_cell_opacity
+ !photosphere_cell_log_opacity
+ !photosphere_L ! Lsun units
+ !photosphere_log_L ! Lsun units
+ !photosphere_r ! Rsun units
+ !photosphere_log_r ! Rsun units
+ !photosphere_m ! Msun units
+ !photosphere_v_km_s
+ !photosphere_cell_k
+ !photosphere_column_density
+ !photosphere_csound
+ !photosphere_log_column_density
+ !photosphere_opacity
+ !photosphere_v_div_cs
+ !photosphere_xm
+ !photosphere_cell_free_e
+ !photosphere_cell_log_free_e
+ !photosphere_logg
+ !photosphere_T
+
+ !## conditions at or near the surface of the model (outer edge of outer cell)
+
+ luminosity ! luminosity in Lsun units
+ !luminosity_ergs_s ! luminosity in cgs units
+ log_L ! log10 luminosity in Lsun units
+ !log_L_ergs_s ! log10 luminosity in cgs units
+ radius ! Rsun
+ log_R ! log10 radius in Rsun units
+ !radius_cm
+ !log_R_cm
+
+ log_g ! log10 gravity
+ !gravity
+ !log_Ledd
+ log_L_div_Ledd ! log10(L/Leddington)
+ lum_div_Ledd
+ !log_surf_optical_depth
+ !surface_optical_depth
+
+ !log_surf_cell_opacity ! old name was log_surf_opacity
+ !log_surf_cell_P ! old name was log_surf_P
+ !log_surf_cell_pressure ! old name was log_surf_pressure
+ !log_surf_cell_density ! old name was log_surf_density
+ !log_surf_cell_temperature ! old name was log_surf_temperature
+ !surface_cell_temperature ! old name was surface_temperature
+ !log_surf_cell_z ! old name was log_surf_z
+ !surface_cell_entropy ! in units of kerg per baryon
+ ! old name was surface_entropy
+
+ !v_surf ! (cm/s)
+ v_surf_km_s ! (km/s)
+ v_div_csound_surf ! velocity divided by sound speed at outermost grid point
+ !v_div_csound_max ! max value of velocity divided by sound speed at face
+ !v_div_vesc
+ !v_phot_km_s
+ !v_surf_div_escape_v
+
+ !v_surf_div_v_kh ! v_surf/(photosphere_r/kh_timescale)
+
+ surf_avg_j_rot
+ surf_avg_omega
+ surf_avg_omega_crit
+ surf_avg_omega_div_omega_crit
+ surf_avg_v_rot ! km/sec rotational velocity at equator
+ surf_avg_v_crit ! critical rotational velocity at equator
+ surf_avg_v_div_v_crit
+ surf_avg_Lrad_div_Ledd
+ !surf_avg_logT
+ !surf_avg_logRho
+ !surf_avg_opacity
+
+ ! Gravity Darkening, reports the surface averaged L/Lsun and Teff (K) caused by
+ ! gravity darkening in rotating stars. Based on the model of Espinosa Lara & Rieutord (2011)
+ ! 'polar' refers to the line of sight being directed along the rotation axis of the star
+ ! 'equatorial' refers to the line of sight coincident with the stellar equator
+ !grav_dark_L_polar !Lsun
+ !grav_dark_Teff_polar !K
+ !grav_dark_L_equatorial !Lsun
+ !grav_dark_Teff_equatorial !K
+
+ !surf_escape_v ! cm/s
+
+ !v_wind_Km_per_s ! Km/s
+ ! = 1d-5*s% opacity(1)*max(0d0,-s% mstar_dot)/ &
+ ! (4*pi*s% photosphere_r*Rsun*s% tau_base)
+ ! Lars says:
+ ! wind_mdot = 4*pi*R^2*rho*v_wind
+ ! tau = integral(opacity*rho*dr) from R to infinity
+ ! so tau = opacity*wind_mdot/(4*pi*R*v_wind) at photosphere
+ ! or v_wind = opacity*wind_mdot/(4*pi*R*tau) at photosphere
+
+ !rotational_mdot_boost ! factor for increase in mass loss mdot due to rotation
+ log_rotational_mdot_boost ! log factor for increase in mass loss mdot due to rotation
+ !surf_r_equatorial_div_r_polar
+ !surf_r_equatorial_div_r
+ !surf_r_polar_div_r
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions near center
+
+ log_center_T ! temperature
+ log_center_Rho ! density
+ !log_center_P ! pressure
+
+ ! shorter names for above
+ log_cntr_P
+ log_cntr_Rho
+ log_cntr_T
+
+ center_T ! temperature
+ center_Rho ! density
+ !center_P ! pressure
+
+ !center_degeneracy ! the electron chemical potential in units of k*T
+ !center_gamma ! plasma interaction parameter
+ center_mu
+ center_ye
+ center_abar
+ !center_zbar
+
+ !center_eps_grav
+
+ !center_non_nuc_neu
+ !center_eps_nuc
+ !d_center_eps_nuc_dlnT
+ !d_center_eps_nuc_dlnd
+ !log_center_eps_nuc
+
+ center_entropy ! in units of kerg per baryon
+ !max_entropy ! in units of kerg per baryon
+ !fe_core_infall
+ !non_fe_core_infall
+ !non_fe_core_rebound
+ !max_infall_speed
+
+ !compactness_parameter ! (m/Msun)/(R(m)/1000km) for m = 2.5 Msun
+ !compactness
+ !m4 ! Mass co-ordinate where entropy=4
+ ! mu4 is sensitive to the choice of how much dm/dr you average over, thus we average dm and dr over M(entropy=4) and M(entropy=4)+0.3Msun
+ !mu4 ! dM(Msun)/dr(1000km) where entropy=4
+
+
+ center_omega
+ center_omega_div_omega_crit
+
+!----------------------------------------------------------------------------------------------
+
+!# abundances
+
+ !species ! size of net
+
+ !## mass fractions near center
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_center_abundances
+ !add_log_center_abundances
+
+ ! individual central mass fractions (as many as desired)
+ center h1
+ center he4
+ center c12
+ center o16
+
+ ! individual log10 central mass fractions (as many as desired)
+ !log_center h1
+ !log_center he4
+ ! etc.
+
+
+ !## mass fractions near surface
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_surface_abundances
+ !add_log_surface_abundances
+
+ ! individual surface mass fractions (as many as desired)
+ !surface h1
+ !surface he4
+ surface c12
+ surface o16
+ ! etc.
+
+ ! individual log10 surface mass fractions (as many as desired)
+
+ !log_surface h1
+ !log_surface he4
+
+
+ !## mass fractions for entire star
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_average_abundances
+ !add_log_average_abundances
+
+ ! individual average mass fractions (as many as desired)
+ !average h1
+ !average he4
+ ! etc.
+
+ ! individual log10 average mass fractions (as many as desired)
+ !log_average h1
+ !log_average he4
+ ! etc.
+
+
+ !## mass totals for entire star (in Msun units)
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_total_mass
+ !add_log_total_mass
+
+ ! individual mass totals for entire star (as many as desired)
+ total_mass h1
+ total_mass he4
+ ! etc.
+
+ ! individual log10 mass totals for entire star (in Msun units)
+ !log_total_mass h1
+ !log_total_mass he4
+ ! etc.
+
+!----------------------------------------------------------------------------------------------
+
+!# info at specific locations
+
+ !## info at location of max temperature
+ !max_T
+ log_max_T
+
+
+!----------------------------------------------------------------------------------------------
+
+!# information about shocks
+
+ !## info about outermost outward moving shock
+ ! excluding locations with q > max_q_for_outer_mach1_location
+ ! returns values at location of max velocity
+ !shock_mass ! baryonic (Msun)
+ !shock_mass_gm ! baryonic (grams)
+ !shock_q
+ !shock_radius ! (Rsun)
+ !shock_radius_cm ! (cm)
+ !shock_velocity
+ !shock_csound
+ !shock_v_div_cs
+ !shock_lgT
+ !shock_lgRho
+ !shock_lgP
+ !shock_gamma1
+ !shock_entropy
+ !shock_tau
+ !shock_k
+ !shock_pre_lgRho
+
+!----------------------------------------------------------------------------------------------
+
+!# asteroseismology
+
+ !delta_nu ! large frequency separation for p-modes (microHz)
+ ! 1e6/(seconds for sound to cross diameter of star)
+ !delta_Pg ! g-mode period spacing for l=1 (seconds)
+ ! sqrt(2) pi^2/(integral of brunt_N/r dr)
+ !log_delta_Pg
+ !nu_max ! estimate from scaling relation (microHz)
+ ! nu_max = nu_max_sun * M/Msun / ((R/Rsun)^2 (Teff/astero_Teff_sun)^0.5)
+ !nu_max_3_4th_div_delta_nu ! nu_max^0.75/delta_nu
+ !acoustic_cutoff ! 0.5*g*sqrt(gamma1*rho/P) at surface
+ !acoustic_radius ! integral of dr/csound (seconds)
+ !ng_for_nu_max ! = 1 / (nu_max*delta_Pg)
+ ! period for g-mode with frequency nu_max = nu_max_ng*delta_Pg
+ !gs_per_delta_nu ! delta_nu / (nu_max**2*delta_Pg)
+ ! number of g-modes per delta_nu at nu_max
+
+ !int_k_r_dr_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=1
+ !int_k_r_dr_2pt0_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=1
+ !int_k_r_dr_0pt5_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=1
+ !int_k_r_dr_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=2
+ !int_k_r_dr_2pt0_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=2
+ !int_k_r_dr_0pt5_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=2
+ !int_k_r_dr_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=3
+ !int_k_r_dr_2pt0_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=3
+ !int_k_r_dr_0pt5_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=3
+
+!----------------------------------------------------------------------------------------------
+
+!# energy information
+
+ total_energy ! at end of step
+ log_total_energy ! log(abs(total_energy))
+ !total_energy_after_adjust_mass ! after mass adjustments
+
+ ! shorter versions of above
+ !tot_E
+ !log_tot_E
+
+
+ !total_gravitational_energy
+ !log_total_gravitational_energy ! log(abs(total_gravitational_energy))
+ !total_gravitational_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_PE
+ !log_tot_PE
+
+ !total_internal_energy
+ !log_total_internal_energy
+ !total_internal_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_IE
+ !log_tot_IE
+
+ !total_radial_kinetic_energy
+ !log_total_radial_kinetic_energy
+ !total_radial_kinetic_energy_after_adjust_mass
+
+ ! shorter versions of above (does not include rot KE)
+ !tot_KE
+ !log_tot_KE
+
+ !total_turbulent_energy
+ !log_total_turbulent_energy
+ !total_turbulent_energy_after_adjust_mass
+ !tot_Et
+ !log_tot_Et
+
+ total_energy_foe
+
+ !tot_IE_div_IE_plus_KE
+ !total_IE_div_IE_plus_KE
+
+ !total_entropy
+ !total_eps_grav
+
+ !total_energy_sources_and_sinks ! for this step
+ !total_nuclear_heating
+ !total_non_nuc_neu_cooling
+ !total_irradiation_heating
+ !total_extra_heating ! extra heat integrated over the model times dt (erg)
+ !total_WD_sedimentation_heating
+
+ !rel_run_E_err
+
+ rel_E_err
+ !abs_rel_E_err
+ log_rel_E_err
+
+ !tot_e_equ_err
+ !tot_e_err
+
+
+ !error_in_energy_conservation ! for this step
+ ! = total_energy - (total_energy_start + total_energy_sources_and_sinks)
+ !cumulative_energy_error ! = sum over all steps of abs(error_in_energy_conservation)
+ !rel_cumulative_energy_error ! = cumulative_energy_error/total_energy
+ !log_rel_cumulative_energy_error ! = log10 of rel_cumulative_energy_error
+ log_rel_run_E_err ! shorter name for rel_cumulative_energy_error
+
+ !rel_error_in_energy_conservation ! = error_in_energy_conservation/total_energy
+ !log_rel_error_in_energy_conservation
+
+ !virial_thm_P_avg
+ !virial_thm_rel_err
+ !work_inward_at_center
+ !work_outward_at_surface
+
+
+!----------------------------------------------------------------------------------------------
+
+ !# rotation
+
+ !total_angular_momentum
+ log_total_angular_momentum
+ !i_rot_total ! moment of inertia
+
+ !total_rotational_kinetic_energy
+ !log_total_rotational_kinetic_energy
+ !total_rotational_kinetic_energy_after_adjust_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# velocities
+
+ !avg_abs_v_div_cs
+ !log_avg_abs_v_div_cs
+ !max_abs_v_div_cs
+ !log_max_abs_v_div_cs
+
+ !avg_abs_v
+ !log_avg_abs_v
+ !max_abs_v
+ !log_max_abs_v
+
+ !u_surf
+ !u_surf_km_s
+ !u_div_csound_surf
+ !u_div_csound_max
+
+ !infall_div_cs
+
+!----------------------------------------------------------------------------------------------
+
+!# misc
+
+ !e_thermal ! sum over all zones of Cp*T*dm
+
+ !## eos
+ !logQ_max ! logQ = logRho - 2*logT + 12
+ !logQ_min
+ gamma1_min
+
+ !## core mixing
+ !mass_semiconv_core
+
+ !## H-He boundary
+
+ !diffusion_time_H_He_bdy
+ !temperature_H_He_bdy
+
+
+ !## optical depth and opacity
+
+ !one_div_yphot
+ !log_one_div_yphot
+
+ !log_min_opacity
+ !min_opacity
+
+ !log_tau_center
+
+ !log_max_tau_conv
+ !max_tau_conv
+ !log_min_tau_conv
+ !min_tau_conv
+
+ !tau_qhse_yrs
+
+ !## other
+
+ !Lsurf_m
+ !dlnR_dlnM
+ !h1_czb_mass ! location (in Msun units) of base of 1st convection zone above he core
+ !kh_mdot_limit
+ !log_cntr_dr_cm
+ !min_Pgas_div_P
+ !surf_c12_minus_o16 ! this is useful for seeing effects of dredge up on AGB
+ !surf_num_c12_div_num_o16
+
+ !phase_of_evolution ! Integer mapping to the type of evolution see star_data/public/star_data_def.inc for definitions
+
+ !## MLT++
+ !gradT_excess_alpha
+ !gradT_excess_min_beta
+ !gradT_excess_max_lambda
+
+ !max_L_rad_div_Ledd
+ !max_L_rad_div_Ledd_div_phi_Joss
+
+
+ !## RTI
+ !rti_regions
+
+ !## Ni & Co
+ !total_ni_co_56
+
+
+ !## internal structure constants
+
+ ! this is evaluated assuming a spherical star and does not account for rotation
+ !apsidal_constant_k2
+
+
+!----------------------------------------------------------------------------------------------
+
+!# accretion
+
+ !k_below_const_q
+ !q_below_const_q
+ !logxq_below_const_q
+
+ !k_const_mass
+ !q_const_mass
+ !logxq_const_mass
+
+ !k_below_just_added
+ !q_below_just_added
+ !logxq_below_just_added
+
+ !k_for_test_CpT_absMdot_div_L
+ !q_for_test_CpT_absMdot_div_L
+ !logxq_for_test_CpT_absMdot_div_L
+
+!----------------------------------------------------------------------------------------------
+
+!# Color output
+
+ ! Outputs the bolometric correction (bc) for the star in filter band ``filter'' (case sensitive)
+ !bc filter
+
+ ! Outputs the absolute magnitude for the star in filter band ``filter'' (case sensitive)
+ !abs_mag filter
+
+ ! Adds all the bc's to the output
+ !add_bc
+
+ ! Adds all the absolute magnitudes to the output
+ !add_abs_mag
+
+ ! Outputs luminosity in filter band ``filter'' (erg s^-1) (case sensitive)
+ ! lum_band filter
+
+ ! Adds all the filter band luminosities to the output (erg s^-1)
+ ! add_lum_band
+
+ ! Outputs log luminosity in filter band ``filter'' (log erg s^-1) (case sensitive)
+ ! log_lum_band filter
+
+ ! Adds all the filter band luminosities to the output (log erg s^-1)
+ ! add_log_lum_band
+
+!----------------------------------------------------------------------------------------------
+
+!# RSP
+
+ !rsp_DeltaMag ! absolute magnitude difference between minimum and maximum light (mag)
+ !rsp_DeltaR ! R_max - R_min difference in the max and min radius (Rsun)
+ !rsp_GREKM ! fractional growth of the kinetic energy per pulsation period ("nonlinear growth rate") - see equation 5 in MESA5
+ !rsp_num_periods ! Count of the number of pulsation cycles completed
+ !rsp_period_in_days ! Running period, ie., period between two consecutive values of R_max (days)
+ !rsp_phase ! Running pulsation phase for a cycle
+
+!----------------------------------------------------------------------------------------------
+!# debugging
+
+ !## retries
+ num_retries ! total during the run
+
+ !## solver iterations
+
+ num_iters ! same as num_solver_iterations
+ num_solver_iterations ! iterations at this step
+ !total_num_solver_iterations ! total iterations during the run
+ !avg_num_solver_iters
+
+ !rotation_solver_steps
+
+ !diffusion_solver_steps
+ !diffusion_solver_iters
+
+ !avg_setvars_per_step
+ !avg_skipped_setvars_per_step
+ !avg_solver_setvars_per_step
+
+ !burn_solver_maxsteps
+
+ !total_num_solver_calls_converged
+ !total_num_solver_calls_failed
+ !total_num_solver_calls_made
+ !total_num_solver_relax_calls_converged
+ !total_num_solver_relax_calls_failed
+ !total_num_solver_relax_calls_made
+ !total_num_solver_relax_iterations
+
+ !total_step_attempts
+ !total_step_redos
+ !total_step_retries
+ !total_steps_finished
+ !total_steps_taken
+
+ !TDC_num_cells
+
+ !## Relaxation steps
+ !total_relax_step_attempts
+ !total_relax_step_redos
+ !total_relax_step_retries
+ !total_relax_steps_finished
+ !total_relax_steps_taken
+
+ !## conservation during mesh adjust
+ !log_mesh_adjust_IE_conservation
+ !log_mesh_adjust_KE_conservation
+ !log_mesh_adjust_PE_conservation
+
+ !## amr
+ !num_hydro_merges
+ !num_hydro_splits
+
+ !## timing
+ !elapsed_time ! time since start of run (seconds)
+
+ !## Extras
+ burning_regions 80
+ mixing_regions 40
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist
new file mode 100644
index 0000000000..48bbd9471c
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist
@@ -0,0 +1,38 @@
+&star_job
+
+ read_extra_star_job_inlist(1) = .true.
+ extra_star_job_inlist_name(1) = 'inlist_project'
+
+/ ! end of star_job namelist
+
+
+&eos
+
+ read_extra_eos_inlist(1) = .true.
+ extra_eos_inlist_name(1) = 'inlist_project'
+
+/ ! end of eos namelist
+
+
+&kap
+
+ read_extra_kap_inlist(1) = .true.
+ extra_kap_inlist_name(1) = 'inlist_project'
+
+/ ! end of kap namelist
+
+
+&controls
+
+ read_extra_controls_inlist(1) = .true.
+ extra_controls_inlist_name(1) = 'inlist_project'
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+ read_extra_pgstar_inlist(1) = .true.
+ extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist_pgstar b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist_pgstar
new file mode 100644
index 0000000000..be0295550d
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist_pgstar
@@ -0,0 +1,677 @@
+&pgstar
+
+!pause_flag = .true.
+
+pgstar_interval = 1
+pgstar_show_age_in_years = .true.
+pgstar_show_age_in_seconds = .false.
+pgstar_sleep = 0.0
+
+! some global grid plot settings at end
+
+pgstar_show_model_number = .false.
+pgstar_show_age = .false.
+
+!------------------------------------------------------------------------------------
+
+Grid1_win_flag = .true.
+Grid1_win_width = 12
+Grid1_win_aspect_ratio = 0.666
+
+! file output
+Grid1_file_flag = .true.
+Grid1_file_dir = 'png'
+Grid1_file_prefix = 'Grid1_'
+Grid1_file_interval = 25 ! output when mod(model_number,Grid1_file_interval)==0
+Grid1_file_width = 27 ! (inches) negative means use same value as for window
+Grid1_file_aspect_ratio = -1 ! negative means use same value as for window
+
+! reset the defaults
+
+Grid1_plot_name(:) = ''
+Grid1_plot_row(:) = 1 ! number from 1 at top
+Grid1_plot_rowspan(:) = 1 ! plot spans this number of rows
+Grid1_plot_col(:) = 1 ! number from 1 at left
+Grid1_plot_colspan(:) = 1 ! plot spans this number of columns
+Grid1_plot_pad_left(:) = 0.0 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(:) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(:) = 0.0 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(:) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(:) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_title = ''
+
+Grid1_num_cols = 3 ! divide plotting region into this many equal width cols
+Grid1_num_rows = 5 ! divide plotting region into this many equal height rows
+Grid1_num_plots = 6 ! <= 10
+
+Grid1_plot_name(1) = 'Text_Summary1'
+Grid1_plot_row(1) = 1 ! number from 1 at top
+Grid1_plot_rowspan(1) = 1 ! plot spans this number of rows
+Grid1_plot_col(1) = 1 ! number from 1 at left
+Grid1_plot_colspan(1) = 3 ! plot spans this number of columns
+
+Grid1_plot_pad_left(1) = -0.03 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(1) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(1) = -0.06 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(1) = 0.07 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(1) = 1 ! 0.8 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(3) = 'TRho'
+Grid1_plot_row(3) = 2 ! number from 1 at top
+Grid1_plot_rowspan(3) = 1 ! plot spans this number of rows
+Grid1_plot_col(3) = 1 ! number from 1 at left
+Grid1_plot_colspan(3) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(3) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(3) = 0.08 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(3) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(3) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(3) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(5) = 'Profile_Panels1'
+Grid1_plot_row(5) = 3 ! number from 1 at top
+Grid1_plot_rowspan(5) = 3 ! plot spans this number of rows
+Grid1_plot_col(5) = 1 ! number from 1 at left
+Grid1_plot_colspan(5) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(5) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(5) = 0.10 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(5) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(5) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(5) = 0.6 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(2) = 'TRho_Profile'
+Grid1_plot_row(2) = 2 ! number from 1 at top
+Grid1_plot_rowspan(2) = 1 ! plot spans this number of rows
+Grid1_plot_col(2) = 2 ! number from 1 at left
+Grid1_plot_colspan(2) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(2) = -0.01 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(2) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(2) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(2) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(2) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(4) = 'History_Panels1'
+Grid1_plot_row(4) = 3 ! number from 1 at top
+Grid1_plot_rowspan(4) = 3 ! plot spans this number of rows
+Grid1_plot_col(4) = 2 ! number from 1 at left
+Grid1_plot_colspan(4) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(4) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(4) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(4) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(4) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(4) = 0.6 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(6) = 'Profile_Panels3'
+Grid1_plot_row(6) = 2 ! number from 1 at top
+Grid1_plot_rowspan(6) = 4 ! plot spans this number of rows
+Grid1_plot_col(6) = 3 ! Number from 1 at left
+Grid1_plot_colspan(6) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(6) = 0.04 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(6) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(6) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(6) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(6) = 0.6 ! multiply txt_scale for subplot by this
+
+!------------------------------------------------------------------------------------
+
+Profile_Panels3_win_flag = .false.
+
+Profile_Panels3_title = ''
+
+Profile_Panels3_num_panels = 5
+
+Profile_Panels3_yaxis_name(1) = 'Abundance'
+
+Profile_Panels3_yaxis_name(2) = 'Power'
+
+Profile_Panels3_yaxis_name(3) = 'Mixing'
+Mixing_legend_txt_scale_factor = 0.9
+
+Profile_Panels3_yaxis_name(4) = 'logRho'
+Profile_Panels3_other_yaxis_name(4) = 'v_div_cs' ! 'vel_km_per_s' ! 'entropy'
+Profile_Panels3_other_dymin(4) = 0.14
+
+Profile_Panels3_yaxis_name(5) = 'logT'
+Profile_Panels3_other_yaxis_name(5) = 'burn_num_iters'
+
+! x-axis limits and properties
+Profile_Panels3_xaxis_name = 'mass'
+Profile_Panels3_xmin = 0.0
+Profile_Panels3_xmax = -101d0 ! 2.2
+Profile_Panels3_xaxis_reversed = .false.
+
+Profile_Panels3_txt_scale = 0.7
+
+!Profile_Panels3_xaxis_name = 'zone'
+!Profile_Panels3_xmin = 800
+!Profile_Panels3_xmax = 1100
+!Profile_Panels3_xaxis_reversed = .true.
+
+!Profile_Panels3_show_grid = .true.
+Profile_Panels3_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+!Profile_Panels1_win_flag = .true.
+!Profile_Panels1_file_flag = .true.
+ Profile_Panels1_file_dir = 'png'
+ Profile_Panels1_file_prefix = 'profile_panels1_'
+ Profile_Panels1_file_interval = 1
+ Profile_Panels1_file_width = -1
+ Profile_Panels1_file_aspect_ratio = -1
+
+Profile_Panels1_title = ''
+
+Profile_Panels1_txt_scale = 0.7
+Profile_Panels1_num_panels = 4
+
+Profile_Panels1_yaxis_name(1) = 'logRho'
+Profile_Panels1_dymin(1) = 0.14
+Profile_Panels1_other_yaxis_name(1) = 'logT'
+Profile_Panels1_other_dymin(1) = 0.14
+
+Profile_Panels1_yaxis_name(2) = 'entropy'
+Profile_Panels1_other_yaxis_name(2) = 'pgas_div_p'
+
+Profile_Panels1_yaxis_name(3) = 'gradT'
+Profile_Panels1_other_yaxis_name(3) = 'grada'
+Profile_Panels1_same_yaxis_range(3) = .true.
+Profile_Panels1_other_dymin(3) = 0.08
+
+Profile_Panels1_yaxis_name(4) = 'log_opacity'
+Profile_Panels1_dymin(1) = 0.14
+Profile_Panels1_other_yaxis_name(4) = 'gradr'
+Profile_Panels1_other_dymin(1) = 0.14
+
+! x-axis limits and properties
+Profile_Panels1_xaxis_name = 'logtau'
+Profile_Panels1_xmin = -101d0
+Profile_Panels1_xmax = 8.1
+Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_xaxis_name = 'zone'
+!Profile_Panels1_xmin = 15
+!Profile_Panels1_xmax = 270
+!Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_show_grid = .true.
+Profile_Panels1_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+!TRho_Profile_win_flag = .true.
+TRho_Profile_win_width = 8
+TRho_Profile_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+! file output
+!TRho_Profile_file_flag = .true.
+TRho_Profile_file_dir = 'TRho'
+TRho_Profile_file_prefix = 'trho_'
+TRho_Profile_file_interval = 10 ! output when `mod(model_number,TRho_Profile_file_interval)==0`
+TRho_Profile_file_width = -1 ! (inches) negative means use same value as for window
+TRho_Profile_file_aspect_ratio = -1 ! negative means use same value as for window
+
+TRho_Profile_xleft = 0.15
+TRho_Profile_xright = 0.85
+TRho_Profile_ybot = 0.15
+TRho_Profile_ytop = 0.85
+TRho_Profile_txt_scale = 0.7
+TRho_Profile_title = ' '
+
+TRho_switch_to_Column_Depth = .false.
+TRho_switch_to_mass = .false.
+
+show_TRho_Profile_legend = .false.
+ TRho_Profile_legend_coord = 0.07
+ TRho_Profile_legend_fjust = 0.0
+ TRho_Profile_legend_disp1 = -2.0
+ TRho_Profile_legend_del_disp = -1.3
+ TRho_Profile_legend_txt_scale = 1.1
+
+show_TRho_Profile_text_info = .false.
+ TRho_Profile_text_info_xfac = 0.77 ! controls x location
+ TRho_Profile_text_info_dxfac = 0.02 ! controls x spacing to value from text
+ TRho_Profile_text_info_yfac = 0.6 ! controls y location of 1st line
+ TRho_Profile_text_info_dyfac = -0.04 ! controls line spacing
+
+show_TRho_Profile_mass_locs = .false.
+show_TRho_accretion_mesh_borders = .false.
+show_TRho_Profile_kap_regions = .false.
+show_TRho_Profile_gamma1_4_3rd = .true.
+show_TRho_Profile_eos_regions = .false.
+show_TRho_Profile_degeneracy_line = .true.
+show_TRho_Profile_Pgas_Prad_line = .true.
+show_TRho_Profile_burn_lines = .true.
+show_TRho_Profile_burn_labels = .true.
+
+! axis limits
+TRho_Profile_xmin = -12.0
+TRho_Profile_xmax = 10.0
+TRho_Profile_ymin = 3.0
+TRho_Profile_ymax = 10.0
+
+! these are shown if show_TRho_Profile_mass_locs = .true.
+! set all the entries
+profile_mass_point_q = -1
+profile_mass_point_color_index = 1
+profile_mass_point_symbol = -6
+profile_mass_point_symbol_scale = 1.7
+profile_mass_point_str = ''
+profile_mass_point_str_clr = 1
+profile_mass_point_str_scale = 1.0
+
+! set defaults
+num_profile_mass_points = 3 ! max is defined in star_def (max_num_profile_mass_points)
+
+profile_mass_point_q(1) = 0.5
+profile_mass_point_color_index(1) = 1
+profile_mass_point_symbol(1) = -6
+profile_mass_point_str(1) = ' 0.5 M\d\(0844)\u'
+profile_mass_point_str_clr(1) = 1
+
+profile_mass_point_q(2) = 0.95
+profile_mass_point_color_index(2) = 1
+profile_mass_point_symbol(2) = -6
+profile_mass_point_str(2) = ' 0.95 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+profile_mass_point_q(3) = 0.999
+profile_mass_point_color_index(3) = 1
+profile_mass_point_symbol(3) = -6
+profile_mass_point_str(3) = ' 0.999 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+!------------------------------------------------------------------------------------
+
+! Text_Summary windows
+
+Text_Summary1_win_flag = .false.
+Text_Summary1_win_width = 10
+Text_Summary1_win_aspect_ratio = 0.15
+
+Text_Summary1_xleft = 0.01
+Text_Summary1_xright = 0.99
+Text_Summary1_ybot = 0.0
+Text_Summary1_ytop = 1.0
+Text_Summary1_txt_scale = 0.95
+Text_Summary1_title = ''
+
+Text_Summary1_num_rows = 6 ! <= 20
+Text_Summary1_num_cols = 5 ! <= 20
+Text_Summary1_name(:,:) = ''
+
+Text_Summary1_name(1,1) = 'model_number'
+Text_Summary1_name(1,2) = 'log_dt'
+Text_Summary1_name(1,3) = 'Mass'
+Text_Summary1_name(1,4) = 'H_cntr'
+Text_Summary1_name(1,5) = 'H_rich'
+
+Text_Summary1_name(2,1) = 'non_fe_core_infall'
+Text_Summary1_name(2,2) = 'star_age'
+Text_Summary1_name(2,3) = 'lg_Mdot'
+Text_Summary1_name(2,4) = 'He_cntr'
+Text_Summary1_name(2,5) = 'He_core'
+
+Text_Summary1_name(3,1) = 'fe_core_infall'
+Text_Summary1_name(3,2) = 'gamma1_min'
+Text_Summary1_name(3,3) = 'eta_cntr'
+Text_Summary1_name(3,4) = 'C_cntr'
+Text_Summary1_name(3,5) = 'CO_core'
+
+Text_Summary1_name(4,1) = 'log_max_T'
+Text_Summary1_name(4,2) = 'log_LH'
+Text_Summary1_name(4,3) = 'lg_Lnuc_tot'
+Text_Summary1_name(4,4) = 'O_cntr'
+Text_Summary1_name(4,5) = 'Fe_core'
+
+Text_Summary1_name(5,1) = 'log_cntr_T'
+Text_Summary1_name(5,2) = 'log_LHe'
+Text_Summary1_name(5,3) = 'lg_Lneu'
+Text_Summary1_name(5,4) = 'Ne_cntr'
+Text_Summary1_name(5,5) = 'zones'
+
+Text_Summary1_name(6,1) = 'log_cntr_Rho'
+Text_Summary1_name(6,2) = 'log_LZ'
+Text_Summary1_name(6,3) = 'lg_Lphoto'
+Text_Summary1_name(6,4) = 'Si_cntr'
+Text_Summary1_name(6,5) = 'retries'
+
+!------------------------------------------------------------------------------------
+
+! Abundance profile plot
+
+Abundance_win_flag = .false.
+
+! window properties
+Abundance_win_width = 10
+Abundance_win_aspect_ratio = 0.75
+
+Abundance_xleft = 0.15
+Abundance_xright = 0.85
+Abundance_ybot = 0.15
+Abundance_ytop = 0.85
+Abundance_txt_scale = 1.1
+Abundance_title = ''
+
+! isotopes to plot
+
+Abundance_num_isos_to_show = 20
+
+Abundance_which_isos_to_show(1) = 'h1'
+Abundance_which_isos_to_show(2) = 'he3'
+Abundance_which_isos_to_show(3) = 'he4'
+Abundance_which_isos_to_show(4) = 'c12'
+Abundance_which_isos_to_show(5) = 'n14'
+Abundance_which_isos_to_show(6) = 'o16'
+Abundance_which_isos_to_show(7) = 'ne20'
+Abundance_which_isos_to_show(8) = 'mg24'
+Abundance_which_isos_to_show(9) = 'si28'
+Abundance_which_isos_to_show(10) = 's32'
+Abundance_which_isos_to_show(11) = 'ar36'
+Abundance_which_isos_to_show(12) = 'ca40'
+Abundance_which_isos_to_show(13) = 'ti44'
+Abundance_which_isos_to_show(14) = 'cr48'
+Abundance_which_isos_to_show(15) = 'cr56'
+Abundance_which_isos_to_show(16) = 'fe52'
+Abundance_which_isos_to_show(17) = 'fe54'
+Abundance_which_isos_to_show(18) = 'fe56'
+Abundance_which_isos_to_show(19) = 'ni56'
+Abundance_which_isos_to_show(20) = 'neut'
+!Abundance_which_isos_to_show(22) = 'ne22'
+
+! number and size of isotope labels along curves
+num_abundance_line_labels = 4
+Abundance_line_txt_scale_factor = 1.1
+
+! number and size of isotopes on legend
+Abundance_legend_max_cnt = 10
+Abundance_legend_txt_scale_factor = 1.3
+
+! yaxis limits
+Abundance_log_mass_frac_min = -4!-6.4 ! -3.5
+Abundance_log_mass_frac_max = 0.3
+
+! file output
+Abundance_file_flag = .false.
+Abundance_file_dir = 'Abundance'
+Abundance_file_prefix = 'abund_'
+Abundance_file_width = -1 ! (inches) negative means use same value as for window
+Abundance_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!------------------------------------------------------------------------------------
+
+! power plot
+
+Power_win_flag = .false.
+Power_win_width = 10
+Power_win_aspect_ratio = 0.75
+Power_title = ''
+
+Power_xleft = 0.15
+Power_xright = 0.85
+Power_ybot = 0.15
+Power_ytop = 0.85
+Power_txt_scale = 1.1
+Power_title = ' '
+
+Power_legend_max_cnt = 10
+Power_legend_txt_scale_factor = 1.3 ! relative to other text
+
+! power yaxis limits -- to override system default selections
+Power_ymin = -5.0 ! -101d0 ! only used if /= -101d0
+Power_ymax = 25.0 ! -101d0 ! only used if /= -101d0
+
+! file output
+Power_file_flag = .false.
+Power_file_dir = 'png'
+Power_file_prefix = 'power_'
+Power_file_interval = 5 ! output when mod(model_number,Power_file_interval)==0
+Power_file_width = -1 ! (inches) negative means use same value as for window
+Power_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!------------------------------------------------------------------------------------
+
+! mixing plot
+
+Mixing_xmin = 0.0
+Mixing_xmax = 1.6 ! -101d0
+Mixing_legend_txt_scale_factor = 1.4 ! relative to other text
+
+Mixing_show_rotation_details = .false.
+
+!Mixing_win_flag = .true.
+!Mixing_file_flag = .true.
+Mixing_file_dir = 'png'
+Mixing_file_prefix = 'mixing_'
+Mixing_file_interval = 1 ! output when `mod(model_number,Mixing_file_interval)==0`
+Mixing_file_width = -1 ! (inches) negative means use same value as for window
+Mixing_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!-----------------------------------------------------------------------
+
+! TRho window
+ ! history of central temperature vs. density
+
+ TRho_txt_scale = 0.7
+ TRho_title = ''
+
+ TRho_logT_min = -101d0
+ TRho_logT_max = -101d0
+ TRho_logRho_min = -101d0
+ TRho_logRho_max = -101d0
+ show_TRho_degeneracy_line = .true.
+
+!-----------------------------------------------------------------------
+
+ !# HR window
+ ! history of `lg_L` vs. `lg_Teff`
+
+ HR_win_flag = .true.
+
+ HR_win_width = 6
+ HR_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+ HR_xleft = 0.15
+ HR_xright = 0.85
+ HR_ybot = 0.15
+ HR_ytop = 0.85
+ HR_txt_scale = 0.7 !1.0
+ HR_title = ''
+
+ ! axis limits -- to override system default selections
+ HR_logT_min = -101d0 ! only used if /= -101d0
+ HR_logT_max = -101d0 ! only used if /= -101d0
+ HR_logL_min = -101d0 ! only used if /= -101d0
+ HR_logL_max = -101d0 ! only used if /= -101d0
+
+ HR_logL_margin = 0.1
+ HR_logT_margin = 0.1
+ HR_dlogT_min = -1
+ HR_dlogL_min = -1
+
+ HR_step_min = -1 ! only plot models with model number >= this
+ HR_step_max = -1 ! only plot models with model number <= this
+
+ show_HR_classical_instability_strip = .true.
+ show_HR_Mira_instability_region = .false.
+ show_HR_WD_instabilities = .false.
+
+ show_HR_target_box = .false.
+ HR_target_n_sigma = -3 ! -n means show sig 1..n
+ HR_target_logL = 0
+ HR_target_logL_sigma = 0
+ HR_target_logT = 0
+ HR_target_logT_sigma = 0
+
+ show_HR_annotation1 = .false.
+ show_HR_annotation2 = .false.
+ show_HR_annotation3 = .false.
+
+ HR_fname = '' ! file name for extra HR data
+
+ ! Enables calling a subroutine to add extra information to a plot
+ ! see `$MESA_DIR/star/other/pgstar_decorator.f90`
+ HR_use_decorator = .false.
+
+ ! file output
+ HR_file_flag = .false.
+ HR_file_dir = 'png'
+ HR_file_prefix = 'hr_'
+ HR_file_interval = 5 ! output when `mod(model_number,HR_file_interval)==0`
+ HR_file_width = -1 ! (inches) negative means use same value as for window
+ HR_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!-----------------------------------------------------------------------
+
+ History_Panels1_title = ''
+
+ History_Panels1_xaxis_name = 'model_number'
+ History_Panels1_max_width = -1
+
+ !History_Panels1_xaxis_name = 'star_age'
+ !History_Panels1_max_width = 10
+
+ History_Panels1_txt_scale = 0.75
+ History_Panels1_xmin = -101d0
+ History_Panels1_xmax = -101d0
+ History_Panels1_dxmin = -1
+ History_Panels1_xaxis_reversed = .false.
+ History_Panels1_xaxis_log = .false.
+ History_Panels1_xmargin = 0.0
+
+ ! ::
+
+ History_Panels1_num_panels = 4
+
+ ! ::
+
+ History_Panels1_yaxis_name(1) = 'log_L'
+ History_Panels1_yaxis_reversed(1) = .false.
+ History_Panels1_ymin(1) = -101d0
+ History_Panels1_ymax(1) = -101d0
+ History_Panels1_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(1) = 'log_Teff'
+ History_Panels1_other_yaxis_reversed(1) = .false.
+ History_Panels1_other_ymin(1) = -101d0
+ History_Panels1_other_ymax(1) = -101d0
+ History_Panels1_other_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(2) = 'lum_div_Ledd'
+ History_Panels1_yaxis_reversed(2) = .false.
+ History_Panels1_ymin(2) = -101d0
+ History_Panels1_ymax(2) = -101d0
+ History_Panels1_dymin(2) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(2) = 'log_max_T' ! 'v_surf_km_s'
+ History_Panels1_other_yaxis_reversed(2) = .false.
+ History_Panels1_other_ymin(2) = -101d0
+ History_Panels1_other_ymax(2) = -101d0
+ History_Panels1_other_dymin(2) = 0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(3) = 'radius'
+ History_Panels1_yaxis_reversed(3) = .false.
+ History_Panels1_ymin(3) = -101d0
+ History_Panels1_ymax(3) = -101d0
+ History_Panels1_dymin(3) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(3) = 'log_cntr_Rho'
+ History_Panels1_other_yaxis_reversed(3) = .false.
+ History_Panels1_other_ymin(3) = -101d0
+ History_Panels1_other_ymax(3) = -101d0
+ History_Panels1_other_dymin(3) = 0.14
+ ! ::
+
+ History_Panels1_yaxis_name(4) = 'log_dt'
+ History_Panels1_yaxis_reversed(4) = .false.
+ History_Panels1_ymin(4) = -101d0
+ History_Panels1_ymax(4) = -101d0
+ History_Panels1_dymin(4) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(4) = ''
+ History_Panels1_other_yaxis_reversed(4) = .false.
+ History_Panels1_other_ymin(4) = -101d0
+ History_Panels1_other_ymax(4) = -101d0
+ History_Panels1_other_dymin(4) = 0.14
+
+!-----------------------------------------------------------------------
+
+! some global grid plot settings
+
+pgstar_grid_show_title = .true.
+pgstar_grid_title_scale = 1.0
+pgstar_grid_title_lw = 3
+pgstar_grid_title_disp = 2.5 ! 1.8
+pgstar_grid_title_coord = 0.5
+pgstar_grid_title_fjust = 0.5
+
+pgstar_age_scale = 0.8
+pgstar_age_disp = 3.0
+pgstar_age_coord = 0.0
+pgstar_age_fjust = 0.0
+
+pgstar_xaxis_label_scale = 1.3
+pgstar_left_yaxis_label_scale = 1.3
+pgstar_xaxis_label_disp = 2.2
+pgstar_left_yaxis_label_disp = 3.1
+pgstar_right_yaxis_label_disp = 4.1
+
+pgstar_model_scale = 0.8
+pgstar_model_disp = 3.0
+pgstar_model_coord = 1.0
+pgstar_model_fjust = 1.0
+
+! white_on_black flags -- true means white foreground color on black background
+file_white_on_black_flag = .true.
+file_device = 'png' ! options 'png' and 'vcps' for png and postscript respectively
+
+kipp_win_flag=.true.
+kipp_file_flag=.true.
+Kipp_mix_interval = 1
+Kipp_show_luminosities = .true.
+
+!Grid1_file_flag = .true.
+
+!pause_flag = .true.
+
+Profile_Panels3_xaxis_name = 'mass'
+Profile_Panels3_xmin = 0 ! -101d0
+Profile_Panels3_xmax = 5 !
+Profile_Panels3_xaxis_reversed = .false.
+
+Profile_Panels3_yaxis_name(4) = 'gamma1'
+Profile_Panels3_dymin(4) = 0.14
+Profile_Panels3_other_yaxis_name(4) = 'vel_km_per_s'
+Profile_Panels3_dymin(4) = 0.14
+
+TRho_Profile_xmin = -15 !3.0
+TRho_Profile_xmax = 10
+TRho_Profile_ymin = 3.35 !8.5
+TRho_Profile_ymax = 10.1
+
+TRho_logT_min = 9.2d0
+TRho_logRho_min = 6d0
+TRho_logRho_max = 10d0
+TRho_logT_max = 10d0
+
+Text_Summary1_name(1,2) = 'time_step_sec'
+Text_Summary1_name(2,2) = 'star_age_sec'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist_project b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist_project
new file mode 100644
index 0000000000..81065ba11c
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/inlist_project
@@ -0,0 +1,295 @@
+! 40M_carbon_burning_envelope_issues
+! Main evolution inlist flattened from 20M_pre_ms_to_core_collapse.
+! This active inlist starts from ZAMS and evolves to core collapse.
+
+&star_job
+ show_log_description_at_start = .false.
+
+ load_saved_model = .false.
+ !load_model_filename = 'standard_lgTmax.mod'
+ ! create_pre_main_sequence_model = .true.
+ ! pre_ms_relax_to_start_radiative_core = .true.
+ ! relax_initial_Y = .true.
+ ! new_Y = 0.2703d0
+ ! relax_initial_Z = .true.
+ ! new_Z = 1.42d-2
+
+ change_net = .true.
+ new_net_name = 'approx21_cr60_plus_co56.net'
+ dump_missing_metals_into_heaviest = .false.
+
+ ! Example ccsn network for properly capturing the energy generation rate during all stages
+ !change_net_net = .true.
+ !new_net_name = 'mesa_206.net'
+ !dump_missing_metals_into_heaviest = .false.
+
+ ! turn on hydrodynamics
+ change_v_flag = .true.
+ new_v_flag = .true.
+
+ ! If using a big network, comment out and use a local rate_tables directory
+ num_special_rate_factors = 2
+ reaction_for_special_factor(1) = 'r_c12_ag_o16'
+ special_rate_factor(1) = 1
+ filename_of_special_rate(1) = 'c12ag_deboer_sigma_0p0_2000_Tgrid.dat'
+
+ reaction_for_special_factor(2) = 'r_he4_he4_he4_to_c12'
+ special_rate_factor(2) = 1
+ filename_of_special_rate(2) = 'r_he4_he4_he4_to_c12_cf88.txt'
+
+ show_retry_counts_when_terminate = .true.
+ show_timestep_limit_counts_when_terminate = .true.
+
+ ! pgstar is recommended for diagnosing issues and understanding the evolution
+ pgstar_flag = .true.
+ save_pgstar_files_when_terminate = .true.
+
+ initial_zfracs = 6 ! set to asplund 2009 abundance fractions
+
+ save_model_when_terminate = .true.
+ save_model_filename = 'final.mod'
+ required_termination_code_string = 'fe_core_infall_limit'
+
+/ ! end of star_job namelist
+
+&eos
+ use_Skye = .true.
+ mass_fraction_limit_for_Skye = 1d-10
+
+/ ! end of eos namelist
+
+&kap
+ ! OPAL asplund 2009 opacities, Zbase set in inlist_mass_Z_wind_rotation
+ kap_file_prefix = 'a09' ! 'gs98' 'a09' 'OP_a09' 'OP_gs98'
+ kap_CO_prefix = 'a09_co' ! 'gs98_co' 'a09_co'
+ kap_lowT_prefix = 'lowT_fa05_a09p'
+ use_Type2_opacities = .true.
+
+ Zbase = 0.02d0 !1.42d-2 !
+/ ! end of kap namelist
+
+&controls
+
+! initial model
+ initial_mass = 40
+ ! initial_z = 1.42d-2 ! solar
+ ! initial_y = 0.2703d0 ! from asplund et al. 2009, solar.
+
+! stopping
+ fe_core_infall_limit = 1d7
+ ! limit max_model_number as part of test_suite
+ max_model_number = 10000
+ !max_number_retries = 37
+
+! wind
+ Dutch_scaling_factor = 0d0
+ x_ctrl(25) = 0.4d0 ! Dutch_scaling_factor after ZAMS
+
+ cool_wind_full_on_T = 0.8d4
+ hot_wind_full_on_T = 1.2d4
+ cool_wind_RGB_scheme = 'Dutch'
+ cool_wind_AGB_scheme = 'Dutch'
+ hot_wind_scheme = 'Dutch'
+ Dutch_wind_lowT_scheme = 'de Jager'
+
+ max_T_center_for_any_mass_loss = 1.1d9
+ max_tries_for_implicit_wind = 0
+
+! atmosphere
+ atm_option = 'T_tau'
+ atm_T_tau_relation = 'Eddington'
+ atm_T_tau_opacity = 'fixed'
+ Pextra_factor = 2
+
+! mlt
+ mixing_length_alpha = 1.5
+ MLT_option = 'Henyey'
+ use_Ledoux_criterion = .true.
+
+ use_other_alpha_mlt = .true. ! implemented in run_star_extras
+ x_ctrl(21) = 3.0 ! alpha_H
+ x_ctrl(22) = 1.5 ! alpha_other
+ x_ctrl(23) = 0.5 ! ! use alpha_H if cell X >= H_limit; else use alpha_other
+ x_ctrl(24) = 9d0 ! ! use other_alpha_mlt only if star_mass >= this limit.
+
+ thermohaline_option = 'Kippenhahn'
+ thermohaline_coeff = 0
+
+ semiconvection_option = 'Langer_85 mixing; gradT = gradr'
+ alpha_semiconvection = 1d-2
+
+ mlt_make_surface_no_mixing = .true.
+
+! superadiabatic convection routines:
+
+ use_superad_reduction = .false.
+ superad_reduction_Gamma_limit = 0.3d0 ! default is 0.5d0
+ superad_reduction_Gamma_limit_scale = 5d0
+ superad_reduction_Gamma_inv_scale = 5d0
+ superad_reduction_diff_grads_limit = 1d-2 ! default is 1d-3
+ superad_reduction_limit = -1d0
+
+ okay_to_reduce_gradT_excess = .false.
+ gradT_excess_f1 = 1d-4
+ gradT_excess_f2 = 1d-2
+ gradT_excess_lambda1 = -1d0 ! full on
+
+! mixing
+ !set_min_D_mix = .true.
+ !min_D_mix = 1d-2
+
+ ! we use step overshooting in H core
+ overshoot_scheme(1) = 'step'
+ overshoot_zone_type(1) = 'burn_H'
+ overshoot_zone_loc(1) = 'core'
+ overshoot_bdy_loc(1) = 'top'
+ overshoot_f(1) = 0.345 ! for M>10
+ !overshoot_f(1) = 0.21 ! For M<10
+ overshoot_f0(1) = 0.01
+
+ ! exponential in the H core
+ overshoot_scheme(2) = 'exponential'
+ overshoot_zone_type(2) = 'burn_He'
+ overshoot_zone_loc(2) = 'core'
+ overshoot_bdy_loc(2) = 'top'
+ overshoot_f(2) = 0.01
+ overshoot_f0(2) = 0.005
+
+ ! we don't want to deal with He/CO core mergers
+ ! and there is reason to believe there is little
+ ! inward overshooting in the shell across compositions boundaries
+ overshoot_scheme(3) = 'none'
+ overshoot_zone_type(3) = 'burn_He'
+ overshoot_zone_loc(3) = 'shell'
+ overshoot_bdy_loc(3) = 'bottom'
+
+ ! a small amount of overshooting on top of any other convective core
+ ! avoid spurious numerical behavior
+ ! perfect amount for degenerate flames
+ overshoot_scheme(4) = 'exponential'
+ overshoot_zone_type(4) = 'any'
+ overshoot_zone_loc(4) = 'any'
+ overshoot_bdy_loc(4) = 'any'
+ overshoot_f(4) = 0.005d0
+ overshoot_f0(4) = 0.001d0
+
+! timesteps
+ time_delta_coeff = 1.0
+ min_timestep_factor = 0.8d0
+ max_timestep_factor = 1.05d0
+ timestep_factor_for_retries = 0.75
+
+ limit_for_rel_error_in_energy_conservation = 1d-3
+ hard_limit_for_rel_error_in_energy_conservation = 1d-2
+
+ never_skip_hard_limits = .true.
+ min_xa_hard_limit = -1d-5
+ min_xa_hard_limit_for_highT = -3d-5
+
+ delta_lgTeff_limit = 0.01
+ delta_lgL_limit = 0.1
+ delta_lgL_He_limit = 0.1
+
+ ! Recommend decreasing all three Rho, T, Tmax
+ ! to 1d-3 or lower in production runs
+ delta_lgRho_cntr_limit = 0.03
+ delta_lgRho_cntr_hard_limit = 0.1
+ delta_lgRho_limit = 0.1
+
+ delta_lgT_cntr_limit_only_after_near_zams = .true.
+ delta_lgT_cntr_limit = 0.002
+ delta_lgT_cntr_hard_limit = 0.1
+
+ delta_lgT_max_limit_only_after_near_zams = .true.
+ delta_lgT_max_limit = 0.002
+ delta_lgT_max_hard_limit = 0.1
+
+ dX_div_X_limit(2) = -1 ! for he4
+
+ ! On the changes in total abundance of each isotope
+ ! one of the most useful timestep controls, period
+ dX_nuc_drop_limit = 2d-2 ! Recommend decreasing to 1d-3 or lower in a production run
+ dX_nuc_drop_limit_at_high_T = 2d-2 ! default = -1 = same as dX_nuc_drop_limit
+ dX_nuc_drop_min_X_limit = 1d-3 ! try decreasing to 1d-4 or 1d-5 in a production run
+ dX_nuc_drop_max_A_limit = 70 ! try increasing beyond 60 in a big network run
+ dX_nuc_drop_hard_limit = 1d99
+
+ delta_lg_XH_cntr_limit = 0.01d0
+ delta_lg_XH_cntr_max = 0.0d0
+ delta_lg_XH_cntr_min = 0.5d0
+
+ delta_lg_XHe_cntr_limit = 0.01d0
+ delta_lg_XHe_cntr_max = 0.0d0
+ delta_lg_XHe_cntr_min = 0.5d0
+
+ delta_XSi_cntr_limit = 0.0025
+ delta_XSi_cntr_hard_limit = -1!0.02
+ delta_Ye_highT_limit = 1d-3
+
+! mesh
+ !max_dq= 1d-3 ! or lower
+ mesh_delta_coeff = 2.5 ! try 1.0 or below in production run
+ mesh_delta_coeff_for_highT = 1.5 ! try 1.0 or below in production run
+ logT_max_for_standard_mesh_delta_coeff = 9.0
+ logT_min_for_highT_mesh_delta_coeff = 9.5
+ !min_dq_for_xa = 1d-4 ! avoid over-resolving composition changes, bad for bit for bit convergence?
+
+! solver
+
+ ! damped newton and structure only
+ scale_max_correction = 0.1d0
+ ignore_species_in_max_correction = .true.
+
+ use_gold2_tolerances = .true.
+ use_gold_tolerances = .true.
+ gold_solver_iters_timestep_limit = 20
+
+ max_abs_rel_run_E_err = 1d-2
+ energy_eqn_option = 'dedt'
+
+ convergence_ignore_equL_residuals = .true.
+ make_gradr_sticky_in_solver_iters = .true.
+ min_logT_for_make_gradr_sticky_in_solver_iters = 8d0
+ xa_scale = 1d-5
+ min_timestep_limit = 1d-12 ! (seconds) ! 1d-20 if things are sticky
+
+ when_to_stop_rtol = 1d-3
+ when_to_stop_atol = 1d-3
+
+ op_split_burn = .true.
+ op_split_burn_min_T = 1d9
+ burn_steps_limit = 150
+ burn_steps_hard_limit = 250
+ op_split_burn_eps = 1d-5
+ op_split_burn_odescal = 1d-5
+
+! output
+
+ !max_model_number = 4000000
+
+ num_trace_history_values = 4
+ trace_history_value_name(1) = 'Fe_core'
+ trace_history_value_name(2) = 'fe_core_infall'
+ trace_history_value_name(3) = 'rel_E_err'
+ trace_history_value_name(4) = 'log_rel_run_E_err'
+
+ photo_interval = 200
+ photo_digits = 8
+ profile_interval = 100
+ max_num_profile_models = 400000
+ history_interval = 1
+ write_header_frequency = 10
+ terminal_interval = 10
+
+ !report_solver_progress = .true. ! set true to see info about solver iterations
+ !report_ierr = .true. ! if true, produce terminal output when have some internal error
+
+/ ! end of controls namelist
+
+&pgstar
+ read_extra_pgstar_inlist(1) = .true.
+ extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+/ ! end of pgstar namelist
+
+&colors
+/
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/mk b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/mk
new file mode 100755
index 0000000000..d9eae582fa
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/mk
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/profile_columns.list b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/profile_columns.list
new file mode 100644
index 0000000000..f05af0c378
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/profile_columns.list
@@ -0,0 +1,962 @@
+! profile_columns.list -- determines the contents of star model profiles
+! you can use a non-standard version by setting profile_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as profile_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! if you need to have something added to the list of options, let me know....
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described at the end of this file.
+
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+
+! the following lines of the profile contain info for 1 zone per row, surface to center.
+
+! minimal set of enabled columns:
+
+ zone ! numbers start with 1 at the surface
+ mass ! m/Msun. mass coordinate of outer boundary of cell.
+ logR ! log10(radius/Rsun) at outer boundary of zone
+ logT ! log10(temperature) at center of zone
+ logRho ! log10(density) at center of zone
+ logP ! log10(pressure) at center of zone
+ x_mass_fraction_H
+ y_mass_fraction_He
+ z_mass_fraction_metals
+
+
+! everything below this line is deactivated
+
+
+!# Structure
+ !logM ! log10(m/Msun)
+ !log_mass
+ dm ! cell mass (grams)
+ !dm_bar ! boundary mass (grams) average of adjacent dm's
+ logdq ! log10(dq)
+ !log_dq
+ dq_ratio ! dq(k-1)/dq(k)
+ q ! fraction of star mass interior to outer boundary of this zone
+ !log_q ! log10(q)
+ !xq
+
+ !grav ! gravitational acceleration (cm sec^2)
+ !log_g ! log10 gravitational acceleration (cm sec^2)
+ !g_div_r ! grav/radius (sec^2)
+ !r_div_g ! radius/grav (sec^-2)
+ !cgrav_factor ! = cgrav(k)/standard_cgrav
+ vel_km_per_s ! velocity at outer boundary of zone (km/s) -- 0 if no velocity variable
+
+ radius ! radius at outer boundary of zone (in Rsun units)
+ radius_cm ! radius at outer boundary of zone (in centimeters)
+ !radius_km ! radius at outer boundary of zone (in kilometers)
+ logR_cm ! log10 radius at outer boundary of zone (in centimeters)
+ rmid ! radius at center by mass of zone (in Rsun units)
+ !r_div_R ! fraction of total radius
+
+ velocity ! velocity at outer boundary of zone (cm/s) -- 0 if no velocity variable
+ v_div_r ! velocity divided by radius
+ !v_times_t_div_r
+ !rho_times_r3 ! at face
+ !log_rho_times_r3 ! at face
+ !scale_height ! in Rsun units
+ pressure_scale_height ! in Rsun units
+
+ !m_div_r ! gm/cm
+ !dmbar_m_div_r
+ !log_dmbar_m_div_r
+ !mass_grams ! mass coordinate of outer boundary of cell in grams
+ mmid ! mass at midpoint of cell (average of mass coords of the cell boundaries) Msun units.
+
+ !m_grav ! total enclosed gravitational mass. Msun units.
+ !m_grav_div_m_baryonic ! mass_gravitational/mass at cell boundary
+ !mass_correction_factor ! dm_gravitational/dm (dm is baryonic mass of cell)
+
+ !xm ! mass exterior to point (Msun units)
+ !dq ! mass of zone as a fraction of total star mass
+ logxq ! log10(1-q)
+ !logxm ! log10(xm)
+
+ !xr ! radial distance from point to surface (Rsun)
+ !xr_cm ! radial distance from point to surface (cm)
+ !xr_div_R ! radial distance from point to surface in units of star radius
+ !log_xr ! log10 radial distance from point to surface (Rsun)
+ !log_xr_cm ! log10 radial distance from point to surface (cm)
+ !log_xr_div_R ! log10 radial distance from point to surface in units of star radius
+
+ dr ! r(outer edge) - r(inner edge); radial extent of cell in cm.
+ log_dr ! log10 cell width (cm)
+ !dv ! v(inner edge) - v(outer edge); rate at which delta_r is shrinking (cm/sec).
+
+ !dt_dv_div_dr ! dt*dv/dr; need to have this << 1 for every cell
+ !dr_div_R ! cell width divided by star R
+ !log_dr_div_R ! log10 cell width divided by star R
+ !dr_div_rmid ! cell width divided by rmid
+ !log_dr_div_rmid ! log(dr_div_rmid)
+
+ dr_div_cs ! cell sound crossing time (sec)
+ log_dr_div_cs ! log10 cell sound crossing time (sec)
+ !dr_div_cs_yr ! cell sound crossing time (years)
+ !log_dr_div_cs_yr ! log10 cell sound crossing time (years)
+
+ !acoustic_radius ! sound time from center to outer cell boundary (sec)
+ !log_acoustic_radius ! log10(acoustic_radius) (sec)
+ acoustic_depth ! sound time from surface to outer cell boundary (sec)
+ !log_acoustic_depth ! log10(acoustic_depth) (sec)
+ !acoustic_r_div_R_phot
+
+ !cell_collapse_time ! only set if doing explicit hydro
+ ! time (seconds) for cell inner edge to catch cell outer edge at current velocities
+ ! 0 if distance between inner and outer is increasing
+ log_cell_collapse_time ! log of cell_collapse_time
+
+ !compression_gradient
+
+
+
+!# Thermodynamics
+ temperature ! temperature at center of zone
+ !logT_face ! log10(temperature) at outer boundary of zone
+ !logT_bb ! log10(black body temperature) at outer boundary of zone
+ !logT_face_div_logT_bb
+
+ energy ! internal energy (ergs/g)
+ logE ! log10(specific internal energy) at center of zone
+ rho ! density
+ !density ! rho
+
+ entropy ! specific entropy divided by (avo*kerg)
+ !logS ! log10(specific entropy)
+ !logS_per_baryon ! log10(specific entropy per baryon / kerg)
+
+ pressure ! total pressure at center of zone (pgas + prad)
+ !prad ! radiation pressure at center of zone
+ !pgas ! gas pressure at center of zone (electrons and ions)
+ logPgas ! log10(pgas)
+ pgas_div_ptotal ! pgas/pressure
+
+ eta ! electron degeneracy parameter (eta >> 1 for significant degeneracy)
+ mu ! mean molecular weight per gas particle (ions + free electrons)
+
+ grada ! dlnT_dlnP at constant S
+ !dE_dRho ! at constant T
+ !cv ! specific heat at constant volume
+ !cp ! specific heat at constant total pressure
+
+ !log_CpT
+ gamma1 ! dlnP_dlnRho at constant S
+ !gamma3 ! gamma3 - 1 = dlnT_dlnRho at constant S
+ !gam ! plasma interaction parameter (> 160 or so means starting crystallization)
+ free_e ! free_e is mean number of free electrons per nucleon
+ !logfree_e ! log10(free_e), free_e is mean number of free electrons per nucleon
+ !chiRho ! dlnP_dlnRho at constant T
+ !chiT ! dlnP_dlnT at constant Rho
+
+ csound ! sound speed
+ log_csound
+ !csound_face ! sound speed (was previously called csound_at_face)
+ !cs_at_cell_bdy ! sound speed at cell boundary (csound is at cell center)
+ !v_div_cs ! velocity divided by sound speed
+ v_div_csound ! velocity divided by sound speed
+ !div_v
+
+ !thermal_time_to_surface ! in seconds
+ !log_thermal_time_to_surface
+ !t_rad
+ !log_t_rad
+ !log_t_sound
+ !log_t_thermal
+
+ !eos_phase
+ !eos_frac_OPAL_SCVH
+ !eos_frac_HELM
+ !eos_frac_Skye
+ !eos_frac_PC
+ !eos_frac_FreeEOS
+ !eos_frac_CMS
+ !eos_frac_ideal
+
+ !pgas_div_p
+ !prad_div_pgas
+ !prad_div_pgas_div_L_div_Ledd
+ !pressure_scale_height_cm
+
+ !eps_grav_composition_term
+ !eps_grav_plus_eps_mdot
+
+ !chiRho_for_partials
+ !chiT_for_partials
+ !rel_diff_chiRho_for_partials
+ !rel_diff_chiT_for_partials
+
+ !latent_ddlnRho
+ !latent_ddlnT
+
+ !log_P_face
+ !log_Ptrb
+ !log_cp_T_div_t_sound
+
+ !QQ
+
+
+!# Mass accretion
+ eps_grav ! -T*ds/dt (negative for expansion)
+ !log_abs_eps_grav_dm_div_L
+ !log_abs_v ! log10(abs(velocity)) (cm/s)
+ !log_mdot_cs
+ !log_mdot_v
+ !eps_mdot
+ !env_eps_grav
+ !xm_div_delta_m
+ !log_xm_div_delta_m
+
+
+!# Nuclear energy generation
+ !signed_log_eps_grav ! sign(eps_grav)*log10(max(1,abs(eps_grav)))
+ !signed_log_eps_nuc
+ !net_nuclear_energy ! erg/gm/s from nuclear reactions minus all neutrino losses
+ ! The value plotted is net_nuclear_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy minus all neutrino losses.
+ !net_energy ! net_energy + eps_grav.
+ ! The value plotted is net_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy plus eps_grav minus all neutrino losses.
+ !eps_nuc_plus_nuc_neu
+ !eps_nuc_minus_non_nuc_neu
+ !eps_nuc_start
+
+ eps_nuc ! ergs/g/sec from nuclear reactions (including losses to reaction neutrinos)
+ !log_abs_eps_nuc
+ !d_lnepsnuc_dlnd
+ !d_epsnuc_dlnd
+ !deps_dlnd_face
+ ! (was previously called deps_dlnd_at_face)
+ !d_lnepsnuc_dlnT
+ !d_epsnuc_dlnT
+ !deps_dlnT_face
+ ! (was previously called deps_dlnT_at_face)
+ !eps_nuc_neu_total ! erg/gm/sec as neutrinos from nuclear reactions
+
+ non_nuc_neu ! non-nuclear-reaction neutrino losses
+ !nonnucneu_plas ! plasmon neutrinos (for collective reactions like gamma_plasmon => nu_e + nubar_e)
+ !nonnucneu_brem ! bremsstrahlung (for reactions like e- + (z,a) => e- + (z,a) + nu + nubar)
+ !nonnucneu_phot ! photon neutrinos (for reactions like e- + gamma => e- + nu_e + nubar_e)
+ !nonnucneu_pair ! pair production (for reactions like e+ + e- => nu_e + nubar_e)
+ !nonnucneu_reco ! recombination neutrinos (for reactions like e- (continuum) => e- (bound) + nu_e + nubar_e)
+
+ ! ergs/g/sec for reaction categories
+ add_reaction_categories ! this adds all the reaction categories
+ ! NOTE: you can list specific categories by giving their names (from chem_def)
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+ burn_num_iters ! Number of split_burn iterations taken
+ !burn_avg_epsnuc
+ !log_burn_avg_epsnuc
+
+!# Composition
+ !x_mass_fraction_H
+ !y_mass_fraction_He
+ !z_mass_fraction_metals
+ abar ! average atomic weight (g/mole)
+ zbar ! average charge
+ z2bar ! average charge^2
+ ye ! average charge per baryon = proton fraction
+
+ x ! hydrogen mass fraction
+ !log_x
+ y ! helium mass fraction
+ !log_y
+ z ! metallicity
+ log_z ! metallicity
+
+ add_abundances ! this adds all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !h1
+ !he3
+ !he4
+ !c12
+ !n14
+ !o16
+
+ add_log_abundances ! this adds log10 of all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !log h1
+ !log he3
+ !log he4
+ !log c12
+ !log n14
+ !log o16
+
+ ! log concentration of species
+ ! concentration = number density / number density of electrons
+ ! Ci = (Xi/Ai) / sum(Zi*Xi/Ai) [see Thoul et al, ApJ 421:828-842, 1994]
+ !log_concentration h1
+ !log_concentration he4
+
+
+ ! typical charge for given species
+ ! (used by diffusion)
+ !typical_charge he4
+ !typical_charge c12
+ !typical_charge fe52
+
+ ! ionization state for given species
+ ! (same as typical charge, except that it's unsmoothed)
+ !ionization he4
+ !ionization c12
+ !ionization fe52
+
+ !cno_div_z ! abundance of c12, n14, and o16 as a fraction of total z
+
+
+
+
+!# Opacity
+ opacity ! opacity measured at center of zone
+ log_opacity ! log10(opacity)
+ !dkap_dlnrho_face ! partial derivative of opacity wrt. ln rho (at T=const) at outer edge of cell
+ ! (was previously called dkap_dlnrho_at_face)
+ !dkap_dlnT_face ! partial derivative of opacity wrt. ln T (at rho=const) at outer edge of cell
+ ! (was previously called dkap_dlnT_at_face)
+ !kap_frac_lowT ! fraction of opacity from lowT tables
+ !kap_frac_highT ! fraction of opacity from highT tables
+ !kap_frac_Type2 ! fraction of opacity from Type2 tables
+ !kap_frac_Compton ! fraction of opacity from Compton_Opacity
+ !kap_frac_op_mono ! fraction of opacity from OP mono
+
+ !log_kap
+ log_kap_times_factor
+
+ !log_c_div_tau
+ !xtau
+ !xlogtau
+ !logtau_sub_xlogtau
+
+!# Luminosity
+ luminosity ! luminosity at outer boundary of zone (in Lsun units)
+ logL ! log10(max(1d-2,L/Lsun))
+ !log_Lrad
+ !log_Ledd ! log10(Leddington/Lsun) -- local Ledd, 4 pi clight G m / kap
+ log_L_div_Ledd ! log10(max(1d-12,L/Leddington))
+ !log_Lrad_div_Ledd
+ !log_Lrad_div_L
+ !signed_log_power ! sign(L)*log10(max(1,abs(L)))
+
+ lum_adv
+ lum_conv
+ !lum_conv_MLT
+ !lum_div_Ledd
+ lum_erg_s
+ lum_plus_lum_adv
+ lum_rad
+
+ !log_L_div_CpTMdot
+ log_abs_lum_erg_s
+
+ !L
+ !Lc
+ !Lc_div_L
+ !Lr
+ !Lr_div_L
+ !Lt
+ !Lt_div_L
+
+!# Energetics
+ total_energy ! specific total energy of cell (ergs/g). internal+potential+kinetic+rotation.
+ !cell_specific_IE
+ !cell_specific_KE
+ !cell_IE_div_IE_plus_KE
+ !cell_KE_div_IE_plus_KE
+
+ !cell_ie_div_star_ie
+ !cell_internal_energy_fraction
+ !cell_internal_energy_fraction_start
+ !cell_specific_PE
+
+ !log_cell_ie_div_star_ie
+ !log_cell_specific_IE
+
+ !ergs_eps_grav_plus_eps_mdot
+ !ergs_error
+ !ergs_error_integral
+ !ergs_mdot
+ !ergs_rel_error_integral
+ !dm_eps_grav
+
+ !dE
+
+ !etrb
+ !log_etrb
+ !extra_grav
+ !log_rel_E_err
+
+ !total_energy_sign
+
+!# Convection
+ mlt_mixing_length ! mixing length for mlt (cm)
+ !mlt_mixing_type ! value returned by mlt
+ !mlt_Pturb
+ !alpha_mlt
+
+ conv_vel ! convection velocity (cm/sec)
+ log_conv_vel ! log10 convection velocity (cm/sec)
+
+ conv_L_div_L
+ log_conv_L_div_L
+ !lum_conv_div_lum_rad
+ !lum_rad_div_L_Edd
+ !lum_conv_div_lum_Edd
+ !lum_conv_div_L
+ !lum_rad_div_L
+ !lum_rad_div_L_Edd_sub_fourPrad_div_PchiT ! density increases outward if this is > 0
+ ! see Joss, Salpeter, and Ostriker, "Critical Luminosity", ApJ 181:429-438, 1973.
+
+ gradT ! mlt value for required temperature gradient dlnT/dlnP
+
+ gradr ! dlnT/dlnP required for purely radiative transport
+ !grad_temperature ! smoothed dlnT/dlnP at cell boundary
+ !grad_density ! smoothed dlnRho/dlnP at cell boundary
+
+ !gradL ! gradient for Ledoux criterion for convection
+ !sch_stable ! 1 if grada > gradr, 0 otherwise
+ !ledoux_stable ! 1 if gradL > gradr, 0 otherwise
+
+ !grada_sub_gradT
+ gradT_sub_grada ! gradT-grada at cell boundary
+ !gradT_div_grada ! gradT/grada at cell boundary
+
+ !gradr_sub_gradT
+ !gradT_sub_gradr ! gradT-gradr at cell boundary
+ !gradT_div_gradr ! gradT/gradr at cell boundary
+
+ !log_gradT_div_gradr ! log10 gradT/gradr at cell boundary
+ !log_mlt_Gamma ! convective efficiency
+ conv_vel_div_csound ! convection velocity divided by sound speed
+ !conv_vel_div_L_vel ! L_vel is velocity needed to carry L by convection; L = 4*pi*r^2*rho*vel**3
+ log_mlt_D_mix ! log10 diffusion coefficient for mixing from mlt (cm^2/sec)
+
+ !gradr_div_grada ! gradr/grada_face; > 1 => Schwarzschild unstable for convection
+ !gradr_sub_grada ! gradr - grada_face; > 0 => Schwarzschild unstable for convection
+
+ !gradL_sub_gradr
+ !gradP_div_rho
+ !gradT_excess_effect
+ !gradT_rel_err
+ !gradT_sub_a
+ !grada_face
+ !grada_sub_gradr
+ !diff_grads
+ !log_diff_grads
+
+ !mlt_D
+ !mlt_Gamma
+ !mlt_Y_face
+ !mlt_Zeta
+ !mlt_gradT
+ !mlt_log_abs_Y
+ !mlt_vc
+ !log_mlt_vc
+ !dvc_dt_TDC_div_g
+
+ !superad_reduction_factor
+ !conv_vel_div_mlt_vc
+
+ !log_Lconv
+ !log_Lconv_div_L
+
+!# Mixing
+ !mixing_type ! mixing types are defined in mesa/const/public/const_def
+ log_D_mix ! log10 diffusion coefficient for mixing in units of cm^2/second (Eulerian)
+ !log_D_mix_non_rotation
+ !log_D_mix_rotation
+
+ log_D_conv ! D_mix for regions where mix_type = convective_mixing
+ !log_D_leftover ! D_mix for regions where mix_type = leftover_convective_mixing
+ log_D_semi ! D_mix for regions where mix_type = semiconvective_mixing
+ log_D_ovr ! D_mix for regions where mix_type = overshoot_mixing
+ log_D_thrm ! D_mix for regions where mix_type = thermohaline_mixing
+ log_D_minimum ! D_mix for regions where mix_type = minimum_mixing
+ log_D_rayleigh_taylor ! D_mix for regions where mix_type = rayleigh_taylor_mixing
+ !log_D_anon ! D_mix for regions where mix_type = anonymous_mixing
+ log_D_omega
+
+ log_sig_mix ! sig(k) is mixing flow across face k in (gm sec^1)
+ ! sig(k) = D_mix*(4*pi*r(k)**2*rho_face)**2/dmavg
+
+ !dominant_isoA_for_thermohaline
+ !dominant_isoZ_for_thermohaline
+ !gradL_composition_term
+
+ mix_type
+
+
+
+!# Optical Depth
+ tau ! optical depth
+ !log_column_depth ! log10 column depth, exterior mass / area (g cm^-2)
+ !log_radial_depth ! log10 radial distance to surface (cm)
+ logtau ! log10(optical depth) at cell face
+ !tau_eff ! tau that gives the local P == P_atm if this location at surface
+ ! tau_eff = kap*(P/g - Pextra_factor*(L/M)/(6*pi*clight*cgrav))
+ !tau_eff_div_tau
+
+
+
+!# Rotation
+ omega ! angular velocity = j_rot/i_rot
+ log_omega
+ log_j_rot
+ log_J_div_M53 ! J is j*1e-15 integrated from center; M53 is m^(5/3)
+ log_J_inside ! J_inside is j_rot integrated from center
+ !shear ! -dlnomega/dlnR
+ log_abs_shear ! log10(abs(dlnomega/dlnR))
+ !richardson_number
+ i_rot ! specific moment of inertia at cell boundary
+ j_rot ! specific angular momentum at cell boundary
+ v_rot ! rotation velocity at cell boundary (km/sec)
+ !w_div_w_crit_roche !ratio of rotational velocity to keplerian at the equator
+ !without the contribution from the Eddington factor
+ fp_rot ! rotation factor for pressure
+ ft_rot ! rotation factor for temperature
+ !ft_rot_div_fp_rot ! gradr factor
+
+ !log_am_nu_non_rot ! log10(am_nu_non_rot)
+ !log_am_nu_rot ! log10(am_nu_rot)
+ log_am_nu ! log10(am_nu_non_rot + am_nu_rot)
+
+ r_polar ! (Rsun)
+ log_r_polar ! log10 (Rsun)
+ r_equatorial ! (Rsun)
+ log_r_equatorial ! log10 (Rsun)
+ r_e_div_r_p ! equatorial/r_polar
+ omega_crit ! breakup angular velocity = sqrt(G M / equatorial^3)
+ omega_div_omega_crit
+
+ !am_log_nu_omega ! for diffusion of omega
+ !am_log_nu_j ! for diffusion of angular momentum
+
+ !am_log_nu_rot ! diffusion of angular momentum driven by rotation
+ !am_log_nu_non_rot ! diffusion driven by other sources, e.g. convection
+
+ !am_log_sig_omega ! for diffusion of omega
+ !am_log_sig_j ! for diffusion of angular momentum
+ am_log_sig ! == am_log_sig_omega
+
+ !am_log_D_visc ! diffusion coeff for kinematic viscosity
+ am_log_D_DSI ! diffusion coeff for dynamical shear instability
+ am_log_D_SH ! diffusion coeff for Solberg-Hoiland instability
+ am_log_D_SSI ! diffusion coeff for secular shear instability
+ am_log_D_ES ! diffusion coeff for Eddington-Sweet circulation
+ am_log_D_GSF ! diffusion coeff for Goldreich-Schubert-Fricke instability
+ am_log_D_ST ! Spruit dynamo mixing diffusivity
+ am_log_nu_ST ! Spruit dynamo effective viscosity
+
+ dynamo_log_B_r ! (Gauss)
+ dynamo_log_B_phi ! (Gauss)
+
+ !am_domega_dlnR
+ !log_abs_dlnR_domega
+
+ !w_div_w_crit_roche2
+
+
+!# Diffusion
+ ! electric field from element diffusion calculation
+ !e_field
+ !log_e_field
+
+ ! gravitational field from element diffusion calculation
+ !g_field_element_diffusion
+ !log_g_field_element_diffusion
+
+ !eE_div_mg_element_diffusion
+ !log_eE_div_mg_element_diffusion
+
+ ! element diffusion velocity for species
+ !edv h1
+ !edv he4
+ !edv o16
+
+ ! Energy generated by Ne22 sedimentation.
+ !eps_WD_sedimentation
+ !log_eps_WD_sedimentation
+
+ !eps_diffusion
+ !log_eps_diffusion
+
+ !diffusion_D h1 ! self diffusion coeff
+ !diffusion_dX h1 ! change in h1 mass fraction from diffusion
+ !diffusion_dX he4 ! change in he4 mass fraction from diffusion
+ !diffusion_dX n20 ! change in n20 mass fraction from diffusion
+
+ !v_rad h1 ! velocity from radiative levitation
+ !v_rad he4 ! velocity from radiative levitation
+ !v_rad ne20 ! velocity from radiative levitation
+
+ !log_g_rad h1 ! log10 acceleration from radiative levitation
+ !log_g_rad he4 ! log10 acceleration from radiative levitation
+ !log_g_rad ne20 ! log10 acceleration from radiative levitation
+
+!# Phase Separation
+ !eps_phase_separation
+
+!# Oscillations
+ !brunt_N2 ! brunt-vaisala frequency squared
+ !brunt_N2_structure_term
+ !brunt_N2_composition_term
+ !log_brunt_N2_structure_term
+ !log_brunt_N2_composition_term
+ !brunt_A ! = N^2*r/g
+ !brunt_A_div_x2 ! x = r(k)/r(1)
+ !brunt_N2_dimensionless ! N2 in units of 3GM/R^3
+ !brunt_N_dimensionless ! N in units of sqrt(3GM/R^3)
+ !brunt_frequency ! cycles per day
+ !brunt_N ! sqrt(abs(brunt_N2))
+ !log_brunt_N ! log10(brunt_N)
+ !log_brunt_N2 ! log10(brunt_N2)
+ !log_brunt_N2_dimensionless ! log10(brunt_N2_dimensionless)
+
+ !brunt_B ! smoothed numerical difference
+ !brunt_nonB ! = grada - gradT
+ !log_brunt_B ! smoothed numerical difference
+ !log_brunt_nonB ! = grada - gradT
+
+ !sign_brunt_N2 ! sign of brunt_N2 (+1 for Ledoux stable; -1 for Ledoux unstable)
+ !brunt_nu ! brunt_frequency in microHz
+ !log_brunt_nu ! brunt_frequency in microHz
+
+ !lamb_S ! lamb frequency for l=1: S = sqrt(2)*csound/r (rad/s)
+ !lamb_S2 ! squared lamb frequency for l=1: S2 = 2*(csound/r)^2 (rad^2/s^2)
+
+ !lamb_Sl1 ! lamb frequency for l=1; = sqrt(2)*csound/r (microHz)
+ !lamb_Sl2 ! lamb frequency for l=2; = sqrt(6)*csound/r (microHz)
+ !lamb_Sl3 ! lamb frequency for l=3; = sqrt(12)*csound/r (microHz)
+ !lamb_Sl10 ! lamb frequency for l=10; = sqrt(110)*csound/r (microHz)
+
+ !log_lamb_Sl1 ! log10(lamb_Sl1)
+ !log_lamb_Sl2 ! log10(lamb_Sl2)
+ !log_lamb_Sl3 ! log10(lamb_Sl3)
+ !log_lamb_Sl10 ! log10(lamb_Sl10)
+
+ !brunt_N_div_r_integral ! integral from center of N*dr/r
+ !k_r_integral ! integral from center of k_r*dr
+ !brunt_N2_sub_omega2
+ !sl2_sub_omega2
+
+
+!# RSP
+
+ !rsp_Chi ! dlnP_dlnRho
+ !rsp_Et ! Specific turbulent energy
+ !rsp_logEt ! Log specific turbulent energy
+ !rsp_erad ! Specific internal (radiative) energy
+ !rsp_log_erad ! Log specific internal (radiative) energy
+ !rsp_Hp_face ! Pressure scale height at cell face
+ !rsp_Lc ! Convective luminosity
+ !rsp_Lc_div_L ! Convective luminosity div total luminosity
+ !rsp_Lr ! Radiative luminosity
+ !rsp_Lr_div_L ! Radiative luminosity div total luminosity
+ !rsp_Lt ! Turbulent luminosity
+ !rsp_Lt_div_L ! Turbulent luminosity div total luminosity
+ !rsp_Pt ! Turbulent pressure, p_t, see Table 1 in MESA5
+ !rsp_Uq ! Viscous momentum transfer rate, U_q, see Table 1 in MESA5
+ !rsp_Eq ! Viscous energy transfer rate, epsilon_q, see Table 1 in MESA5
+ !rsp_Pvsc ! Artificial viscosity, p_av, see Table 1 in MESA5
+ !rsp_gradT ! Temperature gradient
+ !rsp_Y_face ! Superadiabatic gradient at cell face, Y_sag, see Table 1 in MESA5
+ !rsp_damp ! Turbulent dissipation, D, see Table 1 in MESA5
+ !rsp_dampR ! Radiative cooling, D_r, see Table 1 in MESA5
+ !rsp_sink ! Sum of turbulent dissipation and radiative cooling terms
+ !rsp_src ! Source function, S, see Table 1 in MESA5
+ !rsp_src_snk ! Convective coupling, C, see Table 1 in MESA5
+ !rsp_heat_exchange_timescale ! 1d0/(clight * opacity * density)
+ !rsp_log_heat_exchange_timescale
+ !rsp_log_dt_div_heat_exchange_timescale ! Ratio of time step to heat exchange timescale
+ !w
+ !log_w
+
+ !COUPL
+ !DAMP
+ !DAMPR
+ !SOURCE
+ !Chi
+ !Eq
+ !Hp_face
+ !PII_face
+ !Ptrb
+ !Pvsc
+ !Uq
+ !Y_face
+
+!# RTI
+
+ RTI_du_diffusion_kick
+ alpha_RTI
+ boost_for_eta_RTI
+ dedt_RTI
+ dudt_RTI
+ eta_RTI
+ log_alpha_RTI
+ !log_boost_for_eta_RTI
+ log_eta_RTI
+ !log_etamid_RTI
+ log_lambda_RTI_div_Hrho
+ log_sig_RTI
+ !log_sigmid_RTI
+ !log_source_RTI
+ log_source_minus_alpha_RTI
+ log_source_plus_alpha_RTI
+ !source_minus_alpha_RTI
+ !source_plus_alpha_RTI
+ lambda_RTI
+
+!# Hydrodynamics
+
+
+ !v
+ v_div_v_escape
+ !v_div_vesc
+ !v_kms
+ !log_v_escape
+
+ u
+ u_face
+
+ P_face
+
+
+!# Extras
+ extra_heat
+ !extra_L ! extra_heat integrated from center (Lsun)
+ !log_extra_L ! log10 integrated from center (Lsun)
+ !log_irradiation_heat
+
+ !extra_jdot ! set in other_torque routine
+ !extra_omegadot ! set in other_torque routine
+
+ extra_opacity_factor ! set in other_opacity_factor routine
+
+ ! diffusion factor profile for species, set in other_diffusion_factor routine
+ !extra_diffusion_factor h1
+ !extra_diffusion_factor he4
+ !extra_diffusion_factor o16
+
+
+
+!# Miscellaneous
+
+ !dlog_h1_dlogP ! (log(h1(k)) - log(h1(k-1)))/(log(P(k)) - log(P(k-1)))
+ !dlog_he3_dlogP
+ !dlog_he4_dlogP
+ !dlog_c12_dlogP
+ !dlog_c13_dlogP
+ !dlog_n14_dlogP
+ !dlog_o16_dlogP
+ !dlog_ne20_dlogP
+ !dlog_mg24_dlogP
+ !dlog_si28_dlogP
+
+ !dlog_pp_dlogP
+ !dlog_cno_dlogP
+ !dlog_3alf_dlogP
+
+ !dlog_burn_c_dlogP
+ !dlog_burn_n_dlogP
+ !dlog_burn_o_dlogP
+
+ !dlog_burn_ne_dlogP
+ !dlog_burn_na_dlogP
+ !dlog_burn_mg_dlogP
+
+ !dlog_cc_dlogP
+ !dlog_co_dlogP
+ !dlog_oo_dlogP
+
+ !dlog_burn_si_dlogP
+ !dlog_burn_s_dlogP
+ !dlog_burn_ar_dlogP
+ !dlog_burn_ca_dlogP
+ !dlog_burn_ti_dlogP
+ !dlog_burn_cr_dlogP
+ !dlog_burn_fe_dlogP
+
+ !dlog_pnhe4_dlogP
+ !dlog_photo_dlogP
+ !dlog_other_dlogP
+
+ !logR_kap ! logR = logRho - 3*logT + 18 ; used in kap tables
+ !logW ! logW = logPgas - 4*logT
+ !logQ ! logQ = logRho - 2*logT + 12
+ !logV ! logV = logRho - 0.7*logE + 20
+
+ !log_CpT_absMdot_div_L ! log10(s% Cp(k)*s% T(k)*abs(s% mstar_dot)/s% L(k))
+
+ !delta_r ! r - r_start, change during step
+ !delta_L ! L - L_start, change during step
+ !delta_cell_vol ! cell_vol - cell_vol_start, change during step
+ !delta_entropy ! entropy - entropy_start, change during step (does not include effects of diffusion)
+ !delta_T ! T - T_start, change during step
+ !delta_rho ! rho - rho_start, change during step
+ !delta_eps_nuc ! eps_nuc - eps_nuc_start, change during step
+ !delta_mu ! mu - mu_start, change during step
+
+ zFe ! mass fraction of "Fe" = Fe+Co+Ni
+ !log_zFe
+ dPdr_dRhodr_info
+ !log_sig_raw_mix
+
+ !d_u_div_rmid
+ !d_u_div_rmid_start
+ !d_v_div_r_dm
+ !d_v_div_r_dr
+
+ !dlnP_dlnR
+ !dlnRho_dlnR
+ !dlnRho_dr
+ !dlnX_dr
+ !dlnY_dr
+ dlogR
+ !dPdr_div_grav
+ dPdr_info
+ dRhodr_info
+ !dRstar_div_dr
+ !dr_ratio
+ !dm_eps_grav
+ !dr_ratio
+ !dt_cs_div_dr
+ !dt_div_tau_conv
+ !dt_times_conv_vel_div_mixing_length
+ !log_dt_cs_div_dr
+ !log_dt_div_tau_conv
+ !log_dt_times_conv_vel_div_mixing_length
+ log_du_kick_div_du
+ !du
+ !dvdt_dPdm
+ !dvdt_grav
+
+ !tau_conv
+ !tau_cool
+ !tau_epsnuc
+ !tau_qhse
+
+ !max_abs_xa_corr
+
+ !tdc_num_iters
+
+ !k
+
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described here.
+
+ ! initial mass and Z
+ ! initial_mass
+ ! initial_z
+ ! general properties of the current state
+ ! model_number
+ ! num_zones
+ ! star_age
+ ! time_step
+ ! properties at the photosphere
+ ! Teff
+ ! photosphere_L
+ ! photosphere_r
+ ! properties at the outermost zone of the model
+ ! log_surface_L
+ ! log_surface_radius
+ ! log_surface_temp
+ ! properties near the center of the model
+ ! log_center_temp
+ ! log_center_density
+ ! log_center_P
+ ! center_eta
+ ! abundances near the center
+ ! center_h1
+ ! center_he3
+ ! center_he4
+ ! center_c12
+ ! center_n14
+ ! center_o16
+ ! center_ne20
+ ! information about total mass
+ ! star_mass
+ ! star_mdot
+ ! star_mass_h1
+ ! star_mass_he3
+ ! star_mass_he4
+ ! star_mass_c12
+ ! star_mass_n14
+ ! star_mass_o16
+ ! star_mass_ne20
+ ! locations of abundance transitions
+ ! he_core_mass
+ ! c_core_mass
+ ! o_core_mass
+ ! si_core_mass
+ ! fe_core_mass
+ ! location of optical depths 10 and 100
+ ! tau10_mass
+ ! tau10_radius
+ ! tau100_mass
+ ! tau100_radius
+ ! time scales
+ ! dynamic_time
+ ! kh_timescale
+ ! nuc_timescale
+ ! various kinds of total power
+ ! power_nuc_burn
+ ! power_h_burn
+ ! power_he_burn
+ ! power_neu
+ ! a few control parameter values
+ ! h1_boundary_limit
+ ! he4_boundary_limit
+ ! c12_boundary_limit
+ ! burn_min1
+ ! burn_min2
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/re b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/re
new file mode 100755
index 0000000000..7093783a31
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/re
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+shopt -u expand_aliases
+
+photo_directory=photos
+
+function most_recent_photo {
+ ls -tp "$photo_directory" | grep -v / | head -1
+}
+
+if [ $# -eq 0 ]
+then
+ photo=$(most_recent_photo)
+else
+ photo=$1
+fi
+
+if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
+then
+ echo "specified photo ($photo) does not exist"
+ exit 1
+fi
+
+echo "restart from $photo"
+if ! cp "$photo_directory/$photo" restart_photo
+then
+ echo "failed to copy photo ($photo)"
+ exit 1
+fi
+
+make run
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/rn b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/rn
new file mode 100755
index 0000000000..68233efd1d
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/rn
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+make run
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+echo 'finished'
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/rn1 b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/rn1
new file mode 100755
index 0000000000..f4ce7695fe
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/rn1
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+rm -f restart_photo
+
+make run
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/src/run.f90 b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/src/run.f90
new file mode 100644
index 0000000000..76d423f1af
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/src/run.f90
@@ -0,0 +1,15 @@
+program run
+ use run_star_support, only: do_read_star_job
+ use run_star, only: do_run_star
+
+ implicit none
+
+ integer :: ierr
+
+ ierr = 0
+ call do_read_star_job('inlist', ierr)
+ if (ierr /= 0) stop 1
+
+ call do_run_star
+
+end program run
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/src/run_star_extras.f90 b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/src/run_star_extras.f90
new file mode 100644
index 0000000000..9cb24ae6e3
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/src/run_star_extras.f90
@@ -0,0 +1,252 @@
+! ***********************************************************************
+!
+! Copyright (C) 2010 The MESA Team
+!
+! This program is free software: you can redistribute it and/or modify
+! it under the terms of the GNU Lesser General Public License
+! as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+! See the GNU Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public License
+! along with this program. If not, see .
+!
+! ***********************************************************************
+
+ module run_star_extras
+
+ use star_lib
+ use star_def
+ use const_def
+ use math_lib
+ use auto_diff
+
+ implicit none
+
+ include "test_suite_extras_def.inc"
+
+ integer, parameter :: i_dutch_scaling_factor_after_zams = 25
+ real(dp), parameter :: zams_h1_depletion = 0.03d0
+
+! here are the x controls used below
+
+!alpha_mlt_routine
+ !alpha_H = s% x_ctrl(21)
+ !alpha_other = s% x_ctrl(22)
+ !H_limit = s% x_ctrl(23)
+
+! Example of one extra value to preserve across photo restarts.
+! real(dp) :: example_photo_value
+
+ contains
+
+ include "test_suite_extras.inc"
+
+
+ subroutine extras_controls(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ s% extras_startup => extras_startup
+ s% extras_start_step => extras_start_step
+ s% extras_check_model => extras_check_model
+ s% extras_finish_step => extras_finish_step
+ s% extras_after_evolve => extras_after_evolve
+ s% how_many_extra_history_columns => how_many_extra_history_columns
+ s% data_for_extra_history_columns => data_for_extra_history_columns
+ s% how_many_extra_profile_columns => how_many_extra_profile_columns
+ s% data_for_extra_profile_columns => data_for_extra_profile_columns
+ s% other_photo_read => extras_photo_read
+ s% other_photo_write => extras_photo_write
+ s% other_alpha_mlt => alpha_mlt_routine
+ end subroutine extras_controls
+
+
+ subroutine extras_photo_read(id, iounit, ierr)
+ integer, intent(in) :: id, iounit
+ integer, intent(out) :: ierr
+ ierr = 0
+ !read(iounit, iostat=ierr) example_photo_value
+ end subroutine extras_photo_read
+
+
+ subroutine extras_photo_write(id, iounit)
+ integer, intent(in) :: id, iounit
+ !write(iounit) example_photo_value
+ end subroutine extras_photo_write
+
+
+ subroutine alpha_mlt_routine(id, ierr)
+ use chem_def, only: ih1
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k, h1
+ real(dp) :: alpha_H, alpha_other, H_limit
+ include 'formats'
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ alpha_H = s% x_ctrl(21)
+ alpha_other = s% x_ctrl(22)
+ H_limit = s% x_ctrl(23)
+ h1 = s% net_iso(ih1)
+ !write(*,1) 'alpha_H', alpha_H
+ !write(*,1) 'alpha_other', alpha_other
+ !write(*,1) 'H_limit', H_limit
+ !write(*,2) 'h1', h1
+ !write(*,2) 's% nz', s% nz
+ if (alpha_H <= 0 .or. alpha_other <= 0 .or. h1 <= 0) return
+ do k=1,s% nz
+ if (s% xa(h1,k) >= H_limit) then
+ s% alpha_mlt(k) = alpha_H
+ else
+ s% alpha_mlt(k) = alpha_other
+ end if
+ !write(*,2) 'alpha_mlt', k, s% alpha_mlt(k),
+ end do
+ !stop
+ end subroutine alpha_mlt_routine
+
+
+ subroutine extras_startup(id, restart, ierr)
+ integer, intent(in) :: id
+ logical, intent(in) :: restart
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ call test_suite_startup(s, restart, ierr)
+
+ end subroutine extras_startup
+
+
+ integer function extras_start_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ real(dp) :: zams_h1_limit
+ type (star_info), pointer :: s
+ ierr = 0
+ extras_start_step = keep_going
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ if (s% Dutch_scaling_factor > 0d0) return
+ zams_h1_limit = max(0d0, min(1d0, 1d0 - (s% initial_z + s% initial_y))) - &
+ zams_h1_depletion
+ if (s% center_h1 < zams_h1_limit) &
+ s% Dutch_scaling_factor = s% x_ctrl(i_dutch_scaling_factor_after_zams)
+ end function extras_start_step
+
+
+ subroutine extras_after_evolve(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ include 'formats'
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ write(*,'(A)')
+ ! put target info in TestHub output
+ testhub_extras_names(1) = 'fe_core_mass'; testhub_extras_vals(1) = s% fe_core_mass
+
+ if(s% fe_core_mass < 1d0) then
+ write(*,1) "Bad fe_core_mass", s%fe_core_mass
+ else
+ if(s% fe_core_infall > s% fe_core_infall_limit) then
+ write(*,'(a)') 'all values are within tolerance'
+ else
+ write(*,'(a)') "Bad fe core infall"
+ end if
+ end if
+ call test_suite_after_evolve(s, ierr)
+ end subroutine extras_after_evolve
+
+
+ ! returns either keep_going, retry, or terminate.
+ integer function extras_check_model(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_check_model = keep_going
+ end function extras_check_model
+
+
+ integer function how_many_extra_history_columns(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_history_columns = 0
+ end function how_many_extra_history_columns
+
+
+ subroutine data_for_extra_history_columns(id, n, names, vals, ierr)
+ integer, intent(in) :: id, n
+ character (len=maxlen_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ end subroutine data_for_extra_history_columns
+
+
+ integer function how_many_extra_profile_columns(id)
+ use star_def, only: star_info
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_profile_columns = 1
+ end function how_many_extra_profile_columns
+
+
+ subroutine data_for_extra_profile_columns(id, n, nz, names, vals, ierr)
+ use star_def, only: star_info, maxlen_profile_column_name
+ use const_def, only: dp
+ integer, intent(in) :: id, n, nz
+ character (len=maxlen_profile_column_name) :: names(n)
+ real(dp) :: vals(nz,n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ names(1) = 'zbar_div_abar'
+ do k=1,s% nz
+ vals(k,1) = s% zbar(k)/s% abar(k)
+ end do
+ end subroutine data_for_extra_profile_columns
+
+ ! returns either keep_going or terminate.
+ integer function extras_finish_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_finish_step = keep_going
+ if (extras_finish_step == terminate) &
+ s% termination_code = t_extras_finish_step
+ end function extras_finish_step
+
+ end module run_star_extras
diff --git a/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/testhub.yml b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/testhub.yml
new file mode 100644
index 0000000000..72737938e4
--- /dev/null
+++ b/star/dev_cases_massive_stars/40M_carbon_burning_envelope_issues/testhub.yml
@@ -0,0 +1,30 @@
+ runtime_minutes: 16.71
+ model_number: 2344
+ star_age: 1.0136396734299462E+07
+ num_retries: 11
+ log_rel_run_E_err: -4.5194878652040105
+ steps: 266
+ retries: 11
+ redos: 0
+ solver_calls_made: 277
+ solver_calls_failed: 11
+ solver_iterations: 2052
+ extra_testhub_names:
+ - 'fe_core_mass'
+ extra_testhub_vals:
+ - 1.6762420545401346E+00
+ runtime_minutes: 50.66
+ model_number: 10000
+ star_age: 4.8397508405607743E+06
+ num_retries: 1483
+ log_rel_run_E_err: -7.6182935365022955
+ steps: 10000
+ retries: 1483
+ redos: 0
+ solver_calls_made: 11483
+ solver_calls_failed: 1483
+ solver_iterations: 96320
+ extra_testhub_names:
+ - 'fe_core_mass'
+ extra_testhub_vals:
+ - 0.0000000000000000E+00
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/Makefile b/star/dev_cases_massive_stars/60M_envelope_issues/Makefile
new file mode 100644
index 0000000000..c779b9d6d8
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/README.rst b/star/dev_cases_massive_stars/60M_envelope_issues/README.rst
new file mode 100644
index 0000000000..8fbfe981e5
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/README.rst
@@ -0,0 +1,20 @@
+.. _60M_envelope_issues:
+
+*******************
+60M_envelope_issues
+*******************
+
+This dev case targets a superadiabatic envelope during H/He burning.
+
+The case creates a 60 |Msun| pre-main-sequence model and evolves it with
+pgstar settings in ``inlist_pgstar``.
+
+Inlists
+=======
+
+This dev case has two inlist files.
+
+* ``inlist`` contains the model setup and evolution controls.
+* ``inlist_pgstar`` contains the pgstar plot settings loaded by ``inlist``.
+
+Last-Updated: 12May2026
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/ck b/star/dev_cases_massive_stars/60M_envelope_issues/ck
new file mode 100755
index 0000000000..78ca63a8c1
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/ck
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+# this provides the definition of check_one
+# check_one
+source "${MESA_DIR}/star/test_suite/test_suite_helpers"
+
+check_one
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/clean b/star/dev_cases_massive_stars/60M_envelope_issues/clean
new file mode 100755
index 0000000000..74f37b9ce4
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/clean
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make clean
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/history_columns.list b/star/dev_cases_massive_stars/60M_envelope_issues/history_columns.list
new file mode 100644
index 0000000000..3aec493a20
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/history_columns.list
@@ -0,0 +1,1066 @@
+! history_columns.list -- determines the contents of star history logs
+! you can use a non-standard version by setting history_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as history_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! blank lines and comments can be used freely.
+! if a column name appears more than once in the list, only the first occurrence is used.
+
+! if you need to have something added to the list of options, let me know....
+
+
+! the first few lines of the log file contain a few items:
+
+ ! version_number -- for the version of mesa being used
+ ! burn_min1 -- 1st limit for reported burning, in erg/g/s
+ ! burn_min2 -- 2nd limit for reported burning, in erg/g/s
+
+
+!# other files
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+! the following lines of the log file contain info about 1 model per row
+
+!----------------------------------------------------------------------------------------------
+
+!# general info about the model
+
+ model_number ! counting from the start of the run
+ num_zones ! number of zones in the model
+
+ !## age
+
+ star_age ! elapsed simulated time in years since the start of the run
+ star_age_sec ! elapsed simulated time in seconds since the start of the run
+ star_age_min ! elapsed simulated time in minutes since the start of the run
+ star_age_hr ! elapsed simulated time in hours since the start of the run
+ star_age_day ! elapsed simulated time in days since the start of the run
+ !day ! elapsed simulated time in days since the start of the run
+
+ !log_star_age
+ !log_star_age_sec
+
+ !## timestep
+
+ time_step ! timestep in years since previous model
+ time_step_sec ! timestep in seconds since previous model
+ time_step_days
+ log_dt ! log10 time_step in years
+ log_dt_sec ! log10 time_step in seconds
+ log_dt_days ! log10 time_step in days
+
+ !## mass
+
+ star_mass ! in Msun units
+ !log_star_mass
+
+ !star_gravitational_mass ! star_mass is baryonic mass
+ !star_mass_grav_div_mass
+
+ !delta_mass ! star_mass - initial_mass in Msun units
+ log_xmstar ! log10 mass exterior to M_center (grams)
+
+ !## mass change
+
+ !star_mdot ! d(star_mass)/dt (in msolar per year)
+ log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+
+ !## imposed surface conditions
+ !tau_factor
+ !tau_surface
+
+ !## imposed center conditions
+ !m_center
+ !m_center_gm
+ !r_center
+ !r_center_cm
+ !r_center_km
+ !L_center
+ !log_L_center
+ !log_L_center_ergs_s
+ !v_center
+ !v_center_kms
+
+ !logt_max
+
+!----------------------------------------------------------------------------------------------
+
+!# mixing and convection
+
+ !max_conv_vel_div_csound
+ !max_gradT_div_grada
+ !max_gradT_sub_grada
+ !min_log_mlt_Gamma
+
+
+ !## mixing regions
+
+ mass_conv_core ! (Msun) mass coord of top of convective core. 0 if core is not convective
+
+ ! mx1 refers to the largest (by mass) convective region.
+ ! mx2 is the 2nd largest.
+
+ ! conv_mx1_top and conv_mx1_bot are the region where mixing_type == convective_mixing.
+ ! mx1_top and mx1_bot are the extent of all kinds of mixing, convective and other.
+
+ ! values are m/Mstar
+ conv_mx1_top
+ conv_mx1_bot
+ conv_mx2_top
+ conv_mx2_bot
+ mx1_top
+ mx1_bot
+ mx2_top
+ mx2_bot
+
+ ! radius -- values are radii in Rsun units
+ !conv_mx1_top_r
+ !conv_mx1_bot_r
+ !conv_mx2_top_r
+ !conv_mx2_bot_r
+ !mx1_top_r
+ !mx1_bot_r
+ !mx2_top_r
+ !mx2_bot_r
+
+ ! you might want to get a more complete list of mixing regions by using the following
+
+ !mixing_regions ! note: this includes regions where the mixing type is no_mixing.
+
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives the mixing type as defined in const/public/const_def.f90.
+
+ ! the second column for a region gives the m/mstar location of the top of the region
+ ! entries for extra columns after the last region in the star will have an invalid mixing_type value of -1.
+ ! mstar is the total mass of the star, so these locations range from 0 to 1
+ ! all regions are include starting from the center, so the bottom of one region
+ ! is the top of the previous one. since we start at the center, the bottom of the 1st region is 0.
+
+ ! the columns in the log file will have names like 'mix_type_1' and 'mix_qtop_1'
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+
+ !mix_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'mix_relr_type_1' and 'mix_relr_top_1'
+
+
+ !## conditions at base of largest convection zone (by mass)
+ !cz_bot_mass ! mass coordinate of base (Msun)
+ !cz_mass ! mass coordinate of base (Msun) -- same as cz_bot_mass
+ !cz_log_xmass ! mass exterior to base (g)
+ !cz_log_xmsun ! mass exterior to base (Msun)
+ !cz_xm ! mass exterior to base (Msun)
+ !cz_logT
+ !cz_logRho
+ !cz_logP
+ !cz_bot_radius ! Rsun
+ !cz_log_column_depth
+ !cz_log_radial_depth
+ !cz_luminosity ! Lsun
+ !cz_opacity
+ !cz_log_tau
+ !cz_eta
+ !cz_log_eps_nuc ! log10(ergs/g/s)
+ !cz_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_csound
+ !cz_scale_height
+ !cz_grav
+
+ !cz_omega
+ !cz_omega_div_omega_crit
+
+ !cz_zone
+
+ ! mass fractions at base of largest convection zone (by mass)
+ !cz_log_xa h1
+ !cz_log_xa he4
+
+ !## conditions at top of largest convection zone (by mass)
+ !cz_top_mass ! mass coordinate of top (Msun)
+ !cz_top_log_xmass ! mass exterior to top (g)
+ !cz_top_log_xmsun ! mass exterior to top (Msun)
+ !cz_top_xm ! mass exterior to top (Msun)
+ !cz_top_logT
+ !cz_top_logRho
+ !cz_top_logP
+ !cz_top_radius ! Rsun
+ !cz_top_log_column_depth
+ !cz_top_log_radial_depth
+ !cz_top_luminosity ! Lsun
+ !cz_top_opacity
+ !cz_top_log_tau
+ !cz_top_eta
+ !cz_top_log_eps_nuc ! log10(ergs/g/s)
+ !cz_top_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_top_csound
+ !cz_top_scale_height
+ !cz_top_grav
+
+ !cz_top_omega
+ !cz_top_omega_div_omega_crit
+
+ !cz_top_zone
+ !cz_top_zone_logdq
+
+ ! mass fractions at top of largest convection zone (by mass)
+ !cz_top_log_xa h1
+ !cz_top_log_xa he4
+
+!----------------------------------------------------------------------------------------------
+
+!# nuclear reactions
+
+ !## integrated quantities
+
+ !power_h_burn ! total thermal power from PP and CNO, excluding neutrinos (in Lsun units)
+ !power_he_burn ! total thermal power from triple-alpha, excluding neutrinos (in Lsun units)
+ !power_photo
+ !power_z_burn
+ !log_power_nuc_burn ! total thermal power from all burning, excluding photodisintegrations
+ log_LH ! log10 power_h_burn
+ log_LHe ! log10 power_he_burn
+ log_LZ ! log10 total burning power including LC, but excluding LH and LHe and photodisintegrations
+ log_Lnuc ! log(LH + LHe + LZ)
+ !log_Lnuc_ergs_s
+ !log_Lnuc_sub_log_L
+ !lnuc_photo
+
+ !extra_L ! integral of extra_heat in Lsun units
+ !log_extra_L ! log10 extra_L
+
+ !## neutrino losses
+ log_Lneu ! log10 power emitted in neutrinos, nuclear and thermal (in Lsun units)
+ log_Lneu_nuc ! log10 power emitted in neutrinos, nuclear sources only (in Lsun units)
+ log_Lneu_nonnuc ! log10 power emitted in neutrinos, thermal sources only (in Lsun units)
+
+ !mass_loc_of_max_eps_nuc ! (in Msun units)
+ !mass_ext_to_max_eps_nuc ! (in Msun units)
+ !eps_grav_integral ! (in Lsun units)
+ !log_abs_Lgrav ! log10 abs(eps_grav_integral) (in Lsun units)
+
+ !## information about reactions (by category)
+
+ ! log10 total luminosity for reaction categories (Lsun units)
+
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ !## information about individual reactions
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+
+
+ !## nuclear reactions at center
+
+ ! center log10 burn erg/g/s for reaction categories
+
+ !c_log_eps_burn cno
+ !c_log_eps_burn tri_alfa
+
+ ! center d_eps_nuc_dlnd for reaction categories
+
+ !c_d_eps_dlnd cno
+ !c_d_eps_dlnd tri_alfa
+
+ ! center d_eps_nuc_dlnT for reaction categories
+
+ !c_d_eps_dlnT cno
+ !c_d_eps_dlnT tri_alfa
+
+ !## regions of strong nuclear burning
+
+ ! 2 zones where eps_nuc > burn_min1 erg/g/s
+ ! for each zone have 4 numbers: start1, start2, end2, end1
+ ! start1 is mass of inner edge where first goes > burn_min1 (or -20 if none such)
+ ! start2 is mass of inner edge where first zone reaches burn_min2 erg/g/sec (or -20 if none such)
+ ! end2 is mass of outer edge where first zone drops back below burn_min2 erg/g/s
+ ! end1 is mass of outer edge where first zone ends (i.e. eps_nuc < burn_min1)
+ ! similar for the second zone
+
+ epsnuc_M_1 ! start1 for 1st zone
+ epsnuc_M_2 ! start2
+ epsnuc_M_3 ! end2
+ epsnuc_M_4 ! end1
+
+ epsnuc_M_5 ! start1 for 2nd zone
+ epsnuc_M_6 ! start2
+ epsnuc_M_7 ! end2
+ epsnuc_M_8 ! end1
+
+
+ ! you might want to get a more complete list of burning regions by using the following
+
+ !burning_regions
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives int(sign(val)*log10(max(1,abs(val))))
+ ! where val = ergs/gm/sec nuclear energy minus all neutrino losses.
+ ! the second column for a region gives the q location of the top of the region
+ ! entries for extra columns after the last region in the star will have a value of -9999
+ ! all regions are included starting from the center, so the bottom of one region
+ ! is the top of the previous one.
+ ! since we start at the center, the bottom of the 1st region is q=0 and top of last is q=1.
+
+ ! the columns in the log file will have names like 'burn_type_1' and 'burn_qtop_1'
+
+ !burn_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'burn_relr_type_1' and 'burn_relr_top_1'
+
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+!----------------------------------------------------------------------------------------------
+
+!# information about core and envelope
+
+ !## helium core
+ he_core_mass
+ !he_core_radius
+ !he_core_lgT
+ !he_core_lgRho
+ !he_core_L
+ !he_core_v
+ !he_core_omega
+ !he_core_omega_div_omega_crit
+ !he_core_k
+
+ !## CO core
+ co_core_mass
+ !CO_core
+ !co_core_radius
+ !co_core_lgT
+ !co_core_lgRho
+ !co_core_L
+ !co_core_v
+ !co_core_omega
+ !co_core_omega_div_omega_crit
+ !co_core_k
+
+ !## ONe core
+ one_core_mass
+ !one_core_radius
+ !one_core_lgT
+ !one_core_lgRho
+ !one_core_L
+ !one_core_v
+ !one_core_omega
+ !one_core_omega_div_omega_crit
+ !one_core_k
+
+ !## iron core
+ !fe_core_mass
+ !fe_core_radius
+ !fe_core_lgT
+ !fe_core_lgRho
+ !fe_core_L
+ !fe_core_v
+ !fe_core_omega
+ !fe_core_omega_div_omega_crit
+ !fe_core_k
+
+ !## neutron rich core
+ neutron_rich_core_mass
+ !neutron_rich_core_radius
+ !neutron_rich_core_lgT
+ !neutron_rich_core_lgRho
+ !neutron_rich_core_L
+ !neutron_rich_core_v
+ !neutron_rich_core_omega
+ !neutron_rich_core_omega_div_omega_crit
+ !neutron_rich_core_k
+
+ !## envelope
+
+ !envelope_mass ! = star_mass - he_core_mass
+ !envelope_fraction_left ! = envelope_mass / (initial_mass - he_core_mass)
+
+ !h_rich_layer_mass ! = star_mass - he_core_mass
+ !he_rich_layer_mass ! = he_core_mass - c_core_mass
+ !co_rich_layer_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# timescales
+
+ !dynamic_timescale ! dynamic timescale (seconds) -- estimated by 2*pi*sqrt(r^3/(G*m))
+ kh_timescale ! kelvin-helmholtz timescale (years)
+ !mdot_timescale ! star_mass/abs(star_mdot) (years)
+ !kh_div_mdot_timescales ! kh_timescale/mdot_timescale
+ !nuc_timescale ! nuclear timescale (years) -- proportional to mass divided by luminosity
+
+ !dt_cell_collapse ! min time for any cell to collapse at current velocities
+ !dt_div_dt_cell_collapse
+
+ !min_dr_div_cs ! min over all cells of dr/csound (seconds)
+ !min_dr_div_cs_k ! location of min
+ !log_min_dr_div_cs ! log10 min dr_div_csound (seconds)
+ !min_dr_div_cs_yr ! min over all cells of dr/csound (years)
+ !log_min_dr_div_cs_yr ! log10 min dr_div_csound (years)
+ !dt_div_min_dr_div_cs
+ !log_dt_div_min_dr_div_cs
+
+ !min_t_eddy ! minimum value of scale_height/conv_velocity
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions at or near the surface of the model
+
+ !## conditions at the photosphere
+ effective_T
+ !Teff
+ log_Teff ! log10 effective temperature
+ ! Teff is calculated using Stefan-Boltzmann relation L = 4 pi R^2 sigma Teff^4,
+ ! where L and R are evaluated at the photosphere (tau_factor < 1)
+ ! or surface of the model (tau_factor >= 1) when photosphere is not inside the model.
+
+ !photosphere_black_body_T
+ !photosphere_cell_T ! temperature at model location closest to the photosphere, not necessarily Teff
+ !photosphere_cell_log_T
+ !photosphere_cell_density
+ !photosphere_cell_log_density
+ !photosphere_cell_opacity
+ !photosphere_cell_log_opacity
+ !photosphere_L ! Lsun units
+ !photosphere_log_L ! Lsun units
+ !photosphere_r ! Rsun units
+ !photosphere_log_r ! Rsun units
+ !photosphere_m ! Msun units
+ !photosphere_v_km_s
+ !photosphere_cell_k
+ !photosphere_column_density
+ !photosphere_csound
+ !photosphere_log_column_density
+ !photosphere_opacity
+ !photosphere_v_div_cs
+ !photosphere_xm
+ !photosphere_cell_free_e
+ !photosphere_cell_log_free_e
+ !photosphere_logg
+ !photosphere_T
+
+ !## conditions at or near the surface of the model (outer edge of outer cell)
+
+ luminosity ! luminosity in Lsun units
+ !luminosity_ergs_s ! luminosity in cgs units
+ log_L ! log10 luminosity in Lsun units
+ !log_L_ergs_s ! log10 luminosity in cgs units
+ radius ! Rsun
+ log_R ! log10 radius in Rsun units
+ !radius_cm
+ !log_R_cm
+
+ log_g ! log10 gravity
+ !gravity
+ !log_Ledd
+ log_L_div_Ledd ! log10(L/Leddington)
+ lum_div_Ledd
+ !log_surf_optical_depth
+ !surface_optical_depth
+
+ !log_surf_cell_opacity ! old name was log_surf_opacity
+ !log_surf_cell_P ! old name was log_surf_P
+ !log_surf_cell_pressure ! old name was log_surf_pressure
+ !log_surf_cell_density ! old name was log_surf_density
+ !log_surf_cell_temperature ! old name was log_surf_temperature
+ !surface_cell_temperature ! old name was surface_temperature
+ !log_surf_cell_z ! old name was log_surf_z
+ !surface_cell_entropy ! in units of kerg per baryon
+ ! old name was surface_entropy
+
+ !v_surf ! (cm/s)
+ v_surf_km_s ! (km/s)
+ v_div_csound_surf ! velocity divided by sound speed at outermost grid point
+ !v_div_csound_max ! max value of velocity divided by sound speed at face
+ !v_div_vesc
+ !v_phot_km_s
+ !v_surf_div_escape_v
+
+ !v_surf_div_v_kh ! v_surf/(photosphere_r/kh_timescale)
+
+ surf_avg_j_rot
+ surf_avg_omega
+ surf_avg_omega_crit
+ surf_avg_omega_div_omega_crit
+ surf_avg_v_rot ! km/sec rotational velocity at equator
+ surf_avg_v_crit ! critical rotational velocity at equator
+ surf_avg_v_div_v_crit
+ surf_avg_Lrad_div_Ledd
+ !surf_avg_logT
+ !surf_avg_logRho
+ !surf_avg_opacity
+
+ ! Gravity Darkening, reports the surface averaged L/Lsun and Teff (K) caused by
+ ! gravity darkening in rotating stars. Based on the model of Espinosa Lara & Rieutord (2011)
+ ! 'polar' refers to the line of sight being directed along the rotation axis of the star
+ ! 'equatorial' refers to the line of sight coincident with the stellar equator
+ !grav_dark_L_polar !Lsun
+ !grav_dark_Teff_polar !K
+ !grav_dark_L_equatorial !Lsun
+ !grav_dark_Teff_equatorial !K
+
+ !surf_escape_v ! cm/s
+
+ !v_wind_Km_per_s ! Km/s
+ ! = 1d-5*s% opacity(1)*max(0d0,-s% mstar_dot)/ &
+ ! (4*pi*s% photosphere_r*Rsun*s% tau_base)
+ ! Lars says:
+ ! wind_mdot = 4*pi*R^2*rho*v_wind
+ ! tau = integral(opacity*rho*dr) from R to infinity
+ ! so tau = opacity*wind_mdot/(4*pi*R*v_wind) at photosphere
+ ! or v_wind = opacity*wind_mdot/(4*pi*R*tau) at photosphere
+
+ !rotational_mdot_boost ! factor for increase in mass loss mdot due to rotation
+ log_rotational_mdot_boost ! log factor for increase in mass loss mdot due to rotation
+ !surf_r_equatorial_div_r_polar
+ !surf_r_equatorial_div_r
+ !surf_r_polar_div_r
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions near center
+
+ log_center_T ! temperature
+ log_center_Rho ! density
+ !log_center_P ! pressure
+
+ ! shorter names for above
+ log_cntr_P
+ log_cntr_Rho
+ log_cntr_T
+
+ center_T ! temperature
+ center_Rho ! density
+ !center_P ! pressure
+
+ !center_degeneracy ! the electron chemical potential in units of k*T
+ !center_gamma ! plasma interaction parameter
+ center_mu
+ center_ye
+ center_abar
+ !center_zbar
+
+ !center_eps_grav
+
+ !center_non_nuc_neu
+ !center_eps_nuc
+ !d_center_eps_nuc_dlnT
+ !d_center_eps_nuc_dlnd
+ !log_center_eps_nuc
+
+ center_entropy ! in units of kerg per baryon
+ !max_entropy ! in units of kerg per baryon
+ !fe_core_infall
+ !non_fe_core_infall
+ !non_fe_core_rebound
+ !max_infall_speed
+
+ !compactness_parameter ! (m/Msun)/(R(m)/1000km) for m = 2.5 Msun
+ !compactness
+ !m4 ! Mass co-ordinate where entropy=4
+ ! mu4 is sensitive to the choice of how much dm/dr you average over, thus we average dm and dr over M(entropy=4) and M(entropy=4)+0.3Msun
+ !mu4 ! dM(Msun)/dr(1000km) where entropy=4
+
+
+ center_omega
+ center_omega_div_omega_crit
+
+!----------------------------------------------------------------------------------------------
+
+!# abundances
+
+ !species ! size of net
+
+ !## mass fractions near center
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_center_abundances
+ !add_log_center_abundances
+
+ ! individual central mass fractions (as many as desired)
+ center h1
+ center he4
+ center c12
+ center o16
+
+ ! individual log10 central mass fractions (as many as desired)
+ !log_center h1
+ !log_center he4
+ ! etc.
+
+
+ !## mass fractions near surface
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_surface_abundances
+ !add_log_surface_abundances
+
+ ! individual surface mass fractions (as many as desired)
+ !surface h1
+ !surface he4
+ surface c12
+ surface o16
+ ! etc.
+
+ ! individual log10 surface mass fractions (as many as desired)
+
+ !log_surface h1
+ !log_surface he4
+
+
+ !## mass fractions for entire star
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_average_abundances
+ !add_log_average_abundances
+
+ ! individual average mass fractions (as many as desired)
+ !average h1
+ !average he4
+ ! etc.
+
+ ! individual log10 average mass fractions (as many as desired)
+ !log_average h1
+ !log_average he4
+ ! etc.
+
+
+ !## mass totals for entire star (in Msun units)
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_total_mass
+ !add_log_total_mass
+
+ ! individual mass totals for entire star (as many as desired)
+ total_mass h1
+ total_mass he4
+ ! etc.
+
+ ! individual log10 mass totals for entire star (in Msun units)
+ !log_total_mass h1
+ !log_total_mass he4
+ ! etc.
+
+!----------------------------------------------------------------------------------------------
+
+!# info at specific locations
+
+ !## info at location of max temperature
+ !max_T
+ log_max_T
+
+
+!----------------------------------------------------------------------------------------------
+
+!# information about shocks
+
+ !## info about outermost outward moving shock
+ ! excluding locations with q > max_q_for_outer_mach1_location
+ ! returns values at location of max velocity
+ !shock_mass ! baryonic (Msun)
+ !shock_mass_gm ! baryonic (grams)
+ !shock_q
+ !shock_radius ! (Rsun)
+ !shock_radius_cm ! (cm)
+ !shock_velocity
+ !shock_csound
+ !shock_v_div_cs
+ !shock_lgT
+ !shock_lgRho
+ !shock_lgP
+ !shock_gamma1
+ !shock_entropy
+ !shock_tau
+ !shock_k
+ !shock_pre_lgRho
+
+!----------------------------------------------------------------------------------------------
+
+!# asteroseismology
+
+ !delta_nu ! large frequency separation for p-modes (microHz)
+ ! 1e6/(seconds for sound to cross diameter of star)
+ !delta_Pg ! g-mode period spacing for l=1 (seconds)
+ ! sqrt(2) pi^2/(integral of brunt_N/r dr)
+ !log_delta_Pg
+ !nu_max ! estimate from scaling relation (microHz)
+ ! nu_max = nu_max_sun * M/Msun / ((R/Rsun)^2 (Teff/astero_Teff_sun)^0.5)
+ !nu_max_3_4th_div_delta_nu ! nu_max^0.75/delta_nu
+ !acoustic_cutoff ! 0.5*g*sqrt(gamma1*rho/P) at surface
+ !acoustic_radius ! integral of dr/csound (seconds)
+ !ng_for_nu_max ! = 1 / (nu_max*delta_Pg)
+ ! period for g-mode with frequency nu_max = nu_max_ng*delta_Pg
+ !gs_per_delta_nu ! delta_nu / (nu_max**2*delta_Pg)
+ ! number of g-modes per delta_nu at nu_max
+
+ !int_k_r_dr_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=1
+ !int_k_r_dr_2pt0_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=1
+ !int_k_r_dr_0pt5_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=1
+ !int_k_r_dr_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=2
+ !int_k_r_dr_2pt0_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=2
+ !int_k_r_dr_0pt5_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=2
+ !int_k_r_dr_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=3
+ !int_k_r_dr_2pt0_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=3
+ !int_k_r_dr_0pt5_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=3
+
+!----------------------------------------------------------------------------------------------
+
+!# energy information
+
+ total_energy ! at end of step
+ log_total_energy ! log(abs(total_energy))
+ !total_energy_after_adjust_mass ! after mass adjustments
+
+ ! shorter versions of above
+ !tot_E
+ !log_tot_E
+
+
+ !total_gravitational_energy
+ !log_total_gravitational_energy ! log(abs(total_gravitational_energy))
+ !total_gravitational_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_PE
+ !log_tot_PE
+
+ !total_internal_energy
+ !log_total_internal_energy
+ !total_internal_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_IE
+ !log_tot_IE
+
+ !total_radial_kinetic_energy
+ !log_total_radial_kinetic_energy
+ !total_radial_kinetic_energy_after_adjust_mass
+
+ ! shorter versions of above (does not include rot KE)
+ !tot_KE
+ !log_tot_KE
+
+ !total_turbulent_energy
+ !log_total_turbulent_energy
+ !total_turbulent_energy_after_adjust_mass
+ !tot_Et
+ !log_tot_Et
+
+ total_energy_foe
+
+ !tot_IE_div_IE_plus_KE
+ !total_IE_div_IE_plus_KE
+
+ !total_entropy
+ !total_eps_grav
+
+ !total_energy_sources_and_sinks ! for this step
+ !total_nuclear_heating
+ !total_non_nuc_neu_cooling
+ !total_irradiation_heating
+ !total_extra_heating ! extra heat integrated over the model times dt (erg)
+ !total_WD_sedimentation_heating
+
+ !rel_run_E_err
+
+ rel_E_err
+ !abs_rel_E_err
+ log_rel_E_err
+
+ !tot_e_equ_err
+ !tot_e_err
+
+
+ !error_in_energy_conservation ! for this step
+ ! = total_energy - (total_energy_start + total_energy_sources_and_sinks)
+ !cumulative_energy_error ! = sum over all steps of abs(error_in_energy_conservation)
+ !rel_cumulative_energy_error ! = cumulative_energy_error/total_energy
+ !log_rel_cumulative_energy_error ! = log10 of rel_cumulative_energy_error
+ log_rel_run_E_err ! shorter name for rel_cumulative_energy_error
+
+ !rel_error_in_energy_conservation ! = error_in_energy_conservation/total_energy
+ !log_rel_error_in_energy_conservation
+
+ !virial_thm_P_avg
+ !virial_thm_rel_err
+ !work_inward_at_center
+ !work_outward_at_surface
+
+
+!----------------------------------------------------------------------------------------------
+
+ !# rotation
+
+ !total_angular_momentum
+ log_total_angular_momentum
+ !i_rot_total ! moment of inertia
+
+ !total_rotational_kinetic_energy
+ !log_total_rotational_kinetic_energy
+ !total_rotational_kinetic_energy_after_adjust_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# velocities
+
+ !avg_abs_v_div_cs
+ !log_avg_abs_v_div_cs
+ !max_abs_v_div_cs
+ !log_max_abs_v_div_cs
+
+ !avg_abs_v
+ !log_avg_abs_v
+ !max_abs_v
+ !log_max_abs_v
+
+ !u_surf
+ !u_surf_km_s
+ !u_div_csound_surf
+ !u_div_csound_max
+
+ !infall_div_cs
+
+!----------------------------------------------------------------------------------------------
+
+!# misc
+
+ !e_thermal ! sum over all zones of Cp*T*dm
+
+ !## eos
+ !logQ_max ! logQ = logRho - 2*logT + 12
+ !logQ_min
+ gamma1_min
+
+ !## core mixing
+ !mass_semiconv_core
+
+ !## H-He boundary
+
+ !diffusion_time_H_He_bdy
+ !temperature_H_He_bdy
+
+
+ !## optical depth and opacity
+
+ !one_div_yphot
+ !log_one_div_yphot
+
+ !log_min_opacity
+ !min_opacity
+
+ !log_tau_center
+
+ !log_max_tau_conv
+ !max_tau_conv
+ !log_min_tau_conv
+ !min_tau_conv
+
+ !tau_qhse_yrs
+
+ !## other
+
+ !Lsurf_m
+ !dlnR_dlnM
+ !h1_czb_mass ! location (in Msun units) of base of 1st convection zone above he core
+ !kh_mdot_limit
+ !log_cntr_dr_cm
+ !min_Pgas_div_P
+ !surf_c12_minus_o16 ! this is useful for seeing effects of dredge up on AGB
+ !surf_num_c12_div_num_o16
+
+ !phase_of_evolution ! Integer mapping to the type of evolution see star_data/public/star_data_def.inc for definitions
+
+ !## MLT++
+ !gradT_excess_alpha
+ !gradT_excess_min_beta
+ !gradT_excess_max_lambda
+
+ !max_L_rad_div_Ledd
+ !max_L_rad_div_Ledd_div_phi_Joss
+
+
+ !## RTI
+ !rti_regions
+
+ !## Ni & Co
+ !total_ni_co_56
+
+
+ !## internal structure constants
+
+ ! this is evaluated assuming a spherical star and does not account for rotation
+ !apsidal_constant_k2
+
+
+!----------------------------------------------------------------------------------------------
+
+!# accretion
+
+ !k_below_const_q
+ !q_below_const_q
+ !logxq_below_const_q
+
+ !k_const_mass
+ !q_const_mass
+ !logxq_const_mass
+
+ !k_below_just_added
+ !q_below_just_added
+ !logxq_below_just_added
+
+ !k_for_test_CpT_absMdot_div_L
+ !q_for_test_CpT_absMdot_div_L
+ !logxq_for_test_CpT_absMdot_div_L
+
+!----------------------------------------------------------------------------------------------
+
+!# Color output
+
+ ! Outputs the bolometric correction (bc) for the star in filter band ``filter'' (case sensitive)
+ !bc filter
+
+ ! Outputs the absolute magnitude for the star in filter band ``filter'' (case sensitive)
+ !abs_mag filter
+
+ ! Adds all the bc's to the output
+ !add_bc
+
+ ! Adds all the absolute magnitudes to the output
+ !add_abs_mag
+
+ ! Outputs luminosity in filter band ``filter'' (erg s^-1) (case sensitive)
+ ! lum_band filter
+
+ ! Adds all the filter band luminosities to the output (erg s^-1)
+ ! add_lum_band
+
+ ! Outputs log luminosity in filter band ``filter'' (log erg s^-1) (case sensitive)
+ ! log_lum_band filter
+
+ ! Adds all the filter band luminosities to the output (log erg s^-1)
+ ! add_log_lum_band
+
+!----------------------------------------------------------------------------------------------
+
+!# RSP
+
+ !rsp_DeltaMag ! absolute magnitude difference between minimum and maximum light (mag)
+ !rsp_DeltaR ! R_max - R_min difference in the max and min radius (Rsun)
+ !rsp_GREKM ! fractional growth of the kinetic energy per pulsation period ("nonlinear growth rate") - see equation 5 in MESA5
+ !rsp_num_periods ! Count of the number of pulsation cycles completed
+ !rsp_period_in_days ! Running period, ie., period between two consecutive values of R_max (days)
+ !rsp_phase ! Running pulsation phase for a cycle
+
+!----------------------------------------------------------------------------------------------
+!# debugging
+
+ !## retries
+ num_retries ! total during the run
+
+ !## solver iterations
+
+ num_iters ! same as num_solver_iterations
+ num_solver_iterations ! iterations at this step
+ !total_num_solver_iterations ! total iterations during the run
+ !avg_num_solver_iters
+
+ !rotation_solver_steps
+
+ !diffusion_solver_steps
+ !diffusion_solver_iters
+
+ !avg_setvars_per_step
+ !avg_skipped_setvars_per_step
+ !avg_solver_setvars_per_step
+
+ !burn_solver_maxsteps
+
+ !total_num_solver_calls_converged
+ !total_num_solver_calls_failed
+ !total_num_solver_calls_made
+ !total_num_solver_relax_calls_converged
+ !total_num_solver_relax_calls_failed
+ !total_num_solver_relax_calls_made
+ !total_num_solver_relax_iterations
+
+ !total_step_attempts
+ !total_step_redos
+ !total_step_retries
+ !total_steps_finished
+ !total_steps_taken
+
+ !TDC_num_cells
+
+ !## Relaxation steps
+ !total_relax_step_attempts
+ !total_relax_step_redos
+ !total_relax_step_retries
+ !total_relax_steps_finished
+ !total_relax_steps_taken
+
+ !## conservation during mesh adjust
+ !log_mesh_adjust_IE_conservation
+ !log_mesh_adjust_KE_conservation
+ !log_mesh_adjust_PE_conservation
+
+ !## amr
+ !num_hydro_merges
+ !num_hydro_splits
+
+ !## timing
+ !elapsed_time ! time since start of run (seconds)
+
+ !## Extras
+ burning_regions 80
+ mixing_regions 40
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/inlist b/star/dev_cases_massive_stars/60M_envelope_issues/inlist
new file mode 100644
index 0000000000..6f91fbacea
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/inlist
@@ -0,0 +1,264 @@
+! 60M_envelope_issues
+
+&star_job
+ show_log_description_at_start = .false.
+
+ !create_pre_main_sequence_model = .true.
+ !pre_ms_relax_to_start_radiative_core = .true.
+ load_saved_model = .false.
+ !load_model_filename = ''
+
+ relax_initial_Y = .true.
+ new_Y = 0.2703d0
+ relax_initial_Z = .true.
+ new_Z = 1.42d-2
+
+ change_net = .true.
+ new_net_name = 'approx21_cr60_plus_co56.net'
+ dump_missing_metals_into_heaviest = .false.
+
+ ! If using a big network, comment out and use a local rate_tables directory
+ num_special_rate_factors = 2
+ reaction_for_special_factor(1) = 'r_c12_ag_o16'
+ special_rate_factor(1) = 1
+ filename_of_special_rate(1) = 'c12ag_deboer_sigma_0p0_2000_Tgrid.dat'
+
+ reaction_for_special_factor(2) = 'r_he4_he4_he4_to_c12'
+ special_rate_factor(2) = 1
+ filename_of_special_rate(2) = 'r_he4_he4_he4_to_c12_cf88.txt'
+
+ show_retry_counts_when_terminate = .true.
+ show_timestep_limit_counts_when_terminate = .true.
+
+ ! pgstar is recommended for diagnosing issues and understanding the evolution
+ pgstar_flag = .true.
+ save_pgstar_files_when_terminate = .true.
+
+ initial_zfracs = 6 ! set to asplund 2009 abundance fractions
+
+ save_model_when_terminate = .true.
+ save_model_filename = 'after_core_he_burn.mod'
+ required_termination_code_string = 'xa_central_lower_limit'
+
+/ ! end of star_job namelist
+
+&eos
+ use_Skye = .true.
+ ! mass_fraction_limit_for_Skye = 1d-10
+
+/ ! end of eos namelist
+
+&kap
+ ! OPAL asplund 2009 opacities, Zbase set in inlist_mass_Z_wind_rotation
+ kap_file_prefix = 'a09' ! 'gs98' 'a09' 'OP_a09' 'OP_gs98'
+ kap_CO_prefix = 'a09_co' ! 'gs98_co' 'a09_co'
+ kap_lowT_prefix = 'lowT_fa05_a09p'
+ use_Type2_opacities = .true.
+
+ Zbase = 1.42d-2
+/ ! end of kap namelist
+
+&controls
+
+! initial model
+ initial_mass = 60
+ !initial_z = 1.42d-2 ! solar
+ !initial_y = 0.2703d0 ! from asplund et al. 2009, solar.
+
+! stopping
+ xa_central_lower_limit_species(1) = 'he4'
+ xa_central_lower_limit(1) = 1d-12
+ ! limit max_model_number as part of test_suite
+ max_model_number = 6000
+ !max_number_retries = 37
+
+! wind
+ Dutch_scaling_factor = 0d0
+ x_ctrl(21) = 0.4d0 ! Dutch_scaling_factor after ZAMS
+
+ cool_wind_full_on_T = 0.8d4
+ hot_wind_full_on_T = 1.2d4
+ cool_wind_RGB_scheme = 'Dutch'
+ cool_wind_AGB_scheme = 'Dutch'
+ hot_wind_scheme = 'Dutch'
+ Dutch_wind_lowT_scheme = 'de Jager'
+
+ max_T_center_for_any_mass_loss = 1.1d9
+ max_tries_for_implicit_wind = 0
+
+! atmosphere
+ atm_option = 'T_tau'
+ atm_T_tau_relation = 'Eddington'
+ atm_T_tau_opacity = 'fixed'
+ Pextra_factor = 2
+
+! mlt
+ mixing_length_alpha = 1.5
+ MLT_option = 'TDC'
+ steps_before_use_TDC = 50
+ use_Ledoux_criterion = .true.
+
+ thermohaline_option = 'Kippenhahn'
+ thermohaline_coeff = 0
+
+ semiconvection_option = 'Langer_85 mixing; gradT = gradr'
+ alpha_semiconvection = 1d-2
+
+ mlt_make_surface_no_mixing = .true.
+
+! superadiabatic convection routines:
+
+ use_superad_reduction = .false.
+ superad_reduction_Gamma_limit = 0.3d0 ! default is 0.5d0
+ superad_reduction_Gamma_limit_scale = 5d0
+ superad_reduction_Gamma_inv_scale = 5d0
+ superad_reduction_diff_grads_limit = 1d-2 ! default is 1d-3
+ superad_reduction_limit = -1d0
+
+ okay_to_reduce_gradT_excess = .false.
+ gradT_excess_f1 = 1d-4
+ gradT_excess_f2 = 1d-2
+ gradT_excess_lambda1 = -1d0 ! full on
+
+! mixing
+
+ ! we use step overshooting in H core
+ overshoot_scheme(1) = 'step'
+ overshoot_zone_type(1) = 'burn_H'
+ overshoot_zone_loc(1) = 'core'
+ overshoot_bdy_loc(1) = 'top'
+ overshoot_f(1) = 0.345 ! for M>10
+ !overshoot_f(1) = 0.21 ! For M<10
+ overshoot_f0(1) = 0.01
+
+ ! exponential in the H core
+ overshoot_scheme(2) = 'exponential'
+ overshoot_zone_type(2) = 'burn_He'
+ overshoot_zone_loc(2) = 'core'
+ overshoot_bdy_loc(2) = 'top'
+ overshoot_f(2) = 0.01
+ overshoot_f0(2) = 0.005
+
+ ! we don't want to deal with He/CO core mergers
+ ! and there is reason to believe there is little
+ ! inward overshooting in the shell across compositions boundaries
+ overshoot_scheme(3) = 'none'
+ overshoot_zone_type(3) = 'burn_He'
+ overshoot_zone_loc(3) = 'shell'
+ overshoot_bdy_loc(3) = 'bottom'
+
+ ! a small amount of overshooting on top of any other convective core
+ ! avoid spurious numerical behavior
+ ! perfect amount for degenerate flames
+ overshoot_scheme(4) = 'exponential'
+ overshoot_zone_type(4) = 'any'
+ overshoot_zone_loc(4) = 'any'
+ overshoot_bdy_loc(4) = 'any'
+ overshoot_f(4) = 0.005d0
+ overshoot_f0(4) = 0.001d0
+
+! timesteps
+ time_delta_coeff = 1.0
+ min_timestep_factor = 0.8d0
+ max_timestep_factor = 1.05d0
+ timestep_factor_for_retries = 0.75
+
+ limit_for_rel_error_in_energy_conservation = 1d-3
+ hard_limit_for_rel_error_in_energy_conservation = 1d-2
+
+ never_skip_hard_limits = .true.
+ min_xa_hard_limit = -1d-5
+ min_xa_hard_limit_for_highT = -3d-5
+
+ delta_lgTeff_limit = 0.01
+ delta_lgL_limit = 0.1
+ delta_lgL_He_limit = 0.1
+
+ ! Recommend decreasing all three Rho, T, Tmax
+ ! to 1d-3 or lower in production runs
+ delta_lgRho_cntr_limit = 0.03
+ delta_lgRho_cntr_hard_limit = 0.1
+ delta_lgRho_limit = 0.1
+
+ delta_lgT_cntr_limit_only_after_near_zams = .true.
+ delta_lgT_cntr_limit = 0.002
+ delta_lgT_cntr_hard_limit = 0.1
+
+ delta_lgT_max_limit_only_after_near_zams = .true.
+ delta_lgT_max_limit = 0.002
+ delta_lgT_max_hard_limit = 0.1
+
+ dX_div_X_limit(2) = -1 ! for he4
+
+ ! On the changes in total abundance of each isotope
+ ! one of the most useful timestep controls, period
+ dX_nuc_drop_limit = 2d-2 ! Recommend decreasing to 1d-3 or lower in a production run
+ dX_nuc_drop_limit_at_high_T = 2d-2 ! default = -1 = same as dX_nuc_drop_limit
+ dX_nuc_drop_min_X_limit = 1d-3 ! try decreasing to 1d-4 or 1d-5 in a production run
+ dX_nuc_drop_max_A_limit = 70 ! try increasing beyond 60 in a big network run
+ dX_nuc_drop_hard_limit = 1d99
+
+ delta_lg_XH_cntr_limit = 0.01d0
+ delta_lg_XH_cntr_max = 0.0d0
+ delta_lg_XH_cntr_min = -2.0d0
+
+ delta_lg_XHe_cntr_limit = 0.01d0
+ delta_lg_XHe_cntr_max = 0.0d0
+ delta_lg_XHe_cntr_min = -12.0d0
+
+! mesh
+ !max_dq= 1d-3 ! or lower
+ mesh_delta_coeff = 2.5 ! try 1.0 or below in production run
+ mesh_delta_coeff_for_highT = 1.5 ! try 1.0 or below in production run
+ logT_max_for_standard_mesh_delta_coeff = 9.0
+ logT_min_for_highT_mesh_delta_coeff = 9.5
+ !min_dq_for_xa = 1d-4 ! avoid over-resolving composition changes, bad for bit for bit convergence?
+
+! solver
+
+ ! damped newton and structure only
+ scale_max_correction = 0.1d0
+ ignore_species_in_max_correction = .true.
+
+ use_gold2_tolerances = .true.
+ use_gold_tolerances = .true.
+ gold_solver_iters_timestep_limit = 20
+
+ max_abs_rel_run_E_err = 1d-2
+ energy_eqn_option = 'dedt'
+
+ convergence_ignore_equL_residuals = .true.
+ make_gradr_sticky_in_solver_iters = .true.
+ min_logT_for_make_gradr_sticky_in_solver_iters = 8d0
+ xa_scale = 1d-5
+ min_timestep_limit = 1d-12 ! (seconds) ! 1d-20 if things are sticky
+
+ when_to_stop_rtol = 1d-3
+ when_to_stop_atol = 1d-3
+
+! output
+
+ !max_model_number = 4000000
+
+ num_trace_history_values = 3
+ trace_history_value_name(1) = 'He_cntr'
+ trace_history_value_name(2) = 'rel_E_err'
+ trace_history_value_name(3) = 'log_rel_run_E_err'
+
+ photo_interval = 200
+ photo_digits = 8
+ profile_interval = 100
+ max_num_profile_models = 400000
+ history_interval = 1
+ write_header_frequency = 10
+ terminal_interval = 10
+
+ !report_solver_progress = .true. ! set true to see info about solver iterations
+ !report_ierr = .true. ! if true, produce terminal output when have some internal error
+
+/ ! end of controls namelist
+
+&pgstar
+ read_extra_pgstar_inlist(1) = .true.
+ extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/inlist_pgstar b/star/dev_cases_massive_stars/60M_envelope_issues/inlist_pgstar
new file mode 100644
index 0000000000..62d291cd00
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/inlist_pgstar
@@ -0,0 +1,672 @@
+&pgstar
+
+!pause_flag = .true.
+
+pgstar_interval = 1
+pgstar_show_age_in_years = .true.
+pgstar_show_age_in_seconds = .false.
+pgstar_sleep = 0.0
+
+! some global grid plot settings at end
+
+pgstar_show_model_number = .false.
+pgstar_show_age = .false.
+
+!------------------------------------------------------------------------------------
+
+Grid1_win_flag = .true.
+Grid1_win_width = 12
+Grid1_win_aspect_ratio = 0.666
+
+! file output
+Grid1_file_flag = .true.
+Grid1_file_dir = 'png'
+Grid1_file_prefix = 'Grid1_'
+Grid1_file_interval = 25 ! output when mod(model_number,Grid1_file_interval)==0
+Grid1_file_width = 27 ! (inches) negative means use same value as for window
+Grid1_file_aspect_ratio = -1 ! negative means use same value as for window
+
+! reset the defaults
+
+Grid1_plot_name(:) = ''
+Grid1_plot_row(:) = 1 ! number from 1 at top
+Grid1_plot_rowspan(:) = 1 ! plot spans this number of rows
+Grid1_plot_col(:) = 1 ! number from 1 at left
+Grid1_plot_colspan(:) = 1 ! plot spans this number of columns
+Grid1_plot_pad_left(:) = 0.0 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(:) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(:) = 0.0 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(:) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(:) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_title = ''
+
+Grid1_num_cols = 3 ! divide plotting region into this many equal width cols
+Grid1_num_rows = 5 ! divide plotting region into this many equal height rows
+Grid1_num_plots = 6 ! <= 10
+
+Grid1_plot_name(1) = 'Text_Summary1'
+Grid1_plot_row(1) = 1 ! number from 1 at top
+Grid1_plot_rowspan(1) = 1 ! plot spans this number of rows
+Grid1_plot_col(1) = 1 ! number from 1 at left
+Grid1_plot_colspan(1) = 3 ! plot spans this number of columns
+
+Grid1_plot_pad_left(1) = -0.03 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(1) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(1) = -0.06 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(1) = 0.07 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(1) = 1 ! 0.8 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(3) = 'HR'
+Grid1_plot_row(3) = 2 ! number from 1 at top
+Grid1_plot_rowspan(3) = 1 ! plot spans this number of rows
+Grid1_plot_col(3) = 1 ! number from 1 at left
+Grid1_plot_colspan(3) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(3) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(3) = 0.08 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(3) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(3) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(3) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(5) = 'Profile_Panels1'
+Grid1_plot_row(5) = 3 ! number from 1 at top
+Grid1_plot_rowspan(5) = 3 ! plot spans this number of rows
+Grid1_plot_col(5) = 1 ! number from 1 at left
+Grid1_plot_colspan(5) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(5) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(5) = 0.10 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(5) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(5) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(5) = 0.6 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(2) = 'TRho_Profile'
+Grid1_plot_row(2) = 2 ! number from 1 at top
+Grid1_plot_rowspan(2) = 1 ! plot spans this number of rows
+Grid1_plot_col(2) = 2 ! number from 1 at left
+Grid1_plot_colspan(2) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(2) = -0.01 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(2) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(2) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(2) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(2) = 0.7 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(4) = 'History_Panels1'
+Grid1_plot_row(4) = 3 ! number from 1 at top
+Grid1_plot_rowspan(4) = 3 ! plot spans this number of rows
+Grid1_plot_col(4) = 2 ! number from 1 at left
+Grid1_plot_colspan(4) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(4) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(4) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(4) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(4) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(4) = 0.6 ! multiply txt_scale for subplot by this
+
+Grid1_plot_name(6) = 'Profile_Panels3'
+Grid1_plot_row(6) = 2 ! number from 1 at top
+Grid1_plot_rowspan(6) = 4 ! plot spans this number of rows
+Grid1_plot_col(6) = 3 ! Number from 1 at left
+Grid1_plot_colspan(6) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(6) = 0.04 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(6) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(6) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(6) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(6) = 0.6 ! multiply txt_scale for subplot by this
+
+!------------------------------------------------------------------------------------
+
+Profile_Panels3_win_flag = .false.
+
+Profile_Panels3_title = ''
+
+Profile_Panels3_num_panels = 5
+
+Profile_Panels3_yaxis_name(1) = 'Abundance'
+
+Profile_Panels3_yaxis_name(2) = 'Power'
+
+Profile_Panels3_yaxis_name(3) = 'Mixing'
+Mixing_legend_txt_scale_factor = 0.9
+
+Profile_Panels3_yaxis_name(4) = 'logRho'
+Profile_Panels3_other_yaxis_name(4) = 'v_div_cs' ! 'vel_km_per_s' ! 'entropy'
+Profile_Panels3_other_dymin(4) = 0.14
+
+Profile_Panels3_yaxis_name(5) = 'logT'
+
+! x-axis limits and properties
+Profile_Panels3_xaxis_name = 'mass'
+Profile_Panels3_xmin = 0.0
+Profile_Panels3_xmax = -101d0 ! 2.2
+Profile_Panels3_xaxis_reversed = .false.
+
+Profile_Panels3_txt_scale = 0.7
+
+!Profile_Panels3_xaxis_name = 'zone'
+!Profile_Panels3_xmin = 800
+!Profile_Panels3_xmax = 1100
+!Profile_Panels3_xaxis_reversed = .true.
+
+!Profile_Panels3_show_grid = .true.
+Profile_Panels3_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+!Profile_Panels1_win_flag = .true.
+!Profile_Panels1_file_flag = .true.
+ Profile_Panels1_file_dir = 'png'
+ Profile_Panels1_file_prefix = 'profile_panels1_'
+ Profile_Panels1_file_interval = 1
+ Profile_Panels1_file_width = -1
+ Profile_Panels1_file_aspect_ratio = -1
+
+Profile_Panels1_title = ''
+
+Profile_Panels1_txt_scale = 0.7
+Profile_Panels1_num_panels = 4
+
+Profile_Panels1_yaxis_name(1) = 'logRho'
+Profile_Panels1_dymin(1) = 0.14
+Profile_Panels1_other_yaxis_name(1) = 'logT'
+Profile_Panels1_other_dymin(1) = 0.14
+
+Profile_Panels1_yaxis_name(2) = 'entropy'
+Profile_Panels1_other_yaxis_name(2) = 'pgas_div_p'
+
+Profile_Panels1_yaxis_name(3) = 'gradT'
+Profile_Panels1_other_yaxis_name(3) = 'grada'
+Profile_Panels1_same_yaxis_range(3) = .true.
+Profile_Panels1_other_dymin(3) = 0.08
+
+Profile_Panels1_yaxis_name(4) = 'log_opacity'
+Profile_Panels1_dymin(1) = 0.14
+Profile_Panels1_other_yaxis_name(4) = 'gradr'
+Profile_Panels1_other_dymin(1) = 0.14
+
+! x-axis limits and properties
+Profile_Panels1_xaxis_name = 'logtau'
+Profile_Panels1_xmin = -101d0
+Profile_Panels1_xmax = 8.1
+Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_xaxis_name = 'zone'
+!Profile_Panels1_xmin = 15
+!Profile_Panels1_xmax = 270
+!Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_show_grid = .true.
+Profile_Panels1_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+!TRho_Profile_win_flag = .true.
+TRho_Profile_win_width = 8
+TRho_Profile_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+! file output
+!TRho_Profile_file_flag = .true.
+TRho_Profile_file_dir = 'TRho'
+TRho_Profile_file_prefix = 'trho_'
+TRho_Profile_file_interval = 10 ! output when `mod(model_number,TRho_Profile_file_interval)==0`
+TRho_Profile_file_width = -1 ! (inches) negative means use same value as for window
+TRho_Profile_file_aspect_ratio = -1 ! negative means use same value as for window
+
+TRho_Profile_xleft = 0.15
+TRho_Profile_xright = 0.85
+TRho_Profile_ybot = 0.15
+TRho_Profile_ytop = 0.85
+TRho_Profile_txt_scale = 0.7
+TRho_Profile_title = ' '
+
+TRho_switch_to_Column_Depth = .false.
+TRho_switch_to_mass = .false.
+
+show_TRho_Profile_legend = .false.
+ TRho_Profile_legend_coord = 0.07
+ TRho_Profile_legend_fjust = 0.0
+ TRho_Profile_legend_disp1 = -2.0
+ TRho_Profile_legend_del_disp = -1.3
+ TRho_Profile_legend_txt_scale = 1.1
+
+show_TRho_Profile_text_info = .false.
+ TRho_Profile_text_info_xfac = 0.77 ! controls x location
+ TRho_Profile_text_info_dxfac = 0.02 ! controls x spacing to value from text
+ TRho_Profile_text_info_yfac = 0.6 ! controls y location of 1st line
+ TRho_Profile_text_info_dyfac = -0.04 ! controls line spacing
+
+show_TRho_Profile_mass_locs = .false.
+show_TRho_accretion_mesh_borders = .false.
+show_TRho_Profile_kap_regions = .false.
+show_TRho_Profile_gamma1_4_3rd = .true.
+show_TRho_Profile_eos_regions = .false.
+show_TRho_Profile_degeneracy_line = .true.
+show_TRho_Profile_Pgas_Prad_line = .true.
+show_TRho_Profile_burn_lines = .true.
+show_TRho_Profile_burn_labels = .true.
+
+! axis limits
+TRho_Profile_xmin = -12.0
+TRho_Profile_xmax = 10.0
+TRho_Profile_ymin = 3.0
+TRho_Profile_ymax = 10.0
+
+! these are shown if show_TRho_Profile_mass_locs = .true.
+! set all the entries
+profile_mass_point_q = -1
+profile_mass_point_color_index = 1
+profile_mass_point_symbol = -6
+profile_mass_point_symbol_scale = 1.7
+profile_mass_point_str = ''
+profile_mass_point_str_clr = 1
+profile_mass_point_str_scale = 1.0
+
+! set defaults
+num_profile_mass_points = 3 ! max is defined in star_def (max_num_profile_mass_points)
+
+profile_mass_point_q(1) = 0.5
+profile_mass_point_color_index(1) = 1
+profile_mass_point_symbol(1) = -6
+profile_mass_point_str(1) = ' 0.5 M\d\(0844)\u'
+profile_mass_point_str_clr(1) = 1
+
+profile_mass_point_q(2) = 0.95
+profile_mass_point_color_index(2) = 1
+profile_mass_point_symbol(2) = -6
+profile_mass_point_str(2) = ' 0.95 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+profile_mass_point_q(3) = 0.999
+profile_mass_point_color_index(3) = 1
+profile_mass_point_symbol(3) = -6
+profile_mass_point_str(3) = ' 0.999 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+!------------------------------------------------------------------------------------
+
+! Text_Summary windows
+
+Text_Summary1_win_flag = .false.
+Text_Summary1_win_width = 10
+Text_Summary1_win_aspect_ratio = 0.15
+
+Text_Summary1_xleft = 0.01
+Text_Summary1_xright = 0.99
+Text_Summary1_ybot = 0.0
+Text_Summary1_ytop = 1.0
+Text_Summary1_txt_scale = 0.95
+Text_Summary1_title = ''
+
+Text_Summary1_num_rows = 6 ! <= 20
+Text_Summary1_num_cols = 5 ! <= 20
+Text_Summary1_name(:,:) = ''
+
+Text_Summary1_name(1,1) = 'model_number'
+Text_Summary1_name(1,2) = 'log_dt'
+Text_Summary1_name(1,3) = 'Mass'
+Text_Summary1_name(1,4) = 'H_cntr'
+Text_Summary1_name(1,5) = 'H_rich'
+
+Text_Summary1_name(2,2) = 'star_age'
+Text_Summary1_name(2,3) = 'lg_Mdot'
+Text_Summary1_name(2,4) = 'He_cntr'
+Text_Summary1_name(2,5) = 'He_core'
+
+Text_Summary1_name(3,2) = 'gamma1_min'
+Text_Summary1_name(3,3) = 'eta_cntr'
+Text_Summary1_name(3,4) = 'C_cntr'
+Text_Summary1_name(3,5) = 'CO_core'
+
+Text_Summary1_name(4,1) = 'log_max_T'
+Text_Summary1_name(4,2) = 'log_LH'
+Text_Summary1_name(4,3) = 'lg_Lnuc_tot'
+Text_Summary1_name(4,4) = 'O_cntr'
+
+Text_Summary1_name(5,1) = 'log_cntr_T'
+Text_Summary1_name(5,2) = 'log_LHe'
+Text_Summary1_name(5,3) = 'lg_Lneu'
+Text_Summary1_name(5,4) = 'Ne_cntr'
+Text_Summary1_name(5,5) = 'zones'
+
+Text_Summary1_name(6,1) = 'log_cntr_Rho'
+Text_Summary1_name(6,2) = 'log_LZ'
+Text_Summary1_name(6,3) = 'lg_Lphoto'
+Text_Summary1_name(6,5) = 'retries'
+
+!------------------------------------------------------------------------------------
+
+! Abundance profile plot
+
+Abundance_win_flag = .false.
+
+! window properties
+Abundance_win_width = 10
+Abundance_win_aspect_ratio = 0.75
+
+Abundance_xleft = 0.15
+Abundance_xright = 0.85
+Abundance_ybot = 0.15
+Abundance_ytop = 0.85
+Abundance_txt_scale = 1.1
+Abundance_title = ''
+
+! isotopes to plot
+
+Abundance_num_isos_to_show = 20
+
+Abundance_which_isos_to_show(1) = 'h1'
+Abundance_which_isos_to_show(2) = 'he3'
+Abundance_which_isos_to_show(3) = 'he4'
+Abundance_which_isos_to_show(4) = 'c12'
+Abundance_which_isos_to_show(5) = 'n14'
+Abundance_which_isos_to_show(6) = 'o16'
+Abundance_which_isos_to_show(7) = 'ne20'
+Abundance_which_isos_to_show(8) = 'mg24'
+Abundance_which_isos_to_show(9) = 'si28'
+Abundance_which_isos_to_show(10) = 's32'
+Abundance_which_isos_to_show(11) = 'ar36'
+Abundance_which_isos_to_show(12) = 'ca40'
+Abundance_which_isos_to_show(13) = 'ti44'
+Abundance_which_isos_to_show(14) = 'cr48'
+Abundance_which_isos_to_show(15) = 'cr56'
+Abundance_which_isos_to_show(16) = 'fe52'
+Abundance_which_isos_to_show(17) = 'fe54'
+Abundance_which_isos_to_show(18) = 'fe56'
+Abundance_which_isos_to_show(19) = 'ni56'
+Abundance_which_isos_to_show(20) = 'neut'
+!Abundance_which_isos_to_show(22) = 'ne22'
+
+! number and size of isotope labels along curves
+num_abundance_line_labels = 4
+Abundance_line_txt_scale_factor = 1.1
+
+! number and size of isotopes on legend
+Abundance_legend_max_cnt = 10
+Abundance_legend_txt_scale_factor = 1.3
+
+! yaxis limits
+Abundance_log_mass_frac_min = -4!-6.4 ! -3.5
+Abundance_log_mass_frac_max = 0.3
+
+! file output
+Abundance_file_flag = .false.
+Abundance_file_dir = 'Abundance'
+Abundance_file_prefix = 'abund_'
+Abundance_file_width = -1 ! (inches) negative means use same value as for window
+Abundance_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!------------------------------------------------------------------------------------
+
+! power plot
+
+Power_win_flag = .false.
+Power_win_width = 10
+Power_win_aspect_ratio = 0.75
+Power_title = ''
+
+Power_xleft = 0.15
+Power_xright = 0.85
+Power_ybot = 0.15
+Power_ytop = 0.85
+Power_txt_scale = 1.1
+Power_title = ' '
+
+Power_legend_max_cnt = 10
+Power_legend_txt_scale_factor = 1.3 ! relative to other text
+
+! power yaxis limits -- to override system default selections
+Power_ymin = -5.0 ! -101d0 ! only used if /= -101d0
+Power_ymax = 25.0 ! -101d0 ! only used if /= -101d0
+
+! file output
+Power_file_flag = .false.
+Power_file_dir = 'png'
+Power_file_prefix = 'power_'
+Power_file_interval = 5 ! output when mod(model_number,Power_file_interval)==0
+Power_file_width = -1 ! (inches) negative means use same value as for window
+Power_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!------------------------------------------------------------------------------------
+
+! mixing plot
+
+Mixing_xmin = 0.0
+Mixing_xmax = 1.6 ! -101d0
+Mixing_legend_txt_scale_factor = 1.4 ! relative to other text
+
+Mixing_show_rotation_details = .false.
+
+!Mixing_win_flag = .true.
+!Mixing_file_flag = .true.
+Mixing_file_dir = 'png'
+Mixing_file_prefix = 'mixing_'
+Mixing_file_interval = 1 ! output when `mod(model_number,Mixing_file_interval)==0`
+Mixing_file_width = -1 ! (inches) negative means use same value as for window
+Mixing_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!-----------------------------------------------------------------------
+
+! TRho window
+ ! history of central temperature vs. density
+
+ TRho_txt_scale = 0.7
+ TRho_title = ''
+
+ TRho_logT_min = -101d0
+ TRho_logT_max = -101d0
+ TRho_logRho_min = -101d0
+ TRho_logRho_max = -101d0
+ show_TRho_degeneracy_line = .true.
+
+!-----------------------------------------------------------------------
+
+ !# HR window
+ ! history of `lg_L` vs. `lg_Teff`
+
+ HR_win_flag = .true.
+
+ HR_win_width = 6
+ HR_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+ HR_xleft = 0.15
+ HR_xright = 0.85
+ HR_ybot = 0.15
+ HR_ytop = 0.85
+ HR_txt_scale = 0.7 !1.0
+ HR_title = ''
+
+ ! axis limits -- to override system default selections
+ HR_logT_min = -101d0 ! only used if /= -101d0
+ HR_logT_max = -101d0 ! only used if /= -101d0
+ HR_logL_min = -101d0 ! only used if /= -101d0
+ HR_logL_max = -101d0 ! only used if /= -101d0
+
+ HR_logL_margin = 0.1
+ HR_logT_margin = 0.1
+ HR_dlogT_min = -1
+ HR_dlogL_min = -1
+
+ HR_step_min = -1 ! only plot models with model number >= this
+ HR_step_max = -1 ! only plot models with model number <= this
+
+ show_HR_classical_instability_strip = .true.
+ show_HR_Mira_instability_region = .false.
+ show_HR_WD_instabilities = .false.
+
+ show_HR_target_box = .false.
+ HR_target_n_sigma = -3 ! -n means show sig 1..n
+ HR_target_logL = 0
+ HR_target_logL_sigma = 0
+ HR_target_logT = 0
+ HR_target_logT_sigma = 0
+
+ show_HR_annotation1 = .false.
+ show_HR_annotation2 = .false.
+ show_HR_annotation3 = .false.
+
+ HR_fname = '' ! file name for extra HR data
+
+ ! Enables calling a subroutine to add extra information to a plot
+ ! see `$MESA_DIR/star/other/pgstar_decorator.f90`
+ HR_use_decorator = .false.
+
+ ! file output
+ HR_file_flag = .false.
+ HR_file_dir = 'png'
+ HR_file_prefix = 'hr_'
+ HR_file_interval = 5 ! output when `mod(model_number,HR_file_interval)==0`
+ HR_file_width = -1 ! (inches) negative means use same value as for window
+ HR_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!-----------------------------------------------------------------------
+
+ History_Panels1_title = ''
+
+ History_Panels1_xaxis_name = 'model_number'
+ History_Panels1_max_width = -1
+
+ !History_Panels1_xaxis_name = 'star_age'
+ !History_Panels1_max_width = 10
+
+ History_Panels1_txt_scale = 0.75
+ History_Panels1_xmin = -101d0
+ History_Panels1_xmax = -101d0
+ History_Panels1_dxmin = -1
+ History_Panels1_xaxis_reversed = .false.
+ History_Panels1_xaxis_log = .false.
+ History_Panels1_xmargin = 0.0
+
+ ! ::
+
+ History_Panels1_num_panels = 4
+
+ ! ::
+
+ History_Panels1_yaxis_name(1) = 'log_L'
+ History_Panels1_yaxis_reversed(1) = .false.
+ History_Panels1_ymin(1) = -101d0
+ History_Panels1_ymax(1) = -101d0
+ History_Panels1_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(1) = 'log_Teff'
+ History_Panels1_other_yaxis_reversed(1) = .false.
+ History_Panels1_other_ymin(1) = -101d0
+ History_Panels1_other_ymax(1) = -101d0
+ History_Panels1_other_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(2) = 'lum_div_Ledd'
+ History_Panels1_yaxis_reversed(2) = .false.
+ History_Panels1_ymin(2) = -101d0
+ History_Panels1_ymax(2) = -101d0
+ History_Panels1_dymin(2) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(2) = 'log_max_T' ! 'v_surf_km_s'
+ History_Panels1_other_yaxis_reversed(2) = .false.
+ History_Panels1_other_ymin(2) = -101d0
+ History_Panels1_other_ymax(2) = -101d0
+ History_Panels1_other_dymin(2) = 0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(3) = 'radius'
+ History_Panels1_yaxis_reversed(3) = .false.
+ History_Panels1_ymin(3) = -101d0
+ History_Panels1_ymax(3) = -101d0
+ History_Panels1_dymin(3) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(3) = 'log_cntr_Rho'
+ History_Panels1_other_yaxis_reversed(3) = .false.
+ History_Panels1_other_ymin(3) = -101d0
+ History_Panels1_other_ymax(3) = -101d0
+ History_Panels1_other_dymin(3) = 0.14
+ ! ::
+
+ History_Panels1_yaxis_name(4) = 'log_dt'
+ History_Panels1_yaxis_reversed(4) = .false.
+ History_Panels1_ymin(4) = -101d0
+ History_Panels1_ymax(4) = -101d0
+ History_Panels1_dymin(4) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(4) = ''
+ History_Panels1_other_yaxis_reversed(4) = .false.
+ History_Panels1_other_ymin(4) = -101d0
+ History_Panels1_other_ymax(4) = -101d0
+ History_Panels1_other_dymin(4) = 0.14
+
+!-----------------------------------------------------------------------
+
+! some global grid plot settings
+
+pgstar_grid_show_title = .true.
+pgstar_grid_title_scale = 1.0
+pgstar_grid_title_lw = 3
+pgstar_grid_title_disp = 2.5 ! 1.8
+pgstar_grid_title_coord = 0.5
+pgstar_grid_title_fjust = 0.5
+
+pgstar_age_scale = 0.8
+pgstar_age_disp = 3.0
+pgstar_age_coord = 0.0
+pgstar_age_fjust = 0.0
+
+pgstar_xaxis_label_scale = 1.3
+pgstar_left_yaxis_label_scale = 1.3
+pgstar_xaxis_label_disp = 2.2
+pgstar_left_yaxis_label_disp = 3.1
+pgstar_right_yaxis_label_disp = 4.1
+
+pgstar_model_scale = 0.8
+pgstar_model_disp = 3.0
+pgstar_model_coord = 1.0
+pgstar_model_fjust = 1.0
+
+! white_on_black flags -- true means white foreground color on black background
+file_white_on_black_flag = .true.
+file_device = 'png' ! options 'png' and 'vcps' for png and postscript respectively
+
+kipp_win_flag=.true.
+kipp_file_flag=.true.
+Kipp_mix_interval = 1
+Kipp_show_luminosities = .true.
+
+!Grid1_file_flag = .true.
+
+!pause_flag = .true.
+
+Profile_Panels3_xaxis_name = 'mass'
+Profile_Panels3_xmin = 0d0
+Profile_Panels3_xmax = -101d0
+Profile_Panels3_xaxis_reversed = .false.
+
+Profile_Panels3_yaxis_name(4) = 'gamma1'
+Profile_Panels3_dymin(4) = 0.14
+Profile_Panels3_other_yaxis_name(4) = 'vel_km_per_s'
+Profile_Panels3_dymin(4) = 0.14
+
+TRho_Profile_xmin = -15 !3.0
+TRho_Profile_xmax = 10
+TRho_Profile_ymin = 3.35 !8.5
+TRho_Profile_ymax = 10.1
+
+TRho_logT_min = 9.2d0
+TRho_logRho_min = 6d0
+TRho_logRho_max = 10d0
+TRho_logT_max = 10d0
+
+Text_Summary1_name(1,2) = 'time_step_sec'
+Text_Summary1_name(2,2) = 'star_age_sec'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/mk b/star/dev_cases_massive_stars/60M_envelope_issues/mk
new file mode 100755
index 0000000000..d9eae582fa
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/mk
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/profile_columns.list b/star/dev_cases_massive_stars/60M_envelope_issues/profile_columns.list
new file mode 100644
index 0000000000..1b1e2fed2c
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/profile_columns.list
@@ -0,0 +1,962 @@
+! profile_columns.list -- determines the contents of star model profiles
+! you can use a non-standard version by setting profile_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as profile_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! if you need to have something added to the list of options, let me know....
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described at the end of this file.
+
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+
+! the following lines of the profile contain info for 1 zone per row, surface to center.
+
+! minimal set of enabled columns:
+
+ zone ! numbers start with 1 at the surface
+ mass ! m/Msun. mass coordinate of outer boundary of cell.
+ logR ! log10(radius/Rsun) at outer boundary of zone
+ logT ! log10(temperature) at center of zone
+ logRho ! log10(density) at center of zone
+ logP ! log10(pressure) at center of zone
+ x_mass_fraction_H
+ y_mass_fraction_He
+ z_mass_fraction_metals
+
+
+! everything below this line is deactivated
+
+
+!# Structure
+ !logM ! log10(m/Msun)
+ !log_mass
+ dm ! cell mass (grams)
+ !dm_bar ! boundary mass (grams) average of adjacent dm's
+ logdq ! log10(dq)
+ !log_dq
+ dq_ratio ! dq(k-1)/dq(k)
+ q ! fraction of star mass interior to outer boundary of this zone
+ !log_q ! log10(q)
+ !xq
+
+ !grav ! gravitational acceleration (cm sec^2)
+ !log_g ! log10 gravitational acceleration (cm sec^2)
+ !g_div_r ! grav/radius (sec^2)
+ !r_div_g ! radius/grav (sec^-2)
+ !cgrav_factor ! = cgrav(k)/standard_cgrav
+ vel_km_per_s ! velocity at outer boundary of zone (km/s) -- 0 if no velocity variable
+
+ radius ! radius at outer boundary of zone (in Rsun units)
+ radius_cm ! radius at outer boundary of zone (in centimeters)
+ !radius_km ! radius at outer boundary of zone (in kilometers)
+ logR_cm ! log10 radius at outer boundary of zone (in centimeters)
+ rmid ! radius at center by mass of zone (in Rsun units)
+ !r_div_R ! fraction of total radius
+
+ velocity ! velocity at outer boundary of zone (cm/s) -- 0 if no velocity variable
+ v_div_r ! velocity divided by radius
+ !v_times_t_div_r
+ !rho_times_r3 ! at face
+ !log_rho_times_r3 ! at face
+ !scale_height ! in Rsun units
+ pressure_scale_height ! in Rsun units
+
+ !m_div_r ! gm/cm
+ !dmbar_m_div_r
+ !log_dmbar_m_div_r
+ !mass_grams ! mass coordinate of outer boundary of cell in grams
+ mmid ! mass at midpoint of cell (average of mass coords of the cell boundaries) Msun units.
+
+ !m_grav ! total enclosed gravitational mass. Msun units.
+ !m_grav_div_m_baryonic ! mass_gravitational/mass at cell boundary
+ !mass_correction_factor ! dm_gravitational/dm (dm is baryonic mass of cell)
+
+ !xm ! mass exterior to point (Msun units)
+ !dq ! mass of zone as a fraction of total star mass
+ logxq ! log10(1-q)
+ !logxm ! log10(xm)
+
+ !xr ! radial distance from point to surface (Rsun)
+ !xr_cm ! radial distance from point to surface (cm)
+ !xr_div_R ! radial distance from point to surface in units of star radius
+ !log_xr ! log10 radial distance from point to surface (Rsun)
+ !log_xr_cm ! log10 radial distance from point to surface (cm)
+ !log_xr_div_R ! log10 radial distance from point to surface in units of star radius
+
+ dr ! r(outer edge) - r(inner edge); radial extent of cell in cm.
+ log_dr ! log10 cell width (cm)
+ !dv ! v(inner edge) - v(outer edge); rate at which delta_r is shrinking (cm/sec).
+
+ !dt_dv_div_dr ! dt*dv/dr; need to have this << 1 for every cell
+ !dr_div_R ! cell width divided by star R
+ !log_dr_div_R ! log10 cell width divided by star R
+ !dr_div_rmid ! cell width divided by rmid
+ !log_dr_div_rmid ! log(dr_div_rmid)
+
+ dr_div_cs ! cell sound crossing time (sec)
+ log_dr_div_cs ! log10 cell sound crossing time (sec)
+ !dr_div_cs_yr ! cell sound crossing time (years)
+ !log_dr_div_cs_yr ! log10 cell sound crossing time (years)
+
+ !acoustic_radius ! sound time from center to outer cell boundary (sec)
+ !log_acoustic_radius ! log10(acoustic_radius) (sec)
+ acoustic_depth ! sound time from surface to outer cell boundary (sec)
+ !log_acoustic_depth ! log10(acoustic_depth) (sec)
+ !acoustic_r_div_R_phot
+
+ !cell_collapse_time ! only set if doing explicit hydro
+ ! time (seconds) for cell inner edge to catch cell outer edge at current velocities
+ ! 0 if distance between inner and outer is increasing
+ !log_cell_collapse_time ! log of cell_collapse_time
+
+ !compression_gradient
+
+
+
+!# Thermodynamics
+ temperature ! temperature at center of zone
+ !logT_face ! log10(temperature) at outer boundary of zone
+ !logT_bb ! log10(black body temperature) at outer boundary of zone
+ !logT_face_div_logT_bb
+
+ energy ! internal energy (ergs/g)
+ logE ! log10(specific internal energy) at center of zone
+ rho ! density
+ !density ! rho
+
+ entropy ! specific entropy divided by (avo*kerg)
+ !logS ! log10(specific entropy)
+ !logS_per_baryon ! log10(specific entropy per baryon / kerg)
+
+ pressure ! total pressure at center of zone (pgas + prad)
+ !prad ! radiation pressure at center of zone
+ !pgas ! gas pressure at center of zone (electrons and ions)
+ logPgas ! log10(pgas)
+ pgas_div_ptotal ! pgas/pressure
+
+ eta ! electron degeneracy parameter (eta >> 1 for significant degeneracy)
+ mu ! mean molecular weight per gas particle (ions + free electrons)
+
+ grada ! dlnT_dlnP at constant S
+ !dE_dRho ! at constant T
+ !cv ! specific heat at constant volume
+ !cp ! specific heat at constant total pressure
+
+ !log_CpT
+ gamma1 ! dlnP_dlnRho at constant S
+ !gamma3 ! gamma3 - 1 = dlnT_dlnRho at constant S
+ !gam ! plasma interaction parameter (> 160 or so means starting crystallization)
+ free_e ! free_e is mean number of free electrons per nucleon
+ !logfree_e ! log10(free_e), free_e is mean number of free electrons per nucleon
+ !chiRho ! dlnP_dlnRho at constant T
+ !chiT ! dlnP_dlnT at constant Rho
+
+ csound ! sound speed
+ log_csound
+ !csound_face ! sound speed (was previously called csound_at_face)
+ !cs_at_cell_bdy ! sound speed at cell boundary (csound is at cell center)
+ !v_div_cs ! velocity divided by sound speed
+ v_div_csound ! velocity divided by sound speed
+ !div_v
+
+ !thermal_time_to_surface ! in seconds
+ !log_thermal_time_to_surface
+ !t_rad
+ !log_t_rad
+ !log_t_sound
+ !log_t_thermal
+
+ !eos_phase
+ !eos_frac_OPAL_SCVH
+ !eos_frac_HELM
+ !eos_frac_Skye
+ !eos_frac_PC
+ !eos_frac_FreeEOS
+ !eos_frac_CMS
+ !eos_frac_ideal
+
+ !pgas_div_p
+ !prad_div_pgas
+ !prad_div_pgas_div_L_div_Ledd
+ !pressure_scale_height_cm
+
+ !eps_grav_composition_term
+ !eps_grav_plus_eps_mdot
+
+ !chiRho_for_partials
+ !chiT_for_partials
+ !rel_diff_chiRho_for_partials
+ !rel_diff_chiT_for_partials
+
+ !latent_ddlnRho
+ !latent_ddlnT
+
+ !log_P_face
+ !log_Ptrb
+ !log_cp_T_div_t_sound
+
+ !QQ
+
+
+!# Mass accretion
+ eps_grav ! -T*ds/dt (negative for expansion)
+ !log_abs_eps_grav_dm_div_L
+ !log_abs_v ! log10(abs(velocity)) (cm/s)
+ !log_mdot_cs
+ !log_mdot_v
+ !eps_mdot
+ !env_eps_grav
+ !xm_div_delta_m
+ !log_xm_div_delta_m
+
+
+!# Nuclear energy generation
+ !signed_log_eps_grav ! sign(eps_grav)*log10(max(1,abs(eps_grav)))
+ !signed_log_eps_nuc
+ !net_nuclear_energy ! erg/gm/s from nuclear reactions minus all neutrino losses
+ ! The value plotted is net_nuclear_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy minus all neutrino losses.
+ !net_energy ! net_energy + eps_grav.
+ ! The value plotted is net_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy plus eps_grav minus all neutrino losses.
+ !eps_nuc_plus_nuc_neu
+ !eps_nuc_minus_non_nuc_neu
+ !eps_nuc_start
+
+ eps_nuc ! ergs/g/sec from nuclear reactions (including losses to reaction neutrinos)
+ !log_abs_eps_nuc
+ !d_lnepsnuc_dlnd
+ !d_epsnuc_dlnd
+ !deps_dlnd_face
+ ! (was previously called deps_dlnd_at_face)
+ !d_lnepsnuc_dlnT
+ !d_epsnuc_dlnT
+ !deps_dlnT_face
+ ! (was previously called deps_dlnT_at_face)
+ !eps_nuc_neu_total ! erg/gm/sec as neutrinos from nuclear reactions
+
+ non_nuc_neu ! non-nuclear-reaction neutrino losses
+ !nonnucneu_plas ! plasmon neutrinos (for collective reactions like gamma_plasmon => nu_e + nubar_e)
+ !nonnucneu_brem ! bremsstrahlung (for reactions like e- + (z,a) => e- + (z,a) + nu + nubar)
+ !nonnucneu_phot ! photon neutrinos (for reactions like e- + gamma => e- + nu_e + nubar_e)
+ !nonnucneu_pair ! pair production (for reactions like e+ + e- => nu_e + nubar_e)
+ !nonnucneu_reco ! recombination neutrinos (for reactions like e- (continuum) => e- (bound) + nu_e + nubar_e)
+
+ ! ergs/g/sec for reaction categories
+ add_reaction_categories ! this adds all the reaction categories
+ ! NOTE: you can list specific categories by giving their names (from chem_def)
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+ !burn_num_iters ! Number of split_burn iterations taken
+ !burn_avg_epsnuc
+ !log_burn_avg_epsnuc
+
+!# Composition
+ !x_mass_fraction_H
+ !y_mass_fraction_He
+ !z_mass_fraction_metals
+ abar ! average atomic weight (g/mole)
+ zbar ! average charge
+ z2bar ! average charge^2
+ ye ! average charge per baryon = proton fraction
+
+ x ! hydrogen mass fraction
+ !log_x
+ y ! helium mass fraction
+ !log_y
+ z ! metallicity
+ log_z ! metallicity
+
+ add_abundances ! this adds all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !h1
+ !he3
+ !he4
+ !c12
+ !n14
+ !o16
+
+ add_log_abundances ! this adds log10 of all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !log h1
+ !log he3
+ !log he4
+ !log c12
+ !log n14
+ !log o16
+
+ ! log concentration of species
+ ! concentration = number density / number density of electrons
+ ! Ci = (Xi/Ai) / sum(Zi*Xi/Ai) [see Thoul et al, ApJ 421:828-842, 1994]
+ !log_concentration h1
+ !log_concentration he4
+
+
+ ! typical charge for given species
+ ! (used by diffusion)
+ !typical_charge he4
+ !typical_charge c12
+ !typical_charge fe52
+
+ ! ionization state for given species
+ ! (same as typical charge, except that it's unsmoothed)
+ !ionization he4
+ !ionization c12
+ !ionization fe52
+
+ !cno_div_z ! abundance of c12, n14, and o16 as a fraction of total z
+
+
+
+
+!# Opacity
+ opacity ! opacity measured at center of zone
+ log_opacity ! log10(opacity)
+ !dkap_dlnrho_face ! partial derivative of opacity wrt. ln rho (at T=const) at outer edge of cell
+ ! (was previously called dkap_dlnrho_at_face)
+ !dkap_dlnT_face ! partial derivative of opacity wrt. ln T (at rho=const) at outer edge of cell
+ ! (was previously called dkap_dlnT_at_face)
+ !kap_frac_lowT ! fraction of opacity from lowT tables
+ !kap_frac_highT ! fraction of opacity from highT tables
+ !kap_frac_Type2 ! fraction of opacity from Type2 tables
+ !kap_frac_Compton ! fraction of opacity from Compton_Opacity
+ !kap_frac_op_mono ! fraction of opacity from OP mono
+
+ !log_kap
+ log_kap_times_factor
+
+ !log_c_div_tau
+ !xtau
+ !xlogtau
+ !logtau_sub_xlogtau
+
+!# Luminosity
+ luminosity ! luminosity at outer boundary of zone (in Lsun units)
+ logL ! log10(max(1d-2,L/Lsun))
+ !log_Lrad
+ !log_Ledd ! log10(Leddington/Lsun) -- local Ledd, 4 pi clight G m / kap
+ log_L_div_Ledd ! log10(max(1d-12,L/Leddington))
+ !log_Lrad_div_Ledd
+ !log_Lrad_div_L
+ !signed_log_power ! sign(L)*log10(max(1,abs(L)))
+
+ lum_adv
+ lum_conv
+ !lum_conv_MLT
+ !lum_div_Ledd
+ lum_erg_s
+ lum_plus_lum_adv
+ lum_rad
+
+ !log_L_div_CpTMdot
+ log_abs_lum_erg_s
+
+ !L
+ !Lc
+ !Lc_div_L
+ !Lr
+ !Lr_div_L
+ !Lt
+ !Lt_div_L
+
+!# Energetics
+ total_energy ! specific total energy of cell (ergs/g). internal+potential+kinetic+rotation.
+ !cell_specific_IE
+ !cell_specific_KE
+ !cell_IE_div_IE_plus_KE
+ !cell_KE_div_IE_plus_KE
+
+ !cell_ie_div_star_ie
+ !cell_internal_energy_fraction
+ !cell_internal_energy_fraction_start
+ !cell_specific_PE
+
+ !log_cell_ie_div_star_ie
+ !log_cell_specific_IE
+
+ !ergs_eps_grav_plus_eps_mdot
+ !ergs_error
+ !ergs_error_integral
+ !ergs_mdot
+ !ergs_rel_error_integral
+ !dm_eps_grav
+
+ !dE
+
+ !etrb
+ !log_etrb
+ !extra_grav
+ !log_rel_E_err
+
+ !total_energy_sign
+
+!# Convection
+ mlt_mixing_length ! mixing length for mlt (cm)
+ !mlt_mixing_type ! value returned by mlt
+ !mlt_Pturb
+ !alpha_mlt
+
+ conv_vel ! convection velocity (cm/sec)
+ log_conv_vel ! log10 convection velocity (cm/sec)
+
+ conv_L_div_L
+ log_conv_L_div_L
+ !lum_conv_div_lum_rad
+ !lum_rad_div_L_Edd
+ !lum_conv_div_lum_Edd
+ !lum_conv_div_L
+ !lum_rad_div_L
+ !lum_rad_div_L_Edd_sub_fourPrad_div_PchiT ! density increases outward if this is > 0
+ ! see Joss, Salpeter, and Ostriker, "Critical Luminosity", ApJ 181:429-438, 1973.
+
+ gradT ! mlt value for required temperature gradient dlnT/dlnP
+
+ gradr ! dlnT/dlnP required for purely radiative transport
+ !grad_temperature ! smoothed dlnT/dlnP at cell boundary
+ !grad_density ! smoothed dlnRho/dlnP at cell boundary
+
+ !gradL ! gradient for Ledoux criterion for convection
+ !sch_stable ! 1 if grada > gradr, 0 otherwise
+ !ledoux_stable ! 1 if gradL > gradr, 0 otherwise
+
+ !grada_sub_gradT
+ gradT_sub_grada ! gradT-grada at cell boundary
+ !gradT_div_grada ! gradT/grada at cell boundary
+
+ !gradr_sub_gradT
+ !gradT_sub_gradr ! gradT-gradr at cell boundary
+ !gradT_div_gradr ! gradT/gradr at cell boundary
+
+ !log_gradT_div_gradr ! log10 gradT/gradr at cell boundary
+ !log_mlt_Gamma ! convective efficiency
+ conv_vel_div_csound ! convection velocity divided by sound speed
+ !conv_vel_div_L_vel ! L_vel is velocity needed to carry L by convection; L = 4*pi*r^2*rho*vel**3
+ log_mlt_D_mix ! log10 diffusion coefficient for mixing from mlt (cm^2/sec)
+
+ !gradr_div_grada ! gradr/grada_face; > 1 => Schwarzschild unstable for convection
+ !gradr_sub_grada ! gradr - grada_face; > 0 => Schwarzschild unstable for convection
+
+ !gradL_sub_gradr
+ !gradP_div_rho
+ !gradT_excess_effect
+ !gradT_rel_err
+ !gradT_sub_a
+ !grada_face
+ !grada_sub_gradr
+ !diff_grads
+ !log_diff_grads
+
+ !mlt_D
+ !mlt_Gamma
+ !mlt_Y_face
+ !mlt_Zeta
+ !mlt_gradT
+ !mlt_log_abs_Y
+ !mlt_vc
+ !log_mlt_vc
+ !dvc_dt_TDC_div_g
+
+ !superad_reduction_factor
+ !conv_vel_div_mlt_vc
+
+ !log_Lconv
+ !log_Lconv_div_L
+
+!# Mixing
+ !mixing_type ! mixing types are defined in mesa/const/public/const_def
+ log_D_mix ! log10 diffusion coefficient for mixing in units of cm^2/second (Eulerian)
+ !log_D_mix_non_rotation
+ !log_D_mix_rotation
+
+ log_D_conv ! D_mix for regions where mix_type = convective_mixing
+ !log_D_leftover ! D_mix for regions where mix_type = leftover_convective_mixing
+ log_D_semi ! D_mix for regions where mix_type = semiconvective_mixing
+ log_D_ovr ! D_mix for regions where mix_type = overshoot_mixing
+ log_D_thrm ! D_mix for regions where mix_type = thermohaline_mixing
+ log_D_minimum ! D_mix for regions where mix_type = minimum_mixing
+ log_D_rayleigh_taylor ! D_mix for regions where mix_type = rayleigh_taylor_mixing
+ !log_D_anon ! D_mix for regions where mix_type = anonymous_mixing
+ log_D_omega
+
+ log_sig_mix ! sig(k) is mixing flow across face k in (gm sec^1)
+ ! sig(k) = D_mix*(4*pi*r(k)**2*rho_face)**2/dmavg
+
+ !dominant_isoA_for_thermohaline
+ !dominant_isoZ_for_thermohaline
+ !gradL_composition_term
+
+ mix_type
+
+
+
+!# Optical Depth
+ tau ! optical depth
+ !log_column_depth ! log10 column depth, exterior mass / area (g cm^-2)
+ !log_radial_depth ! log10 radial distance to surface (cm)
+ logtau ! log10(optical depth) at cell face
+ !tau_eff ! tau that gives the local P == P_atm if this location at surface
+ ! tau_eff = kap*(P/g - Pextra_factor*(L/M)/(6*pi*clight*cgrav))
+ !tau_eff_div_tau
+
+
+
+!# Rotation
+ omega ! angular velocity = j_rot/i_rot
+ log_omega
+ log_j_rot
+ log_J_div_M53 ! J is j*1e-15 integrated from center; M53 is m^(5/3)
+ log_J_inside ! J_inside is j_rot integrated from center
+ !shear ! -dlnomega/dlnR
+ log_abs_shear ! log10(abs(dlnomega/dlnR))
+ !richardson_number
+ i_rot ! specific moment of inertia at cell boundary
+ j_rot ! specific angular momentum at cell boundary
+ v_rot ! rotation velocity at cell boundary (km/sec)
+ !w_div_w_crit_roche !ratio of rotational velocity to keplerian at the equator
+ !without the contribution from the Eddington factor
+ fp_rot ! rotation factor for pressure
+ ft_rot ! rotation factor for temperature
+ !ft_rot_div_fp_rot ! gradr factor
+
+ !log_am_nu_non_rot ! log10(am_nu_non_rot)
+ !log_am_nu_rot ! log10(am_nu_rot)
+ log_am_nu ! log10(am_nu_non_rot + am_nu_rot)
+
+ r_polar ! (Rsun)
+ log_r_polar ! log10 (Rsun)
+ r_equatorial ! (Rsun)
+ log_r_equatorial ! log10 (Rsun)
+ r_e_div_r_p ! equatorial/r_polar
+ omega_crit ! breakup angular velocity = sqrt(G M / equatorial^3)
+ omega_div_omega_crit
+
+ !am_log_nu_omega ! for diffusion of omega
+ !am_log_nu_j ! for diffusion of angular momentum
+
+ !am_log_nu_rot ! diffusion of angular momentum driven by rotation
+ !am_log_nu_non_rot ! diffusion driven by other sources, e.g. convection
+
+ !am_log_sig_omega ! for diffusion of omega
+ !am_log_sig_j ! for diffusion of angular momentum
+ am_log_sig ! == am_log_sig_omega
+
+ !am_log_D_visc ! diffusion coeff for kinematic viscosity
+ am_log_D_DSI ! diffusion coeff for dynamical shear instability
+ am_log_D_SH ! diffusion coeff for Solberg-Hoiland instability
+ am_log_D_SSI ! diffusion coeff for secular shear instability
+ am_log_D_ES ! diffusion coeff for Eddington-Sweet circulation
+ am_log_D_GSF ! diffusion coeff for Goldreich-Schubert-Fricke instability
+ am_log_D_ST ! Spruit dynamo mixing diffusivity
+ am_log_nu_ST ! Spruit dynamo effective viscosity
+
+ dynamo_log_B_r ! (Gauss)
+ dynamo_log_B_phi ! (Gauss)
+
+ !am_domega_dlnR
+ !log_abs_dlnR_domega
+
+ !w_div_w_crit_roche2
+
+
+!# Diffusion
+ ! electric field from element diffusion calculation
+ !e_field
+ !log_e_field
+
+ ! gravitational field from element diffusion calculation
+ !g_field_element_diffusion
+ !log_g_field_element_diffusion
+
+ !eE_div_mg_element_diffusion
+ !log_eE_div_mg_element_diffusion
+
+ ! element diffusion velocity for species
+ !edv h1
+ !edv he4
+ !edv o16
+
+ ! Energy generated by Ne22 sedimentation.
+ !eps_WD_sedimentation
+ !log_eps_WD_sedimentation
+
+ !eps_diffusion
+ !log_eps_diffusion
+
+ !diffusion_D h1 ! self diffusion coeff
+ !diffusion_dX h1 ! change in h1 mass fraction from diffusion
+ !diffusion_dX he4 ! change in he4 mass fraction from diffusion
+ !diffusion_dX n20 ! change in n20 mass fraction from diffusion
+
+ !v_rad h1 ! velocity from radiative levitation
+ !v_rad he4 ! velocity from radiative levitation
+ !v_rad ne20 ! velocity from radiative levitation
+
+ !log_g_rad h1 ! log10 acceleration from radiative levitation
+ !log_g_rad he4 ! log10 acceleration from radiative levitation
+ !log_g_rad ne20 ! log10 acceleration from radiative levitation
+
+!# Phase Separation
+ !eps_phase_separation
+
+!# Oscillations
+ !brunt_N2 ! brunt-vaisala frequency squared
+ !brunt_N2_structure_term
+ !brunt_N2_composition_term
+ !log_brunt_N2_structure_term
+ !log_brunt_N2_composition_term
+ !brunt_A ! = N^2*r/g
+ !brunt_A_div_x2 ! x = r(k)/r(1)
+ !brunt_N2_dimensionless ! N2 in units of 3GM/R^3
+ !brunt_N_dimensionless ! N in units of sqrt(3GM/R^3)
+ !brunt_frequency ! cycles per day
+ !brunt_N ! sqrt(abs(brunt_N2))
+ !log_brunt_N ! log10(brunt_N)
+ !log_brunt_N2 ! log10(brunt_N2)
+ !log_brunt_N2_dimensionless ! log10(brunt_N2_dimensionless)
+
+ !brunt_B ! smoothed numerical difference
+ !brunt_nonB ! = grada - gradT
+ !log_brunt_B ! smoothed numerical difference
+ !log_brunt_nonB ! = grada - gradT
+
+ !sign_brunt_N2 ! sign of brunt_N2 (+1 for Ledoux stable; -1 for Ledoux unstable)
+ !brunt_nu ! brunt_frequency in microHz
+ !log_brunt_nu ! brunt_frequency in microHz
+
+ !lamb_S ! lamb frequency for l=1: S = sqrt(2)*csound/r (rad/s)
+ !lamb_S2 ! squared lamb frequency for l=1: S2 = 2*(csound/r)^2 (rad^2/s^2)
+
+ !lamb_Sl1 ! lamb frequency for l=1; = sqrt(2)*csound/r (microHz)
+ !lamb_Sl2 ! lamb frequency for l=2; = sqrt(6)*csound/r (microHz)
+ !lamb_Sl3 ! lamb frequency for l=3; = sqrt(12)*csound/r (microHz)
+ !lamb_Sl10 ! lamb frequency for l=10; = sqrt(110)*csound/r (microHz)
+
+ !log_lamb_Sl1 ! log10(lamb_Sl1)
+ !log_lamb_Sl2 ! log10(lamb_Sl2)
+ !log_lamb_Sl3 ! log10(lamb_Sl3)
+ !log_lamb_Sl10 ! log10(lamb_Sl10)
+
+ !brunt_N_div_r_integral ! integral from center of N*dr/r
+ !k_r_integral ! integral from center of k_r*dr
+ !brunt_N2_sub_omega2
+ !sl2_sub_omega2
+
+
+!# RSP
+
+ !rsp_Chi ! dlnP_dlnRho
+ !rsp_Et ! Specific turbulent energy
+ !rsp_logEt ! Log specific turbulent energy
+ !rsp_erad ! Specific internal (radiative) energy
+ !rsp_log_erad ! Log specific internal (radiative) energy
+ !rsp_Hp_face ! Pressure scale height at cell face
+ !rsp_Lc ! Convective luminosity
+ !rsp_Lc_div_L ! Convective luminosity div total luminosity
+ !rsp_Lr ! Radiative luminosity
+ !rsp_Lr_div_L ! Radiative luminosity div total luminosity
+ !rsp_Lt ! Turbulent luminosity
+ !rsp_Lt_div_L ! Turbulent luminosity div total luminosity
+ !rsp_Pt ! Turbulent pressure, p_t, see Table 1 in MESA5
+ !rsp_Uq ! Viscous momentum transfer rate, U_q, see Table 1 in MESA5
+ !rsp_Eq ! Viscous energy transfer rate, epsilon_q, see Table 1 in MESA5
+ !rsp_Pvsc ! Artificial viscosity, p_av, see Table 1 in MESA5
+ !rsp_gradT ! Temperature gradient
+ !rsp_Y_face ! Superadiabatic gradient at cell face, Y_sag, see Table 1 in MESA5
+ !rsp_damp ! Turbulent dissipation, D, see Table 1 in MESA5
+ !rsp_dampR ! Radiative cooling, D_r, see Table 1 in MESA5
+ !rsp_sink ! Sum of turbulent dissipation and radiative cooling terms
+ !rsp_src ! Source function, S, see Table 1 in MESA5
+ !rsp_src_snk ! Convective coupling, C, see Table 1 in MESA5
+ !rsp_heat_exchange_timescale ! 1d0/(clight * opacity * density)
+ !rsp_log_heat_exchange_timescale
+ !rsp_log_dt_div_heat_exchange_timescale ! Ratio of time step to heat exchange timescale
+ !w
+ !log_w
+
+ !COUPL
+ !DAMP
+ !DAMPR
+ !SOURCE
+ !Chi
+ !Eq
+ !Hp_face
+ !PII_face
+ !Ptrb
+ !Pvsc
+ !Uq
+ !Y_face
+
+!# RTI
+
+ RTI_du_diffusion_kick
+ alpha_RTI
+ boost_for_eta_RTI
+ dedt_RTI
+ dudt_RTI
+ eta_RTI
+ log_alpha_RTI
+ !log_boost_for_eta_RTI
+ log_eta_RTI
+ !log_etamid_RTI
+ log_lambda_RTI_div_Hrho
+ log_sig_RTI
+ !log_sigmid_RTI
+ !log_source_RTI
+ log_source_minus_alpha_RTI
+ log_source_plus_alpha_RTI
+ !source_minus_alpha_RTI
+ !source_plus_alpha_RTI
+ lambda_RTI
+
+!# Hydrodynamics
+
+
+ !v
+ v_div_v_escape
+ !v_div_vesc
+ !v_kms
+ !log_v_escape
+
+ u
+ u_face
+
+ P_face
+
+
+!# Extras
+ extra_heat
+ !extra_L ! extra_heat integrated from center (Lsun)
+ !log_extra_L ! log10 integrated from center (Lsun)
+ !log_irradiation_heat
+
+ !extra_jdot ! set in other_torque routine
+ !extra_omegadot ! set in other_torque routine
+
+ extra_opacity_factor ! set in other_opacity_factor routine
+
+ ! diffusion factor profile for species, set in other_diffusion_factor routine
+ !extra_diffusion_factor h1
+ !extra_diffusion_factor he4
+ !extra_diffusion_factor o16
+
+
+
+!# Miscellaneous
+
+ !dlog_h1_dlogP ! (log(h1(k)) - log(h1(k-1)))/(log(P(k)) - log(P(k-1)))
+ !dlog_he3_dlogP
+ !dlog_he4_dlogP
+ !dlog_c12_dlogP
+ !dlog_c13_dlogP
+ !dlog_n14_dlogP
+ !dlog_o16_dlogP
+ !dlog_ne20_dlogP
+ !dlog_mg24_dlogP
+ !dlog_si28_dlogP
+
+ !dlog_pp_dlogP
+ !dlog_cno_dlogP
+ !dlog_3alf_dlogP
+
+ !dlog_burn_c_dlogP
+ !dlog_burn_n_dlogP
+ !dlog_burn_o_dlogP
+
+ !dlog_burn_ne_dlogP
+ !dlog_burn_na_dlogP
+ !dlog_burn_mg_dlogP
+
+ !dlog_cc_dlogP
+ !dlog_co_dlogP
+ !dlog_oo_dlogP
+
+ !dlog_burn_si_dlogP
+ !dlog_burn_s_dlogP
+ !dlog_burn_ar_dlogP
+ !dlog_burn_ca_dlogP
+ !dlog_burn_ti_dlogP
+ !dlog_burn_cr_dlogP
+ !dlog_burn_fe_dlogP
+
+ !dlog_pnhe4_dlogP
+ !dlog_photo_dlogP
+ !dlog_other_dlogP
+
+ !logR_kap ! logR = logRho - 3*logT + 18 ; used in kap tables
+ !logW ! logW = logPgas - 4*logT
+ !logQ ! logQ = logRho - 2*logT + 12
+ !logV ! logV = logRho - 0.7*logE + 20
+
+ !log_CpT_absMdot_div_L ! log10(s% Cp(k)*s% T(k)*abs(s% mstar_dot)/s% L(k))
+
+ !delta_r ! r - r_start, change during step
+ !delta_L ! L - L_start, change during step
+ !delta_cell_vol ! cell_vol - cell_vol_start, change during step
+ !delta_entropy ! entropy - entropy_start, change during step (does not include effects of diffusion)
+ !delta_T ! T - T_start, change during step
+ !delta_rho ! rho - rho_start, change during step
+ !delta_eps_nuc ! eps_nuc - eps_nuc_start, change during step
+ !delta_mu ! mu - mu_start, change during step
+
+ zFe ! mass fraction of "Fe" = Fe+Co+Ni
+ !log_zFe
+ dPdr_dRhodr_info
+ !log_sig_raw_mix
+
+ !d_u_div_rmid
+ !d_u_div_rmid_start
+ !d_v_div_r_dm
+ !d_v_div_r_dr
+
+ !dlnP_dlnR
+ !dlnRho_dlnR
+ !dlnRho_dr
+ !dlnX_dr
+ !dlnY_dr
+ dlogR
+ !dPdr_div_grav
+ dPdr_info
+ dRhodr_info
+ !dRstar_div_dr
+ !dr_ratio
+ !dm_eps_grav
+ !dr_ratio
+ !dt_cs_div_dr
+ !dt_div_tau_conv
+ !dt_times_conv_vel_div_mixing_length
+ !log_dt_cs_div_dr
+ !log_dt_div_tau_conv
+ !log_dt_times_conv_vel_div_mixing_length
+ log_du_kick_div_du
+ !du
+ !dvdt_dPdm
+ !dvdt_grav
+
+ !tau_conv
+ !tau_cool
+ !tau_epsnuc
+ !tau_qhse
+
+ !max_abs_xa_corr
+
+ !tdc_num_iters
+
+ !k
+
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described here.
+
+ ! initial mass and Z
+ ! initial_mass
+ ! initial_z
+ ! general properties of the current state
+ ! model_number
+ ! num_zones
+ ! star_age
+ ! time_step
+ ! properties at the photosphere
+ ! Teff
+ ! photosphere_L
+ ! photosphere_r
+ ! properties at the outermost zone of the model
+ ! log_surface_L
+ ! log_surface_radius
+ ! log_surface_temp
+ ! properties near the center of the model
+ ! log_center_temp
+ ! log_center_density
+ ! log_center_P
+ ! center_eta
+ ! abundances near the center
+ ! center_h1
+ ! center_he3
+ ! center_he4
+ ! center_c12
+ ! center_n14
+ ! center_o16
+ ! center_ne20
+ ! information about total mass
+ ! star_mass
+ ! star_mdot
+ ! star_mass_h1
+ ! star_mass_he3
+ ! star_mass_he4
+ ! star_mass_c12
+ ! star_mass_n14
+ ! star_mass_o16
+ ! star_mass_ne20
+ ! locations of abundance transitions
+ ! he_core_mass
+ ! c_core_mass
+ ! o_core_mass
+ ! si_core_mass
+ ! fe_core_mass
+ ! location of optical depths 10 and 100
+ ! tau10_mass
+ ! tau10_radius
+ ! tau100_mass
+ ! tau100_radius
+ ! time scales
+ ! dynamic_time
+ ! kh_timescale
+ ! nuc_timescale
+ ! various kinds of total power
+ ! power_nuc_burn
+ ! power_h_burn
+ ! power_he_burn
+ ! power_neu
+ ! a few control parameter values
+ ! h1_boundary_limit
+ ! he4_boundary_limit
+ ! c12_boundary_limit
+ ! burn_min1
+ ! burn_min2
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/re b/star/dev_cases_massive_stars/60M_envelope_issues/re
new file mode 100755
index 0000000000..7093783a31
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/re
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+shopt -u expand_aliases
+
+photo_directory=photos
+
+function most_recent_photo {
+ ls -tp "$photo_directory" | grep -v / | head -1
+}
+
+if [ $# -eq 0 ]
+then
+ photo=$(most_recent_photo)
+else
+ photo=$1
+fi
+
+if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
+then
+ echo "specified photo ($photo) does not exist"
+ exit 1
+fi
+
+echo "restart from $photo"
+if ! cp "$photo_directory/$photo" restart_photo
+then
+ echo "failed to copy photo ($photo)"
+ exit 1
+fi
+
+make run
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/rn b/star/dev_cases_massive_stars/60M_envelope_issues/rn
new file mode 100755
index 0000000000..68233efd1d
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/rn
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+make run
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+echo 'finished'
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/rn1 b/star/dev_cases_massive_stars/60M_envelope_issues/rn1
new file mode 100755
index 0000000000..f4ce7695fe
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/rn1
@@ -0,0 +1,5 @@
+#!/usr/bin/env bash
+
+rm -f restart_photo
+
+make run
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/src/run.f90 b/star/dev_cases_massive_stars/60M_envelope_issues/src/run.f90
new file mode 100644
index 0000000000..76d423f1af
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/src/run.f90
@@ -0,0 +1,15 @@
+program run
+ use run_star_support, only: do_read_star_job
+ use run_star, only: do_run_star
+
+ implicit none
+
+ integer :: ierr
+
+ ierr = 0
+ call do_read_star_job('inlist', ierr)
+ if (ierr /= 0) stop 1
+
+ call do_run_star
+
+end program run
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/src/run_star_extras.f90 b/star/dev_cases_massive_stars/60M_envelope_issues/src/run_star_extras.f90
new file mode 100644
index 0000000000..baac47443e
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/src/run_star_extras.f90
@@ -0,0 +1,197 @@
+! ***********************************************************************
+!
+! Copyright (C) 2010 The MESA Team
+!
+! This program is free software: you can redistribute it and/or modify
+! it under the terms of the GNU Lesser General Public License
+! as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+! See the GNU Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public License
+! along with this program. If not, see .
+!
+! ***********************************************************************
+
+ module run_star_extras
+
+ use star_lib
+ use star_def
+ use const_def
+ use math_lib
+ use auto_diff
+
+ implicit none
+
+ include "test_suite_extras_def.inc"
+
+ integer, parameter :: i_dutch_scaling_factor_after_zams = 21
+ real(dp), parameter :: zams_h1_depletion = 0.03d0
+
+! Example of one extra value to preserve across photo restarts.
+! real(dp) :: example_photo_value
+
+ contains
+
+ include "test_suite_extras.inc"
+
+
+ subroutine extras_controls(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ s% extras_startup => extras_startup
+ s% extras_start_step => extras_start_step
+ s% extras_check_model => extras_check_model
+ s% extras_finish_step => extras_finish_step
+ s% extras_after_evolve => extras_after_evolve
+ s% how_many_extra_history_columns => how_many_extra_history_columns
+ s% data_for_extra_history_columns => data_for_extra_history_columns
+ s% how_many_extra_profile_columns => how_many_extra_profile_columns
+ s% data_for_extra_profile_columns => data_for_extra_profile_columns
+ s% other_photo_read => extras_photo_read
+ s% other_photo_write => extras_photo_write
+ end subroutine extras_controls
+
+
+ subroutine extras_photo_read(id, iounit, ierr)
+ integer, intent(in) :: id, iounit
+ integer, intent(out) :: ierr
+ ierr = 0
+ !read(iounit, iostat=ierr) example_photo_value
+ end subroutine extras_photo_read
+
+
+ subroutine extras_photo_write(id, iounit)
+ integer, intent(in) :: id, iounit
+ !write(iounit) example_photo_value
+ end subroutine extras_photo_write
+
+ subroutine extras_startup(id, restart, ierr)
+ integer, intent(in) :: id
+ logical, intent(in) :: restart
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ call test_suite_startup(s, restart, ierr)
+
+ end subroutine extras_startup
+
+
+ integer function extras_start_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ real(dp) :: zams_h1_limit
+ type (star_info), pointer :: s
+ ierr = 0
+ extras_start_step = keep_going
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ if (s% Dutch_scaling_factor > 0d0) return
+ zams_h1_limit = max(0d0, min(1d0, 1d0 - (s% initial_z + s% initial_y))) - &
+ zams_h1_depletion
+ if (s% center_h1 < zams_h1_limit) &
+ s% Dutch_scaling_factor = s% x_ctrl(i_dutch_scaling_factor_after_zams)
+ end function extras_start_step
+
+
+ subroutine extras_after_evolve(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ write(*,'(A)')
+ call test_suite_after_evolve(s, ierr)
+ end subroutine extras_after_evolve
+
+
+ ! returns either keep_going, retry, or terminate.
+ integer function extras_check_model(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_check_model = keep_going
+ end function extras_check_model
+
+
+ integer function how_many_extra_history_columns(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_history_columns = 0
+ end function how_many_extra_history_columns
+
+
+ subroutine data_for_extra_history_columns(id, n, names, vals, ierr)
+ integer, intent(in) :: id, n
+ character (len=maxlen_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ end subroutine data_for_extra_history_columns
+
+
+ integer function how_many_extra_profile_columns(id)
+ use star_def, only: star_info
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_profile_columns = 1
+ end function how_many_extra_profile_columns
+
+
+ subroutine data_for_extra_profile_columns(id, n, nz, names, vals, ierr)
+ use star_def, only: star_info, maxlen_profile_column_name
+ use const_def, only: dp
+ integer, intent(in) :: id, n, nz
+ character (len=maxlen_profile_column_name) :: names(n)
+ real(dp) :: vals(nz,n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ names(1) = 'zbar_div_abar'
+ do k=1,s% nz
+ vals(k,1) = s% zbar(k)/s% abar(k)
+ end do
+ end subroutine data_for_extra_profile_columns
+
+ ! returns either keep_going or terminate.
+ integer function extras_finish_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_finish_step = keep_going
+ if (extras_finish_step == terminate) &
+ s% termination_code = t_extras_finish_step
+ end function extras_finish_step
+
+ end module run_star_extras
diff --git a/star/dev_cases_massive_stars/60M_envelope_issues/testhub.yml b/star/dev_cases_massive_stars/60M_envelope_issues/testhub.yml
new file mode 100644
index 0000000000..2b486a02cb
--- /dev/null
+++ b/star/dev_cases_massive_stars/60M_envelope_issues/testhub.yml
@@ -0,0 +1,15 @@
+ runtime_minutes: 16.71
+ model_number: 2344
+ star_age: 1.0136396734299462E+07
+ num_retries: 11
+ log_rel_run_E_err: -4.5194878652040105
+ steps: 266
+ retries: 11
+ redos: 0
+ solver_calls_made: 277
+ solver_calls_failed: 11
+ solver_iterations: 2052
+ extra_testhub_names:
+ - 'fe_core_mass'
+ extra_testhub_vals:
+ - 1.6762420545401346E+00
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/1.1M_lgTc_7.7.mod b/star/dev_cases_massive_stars/wd_nova_burst/1.1M_lgTc_7.7.mod
new file mode 100644
index 0000000000..de01735f90
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/1.1M_lgTc_7.7.mod
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dd251d75bbee527d82e5b34e069e305bc6a15c5edc05c339f0efe77ae81529a4
+size 432140
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/Makefile b/star/dev_cases_massive_stars/wd_nova_burst/Makefile
new file mode 100644
index 0000000000..c779b9d6d8
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/Makefile
@@ -0,0 +1 @@
+include $(MESA_DIR)/star/work/Makefile
\ No newline at end of file
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/README.rst b/star/dev_cases_massive_stars/wd_nova_burst/README.rst
new file mode 100644
index 0000000000..24721f2ec4
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/README.rst
@@ -0,0 +1,51 @@
+.. _wd_nova_burst:
+
+*************
+wd_nova_burst
+*************
+
+This is a violent nova burst envelope test case.
+
+This test case has 2 parts. Click to see a larger version of a plot.
+
+* Part 1 (``inlist_setup``) loads ``1.1M_lgTc_7.7.mod``, a prebuilt carbon-oxygen white dwarf from the :ref:`make_o_ne_wd` test suite, sets the topical depth to 30, evolves for a few steps to an age of 1e7 year and terminates.
+
+* Part 2 (``inlist_wd_nova_burst``) continues the evolution with the accretion of a hydrogen-helium mixture at a rate of 1e-9 Msun/yr. Eventually hydrogen burning in the accerted envelope causes the luminosity to exceed 1e4 Lsun and an alert is written to the terminate via the ``run_star_extras.f90``:
+
+
+.. code-block:: console
+
+ num_bursts 1
+ 405 8.277879 4.365E+05 8.624940 8.625037 1.115473 0.000025 0.000000 0.000000 0.309197 329.049014 1497 36
+ -5.0945E+00 7.679057 -1.661720 -2.464781 7.731723 -9.000000 1.115449 0.000000 0.400729 0.019380 65.113954 10
+ 2.4766E+04 7.926520 4.191187 4.972103 -6.862099 -4.289137 1.115442 0.038204 0.474628 1.000000 0.327E-01 max increase
+ rel_E_err -1.9543755810854924D-08
+ log_rel_run_E_err -6.0755826271591920
+
+
+and when the luminosity falls below 1e3 Lsun a nova cycle is considered finished and the run terminates:
+
+.. code-block:: console
+
+ 585 7.835616 3.884E+05 1.624521 1.624523 1.115450 0.000001 0.000000 0.000000 0.332277 329.045159 1617 48
+ -1.4608E+00 7.679051 -2.147858 -16.859525 0.457865 -9.000000 1.115449 0.000000 0.400729 0.019454 65.113548 5
+ 2.4768E+04 7.926494 3.015873 -3.748867 -67.588316 -3.897373 1.115442 0.038204 0.474628 1.000000 -0.133E-06 Lnuc_H
+ rel_E_err -5.3661942520223188D-10
+ log_rel_run_E_err -5.9590177286527863
+
+ have finished burst
+
+
+.. image:: ../../../star/test_suite/wd_nova_burst/docs/wd_nova_burst_grid.svg
+ :width: 100%
+
+
+The Python script used to create the figures above:
+
+.. literalinclude:: ../../../star/test_suite/wd_nova_burst/plot.py
+ :language: python
+
+
+Last-Updated: 07Aug2024 (MESA 0b40398b) by wmwolf.
+
+Last-Run: 22Dec2025 (MESA fede5937) by pmocz on C916PXT6XW in 586 seconds using 8 threads.
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/ck b/star/dev_cases_massive_stars/wd_nova_burst/ck
new file mode 100755
index 0000000000..78ca63a8c1
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/ck
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+# this provides the definition of check_one
+# check_one
+source "${MESA_DIR}/star/test_suite/test_suite_helpers"
+
+check_one
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/clean b/star/dev_cases_massive_stars/wd_nova_burst/clean
new file mode 100755
index 0000000000..74f37b9ce4
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/clean
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make clean
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/docs/grid8_000586.svg b/star/dev_cases_massive_stars/wd_nova_burst/docs/grid8_000586.svg
new file mode 100644
index 0000000000..74b7386b65
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/docs/grid8_000586.svg
@@ -0,0 +1,3140 @@
+
+
+
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/docs/wd_nova_burst_grid.svg b/star/dev_cases_massive_stars/wd_nova_burst/docs/wd_nova_burst_grid.svg
new file mode 100644
index 0000000000..19d95d2241
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/docs/wd_nova_burst_grid.svg
@@ -0,0 +1,8274 @@
+
+
+
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/history_columns.list b/star/dev_cases_massive_stars/wd_nova_burst/history_columns.list
new file mode 100644
index 0000000000..6af3df1cee
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/history_columns.list
@@ -0,0 +1,1067 @@
+! history_columns.list -- determines the contents of star history logs
+! you can use a non-standard version by setting history_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as history_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! blank lines and comments can be used freely.
+! if a column name appears more than once in the list, only the first occurrence is used.
+
+! if you need to have something added to the list of options, let me know....
+
+
+! the first few lines of the log file contain a few items:
+
+ ! version_number -- for the version of mesa being used
+ ! burn_min1 -- 1st limit for reported burning, in erg/g/s
+ ! burn_min2 -- 2nd limit for reported burning, in erg/g/s
+
+
+!# other files
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+! the following lines of the log file contain info about 1 model per row
+
+!----------------------------------------------------------------------------------------------
+
+!# general info about the model
+
+ model_number ! counting from the start of the run
+ num_zones ! number of zones in the model
+
+ !## age
+
+ star_age ! elapsed simulated time in years since the start of the run
+ !star_age_sec ! elapsed simulated time in seconds since the start of the run
+ !star_age_min ! elapsed simulated time in minutes since the start of the run
+ !star_age_hr ! elapsed simulated time in hours since the start of the run
+ !star_age_day ! elapsed simulated time in days since the start of the run
+ !day ! elapsed simulated time in days since the start of the run
+
+ !log_star_age
+ !log_star_age_sec
+
+ !## timestep
+
+ !time_step ! timestep in years since previous model
+ time_step_sec ! timestep in seconds since previous model
+ !time_step_days
+ log_dt ! log10 time_step in years
+ !log_dt_sec ! log10 time_step in seconds
+ !log_dt_days ! log10 time_step in days
+
+ !## mass
+
+ star_mass ! in Msun units
+ !log_star_mass
+
+ !star_gravitational_mass ! star_mass is baryonic mass
+ !star_mass_grav_div_mass
+
+ !delta_mass ! star_mass - initial_mass in Msun units
+ log_xmstar ! log10 mass exterior to M_center (grams)
+
+ !## mass change
+
+ !star_mdot ! d(star_mass)/dt (in msolar per year)
+ log_abs_mdot ! log10(abs(star_mdot)) (in msolar per year)
+
+ !## imposed surface conditions
+ !Tsurf_factor
+ !tau_factor
+ !tau_surface
+
+ !## imposed center conditions
+ !m_center
+ !m_center_gm
+ !r_center
+ !r_center_cm
+ !r_center_km
+ !L_center
+ !log_L_center
+ !log_L_center_ergs_s
+ !v_center
+ !v_center_kms
+
+ !logt_max
+
+!----------------------------------------------------------------------------------------------
+
+!# mixing and convection
+
+ !max_conv_vel_div_csound
+ !max_gradT_div_grada
+ !max_gradT_sub_grada
+ !min_log_mlt_Gamma
+
+
+ !## mixing regions
+
+ mass_conv_core ! (Msun) mass coord of top of convective core. 0 if core is not convective
+
+ ! mx1 refers to the largest (by mass) convective region.
+ ! mx2 is the 2nd largest.
+
+ ! conv_mx1_top and conv_mx1_bot are the region where mixing_type == convective_mixing.
+ ! mx1_top and mx1_bot are the extent of all kinds of mixing, convective and other.
+
+ ! values are m/Mstar
+ conv_mx1_top
+ conv_mx1_bot
+ conv_mx2_top
+ conv_mx2_bot
+ mx1_top
+ mx1_bot
+ mx2_top
+ mx2_bot
+
+ ! radius -- values are radii in Rsun units
+ !conv_mx1_top_r
+ !conv_mx1_bot_r
+ !conv_mx2_top_r
+ !conv_mx2_bot_r
+ !mx1_top_r
+ !mx1_bot_r
+ !mx2_top_r
+ !mx2_bot_r
+
+ ! you might want to get a more complete list of mixing regions by using the following
+
+ !mixing_regions ! note: this includes regions where the mixing type is no_mixing.
+
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives the mixing type as defined in const/public/const_def.f90.
+
+ ! the second column for a region gives the m/mstar location of the top of the region
+ ! entries for extra columns after the last region in the star will have an invalid mixing_type value of -1.
+ ! mstar is the total mass of the star, so these locations range from 0 to 1
+ ! all regions are include starting from the center, so the bottom of one region
+ ! is the top of the previous one. since we start at the center, the bottom of the 1st region is 0.
+
+ ! the columns in the log file will have names like 'mix_type_1' and 'mix_qtop_1'
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+
+ !mix_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'mix_relr_type_1' and 'mix_relr_top_1'
+
+
+ !## conditions at base of largest convection zone (by mass)
+ !cz_bot_mass ! mass coordinate of base (Msun)
+ !cz_mass ! mass coordinate of base (Msun) -- same as cz_bot_mass
+ !cz_log_xmass ! mass exterior to base (g)
+ !cz_log_xmsun ! mass exterior to base (Msun)
+ !cz_xm ! mass exterior to base (Msun)
+ !cz_logT
+ !cz_logRho
+ !cz_logP
+ !cz_bot_radius ! Rsun
+ !cz_log_column_depth
+ !cz_log_radial_depth
+ !cz_luminosity ! Lsun
+ !cz_opacity
+ !cz_log_tau
+ !cz_eta
+ !cz_log_eps_nuc ! log10(ergs/g/s)
+ !cz_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_csound
+ !cz_scale_height
+ !cz_grav
+
+ !cz_omega
+ !cz_omega_div_omega_crit
+
+ !cz_zone
+
+ ! mass fractions at base of largest convection zone (by mass)
+ !cz_log_xa h1
+ !cz_log_xa he4
+
+ !## conditions at top of largest convection zone (by mass)
+ !cz_top_mass ! mass coordinate of top (Msun)
+ !cz_top_log_xmass ! mass exterior to top (g)
+ !cz_top_log_xmsun ! mass exterior to top (Msun)
+ !cz_top_xm ! mass exterior to top (Msun)
+ !cz_top_logT
+ !cz_top_logRho
+ !cz_top_logP
+ !cz_top_radius ! Rsun
+ !cz_top_log_column_depth
+ !cz_top_log_radial_depth
+ !cz_top_luminosity ! Lsun
+ !cz_top_opacity
+ !cz_top_log_tau
+ !cz_top_eta
+ !cz_top_log_eps_nuc ! log10(ergs/g/s)
+ !cz_top_t_heat ! Cp*T/eps_nuc (seconds)
+
+ !cz_top_csound
+ !cz_top_scale_height
+ !cz_top_grav
+
+ !cz_top_omega
+ !cz_top_omega_div_omega_crit
+
+ !cz_top_zone
+ !cz_top_zone_logdq
+
+ ! mass fractions at top of largest convection zone (by mass)
+ !cz_top_log_xa h1
+ !cz_top_log_xa he4
+
+!----------------------------------------------------------------------------------------------
+
+!# nuclear reactions
+
+ !## integrated quantities
+
+ !power_h_burn ! total thermal power from PP and CNO, excluding neutrinos (in Lsun units)
+ !power_he_burn ! total thermal power from triple-alpha, excluding neutrinos (in Lsun units)
+ !power_photo
+ !power_z_burn
+ !log_power_nuc_burn ! total thermal power from all burning, excluding photodisintegrations
+ log_LH ! log10 power_h_burn
+ log_LHe ! log10 power_he_burn
+ log_LZ ! log10 total burning power including LC, but excluding LH and LHe and photodisintegrations
+ log_Lnuc ! log(LH + LHe + LZ)
+ !log_Lnuc_ergs_s
+ !log_Lnuc_sub_log_L
+ !lnuc_photo
+
+ !extra_L ! integral of extra_heat in Lsun units
+ !log_extra_L ! log10 extra_L
+
+ !## neutrino losses
+ !log_Lneu ! log10 power emitted in neutrinos, nuclear and thermal (in Lsun units)
+ !log_Lneu_nuc ! log10 power emitted in neutrinos, nuclear sources only (in Lsun units)
+ !log_Lneu_nonnuc ! log10 power emitted in neutrinos, thermal sources only (in Lsun units)
+
+ !mass_loc_of_max_eps_nuc ! (in Msun units)
+ !mass_ext_to_max_eps_nuc ! (in Msun units)
+ !eps_grav_integral ! (in Lsun units)
+ !log_abs_Lgrav ! log10 abs(eps_grav_integral) (in Lsun units)
+
+ !## information about reactions (by category)
+
+ ! log10 total luminosity for reaction categories (Lsun units)
+
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ !## information about individual reactions
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+
+
+ !## nuclear reactions at center
+
+ ! center log10 burn erg/g/s for reaction categories
+
+ !c_log_eps_burn cno
+ !c_log_eps_burn tri_alfa
+
+ ! center d_eps_nuc_dlnd for reaction categories
+
+ !c_d_eps_dlnd cno
+ !c_d_eps_dlnd tri_alfa
+
+ ! center d_eps_nuc_dlnT for reaction categories
+
+ !c_d_eps_dlnT cno
+ !c_d_eps_dlnT tri_alfa
+
+ !## regions of strong nuclear burning
+
+ ! 2 zones where eps_nuc > burn_min1 erg/g/s
+ ! for each zone have 4 numbers: start1, start2, end2, end1
+ ! start1 is mass of inner edge where first goes > burn_min1 (or -20 if none such)
+ ! start2 is mass of inner edge where first zone reaches burn_min2 erg/g/sec (or -20 if none such)
+ ! end2 is mass of outer edge where first zone drops back below burn_min2 erg/g/s
+ ! end1 is mass of outer edge where first zone ends (i.e. eps_nuc < burn_min1)
+ ! similar for the second zone
+
+ epsnuc_M_1 ! start1 for 1st zone
+ epsnuc_M_2 ! start2
+ epsnuc_M_3 ! end2
+ epsnuc_M_4 ! end1
+
+ epsnuc_M_5 ! start1 for 2nd zone
+ epsnuc_M_6 ! start2
+ epsnuc_M_7 ! end2
+ epsnuc_M_8 ! end1
+
+
+ ! you might want to get a more complete list of burning regions by using the following
+
+ !burning_regions
+ ! the is the number of regions to report
+ ! there will be 2* columns for this in the log file, 2 for each region.
+ ! the first column for a region gives int(sign(val)*log10(max(1,abs(val))))
+ ! where val = ergs/gm/sec nuclear energy minus all neutrino losses.
+ ! the second column for a region gives the q location of the top of the region
+ ! entries for extra columns after the last region in the star will have a value of -9999
+ ! all regions are included starting from the center, so the bottom of one region
+ ! is the top of the previous one.
+ ! since we start at the center, the bottom of the 1st region is q=0 and top of last is q=1.
+
+ ! the columns in the log file will have names like 'burn_type_1' and 'burn_qtop_1'
+
+ !burn_relr_regions
+ ! same as above, but locations given as r/rstar instead of m/mstar.
+ ! the columns in the log file will have names like 'burn_relr_type_1' and 'burn_relr_top_1'
+
+
+ ! if the star has too many regions to report them all,
+ ! the smallest regions will be merged with neighbors for reporting purposes only.
+
+!----------------------------------------------------------------------------------------------
+
+!# information about core and envelope
+
+ !## helium core
+ he_core_mass
+ !he_core_radius
+ !he_core_lgT
+ !he_core_lgRho
+ !he_core_L
+ !he_core_v
+ !he_core_omega
+ !he_core_omega_div_omega_crit
+ !he_core_k
+
+ !## CO core
+ co_core_mass
+ !CO_core
+ !co_core_radius
+ !co_core_lgT
+ !co_core_lgRho
+ !co_core_L
+ !co_core_v
+ !co_core_omega
+ !co_core_omega_div_omega_crit
+ !co_core_k
+
+ !## ONe core
+ one_core_mass
+ !one_core_radius
+ !one_core_lgT
+ !one_core_lgRho
+ !one_core_L
+ !one_core_v
+ !one_core_omega
+ !one_core_omega_div_omega_crit
+ !one_core_k
+
+ !## iron core
+ fe_core_mass
+ !fe_core_radius
+ !fe_core_lgT
+ !fe_core_lgRho
+ !fe_core_L
+ !fe_core_v
+ !fe_core_omega
+ !fe_core_omega_div_omega_crit
+ !fe_core_k
+
+ !## neutron rich core
+ neutron_rich_core_mass
+ !neutron_rich_core_radius
+ !neutron_rich_core_lgT
+ !neutron_rich_core_lgRho
+ !neutron_rich_core_L
+ !neutron_rich_core_v
+ !neutron_rich_core_omega
+ !neutron_rich_core_omega_div_omega_crit
+ !neutron_rich_core_k
+
+ !## envelope
+
+ !envelope_mass ! = star_mass - he_core_mass
+ !envelope_fraction_left ! = envelope_mass / (initial_mass - he_core_mass)
+
+ !h_rich_layer_mass ! = star_mass - he_core_mass
+ !he_rich_layer_mass ! = he_core_mass - c_core_mass
+ !co_rich_layer_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# timescales
+
+ !dynamic_timescale ! dynamic timescale (seconds) -- estimated by 2*pi*sqrt(r^3/(G*m))
+ kh_timescale ! kelvin-helmholtz timescale (years)
+ !mdot_timescale ! star_mass/abs(star_mdot) (years)
+ !kh_div_mdot_timescales ! kh_timescale/mdot_timescale
+ !nuc_timescale ! nuclear timescale (years) -- proportional to mass divided by luminosity
+
+ !dt_cell_collapse ! min time for any cell to collapse at current velocities
+ !dt_div_dt_cell_collapse
+
+ !dt_div_max_tau_conv ! dt/ maximum conv timescale
+ !dt_div_min_tau_conv ! dt/ minimum conv timescale
+
+
+ !min_dr_div_cs ! min over all cells of dr/csound (seconds)
+ !min_dr_div_cs_k ! location of min
+ !log_min_dr_div_cs ! log10 min dr_div_csound (seconds)
+ !min_dr_div_cs_yr ! min over all cells of dr/csound (years)
+ !log_min_dr_div_cs_yr ! log10 min dr_div_csound (years)
+ !dt_div_min_dr_div_cs
+ !log_dt_div_min_dr_div_cs
+
+ !min_t_eddy ! minimum value of scale_height/conv_velocity
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions at or near the surface of the model
+
+ !## conditions at the photosphere
+ effective_T
+ !Teff
+ log_Teff ! log10 effective temperature
+ ! Teff is calculated using Stefan-Boltzmann relation L = 4 pi R^2 sigma Teff^4,
+ ! where L and R are evaluated at the photosphere (tau_factor < 1)
+ ! or surface of the model (tau_factor >= 1) when photosphere is not inside the model.
+
+ !photosphere_black_body_T
+ !photosphere_cell_T ! temperature at model location closest to the photosphere, not necessarily Teff
+ !photosphere_cell_log_T
+ !photosphere_cell_density
+ !photosphere_cell_log_density
+ !photosphere_cell_opacity
+ !photosphere_cell_log_opacity
+ !photosphere_L ! Lsun units
+ !photosphere_log_L ! Lsun units
+ !photosphere_r ! Rsun units
+ !photosphere_log_r ! Rsun units
+ !photosphere_m ! Msun units
+ !photosphere_v_km_s
+ !photosphere_cell_k
+ !photosphere_column_density
+ !photosphere_csound
+ !photosphere_log_column_density
+ !photosphere_opacity
+ !photosphere_v_div_cs
+ !photosphere_xm
+ !photosphere_cell_free_e
+ !photosphere_cell_log_free_e
+ !photosphere_logg
+ !photosphere_T
+
+ !## conditions at or near the surface of the model (outer edge of outer cell)
+
+ !luminosity ! luminosity in Lsun units
+ !luminosity_ergs_s ! luminosity in cgs units
+ log_L ! log10 luminosity in Lsun units
+ !log_L_ergs_s ! log10 luminosity in cgs units
+ radius ! Rsun
+ log_R ! log10 radius in Rsun units
+ radius_cm
+ log_R_cm
+
+ log_g ! log10 gravity
+ !gravity
+ !log_Ledd
+ !log_L_div_Ledd ! log10(L/Leddington)
+ lum_div_Ledd
+ !log_surf_optical_depth
+ !surface_optical_depth
+
+ !log_surf_cell_opacity ! old name was log_surf_opacity
+ !log_surf_cell_P ! old name was log_surf_P
+ !log_surf_cell_pressure ! old name was log_surf_pressure
+ !log_surf_cell_density ! old name was log_surf_density
+ !log_surf_cell_temperature ! old name was log_surf_temperature
+ !surface_cell_temperature ! old name was surface_temperature
+ !log_surf_cell_z ! old name was log_surf_z
+ !surface_cell_entropy ! in units of kerg per baryon
+ ! old name was surface_entropy
+
+ !v_surf ! (cm/s)
+ v_surf_km_s ! (km/s)
+ v_div_csound_surf ! velocity divided by sound speed at outermost grid point
+ !v_div_csound_max ! max value of velocity divided by sound speed at face
+ !v_div_vesc
+ !v_phot_km_s
+ !v_surf_div_escape_v
+
+ !v_surf_div_v_kh ! v_surf/(photosphere_r/kh_timescale)
+
+ !surf_avg_j_rot
+ !surf_avg_omega
+ !surf_avg_omega_crit
+ !surf_avg_omega_div_omega_crit
+ !surf_avg_v_rot ! km/sec rotational velocity at equator
+ !surf_avg_v_crit ! critical rotational velocity at equator
+ !surf_avg_v_div_v_crit
+ !surf_avg_Lrad_div_Ledd
+ !surf_avg_logT
+ !surf_avg_logRho
+ !surf_avg_opacity
+
+ ! Gravity Darkening, reports the surface averaged L/Lsun and Teff (K) caused by
+ ! gravity darkening in rotating stars. Based on the model of Espinosa Lara & Rieutord (2011)
+ ! 'polar' refers to the line of sight being directed along the rotation axis of the star
+ ! 'equatorial' refers to the line of sight coincident with the stellar equator
+ !grav_dark_L_polar !Lsun
+ !grav_dark_Teff_polar !K
+ !grav_dark_L_equatorial !Lsun
+ !grav_dark_Teff_equatorial !K
+
+ !surf_escape_v ! cm/s
+
+ !v_wind_Km_per_s ! Km/s
+ ! = 1d-5*s% opacity(1)*max(0d0,-s% mstar_dot)/ &
+ ! (4*pi*s% photosphere_r*Rsun*s% tau_base)
+ ! Lars says:
+ ! wind_mdot = 4*pi*R^2*rho*v_wind
+ ! tau = integral(opacity*rho*dr) from R to infinity
+ ! so tau = opacity*wind_mdot/(4*pi*R*v_wind) at photosphere
+ ! or v_wind = opacity*wind_mdot/(4*pi*R*tau) at photosphere
+
+ !rotational_mdot_boost ! factor for increase in mass loss mdot due to rotation
+ !log_rotational_mdot_boost ! log factor for increase in mass loss mdot due to rotation
+ !surf_r_equatorial_div_r_polar
+ !surf_r_equatorial_div_r
+ !surf_r_polar_div_r
+
+!----------------------------------------------------------------------------------------------
+
+!# conditions near center
+
+ log_center_T ! temperature
+ log_center_Rho ! density
+ log_center_P ! pressure
+
+ ! shorter names for above
+ log_cntr_P
+ log_cntr_Rho
+ log_cntr_T
+
+ !center_T ! temperature
+ !center_Rho ! density
+ !center_P ! pressure
+
+ !center_degeneracy ! the electron chemical potential in units of k*T
+ !center_gamma ! plasma interaction parameter
+ center_mu
+ center_ye
+ center_abar
+ !center_zbar
+
+ !center_eps_grav
+
+ !center_non_nuc_neu
+ !center_eps_nuc
+ !d_center_eps_nuc_dlnT
+ !d_center_eps_nuc_dlnd
+ !log_center_eps_nuc
+
+ !center_entropy ! in units of kerg per baryon
+ !max_entropy ! in units of kerg per baryon
+ !fe_core_infall
+ !non_fe_core_infall
+ !non_fe_core_rebound
+ !max_infall_speed
+
+ !compactness_parameter ! (m/Msun)/(R(m)/1000km) for m = 2.5 Msun
+ !compactness
+ !m4 ! Mass coordinate where entropy=4
+ ! mu4 is sensitive to the choice of how much dm/dr you average over, thus we average dm and dr over M(entropy=4) and M(entropy=4)+0.3Msun
+ !mu4 ! dM(Msun)/dr(1000km) where entropy=4
+
+
+ !center_omega
+ !center_omega_div_omega_crit
+
+!----------------------------------------------------------------------------------------------
+
+!# abundances
+
+ !species ! size of net
+
+ !## mass fractions near center
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_center_abundances
+ !add_log_center_abundances
+
+ ! individual central mass fractions (as many as desired)
+ center h1
+ center he4
+ center c12
+ center o16
+
+ ! individual log10 central mass fractions (as many as desired)
+ !log_center h1
+ !log_center he4
+ ! etc.
+
+
+ !## mass fractions near surface
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_surface_abundances
+ !add_log_surface_abundances
+
+ ! individual surface mass fractions (as many as desired)
+ !surface h1
+ !surface he4
+ surface c12
+ surface o16
+ ! etc.
+
+ ! individual log10 surface mass fractions (as many as desired)
+
+ !log_surface h1
+ !log_surface he4
+
+
+ !## mass fractions for entire star
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_average_abundances
+ !add_log_average_abundances
+
+ ! individual average mass fractions (as many as desired)
+ !average h1
+ !average he4
+ ! etc.
+
+ ! individual log10 average mass fractions (as many as desired)
+ !log_average h1
+ !log_average he4
+ ! etc.
+
+
+ !## mass totals for entire star (in Msun units)
+
+ ! the following controls automatically add columns for all of the isos that are in the current net
+ !add_total_mass
+ !add_log_total_mass
+
+ ! individual mass totals for entire star (as many as desired)
+ total_mass h1
+ total_mass he4
+ ! etc.
+
+ ! individual log10 mass totals for entire star (in Msun units)
+ !log_total_mass h1
+ !log_total_mass he4
+ ! etc.
+
+!----------------------------------------------------------------------------------------------
+
+!# info at specific locations
+
+ !## info at location of max temperature
+ !max_T
+ !log_max_T
+
+
+!----------------------------------------------------------------------------------------------
+
+!# information about shocks
+
+ !## info about outermost outward moving shock
+ ! excluding locations with q > max_q_for_outer_mach1_location
+ ! returns values at location of max velocity
+ !shock_mass ! baryonic (Msun)
+ !shock_mass_gm ! baryonic (grams)
+ !shock_q
+ !shock_radius ! (Rsun)
+ !shock_radius_cm ! (cm)
+ !shock_velocity
+ !shock_csound
+ !shock_v_div_cs
+ !shock_lgT
+ !shock_lgRho
+ !shock_lgP
+ !shock_gamma1
+ !shock_entropy
+ !shock_tau
+ !shock_k
+ !shock_pre_lgRho
+
+!----------------------------------------------------------------------------------------------
+
+!# asteroseismology
+
+ !delta_nu ! large frequency separation for p-modes (microHz)
+ ! 1e6/(seconds for sound to cross diameter of star)
+ !delta_Pg ! g-mode period spacing for l=1 (seconds)
+ ! sqrt(2) pi^2/(integral of brunt_N/r dr)
+ !log_delta_Pg
+ !nu_max ! estimate from scaling relation (microHz)
+ ! nu_max = nu_max_sun * M/Msun / ((R/Rsun)^2 (Teff/astero_Teff_sun)^0.5)
+ !nu_max_3_4th_div_delta_nu ! nu_max^0.75/delta_nu
+ !acoustic_cutoff ! 0.5*g*sqrt(gamma1*rho/P) at surface
+ !acoustic_radius ! integral of dr/csound (seconds)
+ !ng_for_nu_max ! = 1 / (nu_max*delta_Pg)
+ ! period for g-mode with frequency nu_max = nu_max_ng*delta_Pg
+ !gs_per_delta_nu ! delta_nu / (nu_max**2*delta_Pg)
+ ! number of g-modes per delta_nu at nu_max
+
+ !int_k_r_dr_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=1
+ !int_k_r_dr_2pt0_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=1
+ !int_k_r_dr_0pt5_nu_max_Sl1 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=1
+ !int_k_r_dr_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=2
+ !int_k_r_dr_2pt0_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=2
+ !int_k_r_dr_0pt5_nu_max_Sl2 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=2
+ !int_k_r_dr_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max, l=3
+ !int_k_r_dr_2pt0_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max*2, l=3
+ !int_k_r_dr_0pt5_nu_max_Sl3 ! integral of k_r*dr where nu < N < Sl for nu = nu_max/2, l=3
+
+!----------------------------------------------------------------------------------------------
+
+!# energy information
+
+ !total_energy ! at end of step
+ !log_total_energy ! log(abs(total_energy))
+ !total_energy_after_adjust_mass ! after mass adjustments
+
+ ! shorter versions of above
+ !tot_E
+ !log_tot_E
+
+
+ !total_gravitational_energy
+ !log_total_gravitational_energy ! log(abs(total_gravitational_energy))
+ !total_gravitational_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_PE
+ !log_tot_PE
+
+ !total_internal_energy
+ !log_total_internal_energy
+ !total_internal_energy_after_adjust_mass
+
+ ! shorter versions of above
+ !tot_IE
+ !log_tot_IE
+
+ !total_radial_kinetic_energy
+ !log_total_radial_kinetic_energy
+ !total_radial_kinetic_energy_after_adjust_mass
+
+ ! shorter versions of above (does not include rot KE)
+ !tot_KE
+ !log_tot_KE
+
+ !total_turbulent_energy
+ !log_total_turbulent_energy
+ !total_turbulent_energy_after_adjust_mass
+ !tot_Et
+ !log_tot_Et
+
+ !total_energy_foe
+
+ !tot_IE_div_IE_plus_KE
+ !total_IE_div_IE_plus_KE
+
+ !total_entropy
+ !total_eps_grav
+
+ !total_energy_sources_and_sinks ! for this step
+ !total_nuclear_heating
+ !total_non_nuc_neu_cooling
+ !total_irradiation_heating
+ !total_extra_heating ! extra heat integrated over the model times dt (erg)
+ !total_WD_sedimentation_heating
+
+ !rel_run_E_err
+
+ !rel_E_err
+ !abs_rel_E_err
+ !log_rel_E_err
+
+ !tot_e_equ_err
+ !tot_e_err
+
+
+ !error_in_energy_conservation ! for this step
+ ! = total_energy - (total_energy_start + total_energy_sources_and_sinks)
+ !cumulative_energy_error ! = sum over all steps of abs(error_in_energy_conservation)
+ !rel_cumulative_energy_error ! = cumulative_energy_error/total_energy
+ !log_rel_cumulative_energy_error ! = log10 of rel_cumulative_energy_error
+ !log_rel_run_E_err ! shorter name for rel_cumulative_energy_error
+
+ !rel_error_in_energy_conservation ! = error_in_energy_conservation/total_energy
+ !log_rel_error_in_energy_conservation
+
+ !virial_thm_P_avg
+ !virial_thm_rel_err
+ !work_inward_at_center
+ !work_outward_at_surface
+
+
+!----------------------------------------------------------------------------------------------
+
+ !# rotation
+
+ !total_angular_momentum
+ !log_total_angular_momentum
+ !i_rot_total ! moment of inertia
+
+ !total_rotational_kinetic_energy
+ !log_total_rotational_kinetic_energy
+ !total_rotational_kinetic_energy_after_adjust_mass
+
+!----------------------------------------------------------------------------------------------
+
+!# velocities
+
+ !avg_abs_v_div_cs
+ !log_avg_abs_v_div_cs
+ !max_abs_v_div_cs
+ !log_max_abs_v_div_cs
+
+ !avg_abs_v
+ !log_avg_abs_v
+ !max_abs_v
+ !log_max_abs_v
+
+ !u_surf
+ !u_surf_km_s
+ !u_div_csound_surf
+ !u_div_csound_max
+
+ !infall_div_cs
+
+!----------------------------------------------------------------------------------------------
+
+!# misc
+
+ !e_thermal ! sum over all zones of Cp*T*dm
+
+ !## eos
+ !logQ_max ! logQ = logRho - 2*logT + 12
+ !logQ_min
+ !gamma1_min
+
+ !## core mixing
+ !mass_semiconv_core
+
+ !## H-He boundary
+
+ !diffusion_time_H_He_bdy
+ !temperature_H_He_bdy
+
+
+ !## optical depth and opacity
+
+ !one_div_yphot
+ !log_one_div_yphot
+
+ !log_min_opacity
+ !min_opacity
+
+ !log_tau_center
+
+ !log_max_tau_conv
+ max_tau_conv
+ !log_min_tau_conv
+ !min_tau_conv
+
+ !tau_qhse_yrs
+
+ !## other
+
+ !Lsurf_m
+ !dlnR_dlnM
+ !h1_czb_mass ! location (in Msun units) of base of 1st convection zone above he core
+ !kh_mdot_limit
+ !log_cntr_dr_cm
+ !min_Pgas_div_P
+ !surf_c12_minus_o16 ! this is useful for seeing effects of dredge up on AGB
+ !surf_num_c12_div_num_o16
+
+ !phase_of_evolution ! Integer mapping to the type of evolution see star_data/public/star_data_def.inc for definitions
+
+ !## MLT++
+ !gradT_excess_alpha
+ !gradT_excess_min_beta
+ !gradT_excess_max_lambda
+
+ !max_L_rad_div_Ledd
+ !max_L_rad_div_Ledd_div_phi_Joss
+
+
+ !## RTI
+ !rti_regions
+
+ !## Ni & Co
+ !total_ni_co_56
+
+
+ !## internal structure constants
+
+ ! this is evaluated assuming a spherical star and does not account for rotation
+ !apsidal_constant_k2
+
+
+!----------------------------------------------------------------------------------------------
+
+!# accretion
+
+ !k_below_const_q
+ !q_below_const_q
+ !logxq_below_const_q
+
+ !k_const_mass
+ !q_const_mass
+ !logxq_const_mass
+
+ !k_below_just_added
+ !q_below_just_added
+ !logxq_below_just_added
+
+ !k_for_test_CpT_absMdot_div_L
+ !q_for_test_CpT_absMdot_div_L
+ !logxq_for_test_CpT_absMdot_div_L
+
+!----------------------------------------------------------------------------------------------
+
+!# Color output
+
+ ! Outputs the bolometric correction (bc) for the star in filter band ``filter'' (case sensitive)
+ !bc filter
+
+ ! Outputs the absolute magnitude for the star in filter band ``filter'' (case sensitive)
+ !abs_mag filter
+
+ ! Adds all the bc's to the output
+ !add_bc
+
+ ! Adds all the absolute magnitudes to the output
+ !add_abs_mag
+
+ ! Outputs luminosity in filter band ``filter'' (erg s^-1) (case sensitive)
+ ! lum_band filter
+
+ ! Adds all the filter band luminosities to the output (erg s^-1)
+ ! add_lum_band
+
+ ! Outputs log luminosity in filter band ``filter'' (log erg s^-1) (case sensitive)
+ ! log_lum_band filter
+
+ ! Adds all the filter band luminosities to the output (log erg s^-1)
+ ! add_log_lum_band
+
+!----------------------------------------------------------------------------------------------
+
+!# RSP
+
+ !rsp_DeltaMag ! absolute magnitude difference between minimum and maximum light (mag)
+ !rsp_DeltaR ! R_max - R_min difference in the max and min radius (Rsun)
+ !rsp_GREKM ! fractional growth of the kinetic energy per pulsation period ("nonlinear growth rate") - see equation 5 in MESA5
+ !rsp_num_periods ! Count of the number of pulsation cycles completed
+ !rsp_period_in_days ! Running period, ie., period between two consecutive values of R_max (days)
+ !rsp_phase ! Running pulsation phase for a cycle
+
+!----------------------------------------------------------------------------------------------
+!# debugging
+
+ !## retries
+ num_retries ! total during the run
+
+ !## solver iterations
+
+ num_iters ! same as num_solver_iterations
+ !num_solver_iterations ! iterations at this step
+ !total_num_solver_iterations ! total iterations during the run
+ !avg_num_solver_iters
+
+ !rotation_solver_steps
+
+ !diffusion_solver_steps
+ !diffusion_solver_iters
+
+ !avg_setvars_per_step
+ !avg_skipped_setvars_per_step
+ !avg_solver_setvars_per_step
+
+ !burn_solver_maxsteps
+
+ !total_num_solver_calls_converged
+ !total_num_solver_calls_failed
+ !total_num_solver_calls_made
+ !total_num_solver_relax_calls_converged
+ !total_num_solver_relax_calls_failed
+ !total_num_solver_relax_calls_made
+ !total_num_solver_relax_iterations
+
+ !total_step_attempts
+ !total_step_redos
+ !total_step_retries
+ !total_steps_finished
+ !total_steps_taken
+
+ !TDC_num_cells
+
+ !## Relaxation steps
+ !total_relax_step_attempts
+ !total_relax_step_redos
+ !total_relax_step_retries
+ !total_relax_steps_finished
+ !total_relax_steps_taken
+
+ !## conservation during mesh adjust
+ !log_mesh_adjust_IE_conservation
+ !log_mesh_adjust_KE_conservation
+ !log_mesh_adjust_PE_conservation
+
+ !## amr
+ !num_hydro_merges
+ !num_hydro_splits
+
+ !## timing
+ !elapsed_time ! time since start of run (seconds)
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/inlist b/star/dev_cases_massive_stars/wd_nova_burst/inlist
new file mode 100644
index 0000000000..7dd6091daa
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/inlist
@@ -0,0 +1,42 @@
+
+&star_job
+
+ read_extra_star_job_inlist(1) = .true.
+ extra_star_job_inlist_name(1) = 'inlist_wd_nova_burst'
+
+/ ! end of star_job namelist
+
+
+&eos
+
+ read_extra_eos_inlist(1) = .true.
+ extra_eos_inlist_name(1) = 'inlist_wd_nova_burst'
+
+/ ! end of eos namelist
+
+
+&kap
+
+ read_extra_kap_inlist(1) = .true.
+ extra_kap_inlist_name(1) = 'inlist_wd_nova_burst'
+
+/ ! end of kap namelist
+
+
+&controls
+
+ read_extra_controls_inlist(2) = .true.
+ extra_controls_inlist_name(2) = 'inlist_wd_nova_burst'
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+ read_extra_pgstar_inlist(1) = .true.
+ extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+
+ read_extra_pgstar_inlist(2) = .true.
+ extra_pgstar_inlist_name(2) = 'inlist_wd_nova_burst'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/inlist_pgstar b/star/dev_cases_massive_stars/wd_nova_burst/inlist_pgstar
new file mode 100644
index 0000000000..c3004cd568
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/inlist_pgstar
@@ -0,0 +1,753 @@
+
+&pgstar
+
+!pause = .true.
+
+pgstar_interval = 10 ! making this too small slows the model down.
+pgstar_show_age_in_years = .true.
+pgstar_show_age_in_seconds = .false.
+pgstar_sleep = 0.0
+
+! some global grid plot settings at end
+
+pgstar_show_model_number = .false.
+pgstar_show_age = .false.
+
+!------------------------------------------------------------------------------------
+
+Grid1_win_flag = .true.
+Grid1_win_width = 12
+Grid1_win_aspect_ratio = 0.666
+
+! file output
+Grid1_file_flag = .true.
+Grid1_file_dir = 'png'
+Grid1_file_prefix = 'Grid1_'
+Grid1_file_interval = 10 ! output when mod(model_number,Grid1_file_interval)==0
+Grid1_file_width = 27 ! (inches) negative means use same value as for window
+Grid1_file_aspect_ratio = -1 ! negative means use same value as for window
+
+! reset the defaults
+
+Grid1_plot_name(:) = ''
+Grid1_plot_row(:) = 1 ! number from 1 at top
+Grid1_plot_rowspan(:) = 1 ! plot spans this number of rows
+Grid1_plot_col(:) = 1 ! number from 1 at left
+Grid1_plot_colspan(:) = 1 ! plot spans this number of columns
+Grid1_plot_pad_left(:) = 0.0 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(:) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(:) = 0.0 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(:) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(:) = 0.7 ! multiply txt_scale for subplot by this
+
+
+Grid1_title = ''
+
+Grid1_num_cols = 3 ! divide plotting region into this many equal width cols
+Grid1_num_rows = 5 ! divide plotting region into this many equal height rows
+Grid1_num_plots = 6 ! <= 10
+
+
+Grid1_plot_name(1) = 'Text_Summary1'
+Grid1_plot_row(1) = 1 ! number from 1 at top
+Grid1_plot_rowspan(1) = 1 ! plot spans this number of rows
+Grid1_plot_col(1) = 1 ! number from 1 at left
+Grid1_plot_colspan(1) = 3 ! plot spans this number of columns
+
+Grid1_plot_pad_left(1) = -0.03 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(1) = 0.0 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(1) = -0.06 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(1) = 0.07 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(1) = 1 ! 0.8 ! multiply txt_scale for subplot by this
+
+
+Grid1_plot_name(3) = 'HR'
+Grid1_plot_row(3) = 2 ! number from 1 at top
+Grid1_plot_rowspan(3) = 1 ! plot spans this number of rows
+Grid1_plot_col(3) = 1 ! number from 1 at left
+Grid1_plot_colspan(3) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(3) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(3) = 0.08 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(3) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(3) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(3) = 0.7 ! multiply txt_scale for subplot by this
+
+
+Grid1_plot_name(5) = 'Profile_Panels1'
+Grid1_plot_row(5) = 3 ! number from 1 at top
+Grid1_plot_rowspan(5) = 3 ! plot spans this number of rows
+Grid1_plot_col(5) = 1 ! number from 1 at left
+Grid1_plot_colspan(5) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(5) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(5) = 0.10 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(5) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(5) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(5) = 0.6 ! multiply txt_scale for subplot by this
+
+
+Grid1_plot_name(2) = 'TRho_Profile'
+Grid1_plot_row(2) = 2 ! number from 1 at top
+Grid1_plot_rowspan(2) = 1 ! plot spans this number of rows
+Grid1_plot_col(2) = 2 ! number from 1 at left
+Grid1_plot_colspan(2) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(2) = -0.01 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(2) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(2) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(2) = 0.01 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(2) = 0.7 ! multiply txt_scale for subplot by this
+
+
+Grid1_plot_name(4) = 'History_Panels1'
+Grid1_plot_row(4) = 3 ! number from 1 at top
+Grid1_plot_rowspan(4) = 3 ! plot spans this number of rows
+Grid1_plot_col(4) = 2 ! number from 1 at left
+Grid1_plot_colspan(4) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(4) = 0.00 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(4) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(4) = 0.05 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(4) = 0.0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(4) = 0.6 ! multiply txt_scale for subplot by this
+
+
+Grid1_plot_name(6) = 'Profile_Panels3'
+Grid1_plot_row(6) = 2 ! number from 1 at top
+Grid1_plot_rowspan(6) = 4 ! plot spans this number of rows
+Grid1_plot_col(6) = 3 ! Number from 1 at left
+Grid1_plot_colspan(6) = 1 ! plot spans this number of columns
+
+Grid1_plot_pad_left(6) = 0.04 ! fraction of full window width for padding on left
+Grid1_plot_pad_right(6) = 0.06 ! fraction of full window width for padding on right
+Grid1_plot_pad_top(6) = -0.04 ! fraction of full window height for padding at top
+Grid1_plot_pad_bot(6) = 0 ! fraction of full window height for padding at bottom
+Grid1_txt_scale_factor(6) = 0.6 ! multiply txt_scale for subplot by this
+
+
+!------------------------------------------------------------------------------------
+
+Profile_Panels3_win_flag = .false.
+
+Profile_Panels3_title = ''
+
+Profile_Panels3_num_panels = 5
+
+Profile_Panels3_yaxis_name(1) = 'Abundance'
+
+Profile_Panels3_yaxis_name(2) = 'Power'
+
+Profile_Panels3_yaxis_name(3) = 'Mixing'
+Mixing_legend_txt_scale_factor = 0.9
+
+Profile_Panels3_yaxis_name(4) = 'conv_vel_div_csound'!'conv_vel'!'logRho'
+Profile_Panels3_other_yaxis_name(4) = 'v_div_cs' ! 'vel_km_per_s' ! 'entropy'
+Profile_Panels3_other_dymin(4) = 0.14
+
+Profile_Panels3_yaxis_name(5) = 'v_div_vesc'!'lum_div_Ledd'!'log_csound'!'logT'
+Profile_Panels3_other_yaxis_name(5) = 'vel_km_per_s'!'burn_num_iters'
+ Profile_Panels3_yaxis_log(5) = .false.
+
+! x-axis limits and properties
+Profile_Panels3_xaxis_name = 'logxq'!'zone'!'zone'!'radius'
+Profile_Panels3_xmin = -101d0
+Profile_Panels3_xmax = -101d0 !1700! -101d0 ! 2.2
+Profile_Panels3_xaxis_reversed = .true.
+
+
+Profile_Panels3_txt_scale = 0.7
+
+!Profile_Panels3_xaxis_name = 'zone'
+!Profile_Panels3_xmin = 800
+!Profile_Panels3_xmax = 1100
+!Profile_Panels3_xaxis_reversed = .true.
+
+!Profile_Panels3_show_grid = .true.
+Profile_Panels3_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+!Profile_Panels1_win_flag = .true.
+!Profile_Panels1_file_flag = .true.
+ Profile_Panels1_file_dir = 'png'
+ Profile_Panels1_file_prefix = 'profile_panels1_'
+ Profile_Panels1_file_interval = 1
+ Profile_Panels1_file_width = -1
+ Profile_Panels1_file_aspect_ratio = -1
+
+Profile_Panels1_title = ''
+
+Profile_Panels1_txt_scale = 0.7
+Profile_Panels1_num_panels = 4
+
+Profile_Panels1_yaxis_name(1) = 'conv_vel'
+!Profile_Panels1_dymin(1) = 0.14
+Profile_Panels1_other_yaxis_name(1) = 'lum_conv'!'lum_conv'
+!Profile_Panels1_other_dymin(1) = 0.14
+
+Profile_Panels1_yaxis_name(2) = 'logT'!'logdq'!'radius'!'entropy'
+Profile_Panels1_other_yaxis_name(2) = 'mlt_Y_face'! 'Lc_div_L'!'log_dt_cs_div_dr'!'pgas_div_p'
+Profile_Panels1_other_yaxis_log(2) = .false.
+
+!Profile_Panels1_ymax(2) = 210
+!Profile_Panels1_ymin(2) = 160
+
+Profile_Panels1_yaxis_name(3) = 'luminosity'!'conv_vel'!'Lc_div_L'!'gradT'
+Profile_Panels1_other_yaxis_name(3) = 'logdq' !'conv_vel'!'lum_div_Ledd'!'grada'
+Profile_Panels1_same_yaxis_range(3) = .false.
+Profile_Panels1_other_dymin(3) = 0.08
+!Profile_Panels1_yaxis_log(3) = .false.
+Profile_Panels1_ymax(3) =-101d0
+
+Profile_Panels1_yaxis_name(4) = 'log_opacity'
+Profile_Panels1_ymin(4) = -101d0
+Profile_Panels1_dymin(4) = 0.14
+Profile_Panels1_other_yaxis_name(4) = 'gradr'
+Profile_Panels1_other_dymin(4) = 0.14
+
+! x-axis limits and properties
+Profile_Panels1_xaxis_name = 'logtau'!'zone'
+Profile_Panels1_xmin = -101d0!-101d0
+Profile_Panels1_xmax = -101d0!9d0 !-101d0 !8.1
+Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_xaxis_name = 'zone'
+!Profile_Panels1_xmin = 15
+!Profile_Panels1_xmax = 270
+!Profile_Panels1_xaxis_reversed = .true.
+
+!Profile_Panels1_show_grid = .true.
+Profile_Panels1_show_mix_regions_on_xaxis = .true.
+
+!------------------------------------------------------------------------------------
+
+
+!TRho_Profile_win_flag = .true.
+TRho_Profile_win_width = 8
+TRho_Profile_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+! file output
+!TRho_Profile_file_flag = .true.
+TRho_Profile_file_dir = 'TRho'
+TRho_Profile_file_prefix = 'trho_'
+TRho_Profile_file_interval = 10 ! output when `mod(model_number,TRho_Profile_file_interval)==0`
+TRho_Profile_file_width = -1 ! (inches) negative means use same value as for window
+TRho_Profile_file_aspect_ratio = -1 ! negative means use same value as for window
+
+TRho_Profile_xleft = 0.15
+TRho_Profile_xright = 0.85
+TRho_Profile_ybot = 0.15
+TRho_Profile_ytop = 0.85
+TRho_Profile_txt_scale = 0.7
+TRho_Profile_title = ' '
+
+TRho_switch_to_Column_Depth = .false.
+TRho_switch_to_mass = .false.
+
+show_TRho_Profile_legend = .false.
+ TRho_Profile_legend_coord = 0.07
+ TRho_Profile_legend_fjust = 0.0
+ TRho_Profile_legend_disp1 = -2.0
+ TRho_Profile_legend_del_disp = -1.3
+ TRho_Profile_legend_txt_scale = 1.1
+
+
+show_TRho_Profile_text_info = .false.
+ TRho_Profile_text_info_xfac = 0.77 ! controls x location
+ TRho_Profile_text_info_dxfac = 0.02 ! controls x spacing to value from text
+ TRho_Profile_text_info_yfac = 0.6 ! controls y location of 1st line
+ TRho_Profile_text_info_dyfac = -0.04 ! controls line spacing
+
+show_TRho_Profile_mass_locs = .false.
+show_TRho_accretion_mesh_borders = .false.
+show_TRho_Profile_kap_regions = .false.
+show_TRho_Profile_gamma1_4_3rd = .true.
+show_TRho_Profile_eos_regions = .true.
+show_TRho_Profile_degeneracy_line = .true.
+show_TRho_Profile_Pgas_Prad_line = .true.
+show_TRho_Profile_burn_lines = .true.
+show_TRho_Profile_burn_labels = .true.
+
+! axis limits
+TRho_Profile_xmin = -15.0
+TRho_Profile_xmax = 10!5d0!10.0
+TRho_Profile_ymin = 2.5
+TRho_Profile_ymax = 9!8.5d0!10.0
+
+! these are shown if show_TRho_Profile_mass_locs = .true.
+! set all the entries
+profile_mass_point_q = -1
+profile_mass_point_color_index = 1
+profile_mass_point_symbol = -6
+profile_mass_point_symbol_scale = 1.7
+profile_mass_point_str = ''
+profile_mass_point_str_clr = 1
+profile_mass_point_str_scale = 1.0
+
+! set defaults
+num_profile_mass_points = 3 ! max is defined in star_def (max_num_profile_mass_points)
+
+profile_mass_point_q(1) = 0.5
+profile_mass_point_color_index(1) = 1
+profile_mass_point_symbol(1) = -6
+profile_mass_point_str(1) = ' 0.5 M\d\(0844)\u'
+profile_mass_point_str_clr(1) = 1
+
+profile_mass_point_q(2) = 0.95
+profile_mass_point_color_index(2) = 1
+profile_mass_point_symbol(2) = -6
+profile_mass_point_str(2) = ' 0.95 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+profile_mass_point_q(3) = 0.999
+profile_mass_point_color_index(3) = 1
+profile_mass_point_symbol(3) = -6
+profile_mass_point_str(3) = ' 0.999 M\d\(0844)\u'
+profile_mass_point_str_clr(3) = 1
+
+!------------------------------------------------------------------------------------
+
+
+! Text_Summary windows
+
+Text_Summary1_win_flag = .false.
+Text_Summary1_win_width = 10
+Text_Summary1_win_aspect_ratio = 0.15
+
+Text_Summary1_xleft = 0.01
+Text_Summary1_xright = 0.99
+Text_Summary1_ybot = 0.0
+Text_Summary1_ytop = 1.0
+Text_Summary1_txt_scale = 0.95
+Text_Summary1_title = ''
+
+Text_Summary1_num_rows = 6 ! <= 20
+Text_Summary1_num_cols = 5 ! <= 20
+Text_Summary1_name(:,:) = ''
+
+
+Text_Summary1_name(1,1) = 'model_number'
+Text_Summary1_name(1,2) = 'log_dt'
+Text_Summary1_name(1,3) = 'Mass'
+Text_Summary1_name(1,4) = 'H_cntr'
+Text_Summary1_name(1,5) = 'H_rich'
+
+Text_Summary1_name(2,1) = 'non_fe_core_infall'
+Text_Summary1_name(2,2) = 'star_age'
+Text_Summary1_name(2,3) = 'lg_Mdot'
+Text_Summary1_name(2,4) = 'He_cntr'
+Text_Summary1_name(2,5) = 'He_core'
+
+Text_Summary1_name(3,1) = ''
+Text_Summary1_name(3,2) = 'log_Teff'
+Text_Summary1_name(3,3) = 'eta_cntr'
+Text_Summary1_name(3,4) = 'C_cntr'
+Text_Summary1_name(3,5) = 'CO_core'
+
+Text_Summary1_name(4,1) = ''!'log_max_T'
+Text_Summary1_name(4,2) = 'log_LH'
+Text_Summary1_name(4,3) = 'lg_Lnuc_tot'
+Text_Summary1_name(4,4) = 'O_cntr'
+Text_Summary1_name(4,5) = 'radius'
+
+Text_Summary1_name(5,1) = ''
+Text_Summary1_name(5,2) = 'log_LHe'
+Text_Summary1_name(5,3) = 'lg_Lneu'
+Text_Summary1_name(5,4) = 'Ne_cntr'
+Text_Summary1_name(5,5) = 'zones'
+
+Text_Summary1_name(6,1) = 'log_cntr_Rho'
+Text_Summary1_name(6,2) = 'log_LZ'
+Text_Summary1_name(6,3) = 'lg_Lphoto'
+Text_Summary1_name(6,4) = 'retries'
+Text_Summary1_name(6,5) = 'log_cntr_T'
+
+
+!------------------------------------------------------------------------------------
+
+! Abundance profile plot
+
+Abundance_win_flag = .false.
+
+! window properties
+Abundance_win_width = 10
+Abundance_win_aspect_ratio = 0.75
+
+Abundance_xleft = 0.15
+Abundance_xright = 0.85
+Abundance_ybot = 0.15
+Abundance_ytop = 0.85
+Abundance_txt_scale = 1.1
+Abundance_title = ''
+
+! isotopes to plot
+
+Abundance_num_isos_to_show = 20
+
+Abundance_which_isos_to_show(1) = 'h1'
+Abundance_which_isos_to_show(2) = 'he3'
+Abundance_which_isos_to_show(3) = 'he4'
+Abundance_which_isos_to_show(4) = 'c12'
+Abundance_which_isos_to_show(5) = 'n14'
+Abundance_which_isos_to_show(6) = 'o16'
+Abundance_which_isos_to_show(7) = 'ne20'
+Abundance_which_isos_to_show(8) = 'mg24'
+Abundance_which_isos_to_show(9) = 'si28'
+Abundance_which_isos_to_show(10) = 's32'
+Abundance_which_isos_to_show(11) = 'ar36'
+Abundance_which_isos_to_show(12) = 'ca40'
+Abundance_which_isos_to_show(13) = 'ti44'
+Abundance_which_isos_to_show(14) = 'cr48'
+Abundance_which_isos_to_show(15) = 'cr56'
+Abundance_which_isos_to_show(16) = 'fe52'
+Abundance_which_isos_to_show(17) = 'fe54'
+Abundance_which_isos_to_show(18) = 'fe56'
+Abundance_which_isos_to_show(19) = 'ni56'
+Abundance_which_isos_to_show(20) = 'neut'
+!Abundance_which_isos_to_show(22) = 'ne22'
+
+
+
+! number and size of isotope labels along curves
+num_abundance_line_labels = 4
+Abundance_line_txt_scale_factor = 1.1
+
+
+! number and size of isotopes on legend
+Abundance_legend_max_cnt = 10
+Abundance_legend_txt_scale_factor = 1.3
+
+! yaxis limits
+Abundance_log_mass_frac_min = -4!-6.4 ! -3.5
+Abundance_log_mass_frac_max = 0.3
+
+! file output
+Abundance_file_flag = .false.
+Abundance_file_dir = 'Abundance'
+Abundance_file_prefix = 'abund_'
+Abundance_file_width = -1 ! (inches) negative means use same value as for window
+Abundance_file_aspect_ratio = -1 ! negative means use same value as for window
+
+
+!------------------------------------------------------------------------------------
+
+! power plot
+
+Power_win_flag = .false.
+Power_win_width = 10
+Power_win_aspect_ratio = 0.75
+Power_title = ''
+
+Power_xleft = 0.15
+Power_xright = 0.85
+Power_ybot = 0.15
+Power_ytop = 0.85
+Power_txt_scale = 1.1
+Power_title = ' '
+
+Power_legend_max_cnt = 10
+Power_legend_txt_scale_factor = 1.3 ! relative to other text
+
+! power yaxis limits -- to override system default selections
+Power_ymin = -5.0 ! -101d0 ! only used if /= -101d0
+Power_ymax = 25.0 ! -101d0 ! only used if /= -101d0
+
+! file output
+Power_file_flag = .false.
+Power_file_dir = 'png'
+Power_file_prefix = 'power_'
+Power_file_interval = 5 ! output when mod(model_number,Power_file_interval)==0
+Power_file_width = -1 ! (inches) negative means use same value as for window
+Power_file_aspect_ratio = -1 ! negative means use same value as for window
+
+
+!------------------------------------------------------------------------------------
+
+! mixing plot
+
+Mixing_xmin = 0.0
+Mixing_xmax = 1.6 ! -101d0
+Mixing_legend_txt_scale_factor = 1.4 ! relative to other text
+
+Mixing_show_rotation_details = .false.
+
+!Mixing_win_flag = .true.
+!Mixing_file_flag = .true.
+Mixing_file_dir = 'png'
+Mixing_file_prefix = 'mixing_'
+Mixing_file_interval = 1 ! output when `mod(model_number,Mixing_file_interval)==0`
+Mixing_file_width = -1 ! (inches) negative means use same value as for window
+Mixing_file_aspect_ratio = -1 ! negative means use same value as for window
+
+
+!-----------------------------------------------------------------------
+
+! TRho window
+ ! history of central temperature vs. density
+
+ TRho_txt_scale = 0.7
+ TRho_title = ''
+
+ TRho_logT_min = -101d0
+ TRho_logT_max = -101d0
+ TRho_logRho_min = -101d0
+ TRho_logRho_max = -101d0
+ show_TRho_degeneracy_line = .true.
+
+
+
+!-----------------------------------------------------------------------
+
+ !# HR window
+ ! history of `lg_L` vs. `lg_Teff`
+
+ HR_win_flag = .false.
+
+ HR_win_width = 12
+ HR_win_aspect_ratio = 0.75 ! aspect_ratio = height/width
+
+ HR_xleft = 0.15
+ HR_xright = 0.85
+ HR_ybot = 0.15
+ HR_ytop = 0.85
+ HR_txt_scale = 0.7 !1.0
+ HR_title = ''
+
+ ! axis limits -- to override system default selections
+ ! HR_logT_min = -101d0 ! only used if /= -101d0
+ ! HR_logT_max = -101d0 ! only used if /= -101d0
+ ! HR_logL_min = -101d0 ! only used if /= -101d0
+ ! HR_logL_max = -101d0 ! only used if /= -101d0
+
+
+
+ History_Panels1_xaxis_name = 'yr_since_coll'
+
+
+ ! axis limits -- to override system default selections
+ HR_logT_min = -101d0!3.3 !-101d0 ! only used if /= -101d0
+ HR_logT_max = -101d0!3.9!-101d0 ! only used if /= -101d0
+ HR_logL_min = -101d0!4.4!-101d0 ! only used if /= -101d0
+ HR_logL_max = -101d0!5.5!-101d0 ! only used if /= -101d0
+
+ ! axis limits -- to override system default selections
+ HR_logT_min = -101d0 ! only used if /= -101d0
+ HR_logT_max = -101d0 ! only used if /= -101d0
+ HR_logL_min = -101d0 ! only used if /= -101d0
+ HR_logL_max = -101d0 ! only used if /= -101d0
+
+ HR_logL_margin = 0.1
+ HR_logT_margin = 0.1
+ HR_dlogT_min = -1
+ HR_dlogL_min = -1
+
+ HR_step_min = -1 ! only plot models with model number >= this
+ HR_step_max = -1 ! only plot models with model number <= this
+
+ show_HR_classical_instability_strip = .true.
+ show_HR_Mira_instability_region = .false.
+ show_HR_WD_instabilities = .false.
+
+ show_HR_target_box = .false.
+ HR_target_n_sigma = -3 ! -n means show sig 1..n
+ HR_target_logL = 0
+ HR_target_logL_sigma = 0
+ HR_target_logT = 0
+ HR_target_logT_sigma = 0
+
+ show_HR_annotation1 = .false.
+ show_HR_annotation2 = .false.
+ show_HR_annotation3 = .false.
+
+ HR_fname = '' ! file name for extra HR data
+
+ ! Enables calling a subroutine to add extra information to a plot
+ ! see `$MESA_DIR/star/other/pgstar_decorator.f90`
+ HR_use_decorator = .false.
+
+
+ ! file output
+ HR_file_flag = .false.
+ HR_file_dir = 'hr_png'
+ HR_file_prefix = 'hr_'
+ HR_file_interval = 10 ! output when `mod(model_number,HR_file_interval)==0`
+ HR_file_width = 27 ! (inches) negative means use same value as for window
+ HR_file_aspect_ratio = -1 ! negative means use same value as for window
+
+!-----------------------------------------------------------------------
+
+ History_Panels1_title = ''
+
+ History_Panels1_xaxis_name = 'model_number'!'model_number'!'model_number'
+ History_Panels1_max_width = 3000! 10000
+
+ !History_Panels1_xaxis_name = 'star_age'
+ !History_Panels1_max_width = 10
+
+ History_Panels1_txt_scale = 0.75
+ History_Panels1_xmin = -101d0!1300!200!500
+ History_Panels1_xmax = -101d0
+ History_Panels1_dxmin = -1
+ History_Panels1_xaxis_reversed = .false.
+ History_Panels1_xaxis_log = .false.
+ History_Panels1_xmargin = 0.0
+
+ ! ::
+
+ History_Panels1_num_panels = 4
+
+ ! ::
+
+ History_Panels1_yaxis_name(1) = 'log_L'
+ History_Panels1_yaxis_reversed(1) = .false.
+ History_Panels1_ymin(1) = -101d0
+ History_Panels1_ymax(1) = -101d0
+ History_Panels1_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(1) = 'log_Teff'
+ History_Panels1_other_yaxis_reversed(1) = .false.
+ History_Panels1_other_ymin(1) = -101d0
+ History_Panels1_other_ymax(1) = -101d0
+ History_Panels1_other_dymin(1) = 0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(2) = 'lum_div_Ledd'
+ !'log_total_gravitational_energy'!'growth'!'lum_div_Ledd'
+ History_Panels1_yaxis_reversed(2) = .false.
+ History_Panels1_ymin(2) = -101d0
+ History_Panels1_ymax(2) = -101d0
+ !History_Panels1_dymin(2) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(2) = 'log_g'
+ !'log_total_energy' !'center_entropy'!'luminosity'!'log_g'!'log_max_T' ! 'v_surf_km_s'
+ History_Panels1_other_yaxis_reversed(2) = .false.
+ History_Panels1_other_ymin(2) = -101d0
+ History_Panels1_other_ymax(2) = -101d0
+ History_Panels1_other_dymin(2) = 1d-3!0.14
+
+ ! ::
+
+ History_Panels1_yaxis_name(3) = 'radius'
+ History_Panels1_yaxis_reversed(3) = .false.
+ History_Panels1_ymin(3) = -101d0
+ History_Panels1_ymax(3) = -101d0
+ History_Panels1_dymin(3) = 0.01d0
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(3) = 'v_surf_km_s'!'log_cntr_Rho'
+ History_Panels1_other_yaxis_reversed(3) = .false.
+ History_Panels1_other_ymin(3) = -101d0
+ History_Panels1_other_ymax(3) = -101d0
+ History_Panels1_other_dymin(3) = 0.01d0
+ ! ::
+
+ History_Panels1_yaxis_name(4) = 'log_dt'!'log_dt'
+ History_Panels1_yaxis_reversed(4) = .false.
+ History_Panels1_ymin(4) = -101d0
+ History_Panels1_ymax(4) = -101d0
+ !History_Panels1_dymin(4) = 0.14
+
+ ! ::
+
+ History_Panels1_other_yaxis_name(4) = 'log_abs_mdot'
+ History_Panels1_other_yaxis_reversed(4) = .false.
+ History_Panels1_other_ymin(4) = -101d0
+ History_Panels1_other_ymax(4) = -101d0
+ History_Panels1_other_dymin(4) = 0.14
+
+
+!-----------------------------------------------------------------------
+
+! some global grid plot settings
+
+pgstar_grid_show_title = .true.
+pgstar_grid_title_scale = 1.0
+pgstar_grid_title_lw = 3
+pgstar_grid_title_disp = 2.5 ! 1.8
+pgstar_grid_title_coord = 0.5
+pgstar_grid_title_fjust = 0.5
+
+pgstar_age_scale = 0.8
+pgstar_age_disp = 3.0
+pgstar_age_coord = 0.0
+pgstar_age_fjust = 0.0
+
+pgstar_xaxis_label_scale = 1.3
+pgstar_left_yaxis_label_scale = 1.3
+pgstar_xaxis_label_disp = 2.2
+pgstar_left_yaxis_label_disp = 3.1
+pgstar_right_yaxis_label_disp = 4.1
+
+pgstar_model_scale = 0.8
+pgstar_model_disp = 3.0
+pgstar_model_coord = 1.0
+pgstar_model_fjust = 1.0
+
+! white_on_black flags -- true means white foreground color on black background
+file_white_on_black_flag = .true.
+file_device = 'png' ! options 'png' and 'vcps' for png and postscript respectively
+
+
+!file_white_on_black_flag = .false.
+!file_device = 'vcps' ! options 'png' and 'vcps' for png and postscript respectively
+
+
+kipp_win_flag=.false.
+kipp_file_flag=.false.
+Kipp_mix_interval = 1
+Kipp_show_luminosities = .true.
+
+
+
+! history tracks for pulsations
+
+
+! history tracks
+ History_Track1_file_flag = .false.
+ History_Track2_file_flag = .false.
+
+
+History_Track1_win_flag = .false.
+History_Track1_file_interval = 50
+History_Track1_win_width = 12
+History_Track1_win_aspect_ratio = 0.75
+
+History_Track1_xname = 'v_surf_km_s'
+History_Track1_yname = 'log_L'
+History_Track1_xaxis_label = 'Vsurf'
+History_Track1_yaxis_label = 'log L/L\d\(2281)'
+History_Track1_reverse_xaxis = .false.
+
+
+!History_Track1_xmin = -50d0
+!History_Track1_xmax = 50d0
+!History_Track1_ymin = 3.50d0
+!History_Track1_ymax = 3.98d0
+
+
+History_Track2_win_flag = .false.
+History_Track2_file_interval = 50
+
+History_Track2_win_width = 12
+History_Track2_win_aspect_ratio = 0.75
+
+History_Track2_xname = 'radius' !'v_surf_km_s'
+History_Track2_yname = 'log_L'
+History_Track2_xaxis_label = 'Radius'
+History_Track2_yaxis_label = 'log L/L\d\(2281)'
+History_Track2_reverse_xaxis = .false.
+
+!History_Track2_xmin = 72d0
+!History_Track2_xmax = 96d0
+!History_Track2_ymin = 3.50d0
+!History_Track2_ymax = 3.98d0
+
+/ ! end of pgstar namelist
+
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/inlist_setup b/star/dev_cases_massive_stars/wd_nova_burst/inlist_setup
new file mode 100644
index 0000000000..115236af86
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/inlist_setup
@@ -0,0 +1,164 @@
+
+! inlist_setup
+
+
+&star_job
+
+ show_log_description_at_start = .false.
+
+ load_saved_model = .true.
+ load_model_filename = '1.1M_lgTc_7.7.mod' ! from make_o_ne_wd test case
+
+ save_model_when_terminate = .true.
+ save_model_filename = 'ready.mod'
+ required_termination_code_string = 'max_age'
+
+ change_initial_net = .true.
+ new_net_name = 'cno_extras_o18_to_mg26_plus_fe56.net'
+ auto_extend_net = .false.
+
+ change_v_flag = .true.
+ new_v_flag = .true.
+
+ set_tau_factor = .true.
+ set_to_this_tau_factor = 30
+
+ set_initial_dt = .true.
+ years_for_initial_dt = 1d6
+
+ set_initial_age = .true.
+ initial_age = 0
+
+ set_initial_model_number = .true.
+ initial_model_number = 0
+
+ pgstar_flag = .true.
+
+
+/ ! end of star_job namelist
+
+
+&eos
+/
+
+&kap
+
+ Zbase = 0.02d0
+
+ use_Type2_opacities = .true.
+
+/ ! end of kap namelist
+
+
+&controls
+
+ ! limit max_model_number as part of test_suite
+ max_model_number = 1800 ! 1300
+
+ max_age = 1d7
+
+! solver
+ energy_eqn_option = 'eps_grav'
+ use_gold2_tolerances = .true.
+
+ limit_for_rel_error_in_energy_conservation = 1d-5
+ hard_limit_for_rel_error_in_energy_conservation = 1d-3
+
+ use_gold_tolerances = .false.
+ warning_limit_for_max_residual = 1d99
+ convergence_ignore_equL_residuals = .true.
+
+
+ mass_change_full_on_dt = 1d-6 ! (seconds)
+ mass_change_full_off_dt = 1d-6 ! (seconds)
+
+ ! NOTE: for super eddington wind,
+ ! we use Ledd averaged over mass to optical depth tau = 100
+ super_eddington_scaling_factor = 1
+ ! parameter for mass loss driven by super Eddington luminosity
+ super_eddington_wind_Ledd_factor = 1
+ ! multiply Ledd by this factor when computing super Eddington wind
+ ! e.g., if this is 2, then only get wind when L > 2*Ledd
+
+ mixing_length_alpha = 1.9
+ MLT_option = 'Henyey'
+
+ use_Ledoux_criterion = .true.
+ alpha_semiconvection = 1d-3
+ thermohaline_coeff = 1d3
+
+ star_mass_max_limit = 1.301d0
+
+ !mass_change = 1d-9
+ accrete_same_as_surface = .false.
+ accretion_h1 = 0.7000 ! Estimate Nomoto 2007
+ accretion_h2 = 0
+ accretion_he3 = 0.292910D-04
+ accretion_he4 = 0.279971 ! Estimated Nomoto 2007
+ accretion_zfracs = 4 ! Lodders 03
+
+ min_timestep_limit = 1d-12
+
+ xa_function_species(1) = 'h1' ! name of nuclide as defined in chem_def
+ xa_function_weight(1) = 20
+ xa_function_param(1) = 1d-6
+ xa_function_species(2) = 'he4' ! name of nuclide as defined in chem_def
+ xa_function_weight(2) = 20
+ xa_function_param(2) = 1d-2
+
+ delta_lgL_H_limit = 0.1 ! limit for magnitude of change in lgL_H
+ lgL_H_burn_min = -0.5 ! ignore changes in lgL_H if value is less than this
+
+ delta_lgL_He_limit = 0.25 ! limit for magnitude of change in lgL_He
+ lgL_He_burn_min = 2.5 ! ignore changes in lgL_He if value is less than this
+
+ delta_lgRho_limit = 1 ! limit for magnitude of max change in log10 density at any point
+ delta_lgRho_hard_limit = -1
+
+ delta_lgT_limit = 0.5
+ delta_lgL_limit = 0.05
+ delta_lgTeff_limit = 0.10
+
+ delta_lgL_nuc_limit = 0.05
+ delta_lgL_nuc_hard_limit = 0.10
+ lgL_nuc_burn_min = -3d0
+
+
+ atm_option = 'T_tau'
+ atm_T_tau_relation = 'Eddington'
+ atm_T_tau_opacity = 'fixed'
+ Pextra_factor = 4
+
+ !varcontrol_target = 3d-4
+
+ mesh_delta_coeff = 1.0
+ max_allowed_nz = 20000
+
+
+ num_trace_history_values = 2
+ trace_history_value_name(1) = 'rel_E_err'
+ trace_history_value_name(2) = 'log_rel_run_E_err'
+
+ photo_interval = 50
+ profile_interval = 50
+ history_interval = 5
+ terminal_interval = 10
+ write_header_frequency = 10
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+ Grid8_win_flag = .true.
+ Grid8_win_width = 7
+ Summary_Burn_xaxis_name = 'logxq'
+ Summary_Burn_xaxis_reversed = .true.
+ Summary_Burn_xmin = -14 ! -101d0 ! only used if /= -101d0
+ Summary_Burn_xmax = -3 ! -101d0 ! only used if /= -101d0
+ Abundance_xaxis_name = 'logxq'
+ Abundance_xaxis_reversed = .true.
+ Abundance_xmin = -14 ! -101d0 ! only used if /= -101d0
+ Abundance_xmax = -3 ! -101d0 ! only used if /= -101d0
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/inlist_setup_header b/star/dev_cases_massive_stars/wd_nova_burst/inlist_setup_header
new file mode 100644
index 0000000000..a346bcb97d
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/inlist_setup_header
@@ -0,0 +1,39 @@
+
+&star_job
+
+ read_extra_star_job_inlist(1) = .true.
+ extra_star_job_inlist_name(1) = 'inlist_setup'
+
+/ ! end of star_job namelist
+
+
+&eos
+
+ read_extra_eos_inlist(1) = .true.
+ extra_eos_inlist_name(1) = 'inlist_setup'
+
+/ ! end of eos namelist
+
+
+&kap
+
+ read_extra_kap_inlist(1) = .true.
+ extra_kap_inlist_name(1) = 'inlist_setup'
+
+/ ! end of kap namelist
+
+
+&controls
+
+ read_extra_controls_inlist(2) = .true.
+ extra_controls_inlist_name(2) = 'inlist_setup'
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+ read_extra_pgstar_inlist(2) = .true.
+ extra_pgstar_inlist_name(2) = 'inlist_setup'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/inlist_wd_nova_burst b/star/dev_cases_massive_stars/wd_nova_burst/inlist_wd_nova_burst
new file mode 100644
index 0000000000..7e69fbe0fd
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/inlist_wd_nova_burst
@@ -0,0 +1,237 @@
+
+! inlist_wd_nova_burst
+
+
+&star_job
+
+ show_log_description_at_start = .false.
+
+ load_saved_model = .true.
+ load_model_filename = 'ready.mod' ! from running inlist_setup
+
+ save_model_when_terminate = .true.
+ save_model_filename = 'final.mod'
+ required_termination_code_string = 'extras_check_model'
+
+! save_model_when_terminate = .true.
+! save_model_filename = 'start_of_wd_nova_burst.mod'
+! required_termination_code_string = 'max_model_number'
+
+ set_initial_age = .true.
+ initial_age = 0
+
+ set_initial_model_number = .true.
+ initial_model_number = 0
+
+relax_tau_factor = .true.
+relax_to_this_tau_factor = 1d0
+dlogtau_factor = 0.1d0
+
+ set_tau_factor = .false.
+ !set_to_this_tau_factor = 30
+
+ set_initial_cumulative_energy_error = .true.
+ new_cumulative_energy_error = 0d0
+
+ set_initial_dt = .true.
+ years_for_initial_dt = 1d0 !1d-5
+
+ change_v_flag = .true.
+ new_v_flag = .true.
+
+ pgstar_flag = .true.
+
+/ ! end of star_job namelist
+
+
+&eos
+ mass_fraction_limit_for_Skye = 1d-16
+
+/ ! end of eos namelist
+
+
+&kap
+ Zbase = 0.02d0
+
+ use_Type2_opacities = .true.
+
+/ ! end of kap namelist
+
+
+&controls
+
+ ! limit max_model_number as part of test_suite
+ !max_model_number = 223
+ !max_model_number = 2250
+
+! solver
+ min_dq = 1d-26
+ min_dq_for_split = 1d-24
+ max_surface_cell_dq = 1d0
+ min_dq_for_xa = 1d-4
+
+
+ ! have used these values to do run to saturation, but may not be necessary ~ Bill P.
+ dt_div_min_dr_div_cs_limit = 5d3 !500d0 !50d0 ! 100d0
+ dt_div_min_dr_div_cs_hard_limit = -1 !10d0! i don't like hard limits ~ EbF
+ min_abs_u_div_cs_for_dt_div_min_dr_div_cs_limit = 0d0 !0.8d0
+ min_q_for_dt_div_min_dr_div_cs_limit = 0d0 !0d0
+ max_q_for_dt_div_min_dr_div_cs_limit = 1d0
+ min_k_for_dt_div_min_dr_div_cs_limit = 1
+ min_abs_du_div_cs_for_dt_div_min_dr_div_cs_limit = 0.001d0 ! lower to 1d-4 for massive stars.
+
+ report_solver_progress = .false.
+
+ energy_eqn_option = 'dedt'
+
+ use_gold2_tolerances = .false.
+
+ limit_for_rel_error_in_energy_conservation = 1d-5
+ hard_limit_for_rel_error_in_energy_conservation = 1d-3
+
+ warning_limit_for_max_residual = 1d99
+ convergence_ignore_equL_residuals = .true.
+ make_gradr_sticky_in_solver_iters = .true.
+
+
+ mass_change_full_on_dt = 1d-6 ! (seconds)
+ mass_change_full_off_dt = 1d-6 ! (seconds)
+
+ ! NOTE: for super eddington wind,
+ ! we use Ledd averaged over mass to optical depth tau = 100
+ !super_eddington_scaling_factor = 0
+ ! parameter for mass loss driven by super Eddington luminosity
+ !super_eddington_wind_Ledd_factor = 1
+ ! multiply Ledd by this factor when computing super Eddington wind
+ ! e.g., if this is 2, then only get wind when L > 2*Ledd
+
+ use_other_wind = .true.
+ max_tries_for_implicit_wind = 10
+ !surf_avg_tau = 10
+ !eps_mdot_leak_frac_factor = 0d0 !1d0
+
+ mixing_length_alpha = 1.9
+ MLT_option = 'TDC'
+ include_mlt_corr_to_TDC = .false. ! true K. 1986 model, no mlt limiting
+ TDC_include_eturb_in_energy_equation = .true.
+ TDC_alpha_M = 0.25d0
+ TDC_alpha_M_use_explicit_mlt_vc_in_momentum_equation = .true.
+ use_superad_reduction = .false.
+ okay_to_reduce_gradT_excess = .false.
+
+ !set_rho_to_dm_div_dV = .false.
+
+ !include_mlt_Pturb_in_thermodynamic_gradients = .false.
+
+
+ ! artificial viscosity if necessary, v_flag only
+ use_Pvsc_art_visc = .true.
+ Pvsc_cq = 4.0d0 ! try 100d0 if shocks become an issue.
+ Pvsc_zsh = 0.1d0
+
+ max_num_merge_surface_cells = 30
+ P_function_weight = 0 ! must be set 0 if doing remesh, when using Pvsc, or risk resolving single zone art visc P.
+ !log_tau_function_weight = 40
+
+okay_to_remesh = .true.
+max_conv_vel_div_csound = 1d0
+max_conv_vel_div_csound_maxq = 1d0
+
+! controls for shock capturing, relaxed for pulsations
+ ! main purpose is to force radiative in shock face
+ max_abs_du_div_cs_for_convection = 1d1 !0.03d0
+ max_v_div_cs_for_convection = 1d2
+ max_v_for_convection = 1d4
+
+
+ use_Ledoux_criterion = .true.
+ alpha_semiconvection = 1d-3
+ thermohaline_coeff = 1d3
+
+ ! we only include a bit of exponential overshooting to smooth things out
+
+ mass_change = 1d-9!1d-9
+ accrete_same_as_surface = .false.
+ accretion_h1 = 0.7000 ! Estimate Nomoto 2007
+ accretion_h2 = 0
+ accretion_he3 = 0.292910D-04
+ accretion_he4 = 0.279971 ! Estimated Nomoto 2007
+ accretion_zfracs = 4 ! Lodders 03
+
+ min_timestep_limit = 1d-12
+
+ xa_function_species(1) = 'h1' ! name of nuclide as defined in chem_def
+ xa_function_weight(1) = 20
+ xa_function_param(1) = 1d-6
+ xa_function_species(2) = 'he4' ! name of nuclide as defined in chem_def
+ xa_function_weight(2) = 20
+ xa_function_param(2) = 1d-2
+
+ delta_lgL_H_limit = 0.1 ! limit for magnitude of change in lgL_H
+ lgL_H_burn_min = -0.5 ! ignore changes in lgL_H if value is less than this
+
+ delta_lgL_He_limit = 0.25 ! limit for magnitude of change in lgL_He
+ lgL_He_burn_min = 2.5 ! ignore changes in lgL_He if value is less than this
+
+ delta_lgRho_limit = 1 ! limit for magnitude of max change in log10 density at any point
+ delta_lgRho_hard_limit = -1
+
+ delta_lgRho_cntr_limit = 1d-2
+
+ delta_lgT_limit = 0.5
+ delta_lgL_limit = 0.1d0 !0.05
+ delta_lgTeff_limit = 0.10
+
+ delta_lgL_nuc_limit = 0.02
+ delta_lgL_nuc_hard_limit = 0.20
+ lgL_nuc_burn_min = -3d0
+
+ delta_lgR_limit = 1d-1
+ delta_lgR_limit_min_lgR = 1d-1
+
+ atm_option = 'T_tau'
+ atm_T_tau_relation = 'Eddington'
+ atm_T_tau_opacity = 'fixed'
+ Pextra_factor = 1.1d0 ! 4 * tau_factor
+ use_momentum_outer_BC = .true.
+
+ !varcontrol_target = 3d-4
+
+ max_q_for_conv_timescale = 0.999999999d0
+
+ mesh_delta_coeff = 1.0
+ max_allowed_nz = 20000
+
+ num_trace_history_values = 2
+ trace_history_value_name(1) = 'rel_E_err'
+ trace_history_value_name(2) = 'log_rel_run_E_err'
+
+ photo_interval = 100
+ profile_interval = 50
+ history_interval = 1
+ photo_digits = 8
+ terminal_interval = 1
+ write_header_frequency = 10
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+ ! Grid8_win_flag = .true.
+ ! Grid8_win_width = 7
+ ! Summary_Burn_xaxis_name = 'logxq'
+ ! Summary_Burn_xaxis_reversed = .true.
+ ! Summary_Burn_xmin = -14 ! -101d0 ! only used if /= -101d0
+ ! Summary_Burn_xmax = -3 ! -101d0 ! only used if /= -101d0
+ ! Abundance_xaxis_name = 'logxq'
+ ! Abundance_xaxis_reversed = .true.
+ ! Abundance_xmin = -14 ! -101d0 ! only used if /= -101d0
+ ! Abundance_xmax = -3 ! -101d0 ! only used if /= -101d0
+
+ ! Text_Summary1_name(5,2) = 'time_step_sec'
+ ! Text_Summary1_name(6,2) = 'max_tau_conv'
+ !Text_Summary1_name(7,2) = 'cz_bot_radius'
+ !Text_Summary1_name(8,2) = 'cz_top_radius'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/inlist_wd_nova_burst_header b/star/dev_cases_massive_stars/wd_nova_burst/inlist_wd_nova_burst_header
new file mode 100644
index 0000000000..7dd6091daa
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/inlist_wd_nova_burst_header
@@ -0,0 +1,42 @@
+
+&star_job
+
+ read_extra_star_job_inlist(1) = .true.
+ extra_star_job_inlist_name(1) = 'inlist_wd_nova_burst'
+
+/ ! end of star_job namelist
+
+
+&eos
+
+ read_extra_eos_inlist(1) = .true.
+ extra_eos_inlist_name(1) = 'inlist_wd_nova_burst'
+
+/ ! end of eos namelist
+
+
+&kap
+
+ read_extra_kap_inlist(1) = .true.
+ extra_kap_inlist_name(1) = 'inlist_wd_nova_burst'
+
+/ ! end of kap namelist
+
+
+&controls
+
+ read_extra_controls_inlist(2) = .true.
+ extra_controls_inlist_name(2) = 'inlist_wd_nova_burst'
+
+/ ! end of controls namelist
+
+
+&pgstar
+
+ read_extra_pgstar_inlist(1) = .true.
+ extra_pgstar_inlist_name(1) = 'inlist_pgstar'
+
+ read_extra_pgstar_inlist(2) = .true.
+ extra_pgstar_inlist_name(2) = 'inlist_wd_nova_burst'
+
+/ ! end of pgstar namelist
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/mk b/star/dev_cases_massive_stars/wd_nova_burst/mk
new file mode 100755
index 0000000000..d9eae582fa
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/mk
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+make
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/plot.py b/star/dev_cases_massive_stars/wd_nova_burst/plot.py
new file mode 100644
index 0000000000..a0bfd4b5c5
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/plot.py
@@ -0,0 +1,249 @@
+import matplotlib.pyplot as plt
+import numpy as np
+import os
+import mesa_reader as mr
+
+# if the directory plt_out/ does not exits, make it
+if not os.path.exists("plt_out"):
+ os.makedirs("plt_out")
+
+# "MESA" styles for plotting
+# note that this requires having a LaTeX installation locally.
+# If you don't have that, you can comment out the "text.usetex" line.
+plt.rcParams["figure.figsize"] = (3.38, 2.535)
+plt.rcParams["lines.markersize"] = 4
+plt.rcParams["lines.linewidth"] = 1.5
+plt.rcParams["text.usetex"] = True
+plt.rcParams["font.size"] = 10
+plt.rcParams["font.family"] = "serif"
+plt.rcParams["font.serif"] = "Computer Modern Roman"
+plt.rcParams["axes.titlesize"] = "medium"
+plt.rcParams["axes.labelsize"] = "medium"
+plt.rcParams["legend.fontsize"] = 8
+plt.rcParams["legend.frameon"] = False
+plt.rcParams["figure.dpi"] = 300
+
+plt.rcParams["xtick.direction"] = "in"
+plt.rcParams["ytick.direction"] = "in"
+plt.rcParams["xtick.top"] = True
+plt.rcParams["ytick.right"] = True
+plt.rcParams["xtick.minor.visible"] = True
+plt.rcParams["ytick.minor.visible"] = True
+
+plt.rcParams["savefig.bbox"] = "tight"
+plt.rcParams["savefig.pad_inches"] = 0.1
+plt.rcParams["savefig.dpi"] = 300
+plt.rcParams["savefig.format"] = "svg"
+
+plt.rcParams["axes.formatter.use_mathtext"] = True
+
+# read in the history data from MESA
+logs = mr.MesaLogDir("LOGS")
+h = logs.history
+p = logs.profile_data()
+
+# Create a figure
+fig = plt.figure(figsize=(10, 6))
+
+# Create a GridSpec with 6 rows and 3 columns
+gs_outer = fig.add_gridspec(1, 2, width_ratios=[1, 2])
+gs_left = gs_outer[0].subgridspec(2, 1, hspace=0.3)
+gs_right = gs_outer[1].subgridspec(3, 2, hspace=0, wspace=0.75)
+
+# First column: Two plots of roughly equal height
+ax1 = fig.add_subplot(gs_left[0])
+ax2 = fig.add_subplot(gs_left[1])
+
+# Second column: Three stacked axes sharing the same x-axis
+ax3 = fig.add_subplot(gs_right[0, 0])
+ax4 = fig.add_subplot(gs_right[1, 0])
+ax5 = fig.add_subplot(gs_right[2, 0])
+
+# Third column: Three stacked axes sharing a different x-axis
+ax6 = fig.add_subplot(gs_right[0, 1])
+ax7 = fig.add_subplot(gs_right[1, 1])
+ax8 = fig.add_subplot(gs_right[2, 1])
+
+# HR diagram
+ax1.loglog(h.Teff, h.L)
+ax1.set_xlabel(r"Effective Temperature [K]")
+ax1.set_ylabel(r"Luminosity [$L_{\odot}$]")
+ax1.invert_xaxis()
+# add marker to last point
+ax1.plot(h.Teff[-1], h.L[-1], "o", color="C3")
+
+# T-Rho Profile
+# load data from MESA_DIR and save to arrays in T-Rho space
+plot_info_dir = os.path.join(os.environ["MESA_DIR"], "data/star_data/plot_info")
+
+# degeneracy data
+psi4_file = os.path.join(plot_info_dir, "psi4.data")
+psi4_data = np.genfromtxt(psi4_file)
+psi4_xs = 10 ** np.array(psi4_data.T[0])
+psi4_ys = 10 ** np.array(psi4_data.T[1])
+
+# hydrogen burn line
+hydrogen_burn_file = os.path.join(plot_info_dir, "hydrogen_burn.data")
+hydrogen_burn_data = np.genfromtxt(hydrogen_burn_file)
+hydrogen_burn_xs = 10 ** np.array(hydrogen_burn_data.T[0])
+hydrogen_burn_ys = 10 ** np.array(hydrogen_burn_data.T[1])
+
+# helium burn line
+helium_burn_file = os.path.join(plot_info_dir, "helium_burn.data")
+helium_burn_data = np.genfromtxt(helium_burn_file)
+helium_burn_xs = 10 ** np.array(helium_burn_data.T[0])
+helium_burn_ys = 10 ** np.array(helium_burn_data.T[1])
+
+# plot raw T-Rho data; sets limits for us
+ax2.loglog(p.Rho, p.T)
+
+# plot psi4 and hydrogen burn lines
+# preserve limits... shouldn't have to do it like this, but
+# autoscale commands always seem to fail
+x_left, x_right = ax2.get_xlim()
+y_bottom, y_top = ax2.get_ylim()
+ax2.plot(psi4_xs, psi4_ys, color="lightgrey", ls=":", zorder=-5)
+ax2.plot(hydrogen_burn_xs, hydrogen_burn_ys, ls="--", color="lightgrey", zorder=-5)
+ax2.plot(helium_burn_xs, helium_burn_ys, ls="--", color="lightgrey", zorder=-5)
+ax2.set_xlim(x_left, x_right)
+ax2.set_ylim(y_bottom, y_top)
+ax2.set_xlabel(r"Density [g/cm$^3$]")
+ax2.set_ylabel(r"Temperature [K]")
+
+# plot strong burning zones
+high_burning = np.where(p.eps_nuc > 1e7, True, False)
+mid_burning = np.where((p.eps_nuc > 1e3) & (p.eps_nuc < 1e7), True, False)
+low_burning = np.where((p.eps_nuc > 1) & (p.eps_nuc < 1e3), True, False)
+# temporarily set cap style to round
+save_capstyle = plt.rcParams["lines.solid_capstyle"]
+plt.rcParams["lines.solid_capstyle"] = "round"
+ax2.plot(
+ p.Rho[high_burning],
+ p.T[high_burning],
+ marker="o",
+ ls="",
+ ms=6,
+ color="C3",
+ zorder=-1,
+)
+ax2.plot(
+ [],
+ [],
+ lw=6,
+ color="C3",
+ label=r"$\epsilon_{\mathrm{nuc}} > 10^7\,\mathrm{erg/g/s}$",
+)
+ax2.plot(
+ p.Rho[mid_burning],
+ p.T[mid_burning],
+ marker="o",
+ ls="",
+ ms=4.5,
+ color="C1",
+ zorder=-2,
+)
+ax2.plot(
+ [],
+ [],
+ color="C1",
+ lw=4.5,
+ label=r"$\epsilon_{\mathrm{nuc}} > 10^3\,\mathrm{erg/g/s}$",
+)
+ax2.plot(
+ p.Rho[low_burning],
+ p.T[low_burning],
+ marker="o",
+ ls="",
+ ms=3,
+ color="goldenrod",
+ zorder=-3,
+)
+ax2.plot(
+ [],
+ [],
+ color="goldenrod",
+ lw=3,
+ label=r"$\epsilon_{\mathrm{nuc}} > 1\,\mathrm{erg/g/s}$",
+)
+ax2.legend(loc="lower right")
+# restore capstyle
+plt.rcParams["lines.solid_capstyle"] = save_capstyle
+
+# time series for last 5 years
+window = 5
+
+# top panel: photospheric and H-burning luminosities
+mask = h.star_age > (max(h.star_age) - window)
+ax3.set_title("Last 5 Years")
+ax3.semilogy(h.star_age[mask], h.L[mask], label=r"$L$")
+ax3.semilogy(h.star_age[mask], h.LH[mask], ls="--", label=r"$L_{\mathrm{H}}$")
+ax3.set_ylabel(r"Luminosity [$L_{\odot}$]")
+ax3.legend(loc="upper left")
+ax3.set_xticklabels([])
+
+# temperature and radius
+ax4.semilogy(h.star_age[mask], h.Teff[mask], label=r"$T_{\mathrm{eff}}$")
+ax4.semilogy([], [], label=r"$R$", ls="--", color="C1")
+ax4.legend(loc="upper left")
+ax4b = ax4.twinx()
+ax4b.semilogy(h.star_age[mask], h.R[mask], ls="--", color="C1")
+ax4.set_ylabel(r"Eff. Temp. [K]", color="C0")
+ax4b.set_ylabel(r"Radius [$R_{\odot}$]", color="C1")
+ax4.set_xticklabels([])
+
+# mass loss and envelope mass
+ax5.semilogy(
+ h.star_age[mask],
+ h.star_mass[mask] - h.he_core_mass[mask],
+ label=r"$\Delta M_{\mathrm{H}}$",
+)
+ax5.semilogy([], [], ls="--", label=r"$|\dot{M}|$")
+ax5.legend(loc="center left")
+ax5.set_ylabel(r"Envelope Mass [$M_{\odot}$]", color="C0")
+ax5b = ax5.twinx()
+ax5b.semilogy(h.star_age[mask], h.abs_mdot[mask], ls="--", color="C1")
+ax5b.set_ylabel(r"$\left\vert\dot{M}\right\vert$ [$M_{\odot}$/yr]", color="C1")
+
+ax5.set_xlabel(r"Star Age [yr]")
+
+# profile at the end of the simulation
+# first up, common isotope mass fractions
+xm = p.star_mass - p.mass
+for iso in ["h1", "he4", "c12", "n14", "o16"]:
+ element = "".join([i for i in iso if not i.isdigit()]).capitalize()
+ mass_number = "".join([i for i in iso if i.isdigit()])
+ tex_iso = r"${}^{" + mass_number + r"}$" + element
+ ax6.loglog(xm, p.data(iso), label=tex_iso)
+
+ax6.set_title("Final Profile")
+ax6.set_ylim(4e-5, 1.5)
+ax6.legend(loc="lower left")
+ax6.set_ylabel(r"Mass Fraction")
+ax6.set_xticklabels([])
+
+# nuclear energy generation rates
+ax7.loglog(xm, p.eps_nuc, label=r"$\epsilon_{\mathrm{nuc}}$")
+ax7.loglog(xm, p.pp, ls="--", label=r"$\epsilon_{\mathrm{pp}}$")
+ax7.loglog(xm, p.cno, ls=":", label=r"$\epsilon_{\mathrm{CNO}}$")
+ax7.legend(loc="upper right")
+ax7.set_ylabel(r"Specific Power [erg/g/s]")
+ax7.set_xticklabels([])
+ax7.set_ylim(1e-6, 1e10)
+
+# basic thermodynamic quantities
+ax8.loglog(xm, p.Rho, label="$\\rho$")
+ax8.loglog([], [], ls="--", label="$T$")
+ax8.set_ylim(2e-3, 2e6)
+ax8.set_ylabel(r"Density [g/cm$^3$]", color="C0")
+ax8b = ax8.twinx()
+ax8b.loglog(xm, p.T, ls="--", color="C1")
+ax8b.set_ylim(2e6, 1.25e8)
+ax8b.set_ylabel(r"Temperature [K]", color="C1")
+ax8.legend(loc="upper right")
+
+for ax in [ax6, ax7, ax8]:
+ ax.set_xlim(8e-4, 1e-10)
+ax8.set_xlabel(r"Exterior Mass Coordinate [M$_{\odot}$]")
+
+
+fig.savefig("plt_out/wd_nova_burst_grid.svg")
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/profile_columns.list b/star/dev_cases_massive_stars/wd_nova_burst/profile_columns.list
new file mode 100644
index 0000000000..dbd1dda574
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/profile_columns.list
@@ -0,0 +1,963 @@
+! profile_columns.list -- determines the contents of star model profiles
+! you can use a non-standard version by setting profile_columns_file in your inlist
+
+! units are cgs unless otherwise noted.
+
+! reorder the following names as desired to reorder columns.
+! comment out the name to omit a column (fewer columns => less IO => faster running).
+! remove '!' to restore a column.
+
+! if you have a situation where you want a non-standard set of columns,
+! make a copy of this file, edit as desired, and give the new filename in your inlist
+! as profile_columns_file. if you are just adding columns, you can 'include' this file,
+! and just list the additions in your file. note: to include the standard default
+! version, use include '' -- the 0 length string means include the default file.
+
+! if you need to have something added to the list of options, let me know....
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described at the end of this file.
+
+
+! note: you can include another list by doing
+! include 'filename'
+! include '' means include the default standard list file
+
+
+! the following lines of the profile contain info for 1 zone per row, surface to center.
+
+! minimal set of enabled columns:
+
+ zone ! numbers start with 1 at the surface
+ mass ! m/Msun. mass coordinate of outer boundary of cell.
+ logR ! log10(radius/Rsun) at outer boundary of zone
+ logT ! log10(temperature) at center of zone
+ logRho ! log10(density) at center of zone
+ logP ! log10(pressure) at center of zone
+ x_mass_fraction_H
+ y_mass_fraction_He
+ z_mass_fraction_metals
+
+ Frad_div_cUrad ! Frad/(C*Urad), must be < 1 to not violate c.
+ flux_limit_lambda
+ flux_limit_R ! everything below this line is deactivated
+
+
+!# Structure
+ !logM ! log10(m/Msun)
+ !log_mass
+ !dm ! cell mass (grams)
+ !dm_bar ! boundary mass (grams) average of adjacent dm's
+ logdq ! log10(dq)
+ !log_dq
+ dq_ratio ! dq(k-1)/dq(k)
+ q ! fraction of star mass interior to outer boundary of this zone
+ !log_q ! log10(q)
+ !xq
+
+ !grav ! gravitational acceleration (cm sec^2)
+ !log_g ! log10 gravitational acceleration (cm sec^2)
+ !g_div_r ! grav/radius (sec^2)
+ !r_div_g ! radius/grav (sec^-2)
+ !cgrav_factor ! = cgrav(k)/standard_cgrav
+ !vel_km_per_s ! velocity at outer boundary of zone (km/s) -- 0 if no velocity variable
+
+ radius ! radius at outer boundary of zone (in Rsun units)
+ !radius_cm ! radius at outer boundary of zone (in centimeters)
+ !radius_km ! radius at outer boundary of zone (in kilometers)
+ !logR_cm ! log10 radius at outer boundary of zone (in centimeters)
+ !rmid ! radius at center by mass of zone (in Rsun units)
+ !r_div_R ! fraction of total radius
+
+ velocity ! velocity at outer boundary of zone (cm/s) -- 0 if no velocity variable
+ v_div_r ! velocity divided by radius
+ !v_times_t_div_r
+ !rho_times_r3 ! at face
+ !log_rho_times_r3 ! at face
+ !scale_height ! in Rsun units
+ pressure_scale_height ! in Rsun units
+
+ !m_div_r ! gm/cm
+ !dmbar_m_div_r
+ !log_dmbar_m_div_r
+ !mass_grams ! mass coordinate of outer boundary of cell in grams
+ mmid ! mass at midpoint of cell (average of mass coords of the cell boundaries) Msun units.
+
+ !m_grav ! total enclosed gravitational mass. Msun units.
+ !m_grav_div_m_baryonic ! mass_gravitational/mass at cell boundary
+ !mass_correction_factor ! dm_gravitational/dm (dm is baryonic mass of cell)
+
+ !xm ! mass exterior to point (Msun units)
+ !dq ! mass of zone as a fraction of total star mass
+ logxq ! log10(1-q)
+ !logxm ! log10(xm)
+
+ !xr ! radial distance from point to surface (Rsun)
+ !xr_cm ! radial distance from point to surface (cm)
+ !xr_div_R ! radial distance from point to surface in units of star radius
+ !log_xr ! log10 radial distance from point to surface (Rsun)
+ !log_xr_cm ! log10 radial distance from point to surface (cm)
+ !log_xr_div_R ! log10 radial distance from point to surface in units of star radius
+
+ !dr ! r(outer edge) - r(inner edge); radial extent of cell in cm.
+ !log_dr ! log10 cell width (cm)
+ !dv ! v(inner edge) - v(outer edge); rate at which delta_r is shrinking (cm/sec).
+
+ !dt_dv_div_dr ! dt*dv/dr; need to have this << 1 for every cell
+ !dr_div_R ! cell width divided by star R
+ !log_dr_div_R ! log10 cell width divided by star R
+ !dr_div_rmid ! cell width divided by rmid
+ !log_dr_div_rmid ! log(dr_div_rmid)
+
+ !dr_div_cs ! cell sound crossing time (sec)
+ !log_dr_div_cs ! log10 cell sound crossing time (sec)
+ !dr_div_cs_yr ! cell sound crossing time (years)
+ !log_dr_div_cs_yr ! log10 cell sound crossing time (years)
+
+ !acoustic_radius ! sound time from center to outer cell boundary (sec)
+ !log_acoustic_radius ! log10(acoustic_radius) (sec)
+ !acoustic_depth ! sound time from surface to outer cell boundary (sec)
+ !log_acoustic_depth ! log10(acoustic_depth) (sec)
+ !acoustic_r_div_R_phot
+
+ !cell_collapse_time ! only set if doing explicit hydro
+ ! time (seconds) for cell inner edge to catch cell outer edge at current velocities
+ ! 0 if distance between inner and outer is increasing
+ !log_cell_collapse_time ! log of cell_collapse_time
+
+ !compression_gradient
+
+
+
+!# Thermodynamics
+ temperature ! temperature at center of zone
+ !logT_face ! log10(temperature) at outer boundary of zone
+ !logT_bb ! log10(black body temperature) at outer boundary of zone
+ !logT_face_div_logT_bb
+
+ !energy ! internal energy (ergs/g)
+ !logE ! log10(specific internal energy) at center of zone
+ !rho ! density
+ !density ! rho
+
+ entropy ! specific entropy divided by (avo*kerg)
+ !logS ! log10(specific entropy)
+ !logS_per_baryon ! log10(specific entropy per baryon / kerg)
+
+ pressure ! total pressure at center of zone (pgas + prad)
+ !prad ! radiation pressure at center of zone
+ !pgas ! gas pressure at center of zone (electrons and ions)
+ logPgas ! log10(pgas)
+ pgas_div_ptotal ! pgas/pressure
+
+ eta ! electron degeneracy parameter (eta >> 1 for significant degeneracy)
+ mu ! mean molecular weight per gas particle (ions + free electrons)
+
+ grada ! dlnT_dlnP at constant S
+ !dE_dRho ! at constant T
+ !cv ! specific heat at constant volume
+ !cp ! specific heat at constant total pressure
+
+ !log_CpT
+ !gamma1 ! dlnP_dlnRho at constant S
+ !gamma3 ! gamma3 - 1 = dlnT_dlnRho at constant S
+ !gam ! plasma interaction parameter (> 160 or so means starting crystallization)
+ free_e ! free_e is mean number of free electrons per nucleon
+ !logfree_e ! log10(free_e), free_e is mean number of free electrons per nucleon
+ !chiRho ! dlnP_dlnRho at constant T
+ !chiT ! dlnP_dlnT at constant Rho
+
+ csound ! sound speed
+ !log_csound
+ !csound_face ! sound speed (was previously called csound_at_face)
+ !cs_at_cell_bdy ! sound speed at cell boundary (csound is at cell center)
+ !v_div_cs ! velocity divided by sound speed
+ v_div_csound ! velocity divided by sound speed
+ !div_v
+
+ !thermal_time_to_surface ! in seconds
+ !log_thermal_time_to_surface
+ !t_rad
+ !log_t_rad
+ !log_t_sound
+ !log_t_thermal
+
+ !eos_phase
+ !eos_frac_OPAL_SCVH
+ !eos_frac_HELM
+ !eos_frac_Skye
+ !eos_frac_PC
+ !eos_frac_FreeEOS
+ !eos_frac_CMS
+ !eos_frac_ideal
+
+ !pgas_div_p
+ !prad_div_pgas
+ !prad_div_pgas_div_L_div_Ledd
+ !pressure_scale_height_cm
+
+ !eps_grav_composition_term
+ eps_grav_plus_eps_mdot
+
+ !chiRho_for_partials
+ !chiT_for_partials
+ !rel_diff_chiRho_for_partials
+ !rel_diff_chiT_for_partials
+
+ !latent_ddlnRho
+ !latent_ddlnT
+
+ !log_P_face
+ !log_Ptrb
+ !log_cp_T_div_t_sound
+
+ !QQ
+
+
+!# Mass accretion
+ eps_grav ! -T*ds/dt (negative for expansion)
+ !log_abs_eps_grav_dm_div_L
+ !log_abs_v ! log10(abs(velocity)) (cm/s)
+ !log_mdot_cs
+ !log_mdot_v
+ eps_mdot
+ !env_eps_grav
+ !xm_div_delta_m
+ !log_xm_div_delta_m
+
+
+!# Nuclear energy generation
+ !signed_log_eps_grav ! sign(eps_grav)*log10(max(1,abs(eps_grav)))
+ !signed_log_eps_nuc
+ !net_nuclear_energy ! erg/gm/s from nuclear reactions minus all neutrino losses
+ ! The value plotted is net_nuclear_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy minus all neutrino losses.
+ !net_energy ! net_energy + eps_grav.
+ ! The value plotted is net_energy = sign(val)*log10(max(1,abs(val)))
+ ! where val = net nuclear energy plus eps_grav minus all neutrino losses.
+ !eps_nuc_plus_nuc_neu
+ !eps_nuc_minus_non_nuc_neu
+ !eps_nuc_start
+
+ eps_nuc ! ergs/g/sec from nuclear reactions (including losses to reaction neutrinos)
+ !log_abs_eps_nuc
+ !d_lnepsnuc_dlnd
+ !d_epsnuc_dlnd
+ !deps_dlnd_face
+ ! (was previously called deps_dlnd_at_face)
+ !d_lnepsnuc_dlnT
+ !d_epsnuc_dlnT
+ !deps_dlnT_face
+ ! (was previously called deps_dlnT_at_face)
+ !eps_nuc_neu_total ! erg/gm/sec as neutrinos from nuclear reactions
+
+ non_nuc_neu ! non-nuclear-reaction neutrino losses
+ !nonnucneu_plas ! plasmon neutrinos (for collective reactions like gamma_plasmon => nu_e + nubar_e)
+ !nonnucneu_brem ! bremsstrahlung (for reactions like e- + (z,a) => e- + (z,a) + nu + nubar)
+ !nonnucneu_phot ! photon neutrinos (for reactions like e- + gamma => e- + nu_e + nubar_e)
+ !nonnucneu_pair ! pair production (for reactions like e+ + e- => nu_e + nubar_e)
+ !nonnucneu_reco ! recombination neutrinos (for reactions like e- (continuum) => e- (bound) + nu_e + nubar_e)
+
+ ! ergs/g/sec for reaction categories
+ add_reaction_categories ! this adds all the reaction categories
+ ! NOTE: you can list specific categories by giving their names (from chem_def)
+ pp
+ cno
+ tri_alpha
+ !c_alpha
+ !n_alpha
+ !o_alpha
+ !ne_alpha
+ !na_alpha
+ !mg_alpha
+ !si_alpha
+ !s_alpha
+ !ar_alpha
+ !ca_alpha
+ !ti_alpha
+ !fe_co_ni
+ !c12_c12
+ !c12_o16
+ !o16_o16
+ !photo
+ !pnhe4
+ !other
+
+ ! adds columns for all of the reactions that are in the current net
+ ! Note that if using op_split_burn=.true. then zones which have been split will report 0 for their rates
+ !add_raw_rates ! raw reaction rates, reactions/second
+ !add_screened_rates ! screened reaction rates reactions/second
+ !add_eps_nuc_rates ! Nuclear energy (minus neutrino losses) released erg/s
+ !add_eps_neu_rates ! Neutrino losses erg/s
+
+ ! individual reactions (as many as desired)
+ ! use list_net_reactions = .true. in star_job to list all reactions in the current net
+ ! reactions/second
+ !raw_rate r_h1_h1_ec_h2
+ !raw_rate r_h1_h1_wk_h2
+
+ !burn_num_iters ! Number of split_burn iterations taken
+ !burn_avg_epsnuc
+ !log_burn_avg_epsnuc
+
+!# Composition
+ !x_mass_fraction_H
+ !y_mass_fraction_He
+ !z_mass_fraction_metals
+ abar ! average atomic weight (g/mole)
+ zbar ! average charge
+ !z2bar ! average charge^2
+ ye ! average charge per baryon = proton fraction
+
+ !x ! hydrogen mass fraction
+ !log_x
+ !y ! helium mass fraction
+ !log_y
+ !z ! metallicity
+ !log_z ! metallicity
+
+ add_abundances ! this adds all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !h1
+ !he3
+ !he4
+ !c12
+ !n14
+ !o16
+
+ !add_log_abundances ! this adds log10 of all of the isos that are in the current net
+ ! NOTE: you can list specific isotopes by giving their names (from chem_def)
+ !log h1
+ !log he3
+ !log he4
+ !log c12
+ !log n14
+ !log o16
+
+ ! log concentration of species
+ ! concentration = number density / number density of electrons
+ ! Ci = (Xi/Ai) / sum(Zi*Xi/Ai) [see Thoul et al, ApJ 421:828-842, 1994]
+ !log_concentration h1
+ !log_concentration he4
+
+
+ ! typical charge for given species
+ ! (used by diffusion)
+ !typical_charge he4
+ !typical_charge c12
+ !typical_charge fe52
+
+ ! ionization state for given species
+ ! (same as typical charge, except that it's unsmoothed)
+ !ionization he4
+ !ionization c12
+ !ionization fe52
+
+ !cno_div_z ! abundance of c12, n14, and o16 as a fraction of total z
+
+
+
+
+!# Opacity
+ !opacity ! opacity measured at center of zone
+ log_opacity ! log10(opacity)
+ !dkap_dlnrho_face ! partial derivative of opacity wrt. ln rho (at T=const) at outer edge of cell
+ ! (was previously called dkap_dlnrho_at_face)
+ !dkap_dlnT_face ! partial derivative of opacity wrt. ln T (at rho=const) at outer edge of cell
+ ! (was previously called dkap_dlnT_at_face)
+ !kap_frac_lowT ! fraction of opacity from lowT tables
+ !kap_frac_highT ! fraction of opacity from highT tables
+ !kap_frac_Type2 ! fraction of opacity from Type2 tables
+ !kap_frac_Compton ! fraction of opacity from Compton_Opacity
+ !kap_frac_op_mono ! fraction of opacity from OP mono
+
+ !log_kap
+ !log_kap_times_factor
+
+ !log_c_div_tau
+ !xtau
+ !xlogtau
+ !logtau_sub_xlogtau
+
+!# Luminosity
+ luminosity ! luminosity at outer boundary of zone (in Lsun units)
+ logL ! log10(max(1d-2,L/Lsun))
+ !log_Lrad
+ !log_Ledd ! log10(Leddington/Lsun) -- local Ledd, 4 pi clight G m / kap
+ !log_L_div_Ledd ! log10(max(1d-12,L/Leddington))
+ !log_Lrad_div_Ledd
+ !log_Lrad_div_L
+ !signed_log_power ! sign(L)*log10(max(1,abs(L)))
+
+ !lum_adv
+ !lum_conv
+ !lum_conv_MLT
+ !lum_div_Ledd
+ !lum_erg_s
+ !lum_plus_lum_adv
+ !lum_rad
+
+ !log_L_div_CpTMdot
+ !log_abs_lum_erg_s
+
+ !L
+ !Lc
+ !Lc_div_L
+ !Lr
+ !Lr_div_L
+ !Lt
+ !Lt_div_L
+
+!# Energetics
+ !total_energy ! specific total energy of cell (ergs/g). internal+potential+kinetic+rotation.
+ !cell_specific_IE
+ !cell_specific_KE
+ !cell_IE_div_IE_plus_KE
+ !cell_KE_div_IE_plus_KE
+
+ !cell_ie_div_star_ie
+ !cell_internal_energy_fraction
+ !cell_internal_energy_fraction_start
+ !cell_specific_PE
+
+ !log_cell_ie_div_star_ie
+ !log_cell_specific_IE
+
+ ergs_eps_grav_plus_eps_mdot
+ ergs_error
+ !ergs_error_integral
+ ergs_mdot
+ !ergs_rel_error_integral
+ !dm_eps_grav
+
+ !dE
+
+ !etrb
+ !log_etrb
+ !extra_grav
+ !log_rel_E_err
+
+ !total_energy_sign
+
+!# Convection
+ mlt_mixing_length ! mixing length for mlt (cm)
+ !mlt_mixing_type ! value returned by mlt
+ !mlt_Pturb
+ !alpha_mlt
+
+ !conv_vel ! convection velocity (cm/sec)
+ log_conv_vel ! log10 convection velocity (cm/sec)
+
+ !conv_L_div_L
+ !log_conv_L_div_L
+ !lum_conv_div_lum_rad
+ !lum_rad_div_L_Edd
+ !lum_conv_div_lum_Edd
+ !lum_conv_div_L
+ !lum_rad_div_L
+ !lum_rad_div_L_Edd_sub_fourPrad_div_PchiT ! density increases outward if this is > 0
+ ! see Joss, Salpeter, and Ostriker, "Critical Luminosity", ApJ 181:429-438, 1973.
+
+ gradT ! mlt value for required temperature gradient dlnT/dlnP
+
+ gradr ! dlnT/dlnP required for purely radiative transport
+ !grad_temperature ! smoothed dlnT/dlnP at cell boundary
+ !grad_density ! smoothed dlnRho/dlnP at cell boundary
+
+ !gradL ! gradient for Ledoux criterion for convection
+ !sch_stable ! 1 if grada > gradr, 0 otherwise
+ !ledoux_stable ! 1 if gradL > gradr, 0 otherwise
+
+ !grada_sub_gradT
+ !gradT_sub_grada ! gradT-grada at cell boundary
+ !gradT_div_grada ! gradT/grada at cell boundary
+
+ !gradr_sub_gradT
+ !gradT_sub_gradr ! gradT-gradr at cell boundary
+ !gradT_div_gradr ! gradT/gradr at cell boundary
+
+ !log_gradT_div_gradr ! log10 gradT/gradr at cell boundary
+ !log_mlt_Gamma ! convective efficiency
+ conv_vel_div_csound ! convection velocity divided by sound speed
+ !conv_vel_div_L_vel ! L_vel is velocity needed to carry L by convection; L = 4*pi*r^2*rho*vel**3
+ log_mlt_D_mix ! log10 diffusion coefficient for mixing from mlt (cm^2/sec)
+
+ !gradr_div_grada ! gradr/grada_face; > 1 => Schwarzschild unstable for convection
+ gradr_sub_grada ! gradr - grada_face; > 0 => Schwarzschild unstable for convection
+
+ !gradL_sub_gradr
+ !gradP_div_rho
+ !gradT_excess_effect
+ !gradT_rel_err
+ !gradT_sub_a
+ !grada_face
+ !grada_sub_gradr
+ !diff_grads
+ !log_diff_grads
+
+ !mlt_D
+ !mlt_Gamma
+ !mlt_Y_face
+ !mlt_Zeta
+ !mlt_gradT
+ !mlt_log_abs_Y
+ !mlt_vc
+ !log_mlt_vc
+ !dvc_dt_TDC_div_g
+
+ !superad_reduction_factor
+ !conv_vel_div_mlt_vc
+
+ !log_Lconv
+ !log_Lconv_div_L
+
+!# Mixing
+ !mixing_type ! mixing types are defined in mesa/const/public/const_def
+ log_D_mix ! log10 diffusion coefficient for mixing in units of cm^2/second (Eulerian)
+ !log_D_mix_non_rotation
+ !log_D_mix_rotation
+
+ !log_D_conv ! D_mix for regions where mix_type = convective_mixing
+ !log_D_leftover ! D_mix for regions where mix_type = leftover_convective_mixing
+ !log_D_semi ! D_mix for regions where mix_type = semiconvective_mixing
+ !log_D_ovr ! D_mix for regions where mix_type = overshoot_mixing
+ !log_D_thrm ! D_mix for regions where mix_type = thermohaline_mixing
+ !log_D_minimum ! D_mix for regions where mix_type = minimum_mixing
+ !log_D_rayleigh_taylor ! D_mix for regions where mix_type = rayleigh_taylor_mixing
+ !log_D_anon ! D_mix for regions where mix_type = anonymous_mixing
+ !log_D_omega
+
+ !log_sig_mix ! sig(k) is mixing flow across face k in (gm sec^1)
+ ! sig(k) = D_mix*(4*pi*r(k)**2*rho_face)**2/dmavg
+
+ !dominant_isoA_for_thermohaline
+ !dominant_isoZ_for_thermohaline
+ !gradL_composition_term
+
+ mix_type
+
+
+
+!# Optical Depth
+ tau ! optical depth
+ !log_column_depth ! log10 column depth, exterior mass / area (g cm^-2)
+ !log_radial_depth ! log10 radial distance to surface (cm)
+ logtau ! log10(optical depth) at cell face
+ !tau_eff ! tau that gives the local P == P_atm if this location at surface
+ ! tau_eff = kap*(P/g - Pextra_factor*(L/M)/(6*pi*clight*cgrav))
+ !tau_eff_div_tau
+
+
+
+!# Rotation
+ !omega ! angular velocity = j_rot/i_rot
+ !log_omega
+ !log_j_rot
+ !log_J_div_M53 ! J is j*1e-15 integrated from center; M53 is m^(5/3)
+ !log_J_inside ! J_inside is j_rot integrated from center
+ !shear ! -dlnomega/dlnR
+ !log_abs_shear ! log10(abs(dlnomega/dlnR))
+ !richardson_number
+ !i_rot ! specific moment of inertia at cell boundary
+ !j_rot ! specific angular momentum at cell boundary
+ !v_rot ! rotation velocity at cell boundary (km/sec)
+ !w_div_w_crit_roche !ratio of rotational velocity to keplerian at the equator
+ !without the contribution from the Eddington factor
+ !fp_rot ! rotation factor for pressure
+ !ft_rot ! rotation factor for temperature
+ !ft_rot_div_fp_rot ! gradr factor
+
+ !log_am_nu_non_rot ! log10(am_nu_non_rot)
+ !log_am_nu_rot ! log10(am_nu_rot)
+ !log_am_nu ! log10(am_nu_non_rot + am_nu_rot)
+
+ !r_polar ! (Rsun)
+ !log_r_polar ! log10 (Rsun)
+ !r_equatorial ! (Rsun)
+ !log_r_equatorial ! log10 (Rsun)
+ !r_e_div_r_p ! equatorial/r_polar
+ !omega_crit ! breakup angular velocity = sqrt(G M / equatorial^3)
+ !omega_div_omega_crit
+
+ !am_log_nu_omega ! for diffusion of omega
+ !am_log_nu_j ! for diffusion of angular momentum
+
+ !am_log_nu_rot ! diffusion of angular momentum driven by rotation
+ !am_log_nu_non_rot ! diffusion driven by other sources, e.g. convection
+
+ !am_log_sig_omega ! for diffusion of omega
+ !am_log_sig_j ! for diffusion of angular momentum
+ !am_log_sig ! == am_log_sig_omega
+
+ !am_log_D_visc ! diffusion coeff for kinematic viscosity
+ !am_log_D_DSI ! diffusion coeff for dynamical shear instability
+ !am_log_D_SH ! diffusion coeff for Solberg-Hoiland instability
+ !am_log_D_SSI ! diffusion coeff for secular shear instability
+ !am_log_D_ES ! diffusion coeff for Eddington-Sweet circulation
+ !am_log_D_GSF ! diffusion coeff for Goldreich-Schubert-Fricke instability
+ !am_log_D_ST ! Spruit dynamo mixing diffusivity
+ !am_log_nu_ST ! Spruit dynamo effective viscosity
+
+ !dynamo_log_B_r ! (Gauss)
+ !dynamo_log_B_phi ! (Gauss)
+
+ !am_domega_dlnR
+ !log_abs_dlnR_domega
+
+ !w_div_w_crit_roche2
+
+
+!# Diffusion
+ ! electric field from element diffusion calculation
+ !e_field
+ !log_e_field
+
+ ! gravitational field from element diffusion calculation
+ !g_field_element_diffusion
+ !log_g_field_element_diffusion
+
+ !eE_div_mg_element_diffusion
+ !log_eE_div_mg_element_diffusion
+
+ ! element diffusion velocity for species
+ !edv h1
+ !edv he4
+ !edv o16
+
+ ! Energy generated by Ne22 sedimentation.
+ !eps_WD_sedimentation
+ !log_eps_WD_sedimentation
+
+ !eps_diffusion
+ !log_eps_diffusion
+
+ !diffusion_D h1 ! self diffusion coeff
+ !diffusion_dX h1 ! change in h1 mass fraction from diffusion
+ !diffusion_dX he4 ! change in he4 mass fraction from diffusion
+ !diffusion_dX n20 ! change in n20 mass fraction from diffusion
+
+ !v_rad h1 ! velocity from radiative levitation
+ !v_rad he4 ! velocity from radiative levitation
+ !v_rad ne20 ! velocity from radiative levitation
+
+ !log_g_rad h1 ! log10 acceleration from radiative levitation
+ !log_g_rad he4 ! log10 acceleration from radiative levitation
+ !log_g_rad ne20 ! log10 acceleration from radiative levitation
+
+!# Phase Separation
+ !eps_phase_separation
+
+!# Oscillations
+ !brunt_N2 ! brunt-vaisala frequency squared
+ !brunt_N2_structure_term
+ !brunt_N2_composition_term
+ !log_brunt_N2_structure_term
+ !log_brunt_N2_composition_term
+ !brunt_A ! = N^2*r/g
+ !brunt_A_div_x2 ! x = r(k)/r(1)
+ !brunt_N2_dimensionless ! N2 in units of 3GM/R^3
+ !brunt_N_dimensionless ! N in units of sqrt(3GM/R^3)
+ !brunt_frequency ! cycles per day
+ !brunt_N ! sqrt(abs(brunt_N2))
+ !log_brunt_N ! log10(brunt_N)
+ !log_brunt_N2 ! log10(brunt_N2)
+ !log_brunt_N2_dimensionless ! log10(brunt_N2_dimensionless)
+
+ !brunt_B ! smoothed numerical difference
+ !brunt_nonB ! = grada - gradT
+ !log_brunt_B ! smoothed numerical difference
+ !log_brunt_nonB ! = grada - gradT
+
+ !sign_brunt_N2 ! sign of brunt_N2 (+1 for Ledoux stable; -1 for Ledoux unstable)
+ !brunt_nu ! brunt_frequency in microHz
+ !log_brunt_nu ! brunt_frequency in microHz
+
+ !lamb_S ! lamb frequency for l=1: S = sqrt(2)*csound/r (rad/s)
+ !lamb_S2 ! squared lamb frequency for l=1: S2 = 2*(csound/r)^2 (rad^2/s^2)
+
+ !lamb_Sl1 ! lamb frequency for l=1; = sqrt(2)*csound/r (microHz)
+ !lamb_Sl2 ! lamb frequency for l=2; = sqrt(6)*csound/r (microHz)
+ !lamb_Sl3 ! lamb frequency for l=3; = sqrt(12)*csound/r (microHz)
+ !lamb_Sl10 ! lamb frequency for l=10; = sqrt(110)*csound/r (microHz)
+
+ !log_lamb_Sl1 ! log10(lamb_Sl1)
+ !log_lamb_Sl2 ! log10(lamb_Sl2)
+ !log_lamb_Sl3 ! log10(lamb_Sl3)
+ !log_lamb_Sl10 ! log10(lamb_Sl10)
+
+ !brunt_N_div_r_integral ! integral from center of N*dr/r
+ !k_r_integral ! integral from center of k_r*dr
+ !brunt_N2_sub_omega2
+ !sl2_sub_omega2
+
+
+!# RSP
+
+ !rsp_Chi ! dlnP_dlnRho
+ !rsp_Et ! Specific turbulent energy
+ !rsp_logEt ! Log specific turbulent energy
+ !rsp_erad ! Specific internal (radiative) energy
+ !rsp_log_erad ! Log specific internal (radiative) energy
+ !rsp_Hp_face ! Pressure scale height at cell face
+ !rsp_Lc ! Convective luminosity
+ !rsp_Lc_div_L ! Convective luminosity div total luminosity
+ !rsp_Lr ! Radiative luminosity
+ !rsp_Lr_div_L ! Radiative luminosity div total luminosity
+ !rsp_Lt ! Turbulent luminosity
+ !rsp_Lt_div_L ! Turbulent luminosity div total luminosity
+ !rsp_Pt ! Turbulent pressure, p_t, see Table 1 in MESA5
+ !rsp_Uq ! Viscous momentum transfer rate, U_q, see Table 1 in MESA5
+ !rsp_Eq ! Viscous energy transfer rate, epsilon_q, see Table 1 in MESA5
+ !rsp_Pvsc ! Artificial viscosity, p_av, see Table 1 in MESA5
+ !rsp_gradT ! Temperature gradient
+ !rsp_Y_face ! Superadiabatic gradient at cell face, Y_sag, see Table 1 in MESA5
+ !rsp_damp ! Turbulent dissipation, D, see Table 1 in MESA5
+ !rsp_dampR ! Radiative cooling, D_r, see Table 1 in MESA5
+ !rsp_sink ! Sum of turbulent dissipation and radiative cooling terms
+ !rsp_src ! Source function, S, see Table 1 in MESA5
+ !rsp_src_snk ! Convective coupling, C, see Table 1 in MESA5
+ !rsp_heat_exchange_timescale ! 1d0/(clight * opacity * density)
+ !rsp_log_heat_exchange_timescale
+ !rsp_log_dt_div_heat_exchange_timescale ! Ratio of time step to heat exchange timescale
+ !w
+ !log_w
+
+ !COUPL
+ !DAMP
+ !DAMPR
+ !SOURCE
+ !Chi
+ !Eq
+ !Hp_face
+ !PII_face
+ !Ptrb
+ !Pvsc
+ !Uq
+ !Y_face
+
+!# RTI
+
+ !RTI_du_diffusion_kick
+ !alpha_RTI
+ !boost_for_eta_RTI
+ !dedt_RTI
+ !dudt_RTI
+ !eta_RTI
+ !log_alpha_RTI
+ !log_boost_for_eta_RTI
+ !log_eta_RTI
+ !log_etamid_RTI
+ !log_lambda_RTI_div_Hrho
+ !log_sig_RTI
+ !log_sigmid_RTI
+ !log_source_RTI
+ !log_source_minus_alpha_RTI
+ !log_source_plus_alpha_RTI
+ !source_minus_alpha_RTI
+ !source_plus_alpha_RTI
+ !lambda_RTI
+
+!# Hydrodynamics
+
+
+ !v
+ !v_div_v_escape
+ !v_div_vesc
+ !v_kms
+ !log_v_escape
+
+ !u
+ !u_face
+
+ !P_face
+
+
+!# Extras
+ !extra_heat
+ !extra_L ! extra_heat integrated from center (Lsun)
+ !log_extra_L ! log10 integrated from center (Lsun)
+ !log_irradiation_heat
+
+ !extra_jdot ! set in other_torque routine
+ !extra_omegadot ! set in other_torque routine
+
+ !extra_opacity_factor ! set in other_opacity_factor routine
+
+ ! diffusion factor profile for species, set in other_diffusion_factor routine
+ !extra_diffusion_factor h1
+ !extra_diffusion_factor he4
+ !extra_diffusion_factor o16
+
+
+
+!# Miscellaneous
+
+ !dlog_h1_dlogP ! (log(h1(k)) - log(h1(k-1)))/(log(P(k)) - log(P(k-1)))
+ !dlog_he3_dlogP
+ !dlog_he4_dlogP
+ !dlog_c12_dlogP
+ !dlog_c13_dlogP
+ !dlog_n14_dlogP
+ !dlog_o16_dlogP
+ !dlog_ne20_dlogP
+ !dlog_mg24_dlogP
+ !dlog_si28_dlogP
+
+ !dlog_pp_dlogP
+ !dlog_cno_dlogP
+ !dlog_3alf_dlogP
+
+ !dlog_burn_c_dlogP
+ !dlog_burn_n_dlogP
+ !dlog_burn_o_dlogP
+
+ !dlog_burn_ne_dlogP
+ !dlog_burn_na_dlogP
+ !dlog_burn_mg_dlogP
+
+ !dlog_cc_dlogP
+ !dlog_co_dlogP
+ !dlog_oo_dlogP
+
+ !dlog_burn_si_dlogP
+ !dlog_burn_s_dlogP
+ !dlog_burn_ar_dlogP
+ !dlog_burn_ca_dlogP
+ !dlog_burn_ti_dlogP
+ !dlog_burn_cr_dlogP
+ !dlog_burn_fe_dlogP
+
+ !dlog_pnhe4_dlogP
+ !dlog_photo_dlogP
+ !dlog_other_dlogP
+
+ !logR_kap ! logR = logRho - 3*logT + 18 ; used in kap tables
+ !logW ! logW = logPgas - 4*logT
+ logQ ! logQ = logRho - 2*logT + 12
+ !logV ! logV = logRho - 0.7*logE + 20
+
+ !log_CpT_absMdot_div_L ! log10(s% Cp(k)*s% T(k)*abs(s% mstar_dot)/s% L(k))
+
+ !delta_r ! r - r_start, change during step
+ !delta_L ! L - L_start, change during step
+ !delta_cell_vol ! cell_vol - cell_vol_start, change during step
+ !delta_entropy ! entropy - entropy_start, change during step (does not include effects of diffusion)
+ !delta_T ! T - T_start, change during step
+ !delta_rho ! rho - rho_start, change during step
+ !delta_eps_nuc ! eps_nuc - eps_nuc_start, change during step
+ !delta_mu ! mu - mu_start, change during step
+
+ !zFe ! mass fraction of "Fe" = Fe+Co+Ni
+ !log_zFe
+ !dPdr_dRhodr_info
+ !log_sig_raw_mix
+
+ !d_u_div_rmid
+ !d_u_div_rmid_start
+ !d_v_div_r_dm
+ !d_v_div_r_dr
+
+ !dlnP_dlnR
+ !dlnRho_dlnR
+ !dlnRho_dr
+ !dlnX_dr
+ !dlnY_dr
+ !dlogR
+ !dPdr_div_grav
+ !dPdr_info
+ !dRhodr_info
+ !dRstar_div_dr
+ !dr_ratio
+ !dm_eps_grav
+ !dr_ratio
+ !dt_cs_div_dr
+ !dt_div_tau_conv
+ !dt_times_conv_vel_div_mixing_length
+ !log_dt_cs_div_dr
+ !log_dt_div_tau_conv
+ !log_dt_times_conv_vel_div_mixing_length
+ !log_du_kick_div_du
+ !du
+ !dvdt_dPdm
+ !dvdt_grav
+
+ !tau_conv
+ !tau_cool
+ !tau_epsnuc
+ !tau_qhse
+
+ !max_abs_xa_corr
+
+ !tdc_num_iters
+
+ !k
+
+
+! the first few lines of the profile contain general info about the model.
+! for completeness, those items are described here.
+
+ ! initial mass and Z
+ ! initial_mass
+ ! initial_z
+ ! general properties of the current state
+ ! model_number
+ ! num_zones
+ ! star_age
+ ! time_step
+ ! properties at the photosphere
+ ! Teff
+ ! photosphere_L
+ ! photosphere_r
+ ! properties at the outermost zone of the model
+ ! log_surface_L
+ ! log_surface_radius
+ ! log_surface_temp
+ ! properties near the center of the model
+ ! log_center_temp
+ ! log_center_density
+ ! log_center_P
+ ! center_eta
+ ! abundances near the center
+ ! center_h1
+ ! center_he3
+ ! center_he4
+ ! center_c12
+ ! center_n14
+ ! center_o16
+ ! center_ne20
+ ! information about total mass
+ ! star_mass
+ ! star_mdot
+ ! star_mass_h1
+ ! star_mass_he3
+ ! star_mass_he4
+ ! star_mass_c12
+ ! star_mass_n14
+ ! star_mass_o16
+ ! star_mass_ne20
+ ! locations of abundance transitions
+ ! he_core_mass
+ ! c_core_mass
+ ! o_core_mass
+ ! si_core_mass
+ ! fe_core_mass
+ ! location of optical depths 10 and 100
+ ! tau10_mass
+ ! tau10_radius
+ ! tau100_mass
+ ! tau100_radius
+ ! time scales
+ ! dynamic_time
+ ! kh_timescale
+ ! nuc_timescale
+ ! various kinds of total power
+ ! power_nuc_burn
+ ! power_h_burn
+ ! power_he_burn
+ ! power_neu
+ ! a few control parameter values
+ ! h1_boundary_limit
+ ! he4_boundary_limit
+ ! c12_boundary_limit
+ ! burn_min1
+ ! burn_min2
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/re b/star/dev_cases_massive_stars/wd_nova_burst/re
new file mode 100755
index 0000000000..7fd60020ab
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/re
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+
+shopt -u expand_aliases
+
+photo_directory=photos
+
+function most_recent_photo {
+ ls -tp "$photo_directory" | grep -v / | head -1
+}
+
+if [ $# -eq 0 ]
+then
+ photo=$(most_recent_photo)
+else
+ photo=$1
+fi
+
+if [ -z "$photo" ] || ! [ -f "$photo_directory/$photo" ]
+then
+ echo "specified photo ($photo) does not exist"
+ exit 1
+fi
+
+echo "restart from $photo"
+if ! cp "$photo_directory/$photo" restart_photo
+then
+ echo "failed to copy photo ($photo)"
+ exit 1
+fi
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+./star
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/ready.mod b/star/dev_cases_massive_stars/wd_nova_burst/ready.mod
new file mode 100644
index 0000000000..ce93af2edd
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/ready.mod
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:02b0b743d60317e7e7bc8ff38a01859f84de36b01454a30284bfbcaf43dc2cc5
+size 754640
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/rn b/star/dev_cases_massive_stars/wd_nova_burst/rn
new file mode 100755
index 0000000000..733034962d
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/rn
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+# this provides the definition of do_one (run one part of test)
+# do_one [inlist] [output model] [LOGS directory]
+source "${MESA_DIR}/star/test_suite/test_suite_helpers"
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+do_one inlist_setup_header ready.mod
+do_one inlist_wd_nova_burst_header final.mod
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+
+echo 'finished inlists'
+
+
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/rn1 b/star/dev_cases_massive_stars/wd_nova_burst/rn1
new file mode 100755
index 0000000000..25a1a7b16d
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/rn1
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+rm -f restart_photo
+
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
+./star
+date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/src/run.f90 b/star/dev_cases_massive_stars/wd_nova_burst/src/run.f90
new file mode 100644
index 0000000000..76d423f1af
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/src/run.f90
@@ -0,0 +1,15 @@
+program run
+ use run_star_support, only: do_read_star_job
+ use run_star, only: do_run_star
+
+ implicit none
+
+ integer :: ierr
+
+ ierr = 0
+ call do_read_star_job('inlist', ierr)
+ if (ierr /= 0) stop 1
+
+ call do_run_star
+
+end program run
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/src/run_star_extras.f90 b/star/dev_cases_massive_stars/wd_nova_burst/src/run_star_extras.f90
new file mode 100644
index 0000000000..8a298da013
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/src/run_star_extras.f90
@@ -0,0 +1,257 @@
+! ***********************************************************************
+!
+! Copyright (C) 2010 The MESA Team
+!
+! this file is part of mesa.
+!
+! mesa is free software; you can redistribute it and/or modify
+! it under the terms of the gnu general library public license as published
+! by the free software foundation; either version 2 of the license, or
+! (at your option) any later version.
+!
+! mesa is distributed in the hope that it will be useful,
+! but without any warranty; without even the implied warranty of
+! merchantability or fitness for a particular purpose. see the
+! gnu library general public license for more details.
+!
+! you should have received a copy of the gnu library general public license
+! along with this software; if not, write to the free software
+! foundation, inc., 59 temple place, suite 330, boston, ma 02111-1307 usa
+!
+! ***********************************************************************
+
+ module run_star_extras
+
+ use star_lib
+ use star_def
+ use const_def
+ use math_lib
+ use auto_diff
+ use interp_1d_lib
+
+ implicit none
+
+ include "test_suite_extras_def.inc"
+
+ integer :: num_bursts
+ logical :: waiting_for_burst
+ real(dp) :: L_burst = 1d4, L_between = 1d3 ! Lsun units
+
+
+ contains
+
+ include "test_suite_extras.inc"
+
+ subroutine nova_wind(id, Lsurf, Msurf, Rsurf, Tsurf, X, Y, Z, w, ierr)
+ use star_def
+ integer, intent(in) :: id
+ real(dp), intent(in) :: Lsurf, Msurf, Rsurf, Tsurf, X, Y, Z ! surface values (cgs)
+ real(dp) :: b
+ ! NOTE: surface is outermost cell. not necessarily at photosphere.
+ ! NOTE: don't assume that vars are set at this point.
+ ! so if you want values other than those given as args,
+ ! you should use values from s% xh(:,:) and s% xa(:,:) only.
+ ! rather than things like s% Teff or s% lnT(:) which have not been set yet.
+ real(dp), intent(out) :: w ! wind in units of Msun/year (value is >= 0)
+ integer, intent(out) :: ierr
+ w = 0
+ ierr = 0
+ b = nova_wind_b(Msurf / Msun)
+ if (Lsurf / Lsun > 1d3) then
+ w = exp10(-1.49 * safe_log10(Tsurf / 1d5) + b) / (Msun / secyer)
+ if (w < 1d-6) then
+ w = 0
+ else
+ write(*,'(A,ES10.3,A)') ' nova wind ', w, ' Msun/year'
+ end if
+ end if
+ end subroutine nova_wind
+
+ function nova_wind_b(m) result(b_out)
+ use interp_1d_def, only: pm_work_size
+ real(dp), intent(in) :: m
+ real(dp) :: b_out
+ integer, parameter :: n = 9
+ real(dp) :: m_interp(n), b_interp(n)
+ real(dp) :: v_new(1), x_new(1)
+ real(dp), pointer :: work1(:) => null()
+ integer :: ierr
+
+ m_interp = [0.5d0, 0.6d0, 0.7d0, 0.8d0, 0.9d0, 1.0d0, 1.1d0, 1.2d0, 1.33d0]
+ b_interp = [10.01d0, 20.24d0, 20.38d0, 20.49d0, 20.55d0, 20.62d0, 20.67d0, 20.72d0, 20.78d0]
+
+ x_new(1) = m
+
+ allocate(work1(n * pm_work_size))
+ call interpolate_vector_pm( &
+ n, m_interp, 1, x_new, b_interp, v_new, work1, 'nova_wind_b', ierr)
+ if (ierr /= 0) then
+ write(*,*) 'ERROR in nova_wind_b interpolation', ierr
+ b_out = 0d0
+ return
+ end if
+
+ b_out = v_new(1)
+ deallocate(work1)
+ end function nova_wind_b
+
+ subroutine extras_photo_read(id, iounit, ierr)
+ integer, intent(in) :: id, iounit
+ integer, intent(out) :: ierr
+ ierr = 0
+ read(iounit,iostat=ierr) num_bursts, waiting_for_burst
+ end subroutine extras_photo_read
+
+
+ subroutine extras_photo_write(id, iounit)
+ integer, intent(in) :: id, iounit
+ write(iounit) num_bursts, waiting_for_burst
+ end subroutine extras_photo_write
+
+
+ subroutine extras_controls(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ s% other_photo_read => extras_photo_read
+ s% other_photo_write => extras_photo_write
+ s% other_wind => nova_wind
+
+ s% extras_startup => extras_startup
+ s% extras_check_model => extras_check_model
+ s% extras_finish_step => extras_finish_step
+ s% extras_after_evolve => extras_after_evolve
+ s% how_many_extra_history_columns => how_many_extra_history_columns
+ s% data_for_extra_history_columns => data_for_extra_history_columns
+ s% how_many_extra_profile_columns => how_many_extra_profile_columns
+ s% data_for_extra_profile_columns => data_for_extra_profile_columns
+ end subroutine extras_controls
+
+
+ subroutine extras_startup(id, restart, ierr)
+ integer, intent(in) :: id
+ logical, intent(in) :: restart
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ call test_suite_startup(s, restart, ierr)
+ if (.not. restart) then
+ num_bursts = 0
+ waiting_for_burst = .true.
+ end if
+ end subroutine extras_startup
+
+
+ subroutine extras_after_evolve(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ real(dp) :: dt
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ call test_suite_after_evolve(s, ierr)
+ end subroutine extras_after_evolve
+
+
+ ! returns either keep_going, retry, or terminate.
+ integer function extras_check_model(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ include 'formats'
+ extras_check_model = keep_going
+! if (s% L_phot > L_burst) then
+! if (waiting_for_burst) then
+! num_bursts = num_bursts + 1
+! write(*,2) 'num_bursts', num_bursts
+! waiting_for_burst = .false.
+! end if
+! else if (s% L_phot < L_between) then
+! if (num_bursts >= 1) then
+! write(*,*) 'have finished burst'
+! extras_check_model = terminate
+! s% termination_code = t_extras_check_model
+! end if
+! waiting_for_burst = .true.
+! end if
+ end function extras_check_model
+
+
+ integer function how_many_extra_history_columns(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_history_columns = 0
+ end function how_many_extra_history_columns
+
+
+ subroutine data_for_extra_history_columns(id, n, names, vals, ierr)
+ integer, intent(in) :: id, n
+ character (len=maxlen_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ end subroutine data_for_extra_history_columns
+
+
+ integer function how_many_extra_profile_columns(id)
+ use star_def, only: star_info
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_profile_columns = 1
+ end function how_many_extra_profile_columns
+
+
+ subroutine data_for_extra_profile_columns(id, n, nz, names, vals, ierr)
+ use star_def, only: star_info, maxlen_profile_column_name
+ use const_def, only: dp
+ integer, intent(in) :: id, n, nz
+ character (len=maxlen_profile_column_name) :: names(n)
+ real(dp) :: vals(nz,n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ names(1) = 'zbar_div_abar'
+ do k=1,s% nz
+ vals(k,1) = s% zbar(k)/s% abar(k)
+ end do
+ end subroutine data_for_extra_profile_columns
+
+
+ ! returns either keep_going or terminate.
+ integer function extras_finish_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_finish_step = keep_going
+
+ end function extras_finish_step
+
+
+ end module run_star_extras
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/src/run_star_extras_old.f90 b/star/dev_cases_massive_stars/wd_nova_burst/src/run_star_extras_old.f90
new file mode 100644
index 0000000000..9f35a2c6b9
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/src/run_star_extras_old.f90
@@ -0,0 +1,198 @@
+! ***********************************************************************
+!
+! Copyright (C) 2010 The MESA Team
+!
+! This program is free software: you can redistribute it and/or modify
+! it under the terms of the GNU Lesser General Public License
+! as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+! See the GNU Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public License
+! along with this program. If not, see .
+!
+! ***********************************************************************
+
+ module run_star_extras
+
+ use star_lib
+ use star_def
+ use const_def
+ use math_lib
+ use auto_diff
+
+ implicit none
+
+ include "test_suite_extras_def.inc"
+
+ integer :: num_bursts
+ logical :: waiting_for_burst
+ real(dp) :: L_burst = 1d4, L_between = 1d3 ! Lsun units
+
+ contains
+
+ include "test_suite_extras.inc"
+
+ subroutine extras_photo_read(id, iounit, ierr)
+ integer, intent(in) :: id, iounit
+ integer, intent(out) :: ierr
+ ierr = 0
+ read(iounit,iostat=ierr) num_bursts, waiting_for_burst
+ end subroutine extras_photo_read
+
+
+ subroutine extras_photo_write(id, iounit)
+ integer, intent(in) :: id, iounit
+ write(iounit) num_bursts, waiting_for_burst
+ end subroutine extras_photo_write
+
+
+ subroutine extras_controls(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ s% other_photo_read => extras_photo_read
+ s% other_photo_write => extras_photo_write
+
+ s% extras_startup => extras_startup
+ s% extras_check_model => extras_check_model
+ s% extras_finish_step => extras_finish_step
+ s% extras_after_evolve => extras_after_evolve
+ s% how_many_extra_history_columns => how_many_extra_history_columns
+ s% data_for_extra_history_columns => data_for_extra_history_columns
+ s% how_many_extra_profile_columns => how_many_extra_profile_columns
+ s% data_for_extra_profile_columns => data_for_extra_profile_columns
+ end subroutine extras_controls
+
+
+ subroutine extras_startup(id, restart, ierr)
+ integer, intent(in) :: id
+ logical, intent(in) :: restart
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ call test_suite_startup(s, restart, ierr)
+ if (.not. restart) then
+ num_bursts = 0
+ waiting_for_burst = .true.
+ end if
+ end subroutine extras_startup
+
+
+ subroutine extras_after_evolve(id, ierr)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ real(dp) :: dt
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ call test_suite_after_evolve(s, ierr)
+ end subroutine extras_after_evolve
+
+
+ ! returns either keep_going, retry, or terminate.
+ integer function extras_check_model(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ include 'formats'
+ extras_check_model = keep_going
+! if (s% L_phot > L_burst) then
+! if (waiting_for_burst) then
+! num_bursts = num_bursts + 1
+! write(*,2) 'num_bursts', num_bursts
+! waiting_for_burst = .false.
+! end if
+! else if (s% L_phot < L_between) then
+! if (num_bursts >= 1) then
+! write(*,*) 'have finished burst'
+! extras_check_model = terminate
+! s% termination_code = t_extras_check_model
+! end if
+! waiting_for_burst = .true.
+! end if
+ end function extras_check_model
+
+
+ integer function how_many_extra_history_columns(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_history_columns = 0
+ end function how_many_extra_history_columns
+
+
+ subroutine data_for_extra_history_columns(id, n, names, vals, ierr)
+ integer, intent(in) :: id, n
+ character (len=maxlen_history_column_name) :: names(n)
+ real(dp) :: vals(n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ end subroutine data_for_extra_history_columns
+
+
+ integer function how_many_extra_profile_columns(id)
+ use star_def, only: star_info
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ how_many_extra_profile_columns = 1
+ end function how_many_extra_profile_columns
+
+
+ subroutine data_for_extra_profile_columns(id, n, nz, names, vals, ierr)
+ use star_def, only: star_info, maxlen_profile_column_name
+ use const_def, only: dp
+ integer, intent(in) :: id, n, nz
+ character (len=maxlen_profile_column_name) :: names(n)
+ real(dp) :: vals(nz,n)
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+ integer :: k
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ names(1) = 'zbar_div_abar'
+ do k=1,s% nz
+ vals(k,1) = s% zbar(k)/s% abar(k)
+ end do
+ end subroutine data_for_extra_profile_columns
+
+
+ ! returns either keep_going or terminate.
+ integer function extras_finish_step(id)
+ integer, intent(in) :: id
+ integer :: ierr
+ type (star_info), pointer :: s
+ ierr = 0
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+ extras_finish_step = keep_going
+ end function extras_finish_step
+
+
+ end module run_star_extras
+
diff --git a/star/dev_cases_massive_stars/wd_nova_burst/testhub.yml b/star/dev_cases_massive_stars/wd_nova_burst/testhub.yml
new file mode 100644
index 0000000000..17c742daf3
--- /dev/null
+++ b/star/dev_cases_massive_stars/wd_nova_burst/testhub.yml
@@ -0,0 +1,556 @@
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.17
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ runtime_minutes: 10.86
+ model_number: 479
+ star_age: 2.6162041751077975E+05
+ num_retries: 22
+ log_rel_run_E_err: -6.7542920773037940
+ steps: 485
+ retries: 16
+ redos: 0
+ solver_calls_made: 501
+ solver_calls_failed: 16
+ solver_iterations: 3245
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ runtime_minutes: 9.16
+ model_number: 421
+ star_age: 2.6159276863960436E+05
+ num_retries: 72
+ log_rel_run_E_err: -9.8826692184686564
+ steps: 428
+ retries: 65
+ redos: 0
+ solver_calls_made: 493
+ solver_calls_failed: 65
+ solver_iterations: 2414
+ - inlist: inlist_setup_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.16
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.14
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
+ - inlist: inlist_setup_header
+ runtime_minutes: 0.15
+ model_number: 11
+ star_age: 1.0000000000000000E+07
+ num_retries: 1
+ log_rel_run_E_err: -2.0804518883152472
+ steps: 11
+ retries: 1
+ redos: 0
+ solver_calls_made: 12
+ solver_calls_failed: 1
+ solver_iterations: 67
+ - inlist: inlist_wd_nova_burst_header
diff --git a/star/private/pgstar_ctrls_io.f90 b/star/private/pgstar_ctrls_io.f90
index dcf53870fd..071f4561b1 100644
--- a/star/private/pgstar_ctrls_io.f90
+++ b/star/private/pgstar_ctrls_io.f90
@@ -3023,6 +3023,38 @@ module pgstar_ctrls_io
Grid9_file_width, &
Grid9_file_aspect_ratio, &
+ Max_eq_resid_win_flag, &
+ Max_eq_resid_win_width, &
+ Max_eq_resid_win_aspect_ratio, &
+ Max_eq_resid_file_flag, &
+ Max_eq_resid_file_width, &
+ Max_eq_resid_file_aspect_ratio, &
+ Max_eq_resid_file_dir, &
+ Max_eq_resid_file_prefix, &
+ Max_eq_resid_xleft, &
+ Max_eq_resid_xright, &
+ Max_eq_resid_ybot, &
+ Max_eq_resid_ytop, &
+ Max_eq_resid_txt_scale, &
+ Max_eq_resid_title, &
+ Max_eq_resid_max_width, &
+
+ Kipp_residuals_win_flag, &
+ Kipp_residuals_win_width, &
+ Kipp_residuals_win_aspect_ratio, &
+ Kipp_residuals_file_flag, &
+ Kipp_residuals_file_width, &
+ Kipp_residuals_file_aspect_ratio, &
+ Kipp_residuals_file_dir, &
+ Kipp_residuals_file_prefix, &
+ Kipp_residuals_xleft, &
+ Kipp_residuals_xright, &
+ Kipp_residuals_ybot, &
+ Kipp_residuals_ytop, &
+ Kipp_residuals_txt_scale, &
+ Kipp_residuals_title, &
+ Kipp_residuals_max_width, &
+ Kipp_residuals_yaxis_name, &
annotation1_ci, &
annotation1_ch, &
@@ -6203,6 +6235,39 @@ subroutine store_pgstar_controls(s, ierr)
s% pg% Grid9_file_width = Grid9_file_width
s% pg% Grid9_file_aspect_ratio = Grid9_file_aspect_ratio
+ s% pg% Max_eq_resid_win_flag = Max_eq_resid_win_flag
+ s% pg% Max_eq_resid_win_width = Max_eq_resid_win_width
+ s% pg% Max_eq_resid_win_aspect_ratio = Max_eq_resid_win_aspect_ratio
+ s% pg% Max_eq_resid_file_flag = Max_eq_resid_file_flag
+ s% pg% Max_eq_resid_file_width = Max_eq_resid_file_width
+ s% pg% Max_eq_resid_file_aspect_ratio = Max_eq_resid_file_aspect_ratio
+ s% pg% Max_eq_resid_file_dir = Max_eq_resid_file_dir
+ s% pg% Max_eq_resid_file_prefix = Max_eq_resid_file_prefix
+ s% pg% Max_eq_resid_xleft = Max_eq_resid_xleft
+ s% pg% Max_eq_resid_xright = Max_eq_resid_xright
+ s% pg% Max_eq_resid_ybot = Max_eq_resid_ybot
+ s% pg% Max_eq_resid_ytop = Max_eq_resid_ytop
+ s% pg% Max_eq_resid_txt_scale = Max_eq_resid_txt_scale
+ s% pg% Max_eq_resid_title = Max_eq_resid_title
+ s% pg% Max_eq_resid_max_width = Max_eq_resid_max_width
+
+ s% pg% Kipp_residuals_win_flag = Kipp_residuals_win_flag
+ s% pg% Kipp_residuals_win_width = Kipp_residuals_win_width
+ s% pg% Kipp_residuals_win_aspect_ratio = Kipp_residuals_win_aspect_ratio
+ s% pg% Kipp_residuals_file_flag = Kipp_residuals_file_flag
+ s% pg% Kipp_residuals_file_width = Kipp_residuals_file_width
+ s% pg% Kipp_residuals_file_aspect_ratio = Kipp_residuals_file_aspect_ratio
+ s% pg% Kipp_residuals_file_dir = Kipp_residuals_file_dir
+ s% pg% Kipp_residuals_file_prefix = Kipp_residuals_file_prefix
+ s% pg% Kipp_residuals_xleft = Kipp_residuals_xleft
+ s% pg% Kipp_residuals_xright = Kipp_residuals_xright
+ s% pg% Kipp_residuals_ybot = Kipp_residuals_ybot
+ s% pg% Kipp_residuals_ytop = Kipp_residuals_ytop
+ s% pg% Kipp_residuals_txt_scale = Kipp_residuals_txt_scale
+ s% pg% Kipp_residuals_title = Kipp_residuals_title
+ s% pg% Kipp_residuals_max_width = Kipp_residuals_max_width
+ s% pg% Kipp_residuals_yaxis_name = Kipp_residuals_yaxis_name
+
s% pg% annotation1_ci = annotation1_ci
s% pg% annotation1_ch = annotation1_ch
diff --git a/star/private/pgstar_equation_residuals.f90 b/star/private/pgstar_equation_residuals.f90
new file mode 100644
index 0000000000..11d440364e
--- /dev/null
+++ b/star/private/pgstar_equation_residuals.f90
@@ -0,0 +1,209 @@
+! ***********************************************************************
+!
+! Copyright (C) 2026 The MESA Team
+!
+! This program is free software: you can redistribute it and/or modify
+! it under the terms of the GNU Lesser General Public License
+! as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+! See the GNU Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public License
+! along with this program. If not, see .
+!
+! ***********************************************************************
+
+
+module pgstar_equation_residuals
+
+ use star_private_def
+ use const_def, only: dp
+ use pgstar_support
+ use star_pgstar
+
+ implicit none
+
+contains
+
+ subroutine Max_eq_resid_plot(id, device_id, ierr)
+
+ integer, intent(in) :: id
+ integer, intent(in) :: device_id
+ integer, intent(out) :: ierr
+
+ type (star_info), pointer :: s
+
+ ierr = 0
+ call get_star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ call pgslct(device_id)
+ call pgbbuf()
+ call pgeras()
+
+ call do_Max_eq_resid_plot(s, id, &
+ s% pg% Max_eq_resid_xleft, s% pg% Max_eq_resid_xright, &
+ s% pg% Max_eq_resid_ybot, s% pg% Max_eq_resid_ytop, .false., &
+ s% pg% Max_eq_resid_title, s% pg% Max_eq_resid_txt_scale, &
+ s% pg% Max_eq_resid_max_width, ierr)
+ if (ierr /= 0) return
+
+ call pgebuf()
+
+ end subroutine Max_eq_resid_plot
+
+
+
+ ! history of residuals for each structure equation
+ subroutine do_Max_eq_resid_plot(s, id, &
+ win_xleft, win_xright, win_ybot, win_ytop, subplot, title, txt_scale, &
+ max_width, ierr)
+
+ integer, intent(in) :: id, max_width
+ logical, intent(in) :: subplot
+ real, intent(in) :: &
+ win_xleft, win_xright, win_ybot, win_ytop, txt_scale
+ character (len=*), intent(in) :: title
+ integer, intent(out) :: ierr
+ type (star_info), pointer :: s
+
+ integer :: i_eq, initial_width
+ integer :: n
+ integer, save :: resid_hist_nvar
+ integer, save :: init_model
+ real :: xmin, xmax
+ real :: ymin, ymax
+
+ ! use save, we set these once, and they are reused in later calls of this function
+ real, allocatable, dimension(:), save :: xvec, yvec, resid_hist_model
+ real, allocatable, dimension(:, :), save :: resid_hist_vals
+ character(len=strlen), allocatable, dimension(:), save :: resid_equ_names
+
+ ierr = 0
+
+ call star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ if (.not. allocated(resid_hist_model)) then
+ init_model = s% model_number - 1
+ end if
+
+ if (max_width < 0) then
+ n = s% model_number - init_model
+ else
+ n = min(s% model_number - init_model, max_width)
+ end if
+
+ if (.not. allocated(resid_hist_model)) then
+ resid_hist_nvar = s% nvar_hydro
+ if (max_width < 0) then
+ initial_width = 100
+ else
+ initial_width = max_width
+ end if
+ allocate(resid_hist_model(initial_width))
+ allocate(resid_hist_vals(resid_hist_nvar, initial_width))
+ allocate(resid_equ_names(resid_hist_nvar))
+ allocate(xvec(initial_width), yvec(initial_width), stat=ierr)
+ if (ierr /= 0) then
+ write(*,*) 'allocate failed for PGSTAR'
+ return
+ end if
+
+ do i_eq = 1, resid_hist_nvar ! set names
+ resid_equ_names(i_eq) = trim(s% nameofequ(i_eq))
+ end do
+ else if (s% model_number - init_model >= size(resid_hist_model) .and. max_width < 0) then
+ call realloc_resid_hist(2*size(resid_hist_model)) ! grow the arrays
+ end if
+
+ ! roll if using a max width and you go over the limit
+ if (max_width > 1 .and. s% model_number - init_model > max_width) then
+ resid_hist_model(1:n-1) = resid_hist_model(2:n)
+ resid_hist_vals(:,1:n-1) = resid_hist_vals(:,2:n)
+ end if
+
+ resid_hist_model(n) = s% model_number
+
+ ! get the max resid values for this step
+ do i_eq = 1, resid_hist_nvar
+ resid_hist_vals(i_eq, n) = &
+ real(max(1d-40, maxval(abs(s% equ(i_eq, 1:s% nz)))))
+ end do
+
+ xvec(1:n) = real(resid_hist_model(1:n))
+
+ xmin = xvec(1)
+ xmax = xvec(n)
+
+ if (xmin >= xmax) xmax = xmin + 1.0
+
+ ymin = minval(resid_hist_vals(:, 1:n))
+ ymax = maxval(resid_hist_vals(:, 1:n))
+ ymin = max(ymin, 1e-20)
+ ymax = max(ymax, 10.0*ymin)
+
+ call pgsave
+ call pgsci(0) ! color index 0 = background
+ call pgsvp(win_xleft, win_xright, win_ybot, win_ytop)
+ call pgrect(0.0, 1.0, 0.0, 1.0) ! pseudo erase
+ call pgswin(xmin, xmax, log10(ymin), log10(ymax))
+ call pgsch(txt_scale)
+ call pgscf(1)
+ call pgsci(1)
+ call pgbox('BCNST',0.0,0,'BCNST',0.0,0)
+ call pgmtxt('B',2.5,0.5,0.5,'Model Number')
+ call pgmtxt('L',3.0,0.5,0.5,'log10(max |residual|)')
+ call pgmtxt('T',1.0,0.5,0.5, title)
+
+ ! draw lines
+ do i_eq = 1, resid_hist_nvar
+ yvec(1:n) = log10(resid_hist_vals(i_eq, 1:n))
+ call pgsci(mod(i_eq-1,13) + 2)
+ call pgline(n, xvec(1:n), yvec(1:n))
+ end do
+
+ ! legend
+ call pgsch(0.75 * txt_scale)
+
+ do i_eq = 1, resid_hist_nvar
+ call pgsci(mod(i_eq-1,13)+2)
+ call pgptxt( &
+ xmax + 0.03, &
+ log10(ymax) - (0.03 + 0.06*real(i_eq-1))*(log10(ymax)-log10(ymin)), &
+ 0.0, 0.0, &
+ trim(resid_equ_names(i_eq)))
+ end do
+
+ call pgsci(1)
+ call pgunsa
+
+ contains
+
+ subroutine realloc_resid_hist(new_size)
+ integer, intent(in) :: new_size
+ real, allocatable :: tmp_model(:)
+ real, allocatable :: tmp_vals(:,:)
+
+ call move_alloc(resid_hist_model, tmp_model)
+ call move_alloc(resid_hist_vals, tmp_vals)
+
+ allocate(resid_hist_model(new_size))
+ allocate(resid_hist_vals(resid_hist_nvar, new_size))
+
+ deallocate(xvec, yvec)
+ allocate(xvec(new_size), yvec(new_size))
+
+ resid_hist_model(1:n) = tmp_model(1:n)
+ resid_hist_vals(:,1:n) = tmp_vals(:,1:n)
+
+ deallocate(tmp_model, tmp_vals)
+ end subroutine
+
+ end subroutine do_Max_eq_resid_plot
+
+end module pgstar_equation_residuals
diff --git a/star/private/pgstar_full.f90 b/star/private/pgstar_full.f90
index 1ae79de2a6..d65d2d1bb7 100644
--- a/star/private/pgstar_full.f90
+++ b/star/private/pgstar_full.f90
@@ -161,6 +161,10 @@ subroutine set_win_file_data(s, ierr)
Color_Magnitude1_plot, Color_Magnitude2_plot, Color_Magnitude3_plot, &
Color_Magnitude4_plot, Color_Magnitude5_plot, Color_Magnitude6_plot, &
Color_Magnitude7_plot, Color_Magnitude8_plot, Color_Magnitude9_plot
+ use pgstar_equation_residuals, only: &
+ Max_eq_resid_plot
+ use pgstar_kipp_residuals, only: &
+ Kipp_residuals_plot
type (star_info), pointer :: s
integer, intent(out) :: ierr
@@ -1261,6 +1265,34 @@ subroutine set_win_file_data(s, ierr)
p% file_width = s% pg% Grid9_file_width
p% file_aspect_ratio = s% pg% Grid9_file_aspect_ratio
+ p => s% pg% pgstar_win_file_ptr(i_max_eq_resid)
+ p% plot => Max_eq_resid_plot
+ p% id = i_max_eq_resid
+ p% name = 'Max_eq_resid'
+ p% win_flag = s% pg% max_eq_resid_win_flag
+ p% win_width = s% pg% max_eq_resid_win_width
+ p% win_aspect_ratio = s% pg% max_eq_resid_win_aspect_ratio
+ p% file_flag = s% pg% max_eq_resid_file_flag
+ p% file_dir = s% pg% max_eq_resid_file_dir
+ p% file_prefix = s% pg% max_eq_resid_file_prefix
+ p% file_interval = s% pg% max_eq_resid_file_interval
+ p% file_width = s% pg% max_eq_resid_file_width
+ p% file_aspect_ratio = s% pg% max_eq_resid_file_aspect_ratio
+
+ p => s% pg% pgstar_win_file_ptr(i_Kipp_residuals)
+ p% plot => Kipp_residuals_plot
+ p% id = i_Kipp_residuals
+ p% name = 'Kipp_resid'
+ p% win_flag = s% pg% Kipp_residuals_win_flag
+ p% win_width = s% pg% Kipp_residuals_win_width
+ p% win_aspect_ratio = s% pg% Kipp_residuals_win_aspect_ratio
+ p% file_flag = s% pg% Kipp_residuals_file_flag
+ p% file_dir = s% pg% Kipp_residuals_file_dir
+ p% file_prefix = s% pg% Kipp_residuals_file_prefix
+ p% file_interval = s% pg% Kipp_residuals_file_interval
+ p% file_width = s% pg% Kipp_residuals_file_width
+ p% file_aspect_ratio = s% pg% Kipp_residuals_file_aspect_ratio
+
do i = 1, max_num_Other_plots
p => s% pg% pgstar_win_file_ptr(i_Other + i - 1)
p% win_flag = .false.
@@ -1343,8 +1375,8 @@ subroutine onScreen_Plots(s, must_write_files_in, ierr)
use utils_lib
use chem_def
use net_def
- use net_lib, only : get_net_reaction_table
- use const_def, only : Msun, Rsun
+ use net_lib, only: get_net_reaction_table
+ use const_def, only: Msun, Rsun
type (star_info), pointer :: s
logical :: must_write_files_in
@@ -1412,7 +1444,7 @@ subroutine onScreen_Plots(s, must_write_files_in, ierr)
do i = 1, num_pgstar_plots
p => s% pg% pgstar_win_file_ptr(i)
- if(show_plot_now) then
+ if (show_plot_now) then
! call to check_window opens device
call check_window(s, p, ierr)
if (failed('check_window')) return
@@ -1568,7 +1600,7 @@ end subroutine read_pgstar_data
subroutine update_pgstar_data(s, ierr)
- use star_utils, only : eval_csound
+ use star_utils, only: eval_csound
type (star_info), pointer :: s
integer, intent(out) :: ierr
@@ -1595,7 +1627,7 @@ subroutine update_pgstar_data(s, ierr)
contains
subroutine get_hist_values(num, ierr)
- use history, only : do_get_data_for_history_columns
+ use history, only: do_get_data_for_history_columns
integer, intent(in) :: num
integer, intent(out) :: ierr
integer :: i
diff --git a/star/private/pgstar_grid.f90 b/star/private/pgstar_grid.f90
index 98a4a2465f..0c37358881 100644
--- a/star/private/pgstar_grid.f90
+++ b/star/private/pgstar_grid.f90
@@ -566,6 +566,10 @@ subroutine Grid_plot(s, id, device_id, &
do_Color_Magnitude1_plot, do_Color_Magnitude2_plot, do_Color_Magnitude3_plot, &
do_Color_Magnitude4_plot, do_Color_Magnitude5_plot, do_Color_Magnitude6_plot, &
do_Color_Magnitude7_plot, do_Color_Magnitude8_plot, do_Color_Magnitude9_plot
+ use pgstar_equation_residuals, only : &
+ do_Max_eq_resid_plot
+ use pgstar_kipp_residuals, only : &
+ do_Kipp_residuals_plot
type (star_info), pointer :: s
logical, intent(in) :: subplot
@@ -947,6 +951,15 @@ subroutine Grid_plot(s, id, device_id, &
call do_Text_Summary9_plot(&
s, id, device_id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Text_Summary9_title, &
Grid_txt_scale_factor(i) * s% pg% Text_Summary9_txt_scale, s% pg% Text_Summary9_dxval, ierr)
+ case ('max_eq_resid')
+ call do_Max_eq_resid_plot(&
+ s, id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Max_eq_resid_title, &
+ Grid_txt_scale_factor(i) * s% pg% Max_eq_resid_txt_scale, s% pg% Max_eq_resid_max_width, ierr)
+ case ('kipp_residuals')
+ call do_Kipp_residuals_plot(&
+ s, id, xleft, xright, ybot, ytop, grid_subplot, s% pg% Kipp_residuals_title, &
+ Grid_txt_scale_factor(i) * s% pg% Kipp_residuals_txt_scale, &
+ s% pg% Kipp_residuals_max_width, s% pg% Kipp_residuals_yaxis_name, ierr)
case default
! check for "other" plot
found_it = .false.
@@ -998,6 +1011,7 @@ subroutine Grid_plot(s, id, device_id, &
'History_Panels1,..,9', &
'History_Tracks1,..,9', &
'Color_Magnitude1,..,9', &
+ 'Max_eq_resid', &
'and if you are using star/astero', &
'Echelle', &
'Ratios'
diff --git a/star/private/pgstar_kipp_residuals.f90 b/star/private/pgstar_kipp_residuals.f90
new file mode 100644
index 0000000000..fdd3a9573f
--- /dev/null
+++ b/star/private/pgstar_kipp_residuals.f90
@@ -0,0 +1,377 @@
+! ***********************************************************************
+!
+! Copyright (C) 2010-2019 The MESA Team
+!
+! This program is free software: you can redistribute it and/or modify
+! it under the terms of the GNU Lesser General Public License
+! as published by the Free Software Foundation,
+! either version 3 of the License, or (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+! See the GNU Lesser General Public License for more details.
+!
+! You should have received a copy of the GNU Lesser General Public License
+! along with this program. If not, see .
+!
+! ***********************************************************************
+
+module pgstar_kipp_residuals
+
+ use const_def
+ use star_private_def
+ use star_pgstar
+ use pgstar_colors
+ use const_def, only: dp, Msun
+
+ implicit none
+
+ real, parameter, dimension(9) :: &
+ l = (/ 0.00, 0.12, 0.25, 0.38, 0.50, 0.62, 0.75, 0.88, 1.00 /), &
+ r = (/ 0.00, 0.05, 0.15, 0.32, 0.55, 0.78, 0.93, 0.99, 1.00 /), &
+ g = (/ 0.00, 0.02, 0.04, 0.06, 0.10, 0.18, 0.32, 0.58, 0.95 /), &
+ b = (/ 0.00, 0.08, 0.18, 0.32, 0.36, 0.28, 0.16, 0.08, 0.80 /)
+ real, parameter :: contra = 1.0, bright = 0.5
+
+contains
+
+ ! Kippenhahn-style log10(max(|res|)) across all equations for a
+ ! given space-time location
+ subroutine Kipp_residuals_plot(id, device_id, ierr)
+ integer, intent(in) :: id, device_id
+ integer, intent(out) :: ierr
+
+ type (star_info), pointer :: s
+
+ ierr = 0
+ call get_star_ptr(id, s, ierr)
+ if (ierr /= 0) return
+
+ call pgslct(device_id)
+ call pgbbuf()
+ call pgeras()
+
+ call do_Kipp_residuals_Plot(s, id, &
+ s% pg% Kipp_residuals_xleft, s% pg% Kipp_residuals_xright, &
+ s% pg% Kipp_residuals_ybot, s% pg% Kipp_residuals_ytop, .false., &
+ s% pg% Kipp_residuals_title, s% pg% Kipp_residuals_txt_scale, &
+ s% pg% Kipp_residuals_max_width, s% pg% Kipp_residuals_yaxis_name, ierr)
+ if (ierr /= 0) return
+
+ call pgebuf()
+
+ end subroutine Kipp_residuals_plot
+
+
+ subroutine do_Kipp_residuals_plot(s, id, &
+ win_xleft, win_xright, win_ybot, win_ytop, subplot, title, txt_scale, &
+ max_width, yaxis_name, &
+ ierr)
+ integer, intent(in) :: id, max_width
+ real, intent(in) :: win_xleft, win_xright, win_ybot, win_ytop, txt_scale
+ logical, intent(in) :: subplot
+ character(len=*), intent(in) :: title, yaxis_name
+ integer, intent(out) :: ierr
+
+ type (star_info), pointer :: s
+ integer :: k, neq, initial_width, n, x_size, y_size, nr_n_cells
+ integer, save :: init_model
+
+ real :: resid_hi, resid_lo
+
+ real, allocatable, dimension(:, :), save :: nr_resid_buf, nr_ycoord_buf
+ integer, allocatable, dimension(:), save :: nr_model_buf, nr_zone_buf
+
+ ! colorbar color mapping info
+ real, allocatable, save :: r_save(:), g_save(:), b_save(:)
+ integer, save :: n_colors, c_low, c_high
+
+ real, allocatable :: tmp_resid_buf(:, :), tmp_ycoord_buf(:, :)
+ integer, allocatable :: tmp_model_buf(:), tmp_zone_buf(:)
+
+ neq = size(s% equ, 1) ! number of equations per cell
+
+ if (.not. allocated(nr_resid_buf)) then
+ if (max_width < 0) then
+ initial_width = 10
+ else
+ initial_width = max_width
+ end if
+ ! make 5 times bigger than current nz
+ allocate(nr_resid_buf(initial_width, int(1.5 * s% nz)))
+ allocate(nr_ycoord_buf(initial_width, int(1.5 * s% nz)))
+ allocate(nr_model_buf(initial_width))
+ allocate(nr_zone_buf(initial_width))
+ nr_resid_buf(:, :) = -99.0
+ nr_ycoord_buf(:, :) = 0.0 ! zero-init so unused cells are safely masked
+
+ init_model = s% model_number - 1
+ else if (s% nz > 0.95 * size(nr_resid_buf, 2)) then
+ ! check if remeshing has increased nz beyond 95% of the
+ ! current array size
+ x_size = size(nr_resid_buf, 1)
+ call move_alloc(nr_resid_buf, tmp_resid_buf)
+ call move_alloc(nr_ycoord_buf, tmp_ycoord_buf)
+
+ allocate(nr_resid_buf(x_size, 5 * s% nz))
+ allocate(nr_ycoord_buf(x_size, 5 * s% nz))
+ nr_resid_buf(:, :) = -99.0
+ nr_ycoord_buf(:, :) = 0.0 ! zero-init so unused cells are safely masked
+
+ nr_resid_buf(:, 1:nr_n_cells) = tmp_resid_buf(:, 1:nr_n_cells)
+ nr_ycoord_buf(:, 1:nr_n_cells) = tmp_ycoord_buf(:, 1:nr_n_cells)
+
+ deallocate(tmp_resid_buf, tmp_ycoord_buf)
+ end if
+
+ nr_n_cells = s% nz
+ if (max_width < 0) then
+ n = s% model_number - init_model
+ else
+ n = min(s% model_number - init_model, max_width)
+ end if
+
+ ! resize n_model dimension
+ if (n > size(nr_resid_buf, 1)) then
+ x_size = size(nr_resid_buf, 1)
+ y_size = size(nr_resid_buf, 2)
+
+ call move_alloc(nr_resid_buf, tmp_resid_buf)
+ call move_alloc(nr_ycoord_buf, tmp_ycoord_buf)
+ call move_alloc(nr_zone_buf, tmp_zone_buf)
+ call move_alloc(nr_model_buf, tmp_model_buf)
+
+ allocate(nr_resid_buf(2 * x_size, y_size))
+ allocate(nr_ycoord_buf(2 * x_size, y_size))
+ allocate(nr_zone_buf(2 * x_size))
+ allocate(nr_model_buf(2 * x_size))
+
+ nr_resid_buf(:, :) = -99.0
+ nr_ycoord_buf(:, :) = 0.0 ! zero-init so unused cells are safely masked
+
+ nr_resid_buf(1:n, :) = tmp_resid_buf(1:n, :)
+ nr_ycoord_buf(1:n, :) = tmp_ycoord_buf(1:n, :)
+ nr_zone_buf(1:n) = tmp_zone_buf(1:n)
+ nr_model_buf(1:n) = tmp_model_buf(1:n)
+
+ deallocate(tmp_resid_buf, tmp_ycoord_buf, tmp_zone_buf, tmp_model_buf)
+ end if
+
+ if (max_width > 1 .and. s% model_number - init_model > max_width) then
+ nr_model_buf(1:max_width-1) = nr_model_buf(2:max_width)
+ nr_resid_buf(1:max_width-1, :) = nr_resid_buf(2:max_width, :)
+ nr_ycoord_buf(1:max_width-1, :) = nr_ycoord_buf(2:max_width, :)
+ nr_zone_buf(1:max_width-1) = nr_zone_buf(2:max_width)
+ end if
+
+ nr_model_buf(n) = s% model_number
+ nr_zone_buf(n) = s% nz
+
+ ! fill arrays with new vals
+ do k = 1, s% nz
+ nr_resid_buf(n, k) = real(safe_log10(maxval(abs(s% equ(1:neq, k)))))
+ select case (trim(yaxis_name))
+ case ('mass')
+ nr_ycoord_buf(n, k) = real(s% m(k)/Msun)
+ case ('logR')
+ if (k < s%nz) then
+ nr_ycoord_buf(n, k) = real(safe_log10(0.5d0 * (s% r(k) + s% r(k+1)) / Rsun))
+ else
+ nr_ycoord_buf(n, k) = real(safe_log10(0.5d0 * s% r(k) / Rsun))
+ end if
+ case ('tau')
+ ! optical depth
+ nr_ycoord_buf(n, k) = real(safe_log10(s% tau(k)))
+ case default
+ ! cell-centered mass coordinate
+ nr_ycoord_buf(n, k) = real((s% m(k) - 0.5d0 * s% dm(k))/Msun)
+ end select
+ end do
+
+ ! so actual plotting
+ call pgsave
+ call pgsci(0) ! color index 0 = background
+ call pgsvp(win_xleft, win_xright, win_ybot, win_ytop)
+ call pgrect(0.0, 1.0, 0.0, 1.0) ! pseudo erase
+ call Kipp_residuals_render(ierr, id)
+
+ call pgunsa
+
+ contains
+
+ subroutine Kipp_residuals_render(ierr, id)
+ integer, intent(in) :: id
+ integer, intent(out) :: ierr
+ real, parameter :: missing_val = TINY(1.0)
+ real, allocatable :: img(:,:), coord_grid(:)
+ real :: tr(6), fg, bg, xlo, xhi, dx
+ real :: clo, chi, dcoord, coord_j, frac
+ integer :: nx, ny, i, j, k, nz_i
+ logical :: y_reverse
+
+ if (.not. allocated(r_save)) then
+ call pgqcir(c_low, c_high)
+ n_colors = c_high - c_low + 1
+ allocate(r_save(n_colors), g_save(n_colors), b_save(n_colors))
+
+ ! save existing color table
+ do i = 1, n_colors
+ call pgqcr(c_low + i - 1, r_save(i), g_save(i), b_save(i))
+ end do
+ end if
+
+ call pgqcir(c_low, c_high)
+ call pgscir(16,255)
+ call pgctab(l, r, g, b, 9, contra, bright)
+
+ nx = n
+ ny = nr_n_cells
+
+ allocate(img(nx, ny))
+ allocate(coord_grid(ny))
+
+ chi = -1.0e30
+ clo = 1.0e30
+ do i = 1, nx
+ nz_i = nr_zone_buf(i)
+ do k = 1, nz_i
+ if (nr_ycoord_buf(i,k) > chi) chi = nr_ycoord_buf(i,k)
+ ! m(k) is positive; skip any zero-initialised slots
+ if (nr_ycoord_buf(i,k) > 0.0 .and. nr_ycoord_buf(i,k) < clo) &
+ clo = nr_ycoord_buf(i,k)
+ end do
+ end do
+
+ resid_hi = -1.0e30
+ resid_lo = 1.0e30
+ do i = 1, nx
+ nz_i = nr_zone_buf(i)
+ do k = 1, nz_i
+ if (nr_resid_buf(i,k) > resid_hi) resid_hi = nr_resid_buf(i,k)
+ if (nr_resid_buf(i,k) < resid_lo) resid_lo = nr_resid_buf(i,k)
+ end do
+ end do
+
+ select case (yaxis_name)
+ case ('mass')
+ y_reverse = .false.
+ case ('logR')
+ y_reverse = .false.
+ case ('tau')
+ y_reverse = .true.
+ case default
+ y_reverse = .false.
+ end select
+
+ dcoord = (chi - clo) / real(ny - 1)
+ do j = 1, ny
+ if (.not. y_reverse) then
+ coord_grid(j) = clo + real(j - 1) * dcoord
+ else
+ coord_grid(j) = chi - real(j - 1) * dcoord
+ end if
+ end do
+
+ ! --- interpolate residuals onto the uniform grid ---
+ img = missing_val
+ do i = 1, nx
+ nz_i = nr_zone_buf(i)
+ do j = 1, ny
+ coord_j = coord_grid(j)
+ do k = 1, nz_i - 1
+ ! skip invalid cells
+ if (nr_resid_buf(i,k) == missing_val) cycle
+ if (nr_resid_buf(i,k+1) == missing_val) cycle
+ ! works for either increasing or decreasing coordinates
+ if ((nr_ycoord_buf(i,k) - coord_j) * &
+ (nr_ycoord_buf(i,k+1) - coord_j) <= 0d0) then
+ if (abs(nr_ycoord_buf(i,k) - nr_ycoord_buf(i,k+1)) > 1d-99) then
+ frac = (coord_j - nr_ycoord_buf(i,k+1)) / &
+ (nr_ycoord_buf(i,k) - nr_ycoord_buf(i,k+1))
+ else
+ frac = 0.5d0
+ end if
+ img(i,j) = nr_resid_buf(i,k+1) + &
+ frac * (nr_resid_buf(i,k) - nr_resid_buf(i,k+1))
+ exit
+ end if
+ end do
+ end do
+ end do
+ ! --- x range centred on model numbers ---
+ dx = max(1.0, real(nr_model_buf(nx) - nr_model_buf(1)) / real(nx - 1))
+ xlo = real(nr_model_buf(1)) - 0.5*dx
+ xhi = real(nr_model_buf(nx)) + 0.5*dx
+
+ ! --- transformation matrix for pgimag ---
+ ! world_y(j) = tr(4) + tr(6)*j
+ ! j=1 -> mhi => tr(4) = mhi - tr(6) = mhi + dm
+ ! j=ny -> mlo => confirms tr(6) = -dm
+ tr(1) = xlo - 0.5
+ tr(2) = (xhi - xlo) / real(nx)
+ tr(3) = 0.0
+ tr(4) = clo - dcoord
+ tr(5) = 0.0
+ tr(6) = dcoord
+
+ ! color scale
+ fg = resid_hi
+ bg = resid_lo
+ if (fg <= -100) fg = maxval(img)
+ if (bg <= -100) bg = minval(img, mask=(img > -19.9))
+ if (bg >= fg) bg = fg - 6.0
+
+ ! --- main panel ---
+ ! y-axis: mlo at bottom (centre), mhi at top (surface)
+ if (.not. y_reverse) then
+ call pgswin(xlo, xhi, clo - 0.5*dcoord, chi + 0.5*dcoord)
+ else
+ call pgswin(xlo, xhi, chi + 0.5*dcoord, clo - 0.5*dcoord)
+ end if
+ call pgimag(img, nx, ny, 1, nx, 1, ny, fg, bg, tr)
+
+ call pgsci(clr_Foreground)
+ call pgsch(txt_scale)
+ call pgbox('BCNST', 0.0, 0, 'BCNST', 0.0, 0)
+
+ select case (yaxis_name)
+ case ('mass')
+ y_reverse = .false.
+ call pglab('Model Number', 'Mass (M\d\(2281)\u)', &
+ 'Newton Raphson Solver Residuals of accepted step')
+ case ('logR')
+ y_reverse = .false.
+ call pglab('Model Number', 'log(R/R\d\(2281)\u)', &
+ 'Newton Raphson Solver Residuals of accepted step')
+ case ('tau')
+ y_reverse = .true.
+ call pglab('Model Number', 'log(tau)', &
+ 'Newton Raphson Solver Residuals of accepted step')
+ case default
+ y_reverse = .false.
+ call pglab('Model Number', 'Mass (M\d\(2281)\u)', &
+ 'Newton Raphson Solver Residuals of accepted step')
+ end select
+
+ ! --- color wedge ---
+ call pgsvp(win_xright + 0.01 * (win_xright - win_xleft), win_xright + 0.03 * (win_xright - win_xleft), &
+ win_ybot, win_ytop)
+ call pgswin(0.0, 1.0, bg, fg)
+ call pgwedg('RI', 0.0, 4.0, bg, fg, 'log10(max(|res|))')
+
+ ! reset color range
+ call pgscir(c_low, c_high)
+ do i = 1, n_colors
+ call pgscr(c_low + i - 1, r_save(i), g_save(i), b_save(i))
+ end do
+
+ deallocate(img, coord_grid)
+
+ end subroutine Kipp_residuals_render
+
+ end subroutine do_Kipp_residuals_plot
+
+
+
+end module pgstar_kipp_residuals
diff --git a/star/work/inlist_pgstar b/star/work/inlist_pgstar
index 2be9090177..2a18cc7361 100644
--- a/star/work/inlist_pgstar
+++ b/star/work/inlist_pgstar
@@ -1,37 +1,6 @@
&pgstar
- ! see star/defaults/pgstar.defaults
+Kipp_residuals_win_flag = .true.
- ! MESA uses PGPLOT for live plotting and gives the user a tremendous
- ! amount of control of the presentation of the information.
-
- ! show HR diagram
- ! this plots the history of L,Teff over many timesteps
- HR_win_flag = .true.
-
- ! set static plot bounds
- HR_logT_min = 3.5
- HR_logT_max = 4.6
- HR_logL_min = 2.0
- HR_logL_max = 6.0
-
- ! set window size (aspect_ratio = height/width)
- HR_win_width = 6
- HR_win_aspect_ratio = 1.0
-
-
- ! show temperature/density profile
- ! this plots the internal structure at single timestep
- TRho_Profile_win_flag = .true.
-
- ! add legend explaining colors
- show_TRho_Profile_legend = .true.
-
- ! display numerical info about the star
- show_TRho_Profile_text_info = .true.
-
- ! set window size (aspect_ratio = height/width)
- TRho_Profile_win_width = 8
- TRho_Profile_win_aspect_ratio = 0.75
/ ! end of pgstar namelist
diff --git a/star/work/inlist_project b/star/work/inlist_project
index 6e9a86824d..97e3ded9fc 100644
--- a/star/work/inlist_project
+++ b/star/work/inlist_project
@@ -6,78 +6,78 @@
&star_job
- ! see star/defaults/star_job.defaults
+! see star/defaults/star_job.defaults
- ! begin with a pre-main sequence model
- create_pre_main_sequence_model = .true.
+! begin with a pre-main sequence model
+create_pre_main_sequence_model = .false.
- ! save a model at the end of the run
- save_model_when_terminate = .false.
- save_model_filename = '15M_at_TAMS.mod'
+! save a model at the end of the run
+save_model_when_terminate = .false.
+save_model_filename = '15M_at_TAMS.mod'
- ! display on-screen plots
- pgstar_flag = .true.
+! display on-screen plots
+pgstar_flag = .true.
/ ! end of star_job namelist
&eos
- ! eos options
- ! see eos/defaults/eos.defaults
+! eos options
+! see eos/defaults/eos.defaults
/ ! end of eos namelist
&kap
- ! kap options
- ! see kap/defaults/kap.defaults
- use_Type2_opacities = .true.
- Zbase = 0.02
+! kap options
+! see kap/defaults/kap.defaults
+use_Type2_opacities = .true.
+Zbase = 0.02
/ ! end of kap namelist
&controls
- ! see star/defaults/controls.defaults
+! see star/defaults/controls.defaults
- ! starting specifications
- initial_mass = 15 ! in Msun units
- initial_z = 0.02
+! starting specifications
+initial_mass = 15 ! in Msun units
+initial_z = 0.02
- ! when to stop
+! when to stop
- ! stop when the star nears ZAMS (Lnuc/L > 0.99)
- Lnuc_div_L_zams_limit = 0.99d0
- stop_near_zams = .true.
+! ! stop when the star nears ZAMS (Lnuc/L > 0.99)
+! Lnuc_div_L_zams_limit = 0.99d0
+! stop_near_zams = .true.
- ! stop when the center mass fraction of h1 drops below this limit
- xa_central_lower_limit_species(1) = 'h1'
- xa_central_lower_limit(1) = 1d-3
+! stop when the center mass fraction of h1 drops below this limit
+xa_central_lower_limit_species(1) = 'h1'
+xa_central_lower_limit(1) = 1d-4
- ! wind
+! wind
- ! atmosphere
+! atmosphere
- ! rotation
+! rotation
- ! element diffusion
+! element diffusion
- ! mlt
+! mlt
- ! mixing
+! mixing
- ! timesteps
+! timesteps
- ! mesh
+! mesh
- ! solver
- ! options for energy conservation (see MESA V, Section 3)
- energy_eqn_option = 'dedt'
- use_gold_tolerances = .true.
+! solver
+! options for energy conservation (see MESA V, Section 3)
+energy_eqn_option = 'dedt'
+use_gold_tolerances = .true.
- ! output
+! output
/ ! end of controls namelist
diff --git a/star_data/private/pgstar_controls.inc b/star_data/private/pgstar_controls.inc
index 6098721b26..4306085947 100644
--- a/star_data/private/pgstar_controls.inc
+++ b/star_data/private/pgstar_controls.inc
@@ -2047,6 +2047,38 @@
integer, dimension(max_num_pgstar_grid_plots) :: &
Grid9_plot_row, Grid9_plot_rowspan, &
Grid9_plot_col, Grid9_plot_colspan
+
+ logical :: Max_eq_resid_win_flag, Max_eq_resid_file_flag
+ logical :: do_Max_eq_resid_win, do_Max_eq_resid_file
+ integer :: Max_eq_resid_file_interval
+ integer :: id_Max_eq_resid_win, id_Max_eq_resid_file
+ character (len=strlen) :: Max_eq_resid_file_dir, Max_eq_resid_file_prefix
+ real :: &
+ Max_eq_resid_win_width, Max_eq_resid_win_aspect_ratio, &
+ Max_eq_resid_xleft, Max_eq_resid_xright, &
+ Max_eq_resid_ybot, Max_eq_resid_ytop, &
+ prev_Max_eq_resid_win_width, prev_Max_eq_resid_win_ratio, &
+ Max_eq_resid_file_width, Max_eq_resid_file_aspect_ratio, &
+ prev_Max_eq_resid_file_width, prev_Max_eq_resid_file_ratio, &
+ Max_eq_resid_txt_scale
+ character (len=strlen) :: Max_eq_resid_title
+ integer :: Max_eq_resid_max_width
+
+ logical :: Kipp_residuals_win_flag, Kipp_residuals_file_flag
+ logical :: do_Kipp_residuals_win, do_Kipp_residuals_file
+ integer :: Kipp_residuals_file_interval
+ integer :: id_Kipp_residuals_win, id_Kipp_residuals_file
+ character (len=strlen) :: Kipp_residuals_file_dir, Kipp_residuals_file_prefix
+ real :: &
+ Kipp_residuals_win_width, Kipp_residuals_win_aspect_ratio, &
+ Kipp_residuals_xleft, Kipp_residuals_xright, &
+ Kipp_residuals_ybot, Kipp_residuals_ytop, &
+ prev_Kipp_residuals_win_width, prev_Kipp_residuals_win_ratio, &
+ Kipp_residuals_file_width, Kipp_residuals_file_aspect_ratio, &
+ prev_Kipp_residuals_file_width, prev_Kipp_residuals_file_ratio
+ character (len=strlen) :: Kipp_residuals_title, Kipp_residuals_yaxis_name
+ real :: Kipp_residuals_txt_scale
+ integer :: Kipp_residuals_max_width
integer :: annotation1_ci, annotation1_lw, annotation1_cf
diff --git a/star_data/public/star_pgstar.f90 b/star_data/public/star_pgstar.f90
index a1b7197a0e..cb1b4857f1 100644
--- a/star_data/public/star_pgstar.f90
+++ b/star_data/public/star_pgstar.f90
@@ -175,7 +175,11 @@ end subroutine pgstar_decorator_interface
integer, parameter :: i_Grid7 = i_Grid6 + 1
integer, parameter :: i_Grid8 = i_Grid7 + 1
integer, parameter :: i_Grid9 = i_Grid8 + 1
- integer, parameter :: i_Other = i_Grid9 + 1
+
+ integer, parameter :: i_Max_eq_resid = i_Grid9 + 1
+ integer, parameter :: i_Kipp_residuals = i_Max_eq_resid + 1
+
+ integer, parameter :: i_Other = i_Kipp_residuals + 1
integer, parameter :: num_pgstar_plots = i_Other + max_num_Other_plots