Skip to content

Commit d3022fd

Browse files
committed
more tweaks and new controls for mixing near surface
1 parent f84db51 commit d3022fd

File tree

13 files changed

+94
-38
lines changed

13 files changed

+94
-38
lines changed

star/defaults/controls.defaults

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4135,6 +4135,27 @@
41354135
D_mix_rotation_min_logT_full_off = 9.5d0
41364136

41374137

4138+
! D_mix_rotation_min_tau_full_off
4139+
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4140+
4141+
! Drop rotational components of ``D_mix`` for locations where tau <= this.
4142+
! For numerical stability, turn off rotational part of ``D_mix`` at very low tau.
4143+
4144+
! ::
4145+
4146+
D_mix_rotation_min_tau_full_off = 0d0
4147+
4148+
! D_mix_rotation_max_tau_full_on
4149+
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4150+
4151+
! Use rotational components of ``D_mix`` for locations where tau >= this.
4152+
! For numerical stability, turn off rotational part of ``D_mix`` at very low tau.
4153+
4154+
! ::
4155+
4156+
D_mix_rotation_min_tau_full_on = 0d0
4157+
4158+
41384159
! D_omega_max_replacement_fraction
41394160
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41404161
! D_omega_growth_rate

star/dev_cases_test_TDC/dev_TDC_through_ppisn/he_dep.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

star/dev_cases_test_TDC/dev_TDC_through_ppisn/inlist_pgstar

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
Grid2_win_flag = .true.
1515
!Grid2_win_flag = .false.
1616

17-
Grid2_win_width = 13 !15
17+
Grid2_win_width = 21 !15
1818
Grid2_win_aspect_ratio = 0.65 ! aspect_ratio = height/width
1919

2020
Grid2_plot_name(4) = 'Mixing'
21-
21+
Mixing_show_rotation_details = .true.
22+
2223
Grid2_num_cols = 7 ! divide plotting region into this many equal width cols
2324
Grid2_num_rows = 8 ! divide plotting region into this many equal height rows
2425

@@ -202,7 +203,7 @@
202203
Grid2_file_dir = 'png'
203204
Grid2_file_prefix = 'grid_'
204205
Grid2_file_interval = 10 ! 1 ! output when mod(model_number,Grid2_file_interval)==0
205-
Grid2_file_width = -1 ! negative means use same value as for window
206+
Grid2_file_width = 27 ! negative means use same value as for window
206207
Grid2_file_aspect_ratio = -1 ! negative means use same value as for window
207208

208209
!show_TRho_Profile_eos_regions = .true.

star/dev_cases_test_TDC/dev_TDC_through_ppisn/inlist_ppisn

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
! this are options for the relaxation of the model in-between pulses
3333
timescale_for_relax_entropy = 1d-15
3434
max_dt_for_relax_entropy = 5d-17
35-
num_timescales_for_relax_entropy = 30
35+
num_timescales_for_relax_entropy = 30 ! probably need 50 or more, takes a while.
3636
max_steps_to_relax_entropy = 10000
3737
relax_omega_max_yrs_dt = 1d-5
3838

@@ -64,6 +64,12 @@
6464

6565
&controls
6666

67+
! remove limits on rotational mixing in the core
68+
D_mix_rotation_max_logT_full_on = 1d11
69+
D_mix_rotation_max_logT_full_off = 1d12
70+
71+
72+
6773
! atmosphere
6874
! Pextra_factor = 1
6975
! ! need this extra pressure to stabilize the atmosphere during core He burning
@@ -117,24 +123,24 @@
117123

118124
!relax_use_gold_tolerances = .false.
119125
use_gold_tolerances = .true.
120-
use_gold2_tolerances = .false.
121-
maxT_for_gold_tolerances = 3.7d9 ! this is to ease core-collapse (~logT=9.7)
126+
use_gold2_tolerances = .true.
127+
maxT_for_gold_tolerances = 1d99!3.7d9 ! this is to ease core-collapse (~logT=9.7)
122128
gold_iter_for_resid_tol2 = 10
123129
gold_iter_for_resid_tol3 = 10
124130
gold_tol_residual_norm3 = 1d-6
125131
gold_tol_max_residual3 = 1d-3
126132
gold_solver_iters_timestep_limit = 20
127133
solver_iters_timestep_limit = 50
128-
ignore_too_large_correction = .true.
134+
ignore_too_large_correction = .false.
129135
scale_max_correction = 0.1d0
130136
!corr_coeff_limit = 0.2d0
131137
ignore_min_corr_coeff_for_scale_max_correction = .true.
132138
ignore_species_in_max_correction = .true.
133139

134140
! Can be helpful to decrease op_split_burn_min_T
135141
! to 3d9 or even 1d9 for large networks to avoid crashes
136-
op_split_burn = .false.
137-
op_split_burn_min_T = 3.0d9
142+
op_split_burn = .true.
143+
op_split_burn_min_T = 1d9
138144
burn_steps_limit = 150
139145
burn_steps_hard_limit = 250
140146
op_split_burn_eps = 1d-5
@@ -238,7 +244,7 @@
238244
! mesh controls
239245
okay_to_remesh = .true.
240246
max_dq = 1d-3 ! RECOMMENDED 1d-3
241-
mesh_delta_coeff = 0.8d0 ! RECOMMENDED 0.8d0
247+
mesh_delta_coeff = 1d0 ! RECOMMENDED 0.8d0
242248
!! this one is turned on in run_star_extras
243249
!use_split_merge_amr = .true.
244250
split_merge_amr_log_zoning = .true.

star/dev_cases_test_TDC/dev_TDC_through_ppisn/inlist_to_he_dep

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,13 @@
1515
save_model_filename = 'he_dep.mod'
1616
required_termination_code_string = 'xa_central_lower_limit'
1717

18-
read_extra_star_job_inlist(1) = .true.
19-
extra_star_job_inlist_name(1) = 'inlist_ppisn'
18+
2019

2120
/ !end of star_job namelist
2221

2322

2423
&controls
2524

26-
read_extra_controls_inlist(1) = .true.
27-
extra_controls_inlist_name(1)= 'inlist_ppisn'
2825

2926
! stop when the center mass fraction of h1 drops below this limit
3027
xa_central_lower_limit_species(1) = 'he4'

star/dev_cases_test_TDC/dev_TDC_through_ppisn/inlist_to_he_dep_header

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11

22
&star_job
33

4+
read_extra_star_job_inlist(1) = .true.
5+
extra_star_job_inlist_name(1) = 'inlist_ppisn'
46

57
read_extra_star_job_inlist(2) = .true.
68
extra_star_job_inlist_name(2) = 'inlist_to_he_dep'
79

10+
811
/ ! end of star_job namelist
912

1013

@@ -28,7 +31,10 @@
2831
&controls
2932

3033
read_extra_controls_inlist(1) = .true.
31-
extra_controls_inlist_name(1)= 'inlist_to_he_dep'
34+
extra_controls_inlist_name(1)= 'inlist_ppisn'
35+
36+
read_extra_controls_inlist(2) = .true.
37+
extra_controls_inlist_name(2)= 'inlist_to_he_dep'
3238

3339
/ ! end of controls namelist
3440

star/dev_cases_test_TDC/dev_TDC_through_ppisn/rn

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ source "${MESA_DIR}/star/test_suite/test_suite_helpers"
1010
date "+DATE: %Y-%m-%d%nTIME: %H:%M:%S"
1111

1212
# check if can skip building starting model
13-
#if [ -n "$MESA_SKIP_OPTIONAL" ]; then
14-
# cp standard_he_dep.mod he_dep.mod
15-
#else
16-
# do_one inlist_to_he_dep_header he_dep.mod
17-
# cp he_dep.mod standard_he_dep.mod
18-
#fi
13+
if [ -n "$MESA_SKIP_OPTIONAL" ]; then
14+
cp standard_he_dep.mod he_dep.mod
15+
else
16+
do_one inlist_to_he_dep_header he_dep.mod
17+
cp he_dep.mod standard_he_dep.mod
18+
fi
1919

2020
do_one inlist_pulses_header final.mod
2121

star/dev_cases_test_TDC/dev_TDC_through_ppisn/src/run_star_extras.f90

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,7 @@ integer function extras_start_step(id)
866866
if (.not. in_inlist_pulses .and. .not. s% lxtra(lx_he_zams)) then
867867
lburn_div_lsurf = abs(s% L_nuc_burn_total*Lsun/s% L(1))
868868
if (lburn_div_lsurf > 0d0) then
869-
if((abs(log10(lburn_div_lsurf))) < 0.01 .and. &
869+
if((abs(log10(lburn_div_lsurf))) < 0.1 .and. &
870870
(s% star_age > 1d3 .or. s% center_he4 < 0.98d0)) then
871871
s% use_other_before_struct_burn_mix = .false.
872872
call star_relax_uniform_omega(id, 1, s% job% new_omega_div_omega_crit,&
@@ -1272,9 +1272,13 @@ subroutine my_before_struct_burn_mix(id, dt, res)
12721272
if(s% u_flag) then
12731273
call star_read_controls(id, 'inlist_hydro_on', ierr)
12741274
if (s% xtra(x_time_start_pulse) > 0d0) then
1275-
s% v_drag = s% u(1)
1276-
s% v_drag_factor = 1d0
1277-
write(*,*) 'using drag'
1275+
!s% v_drag = 2d4 !s% u(1)
1276+
!s% v_drag_factor = 1d0
1277+
!s% v_drag = 2d9
1278+
!s% v_drag_factor = 1d0
1279+
s% D_mix_rotation_min_tau_full_off = 1d0
1280+
s% D_mix_rotation_min_tau_full_on = 10d0
1281+
write(*,*) 'u_flag is on, pulse has begun'
12781282
if (.not. s% lxtra(lx_using_bb_bcs)) then
12791283
s% max_timestep = max_dt_during_pulse
12801284
else
@@ -1289,13 +1293,17 @@ subroutine my_before_struct_burn_mix(id, dt, res)
12891293
end do
12901294
if (k > 1) then
12911295
s% max_q_for_convection_with_hydro_on = s% q(k)
1296+
!if (s% tau(k)> 10d0) then
1297+
!s% D_mix_rotation_min_tau_full_off = s% tau(k)
1298+
!end if
12921299
end if
12931300
else
1301+
write (*,*) 'u_flag is on, Pulse has not begun.'
12941302
s% max_timestep = max_dt_before_pulse
12951303
!!this prevents surface from going mad right when hydro is turned on
12961304
!right after a relax
1297-
s% v_drag = 0d0
1298-
s% v_drag_factor = 1d0
1305+
!s% v_drag = 0d0
1306+
!s% v_drag_factor = 1d0
12991307
!s% max_timestep = 1d99
13001308
s% max_q_for_convection_with_hydro_on = 0.999d0
13011309
end if
@@ -1390,7 +1398,7 @@ subroutine my_before_struct_burn_mix(id, dt, res)
13901398
end if
13911399
if (safe_log10(abs(power_photo)) > max_Lphoto_for_lgLnuc_limit) then
13921400
s% delta_lgL_power_photo_limit = delta_lgLnuc_limit
1393-
s% delta_lgL_power_photo_hard_limit = 2d0*delta_lgLnuc_limit
1401+
s% delta_lgL_power_photo_hard_limit = 10d0*delta_lgLnuc_limit
13941402
else
13951403
s% delta_lgL_power_photo_limit = -1d0
13961404
s% delta_lgL_power_photo_hard_limit = -1d0

star/dev_cases_test_TDC/dev_TDC_through_ppisn/standard_he_dep.mod

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

star/dev_cases_test_TDC/dev_TDC_through_ppisn/zams.mod

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)