21 #include <lal/LALSimIMR.h>
22 #include <lal/Units.h>
23 #include <lal/LALConstants.h>
24 #include <gsl/gsl_errno.h>
25 #include <gsl/gsl_spline.h>
26 #include <gsl/gsl_poly.h>
54 return 1.0/(
LAL_PI*(
a*
M + sqrt(pow(
r, 3.0)/
M)));
66 REAL8 Z1 = 1.0 + pow(1.0 - pow(
a, 2.0), 1.0/3.0)*(pow(1.0+
a, 1.0/3.0) + pow(1.0-
a, 1.0/3.0));
67 REAL8 Z2 = sqrt(3.0*pow(
a,2.0) + pow(Z1, 2.0));
69 return 3.0 + Z2 - sqrt((3.0 - Z1)*(3.0 + Z1 + 2.0*Z2));
71 return 3.0 + Z2 + sqrt((3.0 - Z1)*(3.0 + Z1 + 2.0*Z2));
95 -3.0*
q*pow(
mu,2.0)*pow(
a,2.0),
108 gsl_error_handler_t * error_handler = gsl_set_error_handler_off();
109 gsl_poly_complex_workspace *
w = gsl_poly_complex_workspace_alloc(11);
112 int status = gsl_poly_complex_solve(
p, 11,
w, z);
113 gsl_poly_complex_workspace_free(
w);
114 gsl_set_error_handler(error_handler);
119 for (
int i=0;
i<10;
i++) {
120 if (fabs(z[2*
i+1]) < 1.0E-5) {
121 if (z[2*
i] > 0.0 && pow(z[2*
i],2.0) > root) {
122 root = pow(z[2*
i],2.0);
144 const REAL8 a0 = 0.360;
145 const REAL8 a1 = -0.0355;
150 return a0 + a1*log_lambda +
a2*pow(log_lambda,2.0);
154 return 0.5 + (3*a0-a1-1.5)*L2 + (-2*a0+a1+1)*L3;
static double beta(const double a, const double b, const sysq *system)
Internal function that computes the spin-orbit couplings.
double XLALSimNSBH_compactness_from_lambda(const REAL8 Lambda)
Compactness as a function of tidal deformability.
double XLALSimNSBH_torus_mass_fit(const REAL8 q, const REAL8 a, const REAL8 C)
Baryonic mass of the torus remnant of a BH-NS merger.
double XLALSimNSBH_fGWinKerr(const REAL8 r, const REAL8 M, const REAL8 a)
GW frequency for a particle on Kerr.
double XLALSimNSBH_xi_tide(const REAL8 q, const REAL8 a, const REAL8 mu)
Relativistic correction to orbital radius at mass-shedding.
double XLALSimNSBH_rKerrISCO(const REAL8 a)
Kerr BH ISCO radius.