Skip to content

Commit 22dcf4f

Browse files
authored
Merge pull request #751 from MESAHub/EbF/reimplement_drag_in_riemann_hydro
reimplement drag in riemann hydro
2 parents 666737f + d3022fd commit 22dcf4f

File tree

51 files changed

+4749
-53
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+4749
-53
lines changed

docs/source/changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ New Features
1919

2020
``mesa_reader`` can now be installed with ``pip``.
2121

22+
A pseudo drag term ``v_drag`` has been reintroduced for ``u_flag`` to damp spurious shocks.
23+
2224
.. _Bug Fixes main:
2325

2426
Bug Fixes

star/defaults/controls.defaults

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@
29852985
conv_premix_dump_snapshots = .false.
29862986

29872987

2988-
! Rayleigh Taylor Instability
2988+
! Rayleigh-Taylor Instability
29892989
! ____________________________
29902990

29912991
! derived from Paul Duffell's code RT1D.
@@ -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
@@ -8241,15 +8262,18 @@
82418262
! ::
82428263

82438264
use_dPrad_dm_form_of_T_gradient_eqn = .false.
8244-
use_gradT_actual_vs_gradT_MLT_for_T_gradient_eqn = .false.
8245-
8246-
8265+
use_gradT_actual_vs_gradT_MLT_for_T_gradient_eqn = .false.
8266+
8267+
8268+
! Hydrodynamic drag
8269+
! =================
8270+
82478271
! drag_coefficient
82488272
! ~~~~~~~~~~~~~~~~
82498273
! min_q_for_drag
82508274
! ~~~~~~~~~~~~~~
82518275

8252-
! only when v_flag. adjusts both v and energy transfer from kinetic to thermal.
8276+
! only when v_flag = .true.. Adjusts both v and energy transfer from kinetic to thermal.
82538277
! only for v(k) when q(k) > min_q_for_drag.
82548278
! kill off fraction of v = drag_coefficient (i.e. set to 1 to keep v near 0)
82558279
! useful for preventing the development radial pulsations during advanced
@@ -8274,13 +8298,35 @@
82748298
use_drag_energy = .true.
82758299
drag_coefficient = 0d0
82768300
min_q_for_drag = 0d0
8301+
8302+
8303+
! v_drag_factor
8304+
! ~~~~~~~~~~~~~
8305+
! v_drag
8306+
! ~~~~~~
8307+
! q_for_v_drag_full_off
8308+
! ~~~~~~~~~~~~~~~~~~~~~
8309+
! q_for_v_drag_full_on
8310+
! ~~~~~~~~~~~~~~~~~~~~
82778311

82788312

8279-
! for hydro comparison tests (e.g., Sedov)
8313+
! Only when u_flag = .true.. Adds a pseudo drag term of the form
8314+
! -v_drag_factor*(v-v_drag)^2/r, can be used damp velocities in outer layers
8315+
! of a star, useful for smoothing out spurious shocks colliding in ejected layers.
8316+
! Effect is full on for q>q_for_v_drag_full_on and full off for
8317+
! q < q_for_v_drag_full_off.
8318+
8319+
! ::
8320+
8321+
v_drag_factor = 0d0
8322+
v_drag = 0d0
8323+
q_for_v_drag_full_off = 0.95d0
8324+
q_for_v_drag_full_on = 0.96d0
82808325

82818326

82828327
! Rayleigh-Taylor Instability
82838328
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~
8329+
! for hydro comparison tests (e.g., Sedov)
82848330
! RTI_A
82858331
! ~~~~~
82868332
! RTI_B

star/dev_cases_star_to_RSP2/dev_BEP/src/run_star_extras.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

star/dev_cases_star_to_RSP2/dev_BW_Vul/src/run_star_extras.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

@@ -185,7 +185,7 @@ end subroutine extras_startup
185185
subroutine gyre_linear_analysis_and_set_velocities(s,restart,ierr)
186186
use const_def
187187
use math_lib
188-
use gyre_lib
188+
use gyre_mesa_m
189189
type (star_info), pointer :: s
190190
logical, intent(in) :: restart
191191
integer, intent(out) :: ierr

star/dev_cases_star_to_RSP2/dev_Cepheid/src/run_star_extras.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

@@ -514,7 +514,7 @@ end subroutine data_for_extra_profile_columns
514514
subroutine gyre_linear_analysis_and_set_velocities(s,restart,ierr)
515515
use const_def
516516
use math_lib
517-
use gyre_lib
517+
use gyre_mesa_m
518518
type (star_info), pointer :: s
519519
logical, intent(in) :: restart
520520
integer, intent(out) :: ierr

star/dev_cases_star_to_RSP2/dev_Cepheid_6M/src/run_star_extras.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

star/dev_cases_star_to_RSP2/dev_Cepheid_9M/src/run_star_extras.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

star/dev_cases_star_to_RSP2/dev_Delta_Scuti/src/run_star_extras.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

star/dev_cases_star_to_RSP2/dev_Mira/src/run_star_extras.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

star/dev_cases_star_to_RSP2/dev_RR_Lyrae/src/run_star_extras.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module run_star_extras
2626
use star_def
2727
use const_def
2828
use math_lib
29-
use gyre_lib
29+
use gyre_mesa_m
3030

3131
implicit none
3232

0 commit comments

Comments
 (0)