Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALSimulation 6.2.0.1-5e288d3
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
LALSimInspiralEccentricTD.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 M. Haney, A. Gopakumar
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 2 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 with program; see the file COPYING. If not, write to the
16 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA
18 */
19
20#include <math.h>
21
22#include <gsl/gsl_const.h>
23#include <gsl/gsl_errno.h>
24#include <gsl/gsl_math.h>
25#include <gsl/gsl_odeiv.h>
26
27#include <lal/LALSimInspiral.h>
28#include <lal/LALConstants.h>
29#include <lal/LALStdlib.h>
30#include <lal/TimeSeries.h>
31#include <lal/Units.h>
32
33#include "check_series_macros.h"
34
35#ifdef __GNUC__
36#define UNUSED __attribute__ ((unused))
37#else
38#define UNUSED
39#endif
40
41/*
42 * This structure contains the intrinsic parameters and angular velocity
43 * co-efficient for the evolution equations for angular velocity,
44 * orbital eccentricity and the mean anomaly of the quasi-Keplerian orbit.
45 * These are computed by XLALSimInspiralEccTaylorT4Setup routine.
46 */
47
48typedef struct
49tagexpnCoeffsEccTaylorT4 {
50
51 /* angular velocity coefficient*/
53
54 /* static (mass) parameters in orbital evolution equations */
55 REAL8 mt,eta,ST;
56
57 /* symmetric mass ratio, total mass, component masses*/
58 REAL8 nu,m,m1,m2,mu;
60
61/*
62 *
63 */
64
66 REAL8 v, /* post-Newtonian parameter */
67 REAL8 et, /* orbital eccentricity */
69);
70
71/*
72 * This strucuture contains pointers to the functions for calculating
73 * the post-Newtonian accurate evolution equations at the desired order. They can be set by
74 * XLALSimInspiralEccTaylorT4Setup by passing an appropriate PN order.
75 */
76
77typedef struct
78tagexpnFuncEccTaylorT4
79{
84
85/*
86 * Computes the rate of increase of the orbital velocity for a post-Newtonian
87 * inspiral in an eccentric orbit.
88 *
89 * Implements Equations (3.12a), (3.14a), (3.15a), (B9a) and (B9b) of:
90 * Sashwat Tanay, Maria Haney, and Achamveedu Gopakumar,
91 * \"Frequency and time domain inspiral waveforms from comparable
92 * mass compact binaries in eccentric orbits\", (2015);
93 * arXiv:TBD
94 * https://dcc.ligo.org/P1500148-v1
95 *
96 * Note that above equation uses x = v^2 as the PN expansion parameter.
97 */
98
99static REAL8
101 REAL8 v, /* post-Newtonian parameter */
102 REAL8 et, /* orbital eccentricity */
103 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
104 )
105{
106 REAL8 ans;
107 REAL8 OTS;
108
109 REAL8 CFdvdt;
110 REAL8 POLdvdt0;
111
112 OTS = sqrt(1. - et * et);
113
114 CFdvdt = ak->eta * pow(v, 9.0) / (2. * ak->mt * ak->ST);
115 POLdvdt0 = (192. + 584. * pow(et, 2.0) + 74 * pow(et, 4.0)) / (15. * pow(OTS, 7.0));
116
117 ans = CFdvdt * POLdvdt0;
118
119 return ans;
120}
121
122static REAL8
124 REAL8 v, /* post-Newtonian parameter */
125 REAL8 et, /* orbital eccentricity */
126 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
127 )
128{
129 REAL8 ans;
130 REAL8 OTS;
131
132 REAL8 CFdvdt;
133 REAL8 POLdvdt0;
134 REAL8 POLdvdt2;
135
136 OTS = sqrt(1. - et * et);
137
138 CFdvdt = ak->eta * pow(v, 9.0) / (2. * ak->mt * ak->ST);
139 POLdvdt0 = (192. + 584. * pow(et, 2.0) + 74 * pow(et, 4.0)) / (15. * pow(OTS, 7.0));
140 POLdvdt2 = ((-11888. + pow(et, 2.0) * (87720. - 159600. * ak->eta) + pow(et, 4.0) * (171038. - 141708. * ak->eta)
141 + pow(et, 6.0) * (11717. - 8288. * ak->eta) - 14784. * ak->eta) * pow(v, 2.0)) / (420. * pow(OTS, 9.0));
142
143 ans = CFdvdt * (POLdvdt0 + POLdvdt2);
144
145 return ans;
146}
147
148static REAL8
150 REAL8 v, /* post-Newtonian parameter */
151 REAL8 et, /* orbital eccentricity */
152 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
153 )
154{
155 REAL8 ans;
156 REAL8 OTS;
157
158 REAL8 CFdvdt;
159 REAL8 POLdvdt0;
160 REAL8 POLdvdt2;
161 REAL8 FACdvdt3;
162 REAL8 RFTdvdt3;
163
164 OTS = sqrt(1. - et * et);
165
166 CFdvdt = ak->eta * pow(v, 9.0) / (2. * ak->mt * ak->ST);
167 POLdvdt0 = (192. + 584. * pow(et, 2.0) + 74 * pow(et, 4.0)) / (15. * pow(OTS, 7.0));
168 POLdvdt2 = ((-11888. + pow(et, 2.0) * (87720. - 159600. * ak->eta) + pow(et, 4.0) * (171038. - 141708. * ak->eta)
169 + pow(et, 6.0) * (11717. - 8288. * ak->eta) - 14784. * ak->eta) * pow(v, 2.0)) / (420. * pow(OTS, 9.0));
170 FACdvdt3 = (256./5.) * LAL_PI * pow(v, 3.0);
171 RFTdvdt3 = (1. + 7.260831042 * pow(et, 2.0) + 5.844370473 * pow(et, 4.0) + 0.8452020270 * pow(et, 6.0)
172 + 0.07580633432 * pow(et, 8.0) + 0.002034045037 * pow(et, 10.0)) / (1. - 4.900627291 * pow(et, 2.0)
173 + 9.512155497 * pow(et, 4.0) - 9.051368575 * pow(et, 6.0) + 4.096465525 * pow(et, 8.0)
174 - 0.5933309609 * pow(et, 10.0) - 0.05427399445 * pow(et, 12.0) - 0.009020225634 * pow(et, 14.0));
175
176 ans = CFdvdt * (POLdvdt0 + POLdvdt2 + (FACdvdt3 * RFTdvdt3));
177
178 return ans;
179}
180
181static REAL8
183 REAL8 v, /* post-Newtonian parameter */
184 REAL8 et, /* orbital eccentricity */
185 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
186 )
187{
188 REAL8 ans;
189 REAL8 OTS;
190
191 REAL8 CFdvdt;
192 REAL8 POLdvdt0;
193 REAL8 POLdvdt2;
194 REAL8 FACdvdt3;
195 REAL8 RFTdvdt3;
196 REAL8 POLdvdt4;
197
198 OTS = sqrt(1. - et * et);
199
200 CFdvdt = ak->eta * pow(v, 9.0) / (2. * ak->mt * ak->ST);
201 POLdvdt0 = (192. + 584. * pow(et, 2.0) + 74 * pow(et, 4.0)) / (15. * pow(OTS, 7.0));
202 POLdvdt2 = ((-11888. + pow(et, 2.0) * (87720. - 159600. * ak->eta) + pow(et, 4.0) * (171038. - 141708. * ak->eta)
203 + pow(et, 6.0) * (11717. - 8288. * ak->eta) - 14784. * ak->eta) * pow(v, 2.0)) / (420. * pow(OTS, 9.0));
204 FACdvdt3 = (256./5.) * LAL_PI * pow(v, 3.0);
205 RFTdvdt3 = (1. + 7.260831042 * pow(et, 2.0) + 5.844370473 * pow(et, 4.0) + 0.8452020270 * pow(et, 6.0)
206 + 0.07580633432 * pow(et, 8.0) + 0.002034045037 * pow(et, 10.0)) / (1. - 4.900627291 * pow(et, 2.0)
207 + 9.512155497 * pow(et, 4.0) - 9.051368575 * pow(et, 6.0) + 4.096465525 * pow(et, 8.0)
208 - 0.5933309609 * pow(et, 10.0) - 0.05427399445 * pow(et, 12.0) - 0.009020225634 * pow(et, 14.0));
209 POLdvdt4 = ((-360224. + 4514976. * ak->eta + 1903104. * pow(ak->eta, 2.0)
210 + pow(et, 8.0) * (3523113. - 3259980. * ak->eta + 1964256. * pow(ak->eta, 2.0))
211 + pow(et, 2.0) * (-92846560. + 15464736. * ak->eta + 61282032. * pow(ak->eta, 2.0))
212 + pow(et, 6.0) * (83424402. - 123108426. * ak->eta + 64828848. * pow(ak->eta, 2.0))
213 + pow(et, 4.0) * (783768. - 207204264. * ak->eta + 166506060. * pow(ak->eta, 2.0))
214 - 3024. * (96. + 4268. * pow(et, 2.0) + 4386. * pow(et, 4.0)
215 + 175. * pow(et, 6.0))*(-5. + 2. * ak->eta) * OTS) * pow(v, 4.0)) / (45360. * pow(OTS, 11.0));
216
217 ans = CFdvdt * (POLdvdt0 + POLdvdt2 + (FACdvdt3 * RFTdvdt3) + POLdvdt4);
218
219 return ans;
220}
221
222/*
223 * Computes the rate of increase of the orbital eccentricity for a post-Newtonian
224 * inspiral in an eccentric orbit.
225 *
226 * Implements Equations (3.12b), (3.14a), (3.14b), (3.15b), (3.16), (B9c) and (B9d) of:
227 * Sashwat Tanay, Maria Haney, and Achamveedu Gopakumar,
228 * \"Frequency and time domain inspiral waveforms from comparable
229 * mass compact binaries in eccentric orbits\", (2015);
230 * arXiv:TBD
231 * https://dcc.ligo.org/P1500148-v1
232 *
233 * Note that above equation uses x = v^2 as the PN expansion parameter.
234 */
235
236static REAL8
238 REAL8 v, /* post-Newtonian parameter */
239 REAL8 et, /* orbital eccentricity */
240 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
241 )
242{
243 REAL8 ans;
244 REAL8 OTS;
245
246 REAL8 CFdedt;
247 REAL8 POLdedt0;
248
249 OTS = sqrt(1. - et * et);
250
251 CFdedt = - et * ak->eta * pow(v, 8.0) / (ak->mt * ak->ST);
252 POLdedt0 = (304. + 121. * pow(et, 2.0)) / (15. * pow(OTS, 5.0));
253
254 ans = CFdedt * POLdedt0;
255
256 return ans;
257}
258
259static REAL8
261 REAL8 v, /* post-Newtonian parameter */
262 REAL8 et, /* orbital eccentricity */
263 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
264 )
265{
266 REAL8 ans;
267 REAL8 OTS;
268
269 REAL8 CFdedt;
270 REAL8 POLdedt0;
271 REAL8 POLdedt2;
272
273 OTS = sqrt(1. - et * et);
274
275 CFdedt = - et * ak->eta * pow(v, 8.0) / (ak->mt * ak->ST);
276 POLdedt0 = (304. + 121. * pow(et, 2.0)) / (15. * pow(OTS, 5.0));
277 POLdedt2 = - ((67608. + 228704. * ak->eta + pow(et, 4.0) * (-125361. + 93184. * ak->eta)
278 + pow(et, 2.0) * (-718008. + 651252. * ak->eta)) * pow(v, 2.0)) / (2520. * pow(OTS, 7.0));
279
280 ans = CFdedt * (POLdedt0 + POLdedt2);
281
282 return ans;
283}
284
285static REAL8
287 REAL8 v, /* post-Newtonian parameter */
288 REAL8 et, /* orbital eccentricity */
289 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
290 )
291{
292 REAL8 ans;
293 REAL8 OTS;
294
295 REAL8 CFdedt;
296 REAL8 POLdedt0;
297 REAL8 POLdedt2;
298 REAL8 FACdedt3;
299 REAL8 RFTdedt3;
300
301 OTS = sqrt(1. - et * et);
302
303 CFdedt = - et * ak->eta * pow(v, 8.0) / (ak->mt * ak->ST);
304 POLdedt0 = (304. + 121. * pow(et, 2.0)) / (15. * pow(OTS, 5.0));
305 POLdedt2 = - ((67608. + 228704. * ak->eta + pow(et, 4.0) * (-125361. + 93184. * ak->eta)
306 + pow(et, 2.0) * (-718008. + 651252. * ak->eta)) * pow(v, 2.0)) / (2520. * pow(OTS, 7.0));
307 FACdedt3 = (394./3.) * LAL_PI * pow(v, 3.0);
308 RFTdedt3 = 0.1949238579 * OTS * (OTS * (1. + 7.260831042 * pow(et, 2.0) + 5.844370473 * pow(et, 4.0)
309 + 0.8452020270 * pow(et, 6.0) + 0.07580633432 * pow(et, 8.0)
310 + 0.002034045037 * pow(et, 10.0)) / (1. - 4.900627291 * pow(et, 2.0) + 9.512155497 * pow(et, 4.0)
311 - 9.051368575 * pow(et, 6.0) + 4.096465525 * pow(et, 8.0) - 0.5933309609 * pow(et, 10.0)
312 - 0.05427399445 * pow(et, 12.0) - 0.009020225634 * pow(et, 14.0)) - (1. + 1.893242666 * pow(et, 2.0)
313 - 2.708117333 * pow(et, 4.0) + 0.6192474531 * pow(et, 6.0) + 0.0500847462 * pow(et, 8.0)
314 - 0.01059040781 * pow(et, 10.0)) / (1. - 4.638007334 * pow(et, 2.0) + 8.716680569 * pow(et, 4.0)
315 - 8.451197591 * pow(et, 6.0) + 4.435922348 * pow(et, 8.0) - 1.199023304 * pow(et, 10.0)
316 + 0.1398678608 * pow(et, 12.0) - 0.004254544193 * pow(et, 14.0))) / pow(et, 2.0);
317
318 ans = CFdedt * (POLdedt0 + POLdedt2 + (FACdedt3 * RFTdedt3));
319
320 return ans;
321}
322
323static REAL8
325 REAL8 v, /* post-Newtonian parameter */
326 REAL8 et, /* orbital eccentricity */
327 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
328 )
329{
330 REAL8 ans;
331 REAL8 OTS;
332
333 REAL8 CFdedt;
334 REAL8 POLdedt0;
335 REAL8 POLdedt2;
336 REAL8 FACdedt3;
337 REAL8 RFTdedt3;
338 REAL8 POLdedt4;
339
340 OTS = sqrt(1. - et * et);
341
342 CFdedt = - et * ak->eta * pow(v, 8.0) / (ak->mt * ak->ST);
343 POLdedt0 = (304. + 121. * pow(et, 2.0)) / (15. * pow(OTS, 5.0));
344 POLdedt2 = - ((67608. + 228704. * ak->eta + pow(et, 4.0) * (-125361. + 93184. * ak->eta)
345 + pow(et, 2.0) * (-718008. + 651252. * ak->eta)) * pow(v, 2.0)) / (2520. * pow(OTS, 7.0));
346 FACdedt3 = (394./3.) * LAL_PI * pow(v, 3.0);
347 RFTdedt3 = 0.1949238579 * OTS * (OTS * (1. + 7.260831042 * pow(et, 2.0) + 5.844370473 * pow(et, 4.0)
348 + 0.8452020270 * pow(et, 6.0) + 0.07580633432 * pow(et, 8.0)
349 + 0.002034045037 * pow(et, 10.0)) / (1. - 4.900627291 * pow(et, 2.0) + 9.512155497 * pow(et, 4.0)
350 - 9.051368575 * pow(et, 6.0) + 4.096465525 * pow(et, 8.0) - 0.5933309609 * pow(et, 10.0)
351 - 0.05427399445 * pow(et, 12.0) - 0.009020225634 * pow(et, 14.0)) - (1. + 1.893242666 * pow(et, 2.0)
352 - 2.708117333 * pow(et, 4.0) + 0.6192474531 * pow(et, 6.0) + 0.0500847462 * pow(et, 8.0)
353 - 0.01059040781 * pow(et, 10.0)) / (1. - 4.638007334 * pow(et, 2.0) + 8.716680569 * pow(et, 4.0)
354 - 8.451197591 * pow(et, 6.0) + 4.435922348 * pow(et, 8.0) - 1.199023304 * pow(et, 10.0)
355 + 0.1398678608 * pow(et, 12.0) - 0.004254544193 * pow(et, 14.0))) / pow(et, 2.0);
356 POLdedt4 = ((-15238352. + 12823920. * ak->eta + 4548096. * pow(ak->eta, 2.0)
357 + pow(et, 6.0) * (3786543. - 4344852. * ak->eta + 2758560. * pow(ak->eta, 2.0))
358 + pow(et, 4.0) * (46566110. - 78343602. * ak->eta + 42810096 * pow(ak->eta, 2.0))
359 + pow(et, 2.0) * (-37367868 - 41949252 * ak->eta + 48711348 * pow(ak->eta, 2.0)) - 1008. * (2672.
360 + 6963. * pow(et, 2.0) + 565. * pow(et, 4.0)) * (-5. + 2. * ak->eta) * OTS) * pow(v, 4.0)) / (30240. * pow(OTS, 9.0));
361
362 ans = CFdedt * (POLdedt0 + POLdedt2 + (FACdedt3 * RFTdedt3) + POLdedt4);
363
364 return ans;
365}
366
367/*
368 * Computes the rate of increase of the mean anomaly for a post-Newtonian
369 * inspiral in an eccentric orbit.
370 *
371 * Implements Equations (3.17a), (B9e) and (B9f) of:
372 * Sashwat Tanay, Maria Haney, and Achamveedu Gopakumar,
373 * \"Frequency and time domain inspiral waveforms from comparable
374 * mass compact binaries in eccentric orbits\", (2015);
375 * arXiv:TBD
376 * https://dcc.ligo.org/P1500148-v1
377 *
378 * Note that above equation uses x = v^2 as the PN expansion parameter.
379 */
380
381static REAL8
383 REAL8 v, /* post-Newtonian parameter */
384 REAL8 UNUSED et, /* orbital eccentricity */
385 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
386 )
387{
388 REAL8 ans;
389
390 REAL8 CFdldt;
391 REAL8 POLdldt0;
392
393 CFdldt = pow(v, 3.0) / (ak->mt * ak->ST);
394 POLdldt0 = 1.;
395
396 ans = CFdldt * POLdldt0;
397
398 return ans;
399}
400
401static REAL8
403 REAL8 v, /* post-Newtonian parameter */
404 REAL8 et, /* orbital eccentricity */
405 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
406 )
407{
408 REAL8 ans;
409 REAL8 OTS;
410
411 REAL8 CFdldt;
412 REAL8 POLdldt0;
413 REAL8 POLdldt2;
414
415 OTS = sqrt(1. - et * et);
416
417 CFdldt = pow(v, 3.0) / (ak->mt * ak->ST);
418 POLdldt0 = 1.;
419 POLdldt2 = - (3. * pow(v, 2.0)) / pow(OTS, 2.0);
420
421 ans = CFdldt * (POLdldt0 + POLdldt2);
422
423 return ans;
424}
425
426static REAL8
428 REAL8 v, /* post-Newtonian parameter */
429 REAL8 et, /* orbital eccentricity */
430 expnCoeffsEccTaylorT4 *ak /* PN co-efficients and intrinsic parameters */
431 )
432{
433 REAL8 ans;
434 REAL8 OTS;
435
436 REAL8 CFdldt;
437 REAL8 POLdldt0;
438 REAL8 POLdldt2;
439 REAL8 POLdldt4;
440
441 OTS = sqrt(1. - et * et);
442
443 CFdldt = pow(v, 3.0) / (ak->mt * ak->ST);
444 POLdldt0 = 1.;
445 POLdldt2 = - (3. * pow(v, 2.0)) / pow(OTS, 2.0);
446 POLdldt4 = ((-18. + 28. * ak->eta + pow(et, 2.0)*(-51. + 26. * ak->eta)) * pow(v, 4.0)) / (4. * pow(OTS, 4.0));
447
448 ans = CFdldt * (POLdldt0 + POLdldt2 + POLdldt4);
449
450 return ans;
451}
452
453/*
454 *
455 */
456
457typedef struct
458{
460 REAL8 (*funcet)(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak);
464
465/*
466 * This function is used in the call to the GSL integrator.
467 *
468 * Implements Equation (3.17b) of: Sashwat Tanay, Maria Haney, and Achamveedu Gopakumar,
469 * \"Frequency and time domain inspiral waveforms from comparable
470 * mass compact binaries in eccentric orbits\", (2015);
471 * arXiv:TBD
472 */
473
474static int
475XLALSimInspiralEccTaylorT4PNEvolveOrbitIntegrand(double UNUSED t, const double y[], double ydot[], void *params)
476{
478 ydot[0] = p->funcv(y[0],y[1],&p->ak);
479 ydot[1] = p->funcet(y[0],y[1],&p->ak);
480 ydot[2] = p->funcl(y[0],y[1],&p->ak);
481 ydot[3] = y[0]*y[0]*y[0]*p->ak.av;
482 t = 0.0;
483 return GSL_SUCCESS;
484}
485
486/*
487 * Set up the expnCoeffsEccTaylorT4 and expnFuncEccTaylorT4 structures for
488 * generating the eccentric TaylorT4 waveform and select the post-Newtonian
489 * functions corresponding to the desired order.
490 *
491 * Inputs given in SI units.
492 */
493
494static int
496 expnCoeffsEccTaylorT4 *ak, /* coefficients for TaylorT4 evolution [modified] */
497 expnFuncEccTaylorT4 *f, /* functions for TaylorT4 evolution [modified] */
498 REAL8 m1, /* mass of companion 1 */
499 REAL8 m2, /* mass of companion 2 */
500 int O /* twice post-Newtonian order */
501)
502{
503 ak->m1 = m1;
504 ak->m2 = m2;
505 ak->m = ak->m1 + ak->m2;
506 ak->mu = m1 * m2 / ak->m;
507 ak->nu = ak->mu / ak->m;
508
509 ak->eta = m1 * m2 / pow(ak->m, 2.0);
510 ak->mt = ak->m / LAL_MSUN_SI;
511 ak->ST = LAL_MTSUN_SI;
512
513 /* angular velocity co-efficient */
514 ak->av = 1./(ak->ST * ak->mt);
515
516 switch (O)
517 {
518 case 0:
522 break;
523 case 1:
524 XLALPrintError("XLAL Error - %s: PN approximant not supported for PN order %d\n", __func__,O);
526 break;
527 case 2:
531 break;
532 case 3:
536 break;
537 case -1: // Highest implemented PN order - move if higher terms added!
538 case 4:
542 break;
543 case 5:
544 XLALPrintError("XLAL Error - %s: PN approximant not yet implemented for PN order %d\n", __func__,O);
546 break;
547 case 6:
548 XLALPrintError("XLAL Error - %s: PN approximant not yet implemented for PN order %d\n", __func__,O);
550 break;
551 case 7:
552 XLALPrintError("XLAL Error - %s: PN approximant not yet implemented for PN order %d\n", __func__,O);
554 break;
555 case 8:
556 XLALPrintError("XLAL Error - %s: PN approximant not supported for PN order %d\n", __func__,O);
558 break;
559 default:
560 XLALPrintError("XLAL Error - %s: Unknown PN order in switch\n", __func__);
562 }
563
564 return 0;
565}
566
567/*
568 * Given time series of the mean anomaly the orbital eccentricity of a quasi-Keplerian orbit,
569 * solves Kepler equation using a modified version of Mikkola's method.
570 *
571 * See:
572 * Manuel Tessmer, and Achamveedu Gopakumar,
573 * \"Accurate and efficient gravitational waveforms for certain galactic
574 * compact binaries\", Mon. Not. R. Astron. Soc. 374, 721–728 (2007);
575 * arXiv:gr-qc/0610139
576 *
577 * and references therein.
578 */
579
581 REAL8TimeSeries **V, /* post-Newtonian parameter */
582 REAL8TimeSeries **ECC, /* orbital eccentricity */
583 REAL8TimeSeries *TIME, /* mean anomaly of quasi-Keplerian orbit */
584 REAL8TimeSeries *U /* eccentric anomaly of quasi-Keplerian orbit [returned] */
585 ){
586
587 UINT4 len, k = 0;
588 len = (*V)->data->length;
589
590 REAL8 l, et;
591
592 REAL8 ND, SIGN, SIGN2, alpha, beta1, zplus, zminus, SIGN3, z, s, w, E0, u;
593 REAL8 f, f1, f2, f3, f4, u1, u2, u3, u4, xi, sol;
594
595 for(k = 0; k < len; k++){
596
597 l = TIME->data->data[k]; et = (*ECC)->data->data[k];
598
599 /* mapping of l into interval -Pi<=l<=Pi to make auxiliary variable s as small as possible */
600 if(l > 0.0 ||l == 0.0){ ND = floor(l/(2.*LAL_PI));
601 SIGN = 1.; }
602 else{ ND = ceil(l/(2.*LAL_PI));
603 SIGN = -1.; }
604
605 l = SIGN*l;
606
607 if(l > (2.*LAL_PI)){ l = (l - floor(l/(2.*LAL_PI))*2.*LAL_PI); }
608
609 if(l < LAL_PI){ SIGN2 = 1.; }
610 else{ SIGN2 = -1.; }
611
612 if(SIGN2 == 1.){ ; }
613 else{ l = (2.*LAL_PI - l); }
614
615 /* root-finding method to solve KE as cubic equation in terms of s=sin(u/3) */
616 alpha = (1. - et)/(4.*et + 1./2.);
617 beta1 = (l/2.)/(4.*et + 1./2.);
618 zplus = pow(beta1 + sqrt(pow(alpha, 3.0) + pow(beta1, 2.0)), (1./3.));
619 zminus = pow(beta1 - sqrt(pow(alpha, 3.0) + pow(beta1, 2.0)), (1./3.));
620
621 if(beta1 > 0.0 ||beta1 == 0.0){ SIGN3 = 1.; }
622 else{ SIGN3 = -1.; }
623
624 if(SIGN3 > 0.0){ z = zplus; }
625 else{ z = zminus; }
626
627 z = zplus;
628 s = (z - alpha/z);
629
630 /* negate largest error occuring at l=Pi by correction term */
631 w = (s - (0.078*pow(s, 5.0))/(1. + et));
632
633 /* initial guess for u */
634 E0 = (l + et*(3.*w - 4.*pow(w, 3.0)));
635 u = E0 ;
636
637 /* define f(u) and its first four derivatives with respect to u */
638 f = u - et*sin(u) - l;
639 f1 = 1. - et*cos(u);
640 f2 = et*sin(u);
641 f3 = et*cos(u);
642 f4 = -et*sin(u);
643
644 /* apply a fourth-order extension of Newton’s method to improve on initial guess */
645 u1 = -f/f1;
646 u2 = -f/(f1 + (1./2.)*f2*u1);
647 u3 = -f/(f1 + (1./2.)*f2*u2 + (1./6.)*f3*(pow(u2, 2.0)));
648 u4 = -f/(f1 + (1./2.)*f2*u3 + (1./6.)*f3*(pow(u3, 2.0)) + (1./24.)*f4*(pow(u3, 3.0)));
649 xi = (E0 + u4);
650
651 if(SIGN2 > 0.0){ sol = xi; }
652 else{ sol = (2.*LAL_PI - xi); }
653
654 if(SIGN < 0.0){ sol = -sol; }
655
656 u = (sol + ND*2.*LAL_PI);
657
658 U->data->data[k] = u;
659 }
660
661 return XLAL_SUCCESS;
662
663}
664
665/*
666 * Given time series for orbital velocity, orbital eccentricity as well as mean
667 * and eccentric anomaly of the quasi-Keplerian orbit, computes the PN-contributions
668 * to the 2PN-accurate Kepler equation.
669 *
670 * Implements Equation (3.11) of: Sashwat Tanay, Maria Haney, and Achamveedu Gopakumar,
671 * \"Frequency and time domain inspiral waveforms from comparable
672 * mass compact binaries in eccentric orbits\", (2015);
673 * arXiv:TBD
674 *
675 * Note that above equation uses x = v^2 as the PN expansion parameter.
676 */
677
680 REAL8TimeSeries **V, /* post-Newtonian parameter */
681 REAL8TimeSeries *U, /* eccentric anomaly of quasi-Keplerian orbit */
682 REAL8TimeSeries **ECC, /* orbital eccentricity */
683 REAL8TimeSeries **TIME, /* mean anomaly l of quasi-Keplerian orbit */
684 REAL8TimeSeries *L2 /* LHS of 2PN-accurate Kepler equation, i.e., l - l_2PN [returned] */
685 ){
686
687 UINT4 len, k = 0;
688 len = (*V)->data->length;
689
690 REAL8 u, et, v, xp;
691 REAL8 dt;
692 REAL8 OTS, betaN, vmuN;
693 REAL8 L2PN;
694
695 for(k = 0; k < len; k++){
696
697 /* Abbreviated names in lower case for time series at this sample */
698 u = U->data->data[k]; et = (*ECC)->data->data[k];
699 v = (*V)->data->data[k]; xp = (*TIME)->data->data[k];
700
701 dt = 1. - et*cos(u);
702
703 OTS = sqrt(1. - et*et);
704 betaN = (1. - OTS)/et;
705 vmuN = 2*atan(betaN*sin(u)/(1. - betaN*cos(u)));
706
707 L2PN = pow(v, 4.0)*(dt*(60. - 24.*ak->eta)*vmuN
708 + et*(15.*ak->eta - pow(ak->eta, 2.0))*OTS*sin(u))/(8.*dt*OTS);
709
710 L2->data->data[k] = xp - L2PN;
711
712 }
713
714 return XLAL_SUCCESS;
715
716}
717
718/*
719 * Given time series for orbital velocity, orbital eccentricity and mean
720 * anomaly of the quasi-Keplerian orbit, computes the periodic contribution W
721 * to the phase split, i.e., phi = lambda + W.
722 *
723 * Implements Equations (3.8) - (3.10) and (B4c), (B4d), (B7a), (B7b) of:
724 * Sashwat Tanay, Maria Haney, and Achamveedu Gopakumar,
725 * \"Frequency and time domain inspiral waveforms from comparable
726 * mass compact binaries in eccentric orbits\", (2015);
727 * arXiv:TBD
728 *
729 * Note that above equation uses x = v^2 as the PN expansion parameter.
730 */
731
734 REAL8TimeSeries **V, /* post-Newtonian parameter */
735 REAL8TimeSeries **ECC, /* orbital eccentricity */
736 REAL8TimeSeries **U, /* eccentric anomaly of quasi-Keplerian orbit */
737 REAL8TimeSeries *W /* periodic contribution to phase split [returned] */
738 ){
739
740 UINT4 len, k = 0;
741 len = (*V)->data->length;
742
743 REAL8 v, et, u, w;
744 REAL8 dt, OTS;
745 REAL8 beta1PN, beta2PN;
746 REAL8 vmu1PN, vmu2PN;
747
748 for(k = 0; k < len; k++){
749
750 v = (*V)->data->data[k]; et = (*ECC)->data->data[k];
751 u = (*U)->data->data[k];
752
753 dt = 1. - et * cos(u);
754 OTS = sqrt(1. - et * et);
755
756 beta1PN = (1. - OTS) / et
757 //=========================================================================================================
758 + ((-4. + pow(et, 2.0) * (8. - 2. * ak->eta) + ak->eta + (4. - ak->eta) * OTS) * pow(v, 2.0)) / (et * OTS);
759 //=========================================================================================================
760 beta2PN = beta1PN
761 //=========================================================================================================
762 + (-528. - 220. * ak->eta + 4. * pow(ak->eta, 2.0) + pow(et, 4.0) * (-3840. + 2086. * ak->eta
763 - 178. * pow(ak->eta, 2.0)) + pow(et, 2.0) * (5232. - 1659. * ak->eta + 177. * pow(ak->eta, 2.0))
764 + (528. + 220. * ak->eta - 4. * pow(ak->eta, 2.0) + pow(et, 2.0) * (288. + 83. * ak->eta
765 - 41. * pow(ak->eta, 2.0))) * OTS) * pow(v, 4.0) / (96. * et * pow(OTS, 3.0));
766 //=========================================================================================================
767
768 vmu1PN = 2. * atan(beta1PN * sin(u) / (1. - beta1PN * cos(u)));
769 vmu2PN = 2. * atan(beta2PN * sin(u) / (1. - beta2PN * cos(u)));
770
771 w = et * sin(u) + vmu2PN
772 //=========================================================================================================
773 + 3. * (et * sin(u) + vmu1PN) * pow(v, 2.0) / pow(OTS, 2.0)
774 //=========================================================================================================
775 + et * sin(u) * (4. * pow(dt, 2.0) * (dt * (108. + pow(et, 2.0) * (102. - 52. * ak->eta) - 56. * ak->eta)
776 - 15. * ak->eta + pow(ak->eta, 2.0) + pow(et, 2.0) * (30. * ak->eta - 2. * pow(ak->eta, 2.0))
777 + pow(et, 4.0) * (-15. * ak->eta + pow(ak->eta, 2.0))) + (4. * ak->eta - 12. * pow(ak->eta, 2.0)
778 + dt * (8. + pow(et, 2.0) * (-8. - 144. * ak->eta) + 144 * ak->eta) + pow(et, 4.0) * (4. * ak->eta
779 - 12. * pow(ak->eta, 2.0)) + pow(et, 2.0) * (-8. * ak->eta + 24. * pow(ak->eta, 2.0))
780 + pow(dt, 2.0) * (-8. - 148. * ak->eta + 12. * pow(ak->eta, 2.0) + pow(et, 2.0) * (- ak->eta
781 + 3. * pow(ak->eta, 2.0)))) * OTS) * pow(v, 4.0) / (32. * pow(dt, 3.0) * pow(OTS, 4.0));
782 //=========================================================================================================
783
784 W->data->data[k] = w;
785
786 }
787
788 return XLAL_SUCCESS;
789
790}
791
792/**
793 * @addtogroup LALSimInspiralEccentricTD_c
794 * @brief Routines to generate time-domain eccentric inspiral waveforms.
795 * @{
796 */
797
798/**
799 * Evolves a post-Newtonian orbit using the eccentric Taylor T4 method.
800 *
801 * See:
802 * Sashwat Tanay, Maria Haney, and Achamveedu Gopakumar,
803 * \"Frequency and time domain inspiral waveforms from comparable
804 * mass compact binaries in eccentric orbits\", (2015);
805 * arXiv:TBD
806 * https://dcc.ligo.org/P1500148-v1
807 */
808
810 REAL8TimeSeries **v, /**< post-Newtonian parameter [returned] */
811 REAL8TimeSeries **et, /**< orbital eccentricity [returned] */
812 REAL8TimeSeries **l, /**< mean anomaly of quasi-Keplerian orbit [returned] */
813 REAL8TimeSeries **lambda, /**< secular contribution to orbital phase [returned] */
814 REAL8TimeSeries **u, /**< eccentric anomaly of quasi-Keplerian orbit [returned] */
815 REAL8TimeSeries **phi, /**< orbital phase [returned] */
816 REAL8 phiRef, /**< reference orbital phase (rad) */
817 REAL8 deltaT, /**< sampling interval (s) */
818 REAL8 m1, /**< mass of companion 1 (kg) */
819 REAL8 m2, /**< mass of companion 2 (kg) */
820 REAL8 f_min, /**< start frequency (Hz) */
821 REAL8 fRef, /**< reference frequency (Hz) */
822 REAL8 e_min, /**< initial orbital eccentricity at f_min */
823 int O /**< twice post-Newtonian order */
824 )
825{
826 const UINT4 blocklen = 1024;
827 const REAL8 visco = 1./sqrt(6.);
828 REAL8 VRef = 0.;
830 expnFuncEccTaylorT4 expnfunc;
832
833 if(XLALSimInspiralEccTaylorT4Setup(&ak,&expnfunc,m1,m2,O))
835
836 params.funcv=expnfunc.orbvel4;
837 params.funcet=expnfunc.orbecc4;
838 params.funcl=expnfunc.meananom4;
839 params.ak=ak;
840
841 UINT4 j, len, idxRef = 0;
843 double y[4];
844 double yerr[4];
845 const gsl_odeiv_step_type *T = gsl_odeiv_step_rk4;
846 gsl_odeiv_step *s;
847 gsl_odeiv_system sys;
848
849 /* setup ode system */
851 sys.jacobian = NULL;
852 sys.dimension = 4;
853 sys.params = &params;
854
855 /* allocate memory */
856 *v = XLALCreateREAL8TimeSeries( "ORBITAL_VELOCITY_PARAMETER", &tc, 0., deltaT, &lalDimensionlessUnit, blocklen );
857 *et = XLALCreateREAL8TimeSeries( "ORBITAL_ECCENTRICITY", &tc, 0., deltaT, &lalDimensionlessUnit, blocklen );
858 *l = XLALCreateREAL8TimeSeries( "ORBITAL_MEAN_ANOMALY", &tc, 0., deltaT, &lalDimensionlessUnit, blocklen );
859 *lambda = XLALCreateREAL8TimeSeries( "SECULAR_ORBITAL_PHASE", &tc, 0., deltaT, &lalDimensionlessUnit, blocklen );
860 if ( !v || !et || !l || !lambda )
862
863 y[0] = (*v)->data->data[0] = cbrt(LAL_PI*LAL_G_SI*ak.m*f_min)/LAL_C_SI;
864 y[1] = (*et)->data->data[0] = e_min;
865 y[2] = (*l)->data->data[0] = 0.;
866 y[3] = (*lambda)->data->data[0] = 0.;
867
868 j = 0;
869
870 s = gsl_odeiv_step_alloc(T, 4);
871 while (1) {
872 ++j;
873 gsl_odeiv_step_apply(s, j*deltaT, deltaT, y, yerr, NULL, NULL, &sys);
874 /* ISCO termination condition for quadrupole, 1PN, 2.5PN */
875 if ( y[0] > visco ) {
876 XLALPrintInfo("XLAL Info - %s: PN inspiral terminated at ISCO\n", __func__);
877 break;
878 }
879 if ( j >= (*v)->data->length ) {
880 if ( ! XLALResizeREAL8TimeSeries(*v, 0, (*v)->data->length + blocklen) )
882 if ( ! XLALResizeREAL8TimeSeries(*et, 0, (*et)->data->length + blocklen) )
884 if ( ! XLALResizeREAL8TimeSeries(*l, 0, (*l)->data->length + blocklen) )
886 if ( ! XLALResizeREAL8TimeSeries(*lambda, 0, (*lambda)->data->length + blocklen) )
888 }
889 (*v)->data->data[j] = y[0];
890 (*et)->data->data[j] = y[1];
891 (*l)->data->data[j] = y[2];
892 (*lambda)->data->data[j] = y[3];
893 }
894 gsl_odeiv_step_free(s);
895
896 /* make the correct length */
897 if ( ! XLALResizeREAL8TimeSeries(*v, 0, j) )
899 if ( ! XLALResizeREAL8TimeSeries(*et, 0, j) )
901 if ( ! XLALResizeREAL8TimeSeries(*l, 0, j) )
903 if ( ! XLALResizeREAL8TimeSeries(*lambda, 0, j) )
905
906 /* adjust to correct time */
907 XLALGPSAdd(&(*v)->epoch, -1.0*j*deltaT);
908 XLALGPSAdd(&(*et)->epoch, -1.0*j*deltaT);
909 XLALGPSAdd(&(*l)->epoch, -1.0*j*deltaT);
910 XLALGPSAdd(&(*lambda)->epoch, -1.0*j*deltaT);
911
912 UINT4 LEN, k = 0;
913 LEN = (*v)->data->length;
914
915 /* 2-step solution of 1PN- and 2PN-accurate Kepler equation to obtain u(l) */
916 /* 1PN KE: l1 = u1 - et*sin(u1) */
917 /* 2PN KE: l2 = l1 - l_2PN = u2 - et*sin(u2) */
918
919 REAL8TimeSeries *l1;
920 REAL8TimeSeries *u1;
921 REAL8TimeSeries *l2;
923
924 /* allocate memory for auxiliary time series */
925 l1 = XLALCreateREAL8TimeSeries( "MEAN_ANOMALY_1PN", &(*v)->epoch, 0., (*v)->deltaT, &lalDimensionlessUnit, (*v)->data->length );
926 memset(l1->data->data, 0, l1->data->length
927 * sizeof(*l1->data->data));
928 u1 = XLALCreateREAL8TimeSeries( "ECCENTRIC_ANOMALY_1PN", &(*v)->epoch, 0., (*v)->deltaT, &lalDimensionlessUnit, (*v)->data->length );
929 memset(u1->data->data, 0, u1->data->length
930 * sizeof(*u1->data->data));
931 l2 = XLALCreateREAL8TimeSeries( "2PN_accurate_l", &(*v)->epoch, 0., (*v)->deltaT, &lalDimensionlessUnit, (*v)->data->length );
932 memset(l2->data->data, 0, l2->data->length
933 * sizeof(*l2->data->data));
934 u2 = XLALCreateREAL8TimeSeries( "ECCENTRIC_ANOMALY_2PN", &(*v)->epoch, 0., (*v)->deltaT, &lalDimensionlessUnit, (*v)->data->length );
935 memset(u2->data->data, 0, u2->data->length
936 * sizeof(*u2->data->data));
937
938
939 for(k = 0; k < LEN; k++){
940 l1->data->data[k] = (*l)->data->data[k];
941 }
944 if(XLALSimInspiralKeplerEquationLHS_PN(&ak,v,u1,et,l,l2))
948
949 /* allocate memory for u [returned] */
950 *u = XLALCreateREAL8TimeSeries( "ECCENTRIC_ANOMALY", &(*v)->epoch, 0., (*v)->deltaT, &lalDimensionlessUnit, LEN );
951
952 for(k = 0; k < LEN; k++){
953 (*u)->data->data[k] = u2->data->data[k];
954 }
955
960
961 /* compute full orbital phase variable phi entering h+/x */
962
963 /* allocate memory for periodic contribution to phase split phi = lambda + W */
965 w = XLALCreateREAL8TimeSeries( "PERIODIC_PHASE_CONTRIBUTION", &(*v)->epoch, 0., (*v)->deltaT, &lalDimensionlessUnit, (*v)->data->length );
966 memset(w->data->data, 0, w->data->length
967 * sizeof(*w->data->data));
968
971
972 *phi = XLALCreateREAL8TimeSeries( "ORBITAL_PHASE", &(*v)->epoch, 0., (*v)->deltaT, &lalDimensionlessUnit, LEN );
973
974 for(k = 0; k < LEN; k++){
975 (*phi)->data->data[k] = (*lambda)->data->data[k] + w->data->data[k];
976 }
977
979
980 /* Do a constant phase shift to get desired value of phiRef */
981 len = (*phi)->data->length;
982 /* For fRef==0, phiRef is phase of last sample */
983 if( fRef == 0. )
984 phiRef -= (*phi)->data->data[len-1];
985 /* For fRef==fmin, phiRef is phase of first sample */
986 else if( fRef == f_min )
987 phiRef -= (*phi)->data->data[0];
988 /* phiRef is phase when f==fRef */
989 else
990 {
991 VRef = pow(LAL_PI * LAL_G_SI*(m1+m2) * fRef, 1./3.) / LAL_C_SI;
992 j = 0;
993 do {
994 idxRef = j;
995 j++;
996 } while ((*v)->data->data[j] <= VRef);
997 phiRef -= (*phi)->data->data[idxRef];
998 }
999 for (j = 0; j < len; ++j)
1000 (*phi)->data->data[j] += phiRef;
1001
1002 return (int)(*v)->data->length;
1003
1004}
1005
1006/**
1007 * Driver routine to compute the post-Newtonian inspiral waveform.
1008 *
1009 * This routine allows the user to specify different PN orders
1010 * for phasing calculation vs. amplitude calculations.
1011 */
1013 REAL8TimeSeries **hplus, /**< +-polarization waveform */
1014 REAL8TimeSeries **hcross, /**< x-polarization waveform */
1015 REAL8 phiRef, /**< reference orbital phase (rad) */
1016 REAL8 deltaT, /**< sampling interval (s) */
1017 REAL8 m1, /**< mass of companion 1 (kg) */
1018 REAL8 m2, /**< mass of companion 2 (kg) */
1019 REAL8 f_min, /**< start frequency (Hz) */
1020 REAL8 fRef, /**< reference frequency (Hz) */
1021 REAL8 r, /**< distance of source (m) */
1022 REAL8 i, /**< inclination of source (rad) */
1023 REAL8 e_min, /**< initial orbital eccentricity at f_min */
1024 int amplitudeO, /**< twice post-Newtonian amplitude order */
1025 int phaseO /**< twice post-Newtonian phase order */
1026 )
1027{
1028
1029 /* The Schwarzschild ISCO frequency - for sanity checking fRef */
1030 REAL8 fISCO = pow(LAL_C_SI,3) / (pow(6.,3./2.)*LAL_PI*(m1+m2)*LAL_G_SI);
1031
1032 /* Sanity check fRef value */
1033 if( fRef < 0. )
1034 {
1035 XLALPrintError("XLAL Error - %s: fRef = %f must be >= 0\n",
1036 __func__, fRef);
1038 }
1039 if( fRef != 0. && fRef < f_min )
1040 {
1041 XLALPrintError("XLAL Error - %s: fRef = %f must be > fStart = %f\n",
1042 __func__, fRef, f_min);
1044 }
1045 if( fRef >= fISCO )
1046 {
1047 XLALPrintError("XLAL Error - %s: fRef = %f must be < Schwar. ISCO=%f\n",
1048 __func__, fRef, fISCO);
1050 }
1051
1052
1053 REAL8TimeSeries *v;
1054 REAL8TimeSeries *et;
1056 REAL8TimeSeries *lambda;
1057
1059 REAL8TimeSeries *phi;
1060
1061 int n;
1062 n = XLALSimInspiralEccentricTDPNEvolveOrbit(&v, &et, &l, &lambda, &u, &phi, phiRef, deltaT,
1063 m1, m2, f_min, fRef, e_min, phaseO);
1064 if ( n < 0 )
1066
1067 int status;
1068 status = XLALSimInspiralPNPolarizationWaveformsEccentric(hplus, hcross, v, et, u, phi,
1069 m1, m2, r, i, amplitudeO, phaseO);
1070
1073
1078
1079 if ( status < 0 )
1081
1082 return n;
1083}
1084
1085/**
1086 * Driver routine to compute the post-Newtonian inspiral waveform.
1087 *
1088 * This routine uses the same pN order for phasing and amplitude
1089 * (unless the order is -1 in which case the highest available
1090 * order is used for both of these -- which might not be the same).
1091 *
1092 * Note that at present phasing calculations for eccentric waveforms are implemented
1093 * up to 2PN order, while amplitude calculations are accurate up to Newtonian
1094 * (quadrupolar) order.
1095 * Higher-order contributions to phasing and amplitude calculations will be implemented
1096 * in the near future.
1097 */
1099 REAL8TimeSeries **hplus, /**< +-polarization waveform */
1100 REAL8TimeSeries **hcross, /**< x-polarization waveform */
1101 REAL8 phiRef, /**< reference orbital phase (rad) */
1102 REAL8 deltaT, /**< sampling interval (Hz) */
1103 REAL8 m1, /**< mass of companion 1 (kg) */
1104 REAL8 m2, /**< mass of companion 2 (kg) */
1105 REAL8 f_min, /**< start frequency (Hz) */
1106 REAL8 fRef, /**< reference frequency (Hz) */
1107 REAL8 r, /**< distance of source (m) */
1108 REAL8 i, /**< inclination of source (rad) */
1109 REAL8 e_min, /**< initial orbital eccentricity at f_min */
1110 int O /**< twice post-Newtonian order */
1111 )
1112{
1113 return XLALSimInspiralEccentricTDPNGenerator(hplus, hcross, phiRef,
1114 deltaT, m1, m2, f_min, fRef, r, i, e_min, O, O);
1115}
1116
1117
1118/**
1119 * Driver routine to compute the restricted post-Newtonian inspiral waveform.
1120 *
1121 * This routine computes the phasing to the specified order, but
1122 * only computes the amplitudes to the Newtonian (quadrupole) order.
1123 *
1124 * Note that amplitudes of eccentric waveforms are at present Newtonian order by default.
1125 * Amplitude corrections will be implemented in the near future.
1126 */
1128 REAL8TimeSeries **hplus, /**< +-polarization waveform */
1129 REAL8TimeSeries **hcross, /**< x-polarization waveform */
1130 REAL8 phiRef, /**< reference orbital phase (rad) */
1131 REAL8 deltaT, /**< sampling interval (s) */
1132 REAL8 m1, /**< mass of companion 1 (kg) */
1133 REAL8 m2, /**< mass of companion 2 (kg) */
1134 REAL8 f_min, /**< start frequency (Hz) */
1135 REAL8 fRef, /**< reference frequency (Hz) */
1136 REAL8 r, /**< distance of source (m) */
1137 REAL8 i, /**< inclination of source (rad) */
1138 REAL8 e_min, /**< initial orbital eccentricity at f_min */
1139 int O /**< twice post-Newtonian phase order */
1140 )
1141{
1142 /* use Newtonian order for amplitude */
1143 return XLALSimInspiralEccentricTDPNGenerator(hplus, hcross, phiRef,
1144 deltaT, m1, m2, f_min, fRef, r, i, e_min, 0, O);
1145}
1146
1147/** @} */
1148
1149#if 0
1150#include <lal/PrintFTSeries.h>
1151#include <lal/PrintFTSeries.h>
1152int main(void)
1153{
1154 LIGOTimeGPS tc = { 888888888, 222222222 };
1155 REAL8 phic = 1.0;
1156 REAL8 deltaT = 1.0/16384.0;
1157 REAL8 m1 = 1.4*LAL_MSUN_SI;
1158 REAL8 m2 = 1.4*LAL_MSUN_SI;
1159 REAL8 r = 1e6*LAL_PC_SI;
1160 REAL8 i = 0.5*LAL_PI;
1161 REAL8 f_min = 100.0;
1162 REAL8 fRef = 0.;
1163 int O = -1;
1164 REAL8TimeSeries *hplus;
1165 REAL8TimeSeries *hcross;
1166 XLALSimInspiralEccentricTDPNRestricted(&hplus, &hcross, &tc, phic, deltaT, m1, m2, f_min, fRef, r, i, e_min, O);
1167 LALDPrintTimeSeries(hplus, "hp.dat");
1168 LALDPrintTimeSeries(hcross, "hc.dat");
1172 return 0;
1173}
1174#endif
void LALCheckMemoryLeaks(void)
static REAL8 XLALSimInspiralMeanAnomalyEvolution4_0PN(REAL8 v, REAL8 UNUSED et, expnCoeffsEccTaylorT4 *ak)
static int XLALSimInspiralKeplerEquationSolver(REAL8TimeSeries **V, REAL8TimeSeries **ECC, REAL8TimeSeries *TIME, REAL8TimeSeries *U)
static int XLALSimInspiralEccTaylorT4PNEvolveOrbitIntegrand(double UNUSED t, const double y[], double ydot[], void *params)
static REAL8 XLALSimInspiralMeanAnomalyEvolution4_4PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static REAL8 XLALSimInspiralOrbitalVelocityEvolution4_2PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static REAL8 XLALSimInspiralOrbitalVelocityEvolution4_0PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static REAL8 XLALSimInspiralOrbitalVelocityEvolution4_4PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static REAL8 XLALSimInspiralOrbitalEccentricityEvolution4_3PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static REAL8 XLALSimInspiralOrbitalEccentricityEvolution4_2PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static int XLALSimInspiralPhaseContributionW(expnCoeffsEccTaylorT4 *ak, REAL8TimeSeries **V, REAL8TimeSeries **ECC, REAL8TimeSeries **U, REAL8TimeSeries *W)
REAL8() SimInspiralEvolutionEquations4(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static int XLALSimInspiralKeplerEquationLHS_PN(expnCoeffsEccTaylorT4 *ak, REAL8TimeSeries **V, REAL8TimeSeries *U, REAL8TimeSeries **ECC, REAL8TimeSeries **TIME, REAL8TimeSeries *L2)
static REAL8 XLALSimInspiralOrbitalEccentricityEvolution4_4PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static int XLALSimInspiralEccTaylorT4Setup(expnCoeffsEccTaylorT4 *ak, expnFuncEccTaylorT4 *f, REAL8 m1, REAL8 m2, int O)
static REAL8 XLALSimInspiralOrbitalEccentricityEvolution4_0PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static REAL8 XLALSimInspiralMeanAnomalyEvolution4_2PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
static REAL8 XLALSimInspiralOrbitalVelocityEvolution4_3PN(REAL8 v, REAL8 et, expnCoeffsEccTaylorT4 *ak)
#define SIGN(x, y)
int main(int argc, char *argv[])
Definition: bh_qnmode.c:226
int s
Definition: bh_qnmode.c:137
int l
Definition: bh_qnmode.c:135
double dt
Definition: bh_ringdown.c:113
double i
Definition: bh_ringdown.c:118
const double u
const double u3
const double w
const double u2
const double u4
#define LAL_C_SI
#define LAL_MSUN_SI
#define LAL_PI
#define LAL_MTSUN_SI
#define LAL_PC_SI
#define LAL_G_SI
#define LIGOTIMEGPSZERO
double REAL8
uint32_t UINT4
int XLALSimInspiralPNPolarizationWaveformsEccentric(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8TimeSeries *V, REAL8TimeSeries *Ecc, REAL8TimeSeries *U, REAL8TimeSeries *Phi, REAL8 m1, REAL8 m2, REAL8 r, REAL8 i, int ampO, int ph_O)
Given time series for a binary's orbital dynamical variables, computes the radial and angular orbital...
int XLALSimInspiralEccentricTDPNRestricted(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 e_min, int O)
Driver routine to compute the restricted post-Newtonian inspiral waveform.
int XLALSimInspiralEccentricTDPNEvolveOrbit(REAL8TimeSeries **v, REAL8TimeSeries **et, REAL8TimeSeries **l, REAL8TimeSeries **lambda, REAL8TimeSeries **u, REAL8TimeSeries **phi, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 e_min, int O)
Evolves a post-Newtonian orbit using the eccentric Taylor T4 method.
int XLALSimInspiralEccentricTDPN(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 e_min, int O)
Driver routine to compute the post-Newtonian inspiral waveform.
int XLALSimInspiralEccentricTDPNGenerator(REAL8TimeSeries **hplus, REAL8TimeSeries **hcross, REAL8 phiRef, REAL8 deltaT, REAL8 m1, REAL8 m2, REAL8 f_min, REAL8 fRef, REAL8 r, REAL8 i, REAL8 e_min, int amplitudeO, int phaseO)
Driver routine to compute the post-Newtonian inspiral waveform.
void LALDPrintTimeSeries(REAL8TimeSeries *series, const CHAR *filename)
static const INT4 r
void XLALDestroyREAL8TimeSeries(REAL8TimeSeries *series)
REAL8TimeSeries * XLALResizeREAL8TimeSeries(REAL8TimeSeries *series, int first, size_t length)
REAL8TimeSeries * XLALCreateREAL8TimeSeries(const CHAR *name, const LIGOTimeGPS *epoch, REAL8 f0, REAL8 deltaT, const LALUnit *sampleUnits, size_t length)
const LALUnit lalDimensionlessUnit
int int int XLALPrintInfo(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
#define XLAL_ERROR(...)
int XLALPrintError(const char *fmt,...) _LAL_GCC_PRINTF_FORMAT_(1
XLAL_SUCCESS
XLAL_EFUNC
XLAL_EINVAL
LIGOTimeGPS * XLALGPSAdd(LIGOTimeGPS *epoch, REAL8 dt)
list y
list mu
string status
p
double alpha
Definition: sgwb.c:106
REAL8Sequence * data
REAL8 * data
SimInspiralEvolutionEquations4 * meananom4
SimInspiralEvolutionEquations4 * orbvel4
SimInspiralEvolutionEquations4 * orbecc4
Definition: burst.c:245
double V
Definition: unicorn.c:25
double f_min
Definition: unicorn.c:22
double deltaT
Definition: unicorn.c:24