Skip to content

adding eddy viscous damping to TDC #735

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
1daceee
[ci optional] Enabled Uq in TDC.
adamjermyn Mar 18, 2022
2aca86c
[ci optional] Enabled Uq in TDC.
adamjermyn Mar 18, 2022
3570a54
Merge branch 'tdc_uq' of github.com:MESAHub/mesa into tdc_uq
pmocz Oct 1, 2024
72cea14
compute_Chi_cell
pmocz Oct 1, 2024
91e5acd
update riemann
pmocz Oct 1, 2024
714ac8a
switch on energy viscous heating term
pmocz Oct 1, 2024
b2f51a8
add tdc coupling
pmocz Oct 1, 2024
29ff289
merge main into branch
Debraheem Feb 15, 2025
b1108cc
add eddy viscosity routine, clean up and reorganize.
Debraheem Feb 15, 2025
e200275
[ci skip] cleanup set_flags.f90
Debraheem Feb 15, 2025
d711db8
missing items from previous commit
Debraheem Feb 15, 2025
ee1d0d0
ad v_flag check and clean up
Debraheem Feb 15, 2025
d12dc92
Update star/private/hydro_rsp2.f90
Debraheem Feb 18, 2025
0a1fcc1
[ci skip]Update star/private/hydro_rsp2.f90
Debraheem Feb 18, 2025
0f987aa
[ci skip]Update star/private/hydro_rsp2.f90
Debraheem Feb 18, 2025
4e99e71
add dev test cases for radial pulsations
Debraheem Mar 17, 2025
86c0c55
[ci skip] updates to 20M RSG
Debraheem Apr 9, 2025
7034e0e
add tridiagonal density form of Uq and Eq for u_flag, update tests
Debraheem May 3, 2025
e3d5612
fixes, changes, new test cases
Debraheem Jun 11, 2025
93ae8ef
[ci skip] add some missing files
Debraheem Jun 11, 2025
cd8fe3f
[ci skip] tweaks
Debraheem Jun 11, 2025
932a098
more changes and clean up
Debraheem Jun 13, 2025
5d19031
[ci skip] fixes to evol
Debraheem Jun 14, 2025
49acc84
fix tdc pturb, add pturb to thermoy and mlt, add new test cases, add …
Debraheem Jun 26, 2025
921fad8
update turb test_output
Debraheem Jun 26, 2025
4857802
move tdc pulsations cases into new dev directory
Debraheem Jun 29, 2025
a47ae96
tweak cepheid comparison
Debraheem Jun 30, 2025
9eb0d57
Merge branch 'main' into tdc_uq
Debraheem Jun 30, 2025
e0ef22e
make rho_face wrapper public
Debraheem Jun 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions star/defaults/controls.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -4594,6 +4594,20 @@
Tsurf_factor = 1


! use_RSP_L_eqn_outer_BC
! ~~~~~~~~~~~~~~~~~~~~~~

! use RSP2 luminosity equation
! as the outer boundary condition on L rather than the
! default atmospheric BC for temperature.
! solves L1 - s% RSP2_Lsurf_factor*4*pi*r^2*c*a*T1^4 = 0
! uses dev control s% RSP2_Lsurf_factor = 0.5 (default),
! see controls_dev.defaults.list

! ::

use_RSP_L_eqn_outer_BC = .false.

! irradiation_flux
! ~~~~~~~~~~~~~~~~
! column_depth_for_irradiation
Expand Down Expand Up @@ -5880,11 +5894,15 @@
! max_surface_cell_dq
! ~~~~~~~~~~~~~~~~~~~

! min_surface_cell_dq
! ~~~~~~~~~~~~~~~~~~~

! Largest allowed dq at surface.

! ::

max_surface_cell_dq = 1d-12
min_surface_cell_dq = 1d-99


! max_num_subcells
Expand All @@ -5899,12 +5917,15 @@

! max_num_merge_cells
! ~~~~~~~~~~~~~~~~~~~
! max_num_merge_surface_cells
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~

! Limits number of old cells to merge into 1 new one.

! ::

max_num_merge_cells = 2
max_num_merge_surface_cells = 2


! mesh_adjust_get_T_from_E
Expand Down Expand Up @@ -6492,6 +6513,28 @@
merge_amr_k_for_ignore_surface_cells = 2


! merge_amr_ignore_core_cells
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~
! merge_amr_logT_for_ignore_core_cells
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
! split_amr_ignore_core_cells
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~
! split_amr_logT_for_ignore_core_cells
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

! For pulsation calulations, splitting and merging core cells can cause problems.
! If merge_amr_ignore_core_cells or split_amr_ignore_surface_cells is true,
! then the innermost cells above merge_amr_logT_for_ignore_core_cells or
! split_amr_logT_for_ignore_core_cells cells are ignored for split/merge.

! ::

merge_amr_ignore_core_cells = .false.
merge_amr_logT_for_ignore_core_cells = 1d99
split_amr_ignore_core_cells = .false.
split_amr_logT_for_ignore_core_cells = 1d99


! split_merge_amr_avoid_repeated_remesh
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
83 changes: 82 additions & 1 deletion star/defaults/controls_dev.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@


! split burn
! ================
! ==========


! op_split_burn_min_T_for_variable_T_solver
Expand All @@ -174,3 +174,84 @@
! ::

op_split_burn_min_T_for_variable_T_solver = 1d99


! TDC
! ===


! alpha_TDC_DAMPM
! ~~~~~~~~~~~~~~~
! TDC_use_density_form_for_eddy_viscosity
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


! If alpha_TDC_DAMPM >0, then include eddy viscous damping in TDC alpha_TDC_DAMPM
! This control is analogous to `RSP_alfam`, where the default is `RSP_alfam` = 0.25d0.

! If hydrostatic (v_flag, u_flag = .false. , v = 0 ) there are no velocity gradients,
! and thus no shear to drive turbulence. Without shear, the eddy viscosity term becomes zero.

! If u_flag = .true. or TDC_use_density_form_for_eddy_viscosity = .true., use density
! derivative from newton solver to form d(v/r)/dr, used to compute Eq and Uq.

! ::

alpha_TDC_DAMPM = 0.25d0
TDC_use_density_form_for_eddy_viscosity = .false.



! TDC_num_innermost_cells_forced_nonturbulent
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

! Forces innermost TDC_num_innermost_cells_forced_nonturbulent cells
! to be nonturbulent, and sets gradT = gradr in these cells.
! Useful for pulsation models in TDC.

! ::

TDC_num_innermost_cells_forced_nonturbulent = 0


! include_mlt_Pturb_in_thermodynamic_gradients
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

! If mlt_Pturb_factor > 0, includes the effect of turbulent pressure Pturb
! on thermodynamic gradients gradr, grada, and hence gradT. The correction
! is approximated as correction = Prad + Pgas / Ptotal, where Ptotal = Prad + Pgas + Pturb.
! Not supported by other_alpha_mlt or starspots

! ::

include_mlt_Pturb_in_thermodynamic_gradients = .false.



! make_mlt_hydrodynamic
! ~~~~~~~~~~~~~~~~~~~~~


! If make_mlt_hydrodynamic = .true., adopt geff = g - dv/dt from newton solver.
! gradr and scale_height are modified by this flag to hydro form.
! If .false. default to QHSE form, where g = GM/r^2
! rotation, semiconvection, and use_mass_corrections ignore this flag, see star_utils.
! not supported by RSP or RSP2.

! ::

make_mlt_hydrodynamic = .false.


! remesh_for_TDC_pulsations_log_core_zoning
! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

! If remesh_for_TDC_pulsations, .true. will rezone below RSP2_Tanchor with logarithmic
! spacing in mass. If .false., remeshing scheme will do a bisection root find such
! that each zone increases in mass inward following a power law.

! ::

remesh_for_TDC_pulsations_log_core_zoning = .false.


21 changes: 21 additions & 0 deletions star/dev_cases_TDC_Pulsation/dev_TDC_Cepheid_15M_u_flag/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.. _ppisn:

*****
ppisn
*****

This test case evolves a very massive helium star from the He-ZAMS
up to the ocurrence of a pulsational pair-instability event (see |Marchant2019|).

.. |Marchant2019| replace:: `Marchant et al. 2019 <https://ui.adsabs.harvard.edu/abs/2019ApJ...882...36M/abstract>`__

Initialization of the model
===========================
The initial mass of the helium star is set in ``inlist_extra``

.. literalinclude:: ../../../star/test_suite/ppisn/inlist_extra

In this case we use a :math:`72 M_\odot`

Last-Updated: 2019-11-12 (mesa r12413) by Pablo Marchant

7 changes: 7 additions & 0 deletions star/dev_cases_TDC_Pulsation/dev_TDC_Cepheid_15M_u_flag/ck
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

# this provides the definition of check_one
# check_one
source "${MESA_DIR}/star/test_suite/test_suite_helpers"

check_one
4 changes: 4 additions & 0 deletions star/dev_cases_TDC_Pulsation/dev_TDC_Cepheid_15M_u_flag/clean
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

cd make
make clean
34 changes: 34 additions & 0 deletions star/dev_cases_TDC_Pulsation/dev_TDC_Cepheid_15M_u_flag/gyre.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
&model
add_center = .FALSE.
/

&mode
l = 0
/

&osc
inner_bound = 'ZERO_R' ! for envelopes
nonadiabatic = .TRUE.
/

&rot
/

&num
diff_scheme = 'MAGNUS_GL2'!'COLLOC_GL2'
/

&scan
grid_type = 'LINEAR'
freq_min = 0.5!1d-4
freq_max = 5.0!10.0
freq_min_units = 'ACOUSTIC_DELTA'
freq_max_units = 'ACOUSTIC_DELTA'
n_freq = 50
/

&grid
w_osc = 10
w_exp = 2
w_ctr = 10
/

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading