Logo coherent WaveBurst  
Library Reference Guide
Logo
merger.cc
Go to the documentation of this file.
1 /*
2 # Copyright (C) 2019 Sergey Klimenko, Valentin Necula
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 
19 #include "numpy.hh"
20 
21 static const double pi = 3.14159265358979312;
22 
23 
24 // Quasinormal ringdown of spin a BH (assuming M=1)
25 Complex ringdown(double a, double t)
26 { double fQNR = (1.0-0.63*pow(1.0-a,0.3))/(2.0*pi);
27  double Q = 2.0/pow(1.0-a,0.45);
28  return exp(-pi*fQNR*t/Q)*Exp(2*pi*fQNR*t);
29 }
30 
31 // IRS merger-ringdown, see http://arxiv.org/abs/0805.1428 and http://arxiv.org/abs/1107.1181
32 void irs_merger(double dt, double tmerge, double* tsig, Complex* hsig,
33 int lentsig, double a, double tstart=-1)
34 { if (tstart<0)tstart = tmerge;
35  double hmerge = fabs(hsig[int(tmerge/dt)]);
36  Complex& aux = hsig[int(tstart/dt)];
37  double phiIRS = 0.5*atan2(aux.Im(), aux.Re());
38  double omQNM = 1-0.63*pow(1-a, 0.3);
39  double Q = 2.0/pow(1.0-a, 0.45);
40  double b = 2.0*Q/omQNM;
41  //#kappa = 0.426
42  double kappa = 0.644;
43  //#c = 0.252
44  double c = 0.26;
45  //#c = 2.0*(1.0-2.0/omQNM/omega0)/((1.0+1.0/kappa)**(1+kappa)-(1.0+1.0/kappa))
46  double alpha = 72.3/(Q*Q);
47  double fhat = c/2.*( pow(1 + 1./kappa, 1+kappa) - (1+1./kappa) );
48 
49  double OmIRS = omQNM/2.0*(1.0-fhat);
50  double fdot = -c/b;
51  double Amppeak = sqrt(fabs(fdot)/(1+alpha*(fhat*fhat- pow(fhat,4))))/(2.0*OmIRS);
52 
53  for(int i=tstart/dt; i<lentsig; ++i){
54  double t = tsig[i]-tmerge;
55  fhat = c/2*pow(1+1./kappa,1+kappa)*( 1 - pow(1+exp(-2*t/b)/kappa, -kappa) );
56  OmIRS = omQNM/2*(1-fhat);
57  fdot = -c/b*pow(1+1./kappa,1+kappa)*pow(1+exp(-2*t/b)/kappa,-1.0-kappa)*exp(-2*t/b);
58  double Amp = hmerge*sqrt(fabs(fdot)/(1+alpha*(fhat*fhat-pow(fhat, 4))))/(2*OmIRS*Amppeak);
59  phiIRS += OmIRS*dt;
60  hsig[i] = Amp*Exp(2*phiIRS);
61  }
62 }
wavearray< double > t(hp.size())
double aux
Definition: testWDM_5.C:14
Complex ringdown(double a, double t)
Definition: merger.cc:25
wavearray< double > a(hp.size())
double Im() const
Definition: numpy.hh:33
Complex Exp(double phase)
Definition: numpy.cc:51
i drho i
double tstart
i() int(T_cor *100))
double dt
double fabs(const Complex &x)
Definition: numpy.cc:55
double Q
void irs_merger(double dt, double tmerge, double *tsig, Complex *hsig, int lentsig, double a, double tstart=-1)
Definition: merger.cc:32
static const double pi
Definition: merger.cc:21
double Re() const
Definition: numpy.hh:32
Definition: numpy.hh:29