Skip to content

Commit 34ffaae

Browse files
authored
Turn on carbon_kh test case (#522)
Test runs the high resolution time-centered `eps_grav` case from the convergence study of MESA VI.
1 parent 17f5778 commit 34ffaae

File tree

10 files changed

+33
-9
lines changed

10 files changed

+33
-9
lines changed

star/test_suite/carbon_kh/README.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,19 @@ non-degenerate conditions to conditions of relativistic electron
2424
degeneracy and the dominant energy loss mechanism transitions from
2525
radiative diffusion to optically-thin neutrino cooling.
2626

27+
This case is discussed extensively in section 5.2 of
28+
`MESA Instrument Paper VI <https://ui.adsabs.harvard.edu/abs/2023ApJS..265...15J/abstract>`__.
29+
You can run the full resolution study described in that section by
30+
using the ``rnall`` bash script, which links to different energy equation
31+
and resolution options to run through the model 12 times. This will produce
32+
the output necessary for reproducing plots like the ones below and seen in
33+
figures 9 and 10 of the instrument paper.
34+
35+
By default, the test suite ``rn`` script runs just one of these instances:
36+
the high resolution run using the ``eps_grav`` energy equation option,
37+
which should run in a few minutes, appears reasonably converged based on the plots
38+
below, and exhibits a small cumulative energy error.
39+
2740
The included Jupyter notebook (``docs/carbon_kh.ipynb``) provides
2841
information about reproducing the following convergence study.
2942

@@ -34,5 +47,5 @@ information about reproducing the following convergence study.
3447
.. image:: ../../../star/test_suite/carbon_kh/docs/carbon_kh_total_energy_history_with_rel_cum_E_err.png
3548

3649

37-
Last-Updated: 2021-08-26 (mesa e9d467610) by Josiah Schwab
50+
Last-Updated: 2023-04-03 (mesa 81ad921) by Evan Bauer
3851

star/test_suite/carbon_kh/inlist_carbon_kh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
load_saved_model = .true.
55
load_model_filename = 'pure_carbon_at_rhoc_10gcc.mod'
66

7+
save_model_when_terminate = .true.
8+
save_model_filename = 'final.mod'
9+
required_termination_code_string = 'log_center_density_limit'
10+
711
set_initial_age = .true.
812
initial_age = 0
913

@@ -65,9 +69,9 @@
6569

6670
history_interval = 1
6771
write_profiles_flag = .true.
68-
profile_interval = 1000000000
69-
photo_interval = 1000000000
70-
terminal_interval = 10
72+
profile_interval = 10000
73+
photo_interval = 100
74+
terminal_interval = 10
7175

7276
num_trace_history_values = 2
7377
trace_history_value_name(1) = 'rel_E_err'
@@ -76,10 +80,10 @@
7680
use_gold2_tolerances = .true.
7781

7882
! for convergence studies
79-
read_extra_controls_inlist(2) = .false.
83+
read_extra_controls_inlist(2) = .true.
8084
extra_controls_inlist_name(2)= 'inlist_resolution'
8185

82-
read_extra_controls_inlist(3) = .false.
86+
read_extra_controls_inlist(3) = .true.
8387
extra_controls_inlist_name(3)= 'inlist_equations'
8488

8589
/ ! end of controls namelist
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
inlists/inlist_eps_grav
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
inlists/inlist_hr

star/test_suite/carbon_kh/inlists/inlist_eps_grav

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
&controls
22

33
energy_eqn_option = 'eps_grav'
4+
use_time_centered_eps_grav = .true.
45

56
! turn off energy error related things
67
limit_for_rel_error_in_energy_conservation = 1d99

star/test_suite/carbon_kh/inlists/inlist_eps_grav_future renamed to star/test_suite/carbon_kh/inlists/inlist_eps_grav_old

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
&controls
22

33
energy_eqn_option = 'eps_grav'
4-
use_time_centered_eps_grav = .true.
4+
use_time_centered_eps_grav = .false.
55

66
! turn off energy error related things
77
limit_for_rel_error_in_energy_conservation = 1d99

star/test_suite/carbon_kh/inlists/inlist_hr

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@
66

77
terminal_interval = 100
88

9+
! limit max_model_number as part of test_suite
10+
max_model_number = 4000
11+
912
/ ! end of controls namelist

star/test_suite/carbon_kh/rnall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ do_set(){
1717
}
1818

1919
do_set dedt_total
20+
do_set eps_grav_old
2021
do_set eps_grav
21-
do_set eps_grav_future
2222

star/test_suite/carbon_kh/standard_pure_carbon_at_rhoc_10gcc.mod

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

star/test_suite/do1_test_source

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ do_one 16M_predictive_mix "termination code: xa_central_lower_limit" "tams.mod"
2626
do_one 20M_z2m2_high_rotation "stop because have dropped below central lower limit for he4" "final.mod" auto
2727
do_one accreted_material_j "star_mass_max_limit" "final.mod" auto
2828
do_one adjust_net "finished with expected number of species" "final.mod" auto
29+
do_one carbon_kh "stop because log_center_density >= log_center_density_limit" "final.mod" auto
2930
do_one cburn_inward "Terminate as flame reached half way" "final.mod" auto
3031
do_one check_pulse_atm "all values are within tolerance" "final.mod" skip
3132
do_one check_redo "stop because have dropped below central lower limit for h1" "final.mod" auto

0 commit comments

Comments
 (0)