32 #ifndef _LALSIMNEUTRONSTAR_H
33 #define _LALSIMNEUTRONSTAR_H
35 #include <lal/LALConstants.h>
41 #define LAL_G_C2_SI ((LAL_G_SI) / ((double)(LAL_C_SI) * (double)(LAL_C_SI)))
44 #define LAL_G_C4_SI ((LAL_G_C2_SI) / ((double)(LAL_C_SI) * (double)(LAL_C_SI)))
47 #define LAL_NUCLEAR_DENSITY_SI 2.8e17
50 #define LAL_NUCLEAR_DENSITY_GEOM_SI ((LAL_NUCLEAR_DENSITY_SI) * (LAL_G_C2_SI))
70 double reference_pressure_si,
double reference_density_si);
72 logp1_si,
double gamma1,
double gamma2,
double gamma3);
76 double SDgamma0,
double SDgamma1,
double SDgamma2,
double SDgamma3);
78 size_t nsec,
int causal);
80 double log10p1_si,
double g1,
double log10p2_si,
double g2);
82 double log10p1_si,
double v2,
double log10p2_si,
double v3);
131 double *love_number_k2,
double central_pressure_si,
135 double *love_number_k2,
double central_pressure_si,
139 double *int1,
double *int2,
double *int3,
double *int4,
double *int5,
double *int6,
140 double *love_number_k2,
double central_pressure_si,
144 double *int1,
double *int2,
double *int3,
double *int4,
double *int5,
double *int6,
145 double *love_number_k2,
double central_pressure_si,
struct tagLALSimNeutronStarFamily LALSimNeutronStarFamily
Incomplete type for a neutron star family having a particular EOS.
struct tagLALSimNeutronStarEOS LALSimNeutronStarEOS
Incomplete type for the neutron star Equation of State (EOS).
LALSimNeutronStarEOS * XLALSimNeutronStarEOSSpectralDecomposition(double gamma[], int size)
Reads spectral decomposition eos parameters to make an eos.
LALSimNeutronStarEOS * XLALSimNeutronStarEOS4ParameterSpectralDecomposition(double SDgamma0, double SDgamma1, double SDgamma2, double SDgamma3)
Reads 4 spectral decomposition eos parameters to make an eos.
double XLALSimNeutronStarEOSRestMassDensityOfPseudoEnthalpy(double h, LALSimNeutronStarEOS *eos)
Returns the rest mass density (kg m^-3) at a given value of the dimensionless pseudo-enthalpy.
double XLALSimNeutronStarEOSMinAcausalPseudoEnthalpy(LALSimNeutronStarEOS *eos)
Returns the minimum pseudo-enthalpy at which EOS becomes acausal (speed of sound > speed of light) (d...
double XLALSimNeutronStarEOSEnergyDensityDerivOfPressure(double p, LALSimNeutronStarEOS *eos)
Returns the gradient of the energy density with respect to the pressure (dimensionless) at a given va...
double XLALSimNeutronStarEOSPressureOfRestMassDensity(double rho, LALSimNeutronStarEOS *eos)
Returns the pressure in Pa at a given rest-mass density in kg/m^3.
int XLALSimNeutronStarEOS4ParamSDGammaCheck(double g0, double g1, double g2, double g3)
Check that EOS has adiabatic index in range (0.6,4.5)
double XLALSimNeutronStarEOSEnergyDensityOfPressureGeometerized(double p, LALSimNeutronStarEOS *eos)
Returns the energy density in geometerized units (m^-2) at a given pressure in geometerized units (m^...
int XLALSimNeutronStarEOS4ParamSDViableFamilyCheck(double g0, double g1, double g2, double g3)
Check that EOS has enough points (>4) in M-R space to interpolate.
const char *const lalSimNeutronStarEOSNames[111]
Recognised names of equations of state.
double XLALSimNeutronStarEOSPressureOfPseudoEnthalpy(double h, LALSimNeutronStarEOS *eos)
Returns the pressure (Pa) at a given value of the dimensionless pseudo-enthalpy.
LALSimNeutronStarEOS * XLALSimNeutronStarEOSPolytrope(double Gamma, double reference_pressure_si, double reference_density_si)
Creates a polytrope Equation of State defined by p = K rho^Gamma.
int XLALSimNeutronStarEOS3PDViableFamilyCheck(double p0, double log10p1_si, double p1, double log10p2_si, double p2, int causal)
Check that EOS has enough points (>4) in M-R space to interpolate.
double XLALSimNeutronStarEOSEnergyDensityDerivOfPressureGeometerized(double p, LALSimNeutronStarEOS *eos)
Returns the gradient of the energy density with respect to the pressure (dimensionless) at a given va...
double XLALSimNeutronStarEOSPressureOfEnergyDensity(double e, LALSimNeutronStarEOS *eos)
Returns the pressure in Pa at a given energy density in J/m^3.
LALSimNeutronStarEOS * XLALSimNeutronStarEOS4ParameterPiecewisePolytrope(double logp1_si, double gamma1, double gamma2, double gamma3)
Creates a 4-parameter piecewise-polytrope Equation of State.
double XLALSimNeutronStarEOSEnergyDensityOfPseudoEnthalpyGeometerized(double h, LALSimNeutronStarEOS *eos)
Returns the energy density in geometerized units (m^-2) at a given value of the dimensionless pseudo-...
double XLALSimNeutronStarEOSSpeedOfSound(double h, LALSimNeutronStarEOS *eos)
Returns the speed of sound (m s^-1) at a given value of the pseudo-enthalpy (dimensionless).
double XLALSimNeutronStarEOSRestMassDensityOfPseudoEnthalpyGeometerized(double h, LALSimNeutronStarEOS *eos)
Returns the rest mass density in geometerized units (m^-2) at a given value of the dimensionless pseu...
double XLALSimNeutronStarEOSPseudoEnthalpyOfPressure(double p, LALSimNeutronStarEOS *eos)
Returns the dimensionless pseudo-enthalpy at a given pressure (Pa).
double XLALSimNeutronStarEOSSpeedOfSoundGeometerized(double h, LALSimNeutronStarEOS *eos)
Returns the speed of sound in geometerized units (dimensionless) at a given value of the pseudo-entha...
double XLALSimNeutronStarEOSMaxPressure(LALSimNeutronStarEOS *eos)
Returns the maximum pressure of the EOS in Pa.
LALSimNeutronStarEOS * XLALSimNeutronStarEOS3PieceCausalAnalytic(double v1, double log10p1_si, double v2, double log10p2_si, double v3)
Reads 5 causal analytic eos parameters to make an eos.
char * XLALSimNeutronStarEOSName(LALSimNeutronStarEOS *eos)
The name of the equation of state.
LALSimNeutronStarEOS * XLALSimNeutronStarEOSByName(const char *name)
Creates an equation of state structure from tabulated equation of state data of a known name.
LALSimNeutronStarEOS * XLALSimNeutronStarEOSDynamicAnalytic(double parameters[], size_t nsec, int causal)
Reads dynamic analytic eos parameters to make an eos.
LALSimNeutronStarEOS * XLALSimNeutronStarEOS3PieceDynamicPolytrope(double g0, double log10p1_si, double g1, double log10p2_si, double g2)
Reads 5 dynamic polytrope eos parameters to make an eos.
double XLALSimNeutronStarEOSPressureOfPseudoEnthalpyGeometerized(double h, LALSimNeutronStarEOS *eos)
Returns the pressure in geometerized units (m^-2) at a given value of the dimensionless pseudo-enthal...
double XLALSimNeutronStarEOSEnergyDensityOfPressure(double p, LALSimNeutronStarEOS *eos)
Returns the energy density (J m^-3) at a given pressure (Pa).
double XLALSimNeutronStarEOSMaxPseudoEnthalpy(LALSimNeutronStarEOS *eos)
Returns the maximum pseudo enthalpy of the EOS (dimensionless).
double XLALSimNeutronStarEOSEnergyDensityOfPseudoEnthalpy(double h, LALSimNeutronStarEOS *eos)
Returns the energy density (J m^-3) at a given value of the dimensionless pseudo-enthalpy.
double XLALSimNeutronStarEOSMaxPressureGeometerized(LALSimNeutronStarEOS *eos)
Returns the maximum pressure of the EOS in geometrized units m^-2.
LALSimNeutronStarEOS * XLALSimNeutronStarEOSFromFile(const char *fname)
Reads a data file containing a tabulated equation of state.
void XLALDestroySimNeutronStarEOS(LALSimNeutronStarEOS *eos)
Frees the memory associated with a pointer to an EOS structure.
double XLALSimNeutronStarEOSPseudoEnthalpyOfPressureGeometerized(double p, LALSimNeutronStarEOS *eos)
Returns the dimensionless pseudo-enthalpy at a given pressure in geometerized units (m^-2).
double XLALSimNeutronStarLoveNumberK2(double m, LALSimNeutronStarFamily *fam)
Returns the tidal Love number k2 of a neutron star of mass m.
void XLALDestroySimNeutronStarFamily(LALSimNeutronStarFamily *fam)
Frees the memory associated with a pointer to a neutron star family.
double XLALSimNeutronStarRadius(double m, LALSimNeutronStarFamily *fam)
Returns the radius of a neutron star of mass m.
double XLALSimNeutronStarFamMinimumMass(LALSimNeutronStarFamily *fam)
Returns the minimum mass of a neutron star family.
double XLALSimNeutronStarCentralPressure(double m, LALSimNeutronStarFamily *fam)
Returns the central pressure of a neutron star of mass m.
LALSimNeutronStarFamily * XLALCreateSimNeutronStarFamily(LALSimNeutronStarEOS *eos)
Creates a neutron star family structure for a given equation of state.
double XLALSimNeutronStarMaximumMass(LALSimNeutronStarFamily *fam)
Returns the maximum mass of a neutron star family.
int XLALSimNeutronStarTOVODEIntegrate(double *radius, double *mass, double *love_number_k2, double central_pressure_si, LALSimNeutronStarEOS *eos)
int XLALSimNeutronStarVirialODEIntegrateWithTolerance(double *radius, double *mass, double *int1, double *int2, double *int3, double *int4, double *int5, double *int6, double *love_number_k2, double central_pressure_si, LALSimNeutronStarEOS *eos, double epsrel)
Integrates the Tolman-Oppenheimer-Volkov stellar structure equations and the Virial Equations.
int XLALSimNeutronStarTOVODEIntegrateWithTolerance(double *radius, double *mass, double *love_number_k2, double central_pressure_si, LALSimNeutronStarEOS *eos, double epsrel)
Integrates the Tolman-Oppenheimer-Volkov stellar structure equations.
int XLALSimNeutronStarVirialODEIntegrate(double *radius, double *mass, double *int1, double *int2, double *int3, double *int4, double *int5, double *int6, double *love_number_k2, double central_pressure_si, LALSimNeutronStarEOS *eos)