Skip to content
Merged
Changes from all commits
Commits
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
25 changes: 25 additions & 0 deletions binary/public/binary_lib.f90
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,30 @@ subroutine binary_set_star_job_namelist(binary_id, name, val, ierr)

end subroutine binary_set_star_job_namelist

real(dp) function binary_compute_k_div_T(binary_id, is_donor, has_convective_envelope, ierr)
use binary_def, only: binary_info, binary_ptr
use binary_tides, only: k_div_T
use star_def, only: star_info
integer, intent(in) :: binary_id
logical, intent(in) :: is_donor
type(star_info), pointer :: s
logical, intent(in) :: has_convective_envelope
integer, intent(out) :: ierr
type (binary_info), pointer :: b

ierr = 0
call binary_ptr(binary_id, b, ierr)
if(ierr/=0) return

if(is_donor) then
s => b% s_donor
else
s => b% s_accretor
end if

binary_compute_k_div_T = k_div_T(b, s, has_convective_envelope, ierr)

end function binary_compute_k_div_T

end module binary_lib