32 use sufr_kinds
, only: double
33 use sufr_system
, only: syntax_quit
34 use sufr_constants
, only: set_sufr_constants, c3rd,pi2, pc_g,pc_c, msun, solday,julyear
37 real(double) :: m1,m2,time,cst,pin,pf83,pf
38 character :: tmpstr*(99)
40 if(command_argument_count().eq.4)
then
41 call get_command_argument(1, tmpstr)
43 call get_command_argument(2, tmpstr)
45 call get_command_argument(3, tmpstr)
47 call get_command_argument(4, tmpstr)
50 call syntax_quit(
'<M1> <M2> <Pi> <t> (Mo, days and yr)', 0, &
51 'This program calculates the orbital period of a detached stellar binary after a given time of GW evolution')
54 call set_sufr_constants()
56 cst = 5.d0/256.d0 * pi2**(-8.d0*c3rd) * pc_c**5 / pc_g**(5.d0*c3rd) * (m1+m2)**c3rd / (m1*m2*msun**(5.d0*c3rd))
57 pf83 = (pin*solday)**(8.d0*c3rd) - time*julyear/cst
62 write(*,
'(2x,A,ES11.3,A)')
'System has already merged after ',time,
' yr.'
66 pf = pf83 ** 0.375d0 / solday
68 write(*,
'(2x,A,ES20.9,A5)')
'Pf: ',pf,
' days'
69 write(*,
'(2x,A,ES20.9,A5)')
'Pf/Pi: ',pf/pin,
''
program gw_final_period
Calculates the orbital period of a detached stellar binary after a given time of GW evolution...