GWtool
Gravitational-wave tool
 All Classes Files Functions Variables Pages
gw_coalescence_pmax.f90
Go to the documentation of this file.
1 !> \file gw_coalescence_pmax.f90 Calculates the maximum initial period that can coalesce within a given time
2 
3 !
4 ! GWtool: Simple tools for working with gravitational waves
5 ! http://gwtool.sourceforge.net/
6 !
7 !
8 ! Copyright 2007-2013 AstroFloyd - astrofloyd.org
9 !
10 !
11 ! This file is part of GWtool.
12 !
13 ! GWtool is free software: you can redistribute it and/or modify
14 ! it under the terms of the GNU General Public License as published by
15 ! the Free Software Foundation, either version 3 of the License, or
16 ! (at your option) any later version.
17 !
18 ! GWtool is distributed in the hope that it will be useful,
19 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ! GNU General Public License for more details.
22 !
23 ! You should have received a copy of the GNU General Public License
24 ! along with GWtool. If not, see <http://www.gnu.org/licenses/>.
25 
26 
27 
28 !***********************************************************************************************************************************
29 !> \brief Calculates the maximum initial period that can coalesce within a given time
30 
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
35 
36  implicit none
37  real(double) :: m1,m2,per,time,cst
38  character :: tmpstr*(99)
39 
40  if(command_argument_count().eq.3) then
41  call get_command_argument(1, tmpstr)
42  read(tmpstr,*) m1
43  call get_command_argument(2, tmpstr)
44  read(tmpstr,*) m2
45  call get_command_argument(3, tmpstr)
46  read(tmpstr,*) time
47  else
48  call syntax_quit('<M1> <M2> <time> (Mo and Gyr)', 0, &
49  'This program calculates the maximum initial period that can coalesce due to GWs within a given time')
50  end if
51 
52  call set_sufr_constants()
53 
54  cst = 5.d0/256.d0 * pi2**(-8*c3rd) * pc_c**5/pc_g**(5*c3rd) * (m1+m2)**(c3rd) / (m1*m2*msun**(5*c3rd))
55 
56  per = (time*1.d9*julyear/cst)**0.375d0/solday
57 
58  write(6,'(/,A,1p,G13.5,A5,/)') ' Maximum initial period for convergence:',per,'days'
59 
60 end program gw_coalescence_pmax
61 !***********************************************************************************************************************************
program gw_coalescence_pmax
Calculates the maximum initial period that can coalesce within a given time.