GWtool
Gravitational-wave tool
 All Classes Files Functions Variables Pages
gw_coalescence_time_from_f0.f90
Go to the documentation of this file.
1 !> \file gw_coalescence_time_from_f0.f90 Calculates time of coalescence for a LIGO binary from certain frequency f0.
2 !!
3 !! Adapted from p2a.f
4 
5 
6 !
7 ! GWtool: Simple tools for working with gravitational waves
8 ! http://gwtool.sourceforge.net/
9 !
10 !
11 ! Copyright 2007-2013 AstroFloyd - astrofloyd.org
12 !
13 !
14 ! This file is part of GWtool.
15 !
16 ! GWtool is free software: you can redistribute it and/or modify
17 ! it under the terms of the GNU General Public License as published by
18 ! the Free Software Foundation, either version 3 of the License, or
19 ! (at your option) any later version.
20 !
21 ! GWtool is distributed in the hope that it will be useful,
22 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
23 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ! GNU General Public License for more details.
25 !
26 ! You should have received a copy of the GNU General Public License
27 ! along with GWtool. If not, see <http://www.gnu.org/licenses/>.
28 
29 
30 
31 
32 !***********************************************************************************************************************************
34  use sufr_kinds, only: double
35  use sufr_system, only: syntax_quit
36  use sufr_constants, only: set_sufr_constants, c3rd,pi,d2r, pc_g,pc_c, msun
37 
38  implicit none
39  real(double) :: m1,m2,mc,mu,eta, t,f0,m,s,theta,x,beta,pn, m0
40  character :: str*(6)
41 
42  if(command_argument_count().eq.5) then
43  call get_command_argument(1,str)
44  read(str,*)f0
45  call get_command_argument(2,str)
46  read(str,*)m1
47  call get_command_argument(3,str)
48  read(str,*)m2
49  call get_command_argument(4,str)
50  read(str,*)s
51  call get_command_argument(5,str)
52  read(str,*)theta
53  else
54  call syntax_quit('<f0> <M1> <M2> <S1> <theta_SL>', 0, &
55  'This program calculates the coalescence time for a binary with masses M1 and M2 from a lower GW frequency of f0')
56  end if
57 
58  call set_sufr_constants()
59 
60  m0 = msun*pc_g/pc_c**3 ! Solar mass in seconds (4.926d-6)
61  theta = theta*d2r
62 
63  m = m1+m2
64  mu = m1*m2/m
65  eta = mu/m
66  mc = m*eta**0.6
67 
68  ! Newtonian:
69  t = 5*(8.d0*pi*f0)**(-8.d0*c3rd) * (mc*m0)**(-5.d0*c3rd)
70 
71  ! PN:
72  beta = 1.d0/12.d0*(113*(m1/m)**2 + 75*eta)*s*cos(theta)
73  x = pi*m*m0*f0
74  pn = 1.d0 + 0.75d0*(743.d0/336.d0 + 11.d0/4.d0*eta)*x**(2*c3rd) - 8.d0/5.d0*(4*pi-beta)*x
75 
76 
77  write(6,*)''
78  write(6,'(2x,A,3F15.4)') 'M1,M2,f0: ',m1,m2,f0
79  write(6,'(2x,A,3F15.4)') 'Mu,eta,Mc: ',mu,eta,mc
80  write(6,'(2x,A)') 'Tcoal: '
81  write(6,'(2x,A,F15.4)') ' Newtonian: ',t
82  write(6,'(2x,A,F15.4)') ' PN: ',t*pn
83  write(6,*)''
84 
86 !***********************************************************************************************************************************
87 
program gw_coalescence_time_from_f0