Skip to content

Commit 54c4dc0

Browse files
authored
Add public interface for k_div_T (#524)
1 parent 72c52f2 commit 54c4dc0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

binary/public/binary_lib.f90

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,5 +229,30 @@ subroutine binary_set_star_job_namelist(binary_id, name, val, ierr)
229229

230230
end subroutine binary_set_star_job_namelist
231231

232+
real(dp) function binary_compute_k_div_T(binary_id, is_donor, has_convective_envelope, ierr)
233+
use binary_def, only: binary_info, binary_ptr
234+
use binary_tides, only: k_div_T
235+
use star_def, only: star_info
236+
integer, intent(in) :: binary_id
237+
logical, intent(in) :: is_donor
238+
type(star_info), pointer :: s
239+
logical, intent(in) :: has_convective_envelope
240+
integer, intent(out) :: ierr
241+
type (binary_info), pointer :: b
242+
243+
ierr = 0
244+
call binary_ptr(binary_id, b, ierr)
245+
if(ierr/=0) return
246+
247+
if(is_donor) then
248+
s => b% s_donor
249+
else
250+
s => b% s_accretor
251+
end if
252+
253+
binary_compute_k_div_T = k_div_T(b, s, has_convective_envelope, ierr)
254+
255+
end function binary_compute_k_div_T
256+
232257
end module binary_lib
233258

0 commit comments

Comments
 (0)