Skip to content
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

Tidal deformation #773

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
d252780
[ci skip] add roche geometry data
Jan 21, 2025
c44f598
[ci skip] introduce procedure interfaces akin to binary_torque
Jan 21, 2025
fe0f398
[ci skip] associate procedure hooks
Jan 21, 2025
43ee89d
[ci skip] add main routines where computations happen
Jan 21, 2025
3f39198
[ci skip] add calls to build interpolators
Jan 22, 2025
ed9bfd7
[ci skip] add to build list
Jan 22, 2025
f2a8075
[ci skip] add explicit interfaces in star_data_def.inc
Jan 22, 2025
acfc9bc
select which deformation routines to use, flip fp/ft in signatures
Jan 22, 2025
e88f444
change i_rot signatures
Jan 23, 2025
8140dac
fix circular dependence
Jan 23, 2025
3575e54
do namelist ctrl_io
Jan 23, 2025
38ea77a
Merge branch 'adjust_J_q-bug' into tidal_deformation
Jan 23, 2025
09aea37
introduce single-to-tidal switching controls
Jan 23, 2025
6ab47dc
introduce single-to-tidal switching in hydro_rotation.f90
Jan 28, 2025
a9b4768
introduce single-to-tidal switching defaults
Jan 28, 2025
615b1d2
implement default single-to-tidal switching function
Jan 28, 2025
4718df1
implement hook for user-defined single-to-tidal switching function
Jan 28, 2025
e037a66
do irot in terms of 2/3 r_psi^2
Jan 30, 2025
69a1ee8
Merge branch 'main' into tidal_deformation
Jan 31, 2025
107d4df
fix-up merge
Jan 31, 2025
728b6f2
changelog entry
Jan 31, 2025
a8fb340
quiet + inter_ok outside dbg
Feb 7, 2025
94863f9
apply warrick's review
Feb 7, 2025
a716af8
always put fp first + fix ppisn other_eval_fp_ft signature
Feb 7, 2025
2f0e80b
Merge branch 'main' into tidal_deformation
Feb 7, 2025
5d3101d
let double_bh use tidal deformation
Feb 7, 2025
d31f3bc
Merge remote-tracking branch 'refs/remotes/origin/main' into tidal_de…
Mar 4, 2025
c4eb749
fix fortitude warnings
Mar 6, 2025
c79cdd6
[ci optional] fix errors in ppisn and magnetic braking; full test
Mar 11, 2025
3bab30c
[ci skip] const def module wide
Mar 11, 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
18 changes: 17 additions & 1 deletion binary/defaults/binary_controls.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@


! initial_eccentricity
! ~~~~~~~~~~~~~~~~~~~~

! Initial eccentricity of the system
! ~~~~~~~~~~~~~~~~~~~~

! ::

Expand Down Expand Up @@ -1462,6 +1462,22 @@
mdot_limit_donor_switch = 1d-20


! tidal_deformation
! ~~~~~~~~~~~~~~~~~

! use the tidal deformation corrections fp/ft and the specific moments of inertia irot
! based on binary Roche geometry integrations of Fabry et al., 2022, A&A 661, A123
! this uses the methodology of Kippenhahn and Thomas, 1970, and Endal and Sofia, 1976 to represent
! the stellar stucture on equipotential surfaces. In these coordinates, all radii are volume equivalent
! radii.

! ::

use_tidal_deformation = .false.
f_sync_switch_from_rot_defor = 8d-1
f_sync_switch_width = 1d-1
f_sync_switch_lim = 1d-2

! use_other_{hook}
! ~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion binary/make/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# goal of QUIET is to make it easier to spot warnings and/or circular dependency
# errors.

QUIET = yes
QUIET = no

include makefile_base
2 changes: 2 additions & 0 deletions binary/make/makefile_base
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ SRCS = \
binary_wind.f90 \
binary_mdot.f90 \
binary_tides.f90 \
binary_roche_deformation.f90 \
binary_edot.f90 \
binary_ctrls_io.f90 \
binary_irradiation.f90 \
Expand All @@ -71,6 +72,7 @@ SRCS = \
mod_other_binary_edot.f90 \
mod_other_binary_ce.f90 \
mod_other_implicit_rlo.f90 \
mod_other_tidal_deformation_switch_function.f90 \
mod_other_binary_extras.f90 \
mod_other_binary_photo_read.f90 \
mod_other_binary_photo_write.f90 \
Expand Down
56 changes: 56 additions & 0 deletions binary/other/mod_other_tidal_deformation_switch_function.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
! ***********************************************************************
!
! Copyright (C) 2025 Matthias Fabry and the MESA Team
!
! MESA is free software; you can use it and/or modify
! it under the combined terms and restrictions of the MESA MANIFESTO
! and 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.
!
! You should have received a copy of the MESA MANIFESTO along with
! this software; if not, it is available at the mesa website:
! http://mesa.sourceforge.net/
!
! 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 mod_other_tidal_deformation_switch_function

! NOTE: remember to set true:
! use_other_tidal_deformation_function = .true.

! you can add your own routine for use instead of the default one.
! the default routine uses the synchronicity parameter to switch from single rotating to tidal corrections.
! When the shell is quite synchronous, f_switch -> 1, when not synchronous, f_switch -> 0. It uses a sigmoid around
! omega/omega_sync = b% f_sync_switch_from_rot_defor to smoothly vary f_switch from 0 to 1.

use const_def

implicit none

contains

subroutine null_other_tidal_deformation_switch_function(id, k, omega_in, f_switch, ierr)
integer, intent(in) :: id, k
real(dp), intent(in) :: omega_in
real(dp), intent(out) :: f_switch
integer, intent(out) :: ierr
include 'formats'

write (*, 1) 'no implementation for other_tidal_deformation_function'
! must set f_switch
ierr = -1
end subroutine null_other_tidal_deformation_switch_function


end module mod_other_tidal_deformation_switch_function

15 changes: 15 additions & 0 deletions binary/private/binary_ctrls_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ module binary_ctrls_io
! miscellaneous controls
keep_donor_fixed, &
mdot_limit_donor_switch, &
use_tidal_deformation, &
f_sync_switch_from_rot_defor, &
f_sync_switch_width, &
f_sync_switch_lim, &
use_other_tidal_deformation_switch_function, &
use_other_rlo_mdot, &
use_other_check_implicit_rlo, &
use_other_implicit_function_to_solve, &
Expand Down Expand Up @@ -511,6 +516,11 @@ subroutine store_binary_controls(b, ierr)
! miscellaneous controls
b% keep_donor_fixed = keep_donor_fixed
b% mdot_limit_donor_switch = mdot_limit_donor_switch
b% use_tidal_deformation = use_tidal_deformation
b% f_sync_switch_from_rot_defor = f_sync_switch_from_rot_defor
b% f_sync_switch_width = f_sync_switch_width
b% f_sync_switch_lim = f_sync_switch_lim
b% use_other_tidal_deformation_switch_function = use_other_tidal_deformation_switch_function
b% use_other_rlo_mdot = use_other_rlo_mdot
b% use_other_check_implicit_rlo = use_other_check_implicit_rlo
b% use_other_implicit_function_to_solve = use_other_implicit_function_to_solve
Expand Down Expand Up @@ -705,6 +715,11 @@ subroutine set_binary_controls_for_writing(b, ierr)
! miscellaneous controls
keep_donor_fixed = b% keep_donor_fixed
mdot_limit_donor_switch = b% mdot_limit_donor_switch
use_tidal_deformation = b% use_tidal_deformation
f_sync_switch_from_rot_defor = b% f_sync_switch_from_rot_defor
f_sync_switch_width = b% f_sync_switch_width
f_sync_switch_lim = b% f_sync_switch_lim
use_other_tidal_deformation_switch_function = b% use_other_tidal_deformation_switch_function
use_other_rlo_mdot = b% use_other_rlo_mdot
use_other_check_implicit_rlo = b% use_other_check_implicit_rlo
use_other_implicit_function_to_solve = b% use_other_implicit_function_to_solve
Expand Down
Loading