GWtool
Gravitational-wave tool
 All Classes Files Functions Variables Pages
gw_isco.f90
Go to the documentation of this file.
1 !> \file gw_isco.f90 Calculates isco properties for a black hole with mass m and spin a
2 !!
3 !! \see Bardeen, Press, Teukolsky, 1972ApJ...178..347B
4 !!
5 !! AF, 2008-05-01
6 
7 
8 !
9 ! GWtool: Simple tools for working with gravitational waves
10 ! http://gwtool.sourceforge.net/
11 !
12 !
13 ! Copyright 2007-2013 AstroFloyd - astrofloyd.org
14 !
15 !
16 ! This file is part of GWtool.
17 !
18 ! GWtool is free software: you can redistribute it and/or modify
19 ! it under the terms of the GNU General Public License as published by
20 ! the Free Software Foundation, either version 3 of the License, or
21 ! (at your option) any later version.
22 !
23 ! GWtool is distributed in the hope that it will be useful,
24 ! but WITHOUT ANY WARRANTY; without even the implied warranty of
25 ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ! GNU General Public License for more details.
27 !
28 ! You should have received a copy of the GNU General Public License
29 ! along with GWtool. If not, see <http://www.gnu.org/licenses/>.
30 
31 
32 
33 !***********************************************************************************************************************************
34 program gw_isco
35  use sufr_kinds, only: double
36  use sufr_system, only: syntax_quit
37  use sufr_constants, only: set_sufr_constants, c3rd,pi, pc_g,pc_c, msun
38 
39  implicit none
40  real(double) :: a, risco,m,z1,z2,fiscogw,fiscoorb
41  integer :: narg,retro
42  character :: str*(99)
43 
44  call set_sufr_constants()
45 
46  a = 0.d0
47  narg = command_argument_count()
48  if(narg.ge.1) then
49  call get_command_argument(1,str)
50  read(str,*)m
51  if(narg.ge.2) then
52  call get_command_argument(2,str)
53  read(str,*)a
54  end if
55  else
56  call syntax_quit('<Mbh> [<a_spin>]', 0, &
57  'This program calculates ISCO properties for a black hole with mass Mbh (Mo) and dimensionless spin -1 < a_spin < 1')
58  end if
59 
60  retro = 0
61  if(a.lt.0.d0) retro = 1
62  a = abs(a)
63 
64  z1 = 1 + (1 - a*a)**c3rd * ( (1+a)**c3rd + (1-a)**c3rd )
65  z2 = sqrt(3*a*a + z1*z1)
66  if(retro.eq.0) then
67  risco = m * (3+z2 - sqrt((3-z1)*(3+z1+2*z2)) )
68  else
69  risco = m * (3+z2 + sqrt((3-z1)*(3+z1+2*z2)) )
70  end if
71  fiscoorb = pc_c**3/(2*pi*(risco/m)**1.5d0*pc_g*m*msun)
72  fiscogw = 2*fiscoorb
73 
74 
75  write(*,*)
76  write(*,'(2x,A,F12.3)') 'Mass: ', m
77  write(*,'(2x,A,F12.3)') 'Spin: ', a
78  write(*,*)
79  write(*,'(2x,A,F12.3)') 'Risco/M: ', risco/m
80  write(*,'(2x,A,F12.4)') 'fisco,orb:', fiscoorb
81  write(*,'(2x,A,F12.4)') 'fisco,gw: ', fiscogw
82  write(*,*)
83 
84 end program gw_isco
85 !***********************************************************************************************************************************
86 
program gw_isco
Definition: gw_isco.f90:34