Physics Overview
This section outlines the mathematical framework used to develop the physics for this module. The first part describes the process of deriving the equations that characterize isolated and slowly rotating neutron stars, explaining the key concepts and steps involved. The second part discusses the numerical implementation of these solutions, detailing the methods used to solve the equations and extract physical quantities.
The Hartle-Thorne method
The Hartle-Thorne procedure is a method for obtaining an approximate solution for slowly rotating neutron stars. It begins with an exact solution to Einstein’s equations for a non-rotating, spherically symmetric star, which serves as the background spacetime. Small disturbances are then introduced to this background in a slow-rotation expansion, controlled by a dimensionless expansion parameter (\(\epsilon\)). This parameter represents the ratio of the star’s angular speed (\(\Omega\)) to the critical angular speed at which mass shedding occurs (\(\Omega_{\textrm{shed}}\)). The model is based on the following assumptions:
Equation of State and matter distribution: In the non-rotating configuration, matter follows a barotropic equation of state represented as \(p=p(\varepsilon)\), where \(p\) denotes the pressure and \(\varepsilon\) stands for the total energy density. In conditions of extremely high densities as in the interior of NS, the Fermi temperature (\(T_{\textrm{f}} \sim 3 \times 10^{11} \, \textrm{K}\)) greatly surpasses the temperature of the star, resulting in an EoS which is unaffected by the star’s temperature. Thus, the main contribution to the pressure is due to nuclear forces and corrections caused by thermal agitation can be neglected. The matter distribution of the star in the non-rotating configuration is described by a perfect-fluid stress energy tensor. Shear stresses and energy transport are assumed to be negligible.
Slow rotation: The non-rotating metric configuration is perturbed in a dimensionless small spin parameter \(\epsilon = \Omega / \Omega_{\textrm{shed}}\). In this context, \(\Omega\) represents the angular speed of the neutron star as observed from spatial infinity, while \(\Omega_{\mathrm{shed}}\) is a characteristic frequency defined by \(\Omega^{2}_{\mathrm{shed}} \sim M_{*}/R_{*}^{3}\), where \(R_{*}\) and \(M_{*}\) refer to the radius and the mass in the non-rotating configuration. The quantity \(\Omega_{\mathrm{shed}}\) corresponds to the order of the Keplerian orbital frequency of a test particle at a radius \(R_{*}\) moving around a mass \(M_{*}\). Therefore, the approximation is valid for \(\epsilon \ll 1\), but breaks down when \(\epsilon \sim 1\).
Uniform rotation: Although differential rotation is particularly relevant in newly formed neutron stars, it has been shown that normal stars with differential rotation tend to evolve toward a uniform equilibrium state [1]. The method originally assumes uniform rotation for simplicity, although it could be extended to include differential rotation.
Stationary and axial symmetry: The perturbed spacetime that characterizes the rotating star exhibits axial symmetry with respect to an arbitrary axis, which is assumed to be aligned with the star’s rotation axis. Thus, the metric components must be independent of the time coordinate \(t\) and the azimuthal angle \(\phi\).
Reflection symmetry: The geometry remains unchanged when mirrored across a plane perpendicular to the axis of rotation. This implies that the geometry should be invariant under the transformation \(\theta\) \(\rightarrow\) \(\pi-\theta\).
Slow-rotation expansion
The slow-rotation expansion relies on the perturbation of the exact spherically symmetric background solution. In mathematical terms this means that the perturbed metric can be written as a power series
QLIMR truncates this series at \(\mathcal{O}(\epsilon^{2})\), which is Hartle and Thorne’s original order and the one at which every observable in this document is defined. The expansion itself is not limited to that order: it has been carried to seventh order in the spin [9], where the accuracy of the truncation and the rotation rates at which second order stops being adequate are quantified.
The quantity \(g^{(0)}_{\alpha \beta}\) is the static and spherically symmetric background metric defined as
According to the symmetry assumptions, the perturbed metric can be expanded up to \(\mathcal{O}(\epsilon^{2})\) as [2]
where \(\omega^{(1)}\) denotes a first order correction while \(h^{(2)}\), \(m^{(2)}\) and \(k^{(2)}\) correspond to second order corrections in the spin-frequency parameter (\(\epsilon\)). The form of the metric is justified by symmetry arguments. Note that for an axially symmetric spacetime a transformation of the form \(\Omega \rightarrow - \Omega\) is equivalent to \(t \rightarrow -t\). Therefore, \(g_{t\phi}\) should contain only odd powers of \(\epsilon\) and \(g_{tt}\), \(g_{rr}\), \(g_{\theta\theta}\), \(g_{\phi\phi}\) only even powers. From this metric ansatz, the perturbations \(h^{(1)}_{\alpha \beta}\) and \(h^{(2)}_{\alpha \beta}\) are therefore,
The slow rotation perturbations will also produce corrections to the stress-energy tensor which is considered to be a perfect fluid given by
where \(p\) is the pressure, \(\varepsilon\) is the total energy density and \(u^{\alpha}\) is the four-velocity of the fluid. Due to the metric perturbations, the four-velocity of the fluid, the pressure and energy density will also develop perturbations,
The fluid’s four velocity is defined as
where the component \(u^{t}\) can be found from the normalization condition \(u_{\alpha}u^{\alpha}=-1\). Therefore, the stress-energy tensor can be expanded as
The metric perturbation function depends on both the radial coordinate, \(r\), and the angular coordinate, \(\theta\). To decouple Einstein’s equations, a harmonic decomposition may be used in the Regge-Wheeler gauge (see [2] for details)
and similar expressions can be obtained for the perturbations of the pressure and energy density. However, as pointed out by Hartle and Thorne, careful is needed with the coordinate frame used when expanding those quantites in a slow rotation expansion because they won’t be valid throughout the entire star. That would be valid if the fractional changes in energy density and pressure at each point were small. However, this is not true close to the boundary of the star where the density may be finite where the non-rotating configuration vanishes. In order to overcome this issue, we choose a new radial coordinate \(R\) in the non-rotating configuration such that the isodensity and isobaric contours of the perturbed configuration are the same as the isodensity and isobaric contours defined at \(R\) in the non-rotating configuration. In matematical terms, this means
where the coordinate transformation between the old and new frame is given by
Let’s call this new frame the Hartle-Thorne coordinate frame and this will be the frame to formally perform the perturbation expansions. By construction in this new frame the pressure and total energy density only contains the static part, i.e. no spin perturbations. Instead, the small displacement \(\xi^{(2)}\) plays the role of the density and pressure perturbations in the Hartle-Thorne frame. Since the function \(\xi^{(2)}\) behaves as a scalar under rotations it can be decomposed as,
Once the background metric has been perturbed to the desired order in the Hartle-Thorne frame, one can systematically construct the perturbation equations order by order in the perturbation parameter from Einstein’s equations,
Since Einstein’s equations can be written as
every term must vanish independently. Therefore, the perturbation equations at the perturbation order \(n\) are given by
Interior equations
Zeroth Order: The TOV equations
At order \(\mathcal{O}(1)\), the metric reduces to the background spacetime which is static and spherically symmetric. By defining the following quantity
the \((t,t)\) and \((R, R)\) components of the Einstein’s equations yield
respectively. In addition, if the equation of motion is used \(\nabla^{\mu}T_{\mu R}=0\) with the equation for \(\nu(R)\), the Tolman-Oppenheimer-Volkoff equation (TOV) is obtained,
These equations along with a defined equation of state (EoS) \(p=p(\varepsilon)\) close the system of differential equations.
First Order
Up to first order in the star’s spin frequency, there is a single equation for the \((t, \phi)\) component of the perturbed Einstein’s equations, given by:
where
is the coordinate angular velocity of the fluid element at \((R, \Theta)\) as seen by a free-falling observer, and \(\Omega\) is the angular velocity of the fluid as observed by an observer at rest at some point within the fluid.
Second Order
Up to second order in the spin-rotation expansion, there are two systems of equations associated with the \(\ell=0\) and \(\ell=2\) modes. The first system describes the correction to the TOV mass due to rotation, while the second system allows us to obtain the quadrupole deformation of the star induced by rotation. These system of equations for each mode are given by
\(\ell=0\)
where
\(\ell=2\)
This pair is not the one QLIMR integrates. Written this way the first equation carries \(dh^{(2)}_{2}/dR\) on its right-hand side, so the two derivatives have to be disentangled before either can be stepped, and the algebraic relation for \(m^{(2)}_{2}\) has to be substituted back at every evaluation. More importantly, \(h^{(2)}_{2}\) and \(k^{(2)}_{2}\) grow large and nearly opposite towards the surface, so forming \(k^{(2)}_{2}\) on its own throws away significant digits in exactly the region the exterior matching reads from.
Substituting \(m^{(2)}_{2}\) and changing variable to
removes both problems at once. The combination is the well-conditioned one – the cancellation is taken analytically rather than numerically – and the first equation loses its own dependent variable. Writing the result in the naming the source code uses, where for each equation \(X\) multiplies the first state variable \(v^{(2)}_{2}\) and \(Y\) the second, \(h^{(2)}_{2}\),
The whole content of the change of variable is the first coefficient:
so \(dv^{(2)}_{2}/dR\) does not depend on \(v^{(2)}_{2}\) itself. The remaining coefficients are radial functions of the background alone,
and the two source terms, which carry the whole of the rotation, are
where the two polynomials are
The system is linear, so it is solved once with the rotational sources kept (the particular branch) and once with them dropped (the homogeneous branch); the two are combined at the surface by the matching to the exterior. The metric function \(k^{(2)}_{2}\) is never integrated. It is recovered wherever it is needed, including for export, as
The two remaining \(\ell = 2\) functions are not integrated either. Once \(h^{(2)}_{2}\) is known they follow algebraically, with no differential equation of their own,
The \(h^{(2)}_{2}\) appearing in \(\eqref{eq:xi22}\) and \(\eqref{eq:m22}\) is the matched interior solution, \(h^{(2) \, \mathsf{P}}_{2, \, \mathsf{int}} + C^{(2)}_{2, \, \mathsf{int}} h^{(2) \, \mathsf{H}}_{2, \, \mathsf{int}}\), so both are evaluated only after the matching of Observables extraction has fixed the constants – not from either branch on its own.
BARYON MASS
The baryon (rest) mass is the mass the star’s constituents would have if they were dispersed to infinity, and it is obtained by counting baryons in the proper volume rather than by reading off an asymptotic metric coefficient,
with \(m_{b}\) the mass per baryon and \(n(R)\) the baryon number density carried by the third column of the equation-of-state table. The factor \([1 - 2M/R]^{-1/2}\) is the proper volume element; it is what makes \(M_{b}\) exceed the gravitational mass \(M_{*}\), the difference \(M_{b} - M_{*}\) being the binding energy released in assembling the star.
At second order in the spin the baryon mass acquires a correction, driven by the \(\ell = 0\) perturbations and the frame dragging. Since the number of baryons is fixed, this is a redistribution rather than a creation of matter: the star expands, the proper volume changes, and the fluid is displaced radially by \(\xi^{(2)}_{0}\). Collecting the three contributions,
Every perturbation on the right-hand side is the physical one, so
\(\delta M_{b}\) is the physical correction, of order \(\Omega^{2}\).
Internally the module carries all of them divided by the appropriate power of
\(\Omega\) – \(\varpi^{(1)}_{1}/\Omega\), \(m^{(2)}_{0}/\Omega^{2}\),
\(\xi^{(2)}_{0}/\Omega^{2}\) – since the seed the frame-dragging equation is
started from is arbitrary and cancels only in that combination. Evaluating the
integral with those scaled quantities therefore yields
\(\delta M_{b}/\Omega^{2}\), which is what observables.csv reports, in
\(M_{\odot}\,\textrm{s}^{2}\).
The last term is the displacement contribution: using the TOV equation \(\eqref{eq:TOVp}\) for \(dp/dR\) it is simply \(-\xi^{(2)}_{0} \, dn/dR\), the change in the local baryon number density produced by moving the fluid element. It is written above in the \(dn/dp\) form because that is how the module evaluates it, taking both derivatives along the radius so that the ratio needs no thermodynamic identity and no chemical potential.
QUARK STARS AND THE SURFACE TERMS
For an ordinary hadronic star the energy density falls continuously to zero at the surface, and the matching of the interior to the exterior at \(R_{*}\) involves no surface contribution. A self-bound star is different. For quark matter in the MIT bag model the pressure and energy density are
so that the surface, defined as always by \(p = 0\), sits at a finite energy density \(\varepsilon(R_{*}) = 4B\). The star ends on a density discontinuity.
Reina and Vera [8] showed that the second-order matching in this situation is not Hartle’s original one: where the energy density jumps, the perturbation functions acquire surface terms. Two consequences matter here.
First, the jump in the radial derivative of the metric function \(\nu\) is fixed by the jump in the pressure,
evaluated at the matching surface \(R = a\). A physical stellar surface has
vacuum outside it and therefore \(p(R_{*}) = 0\) on both sides, so
\([p] = 0\) and \([\nu'] = 0\). The pressure is continuous at the
surface of a quark star exactly as it is at the surface of a hadronic one –
it is the energy density, not the pressure, that jumps. An equation-of-state
table for a self-bound star must therefore be tabulated down to \(p \approx
0\); a table truncated at a finite pressure does not describe a star with a
surface, and QLIMR should be run on it with zero_stopping_condition set to
false so that its own lowest row is taken as the surface rather than a
zero-density row being prepended to it.
Second, the mass perturbations pick up terms proportional to the surface energy density \(\varepsilon_{s} \equiv \varepsilon(R_{*})\),
Note that it is \(\varepsilon_{s}\) alone that appears and not \(\varepsilon_{s} + p_{s}\), since \(p_{s} = 0\) by \(\eqref{eq:reina44}\). The \(\ell = 0\) term is what enters the correction to the mass,
where the last term is the surface contribution. It vanishes identically when \(\varepsilon_{s} = 0\), which is why it is invisible for a hadronic star and why the same expression serves both cases: nothing needs to be switched on for quark matter. Neglecting it, on the other hand, biases every second-order observable of a self-bound star.
TIDAL DEFORMABILITY OF NON-ROTATING STARS
Another important macroscopic observable of non-rotating neutron stars is the tidal deformability, which measures how easily a star can be deformed under the influence of a static external field. Although tidal deformations have been formally explored in ([6] , [7]), an interesting approach to deriving the equation governing tidal deformation is to use the Hartle-Thorne expansion up to second order by setting the function \(\varpi^{(1)}_{1}=0\) in the differential equation for \(h^{(2)}_{2}\) [5]. This leads to an equation of the following form,
From the previous equation, the tidal Love number, or tidal deformability of the star can be extracted. For more details, see the subsection on observables extraction.
Asymptotic Analysis
Since the interior equations at each spin-frequency order diverge at \(R = 0\), it is necessary to generate boundary conditions within a very small core around the center of the star. Regularity is imposed at the center, and the unknown functions are Taylor-expanded around \(R = 0\). By substituting the power series expansion into the differential equations, an algebraic system is obtained for the coefficients of the series expansion of each unknown function. The asymptotic expansions used for generating the boundary conditions are presented in subsection Numerical Implementation.
Observables extraction
The process of extracting the observables or multipole moments of the star involves solving the interior equations and matching them to the exterior solutions at each order. This procedure must be carried out order by order in the slow-rotation expansion to extract each macroscopic observable.
Zeroth Order
At zeroth order, since the spacetime is static and spherically symmetric, the exterior solution is the Schwarzschild solution. Thus,
If we take the \((t,t)\) component of the exterior solution and expand it at spatial infinity, we obtain \(g^{(0)}_{tt} = -1 + \frac{2M_{*}}{R} + \cdots\). Thus, the quantity \(M_{*}\) is interpreted as the TOV mass monopole of the source distribution of a non-rotating star. The TOV radius, \(R_{*}\), of the star is obtained by matching the pressure at the surface, which implies finding the radial coordinate, \(R\), at which \(p(R=R_{*}) = 0\).
First Order
At linear order, the spin angular momentum of the slowly rotating star can be extracted by matching the interior and exterior solution at the neutron star surface \(R_{*}\) and also imposing continuity of the function \(\omega^{(1)}_{1}(R)\). This implies, that the matching conditions are given by,
where the exterior solution gives,
with \(\Omega\) being the angular speed of the neutron star, \(S\) it’s spin angular momentum and \(I\) the moment of inertia. Since there are two equations for two unknowns, \((\Omega, S)\) then they are giving by
Once \(S\) and \(\Omega\) are obtained, the moment of inertia is defined as \(I = S/\Omega\). This module computes the dimensionless moment of inertia which is defined as
As mentioned by Hartle [4], if a different value of \(\Omega\) is desired (e.g., another value interested by the user), one rescales the function \(\varpi^{(1)}_{1}\) as
Second Order
At second order, we can extract the first correction to the mass monopole, denoted as \(\delta M_{*}\), the equatorial radius, \(R_{\textrm{eq}}\), the first correction to the mean radius of the star, \(\langle \delta R_{*} \rangle\), the stellar eccentricity, \(e_{s}\), and the rotational quadrupole moment, \(Q^{\textrm{(rot)}}\). The procedure is similar to the previous one, where the interior and exterior solutions must be matched at the surface of the neutron star.
\(\ell=0\)
Mass correction
To extract the first correction to the TOV mass \(\delta M_{*}\), we solve the \(\ell=0\) equations and math the interior and exterior solutions at the surface of the neutron star.
where
From the matching condition the quantity \(\delta M_{*}\) is obtained as
which is \(\eqref{eq:dM}\). The last term is the surface contribution discussed under Quark stars and the surface terms: it comes from the jump \(\eqref{eq:jumps}\) in \(m^{(2)}_{0}\) and vanishes identically when the energy density goes to zero at the surface, as it does for a hadronic star.
The remaining \(\ell = 0\) constant is the one in \(h^{(2)}_{0}\). The interior solution is algebraic rather than integrated – it follows from \(m^{(2)}_{0}\) and \(\xi^{(2)}_{0}\) once those are known –
and outside the star, with \(C_{20} = \delta M_{*}/M_{*}\) the amplitude of the homogeneous exterior solution,
The integration constant \(h_{0c}\) is then fixed by requiring the two to agree at the surface, \(h^{(2)}_{0, \, \mathsf{int}}(R_{*}) = h^{(2)}_{0, \, \mathsf{ext}}(R_{*})\), which gives
The term in \(p_{*}\) is worth keeping even though a true surface has
\(p_{*} = 0\). With zero_stopping_condition set to false the
integration stops at the lowest tabulated enthalpy, where the pressure is small
but finite, and dropping the term makes the interior and exterior
\(h^{(2)}_{0}\) disagree systematically.
In principle the quantity \(\delta M_{*}\) is a integration constant. However, if we take the exterior metric solution and expand the \((t,t)\) components at spatial infinity it is obtained
and therefore, the mass monopole of the distribution is given by
The quantity \(\delta M_{*}\) depends in general on the angular spin-frequency of the star \(\Omega\). To obtain the same quantity for another value of \(\Omega\) specified by the user, \(\Omega_{\textsf{user}}\). Then,
Mean radius correction
When the star is rotating, the surface of the neutron star gets deformed. To find an invariant parametrization of the stellar surface, we look for the surface in 3D space with spherical coordinates \((\tilde{r}, \theta, \phi)\) with the same intrinsic geometry as the surface of constant density of the star at \(R=R_{*}\). The surface contour is then described by
By taking an integral average over the 2-sphere then the total mean radius of the star is obtained,
where \(\langle \delta R \rangle \equiv \xi^{(2)}_{0}(R_{*})\). We refer to the quantity \(\langle \delta R \rangle\) as the first mean contribution the TOV radius \(R_{*}\). Similarly, the quantity \(\langle \delta R \rangle\) can be rescaled as
\(\ell=2\)
Rotational quadrupole moment From the \(\ell = 2\) set of equations, the rotational quadrupole moment of the star, denoted as \(Q^{\textsf{(rot)}}\), can be extracted. The two functions the system is integrated in, \(v^{(2)}_{2}(R)\) and \(h^{(2)}_{2}(R)\), are solved numerically inside the star. Then, by matching the internal solution to the external one, it is possible to extract two integration constants: one inside the star and the other outside. In particular, the integration constant outside the star is the one required to extract the quadrupole moment. To see this, recall that the general solution of a linear ODE system consists of the particular solution plus the homogeneous solution. Thus,
and similarly for \(v^{(2)}_{2}(R)\),
Note that the whole procedure is carried out in \(v^{(2)}_{2}\) and never in \(k^{(2)}_{2}\): the same pair that is integrated is the pair that is matched, so the ill-conditioned combination is not formed at any point. \(k^{(2)}_{2}\) is reconstructed only at the very end, once both constants are known, from \(\eqref{eq:k22rec}\).
Then, by matching both functions, \(v^{(2)}_{2}(R)\) and \(h^{(2)}_{2}(R)\), at the neutron star boundary, the integration constants can be found from
The matching is done in the pair the system was integrated in, \((v^{(2)}_{2}, h^{(2)}_{2})\), and not in \((h^{(2)}_{2}, k^{(2)}_{2})\). Solving this linear system for the two constants gives
with the determinant of the homogeneous pair
To keep these readable the argument has been dropped throughout: every function above is one of \(v^{(2)}_{2}\) or \(h^{(2)}_{2}\), the superscript \(\mathsf{H}\) or \(\mathsf{P}\) selects the homogeneous or the particular branch, the subscript selects the interior or exterior solution, and all of them are evaluated at the stellar surface,
Nothing in \(\eqref{eq:C22int}\) or \(\eqref{eq:C22ext}\) guards against \(\mathcal{W}\) being small, and where it is, both constants are dominated by round-off with no sign of it in the output. The module therefore checks the two conditions \(\eqref{eq:match22}\) directly after solving them: they are what the matching was for, so a failure to satisfy them means the system was ill-conditioned.
The homogeneous and particular exterior solutions can be read out from
where \(\zeta \equiv R/M_{*} - 1\) and \(A\) is the amplitude fixed by the matching at \(R_{*}\).
Adding the two gives the exterior solution for the variable the module actually integrates. The \(Q^{2}_{2}\) terms cancel between them, which is the exterior counterpart of the cancellation that motivated the change of variable in the interior:
with \(\hat{\jmath} = S/M_{*}^{2}\) the dimensionless spin. The second line is the form the module evaluates: the first term is the particular solution, quadratic in the spin, and the bracket is the homogeneous one, whose amplitude \(A\) the interior–exterior matching determines.
where \(Q^{m}_{\ell}\) is the associated Legendre function of the second kind,
Using the analytical exterior solution and expanding the \(g_{tt}\) component of the metric at spatial infinity it is obtained:
The quadrupole moment is the term proportional to \(2P_{2}/R^{3}\). Therefore,
As before, such quantity depends in general on the speed spin-frequency of the star. Then, this quantity can be rescaled as
Equatorial radius and stellar eccentricity
To compute the equatorial radius correction due to the rotation of the neutron star, we can use the contour invariant parametrization of the surface. The equatorial and polar radius of the star are defined at \(\Theta=\pi/2\) and \(\Theta=0\), respectively. Thus,
where
The stellar eccentricity can be defined from the previous expressions as:
Notice that the quantities \(\delta R_{eq}\), \(\delta R_{pol}\) and \(e_{s}\) depend on the angular spin-frequency of the star. To rescale the quantities according to a desired speed angular frequency then,
Tidal deformability
The exterior solution to the equation presented earlier for the tidal deformation is given by
Expanding this expression in the buffer zone we obtain [5]
By comparing the general expansion of the metric of a tidally distorted object of mass \(M_{*}\) in ACMC coordinates, it can be seen that \(c_{1}\) is related to the tidal quadrupole moment \(Q^{\mathrm{(tid)}}\) and the constant \(c_{2}\) to the tidal field \(\mathcal{E}^{\mathsf{(tid)}}\). Then the apsidal constant \(k_{2}\) which is related to the tidal deformability is given by \((8/5)C^{5}(c_{1}/c_{2})\). By matching the internal and exterior solution at the neutron star surface,
we can express \(c_{1}\) and \(c_{2}\) in terms of \(h^{(2),\textrm{tid}}_{2, \textrm{int}}(R_{*})\) and it’s derivative \(h'^{(2),\textrm{tid}}_{2, \textrm{int}}(R_{*})\). Thus, the apsidal constant gives,
with the denominator
where \(C= M_{*}/R_{*}\) is the compactness of the neutron star and
Once the apsidal constant is computed, the dimensionless static tidal Love number or tidal deformability is given by
Numerical Implementation
Zeroth Order
Enthalpy formulation
From a numerical standpoint, as we integrate from the center to the surface, it is essential to check at each step whether the pressure has already reached zero. In practice, this is done by assuming that the surface is reached when \(p=\delta p_{c}\), where \(\delta\) is a very small value (e.g., \(\delta = 10^{-9}\)). To avoid computing the pressure at each step, the TOV equations can be reformulated by applying a change of variables [3].
Important
TOV Equations in pseudo-enthalpy form
Let \(h=\ln\textsf{h}\) and then \(dh=\dfrac{d \textsf{h}}{\textsf{h}} = \dfrac{dp}{\varepsilon + p}\). Then, the TOV equation can be written as
\begin{align} \begin{cases} \hspace{0.2cm} \dfrac{dR}{dh} =- \dfrac{R(R-2M)}{M + 4\pi R^{3} p} \\[3ex] \hspace{0.2cm} \dfrac{dM}{dh} =- \dfrac{4 \pi \varepsilon R^{3} (R-2M)}{M + 4 \pi R^{3} p} \\[3ex] \end{cases} \end{align}Boundary conditions
\begin{align} R(h_{\epsilon}) &= R_{\epsilon} \\[2ex] M(R_{\epsilon}) &= \dfrac{4 \pi }{3} \varepsilon_{c} R^{3}_{\epsilon} + \mathcal{O}(R^{5}_{\epsilon}) \end{align}Domain of integration: \([h_{\epsilon}, 0]\) where \(h_{\epsilon} = h_{c} - \dfrac{2 \pi}{3} R_{\epsilon}^{2}(\varepsilon_{c} + 3p_{c})\).
where \(p = p(h)\) and \(\varepsilon = \varepsilon(h)\). The extra equation for the metric function \(\nu\) gives,
\begin{equation} \dfrac{d\nu}{dh} = -2 \end{equation}and the solution is just given by
\begin{equation} \nu(h) = - 2h + \ln \left( 1-\dfrac{2M_{*}}{R_{*}} \right) \, . \end{equation}
First Order
Important
in the same naming as the second-order system: \(X\) multiplies the first state variable \(\varpi^{(1)}_{1}\) and \(Y\) the second, \(\alpha^{(1)}_{1}\), with
There is no source term here: the equation is linear and homogeneous, which is why the central seed \(\varpi^{(1)}_{1,c}\) is arbitrary and divides out of every observable built from it.
Second Order
Important
\(\ell=0\) equations:
where
Boundary conditions
\(\ell=2\) equations:
These are integrated in \(v^{(2)}_{2} = h^{(2)}_{2} + k^{(2)}_{2}\) rather than in \(k^{(2)}_{2}\), for the reasons given under Interior equations above. The pair below is what the module actually steps, and \(k^{(2)}_{2}\) is recovered as \(v^{(2)}_{2} - h^{(2)}_{2}\) wherever it is needed. The coefficients are the ones defined in \(\eqref{eq:Xv22}\) to \(\eqref{eq:Yh22}\) and the sources in \(\eqref{eq:Sv22}\) and \(\eqref{eq:Sh22}\).
Inhomogeneous system
Homogeneous system
The two differ only by the source terms, so they are integrated together as a single four-component system, with the state vector \(\left( v^{(2)}_{2,P}, \, h^{(2)}_{2,P}, \, v^{(2)}_{2,H}, \, h^{(2)}_{2,H} \right)\) and one shared evaluation of the coefficients per step.
Boundary conditions
The near-centre expansions used to start both systems, with \(A^{(2)}_{2, \mathsf{int}}\) the trial amplitude of the run and \(\varpi^{(1)}_{1,c}\) the \(\Omega\)-scaled central seed:
Dropping the terms in \(\varpi^{(1)}_{1,c}\) gives the homogeneous pair, which at leading order reduces to \(h^{(2)}_{2} = A^{(2)}_{2, \mathsf{int}} R^{2}\) and \(v^{(2)}_{2} = -\tfrac{2\pi}{3} A^{(2)}_{2, \mathsf{int}} R^{4} \left( \varepsilon_{c} + 3 p_{c} \right)\). The trial amplitude \(A^{(2)}_{2, \mathsf{int}}\) is arbitrary: the system is linear, so the matching at \(R_{*}\) divides its scale back out and no observable depends on it.
Tidal deformability
Important
where
Boundary condition:
The leading value \(y = 2\) is the regular solution at the centre; the \(\mathcal{O}(R_{\epsilon}^{2})\) term is the first correction picked up over the small core that the integration skips, and dropping it biases the surface value of \(y\), and so the Love number, for every star.
Numerical methods
Interpolation of the equation of state. The module utilizes Steffen’s algorithm as a monotonic increasing interpolator to process the Equation of State (EOS) data file. This approach ensures that the EoS remains monotonic, which is crucial for maintaining the stability of the star’s equilibrium configuration. The GNU Scientific Library (GSL) is used for this interpolation. For more information on how to use the GSL Steffen’s interpolator, please refer to the GSL website.
The ODE solver. To solve the interior equations, QLIMR employs the well-optimized and fast RF45 ODE solver from the GNU Scientific Library (GSL). This integrator is specifically designed for efficient performance. For more details on how to use the GSL integrator, please refer to GSL integrators. The step size is adaptive, but the integration is not free-running: every system – the TOV background, the frame dragging, both \(\ell = 0\) and \(\ell = 2\) second-order systems, and the tidal equation – is marched from one knot of the same radial grid to the next, the grid the TOV solve produced. All the radial functions therefore share one set of knots, so no perturbation is ever evaluated by interpolating another one off its own grid, and the exported solutions line up row by row.
Interpolation of the radial solutions. Every function a solver produces is stored as a spline in \(R\), so that any later stage can evaluate it at an arbitrary radius rather than only at the knots it was solved on. Fifteen are built per star: the background \(M\), \(p\), \(\varepsilon\), \(n\), \(\mu\) and \(\nu\); the frame dragging \(\varpi^{(1)}_{1}\) and \(\alpha^{(1)}_{1}\); the \(\ell = 0\) pair \(m^{(2)}_{0}\) and \(\xi^{(2)}_{0}\); the four \(\ell = 2\) branches, homogeneous and particular, of \(h^{(2)}_{2}\) and \(k^{(2)}_{2}\); and the tidal function \(y\). All of them use the same Steffen interpolator as the equation of state, for the same reason: an ordinary cubic spline is free to overshoot between knots, which near the surface can return a negative pressure or a density that is not monotonic, while Steffen constrains the slopes so that the interpolant has no extremum the data does not already have. Since the sources of the higher-order systems are built by evaluating these splines at every integration step, an overshoot in one of them would propagate into every quantity above it. (A plain cubic spline,
gsl_interp_cspline, appears only in the unit tests, where reproducing an exact cubic is the property being checked.)All of these splines share the radial grid of the TOV solve, so they also share one GSL lookup accelerator: the index of the interval containing \(R\) is found once per radius rather than once per spline.
The equation of state in pseudo-enthalpy form. The TOV system is integrated in the pseudo-enthalpy \(h\) rather than in the pressure, since \(h\) is finite and monotonic through the surface where \(p \to 0\). It is defined by
\begin{equation} \label{eq:hdef} h(\varepsilon) = \int^{\varepsilon} \dfrac{dp}{\varepsilon' + p(\varepsilon')} = \int^{\varepsilon} \dfrac{c_{s}^{2}(\varepsilon')}{\varepsilon' + p(\varepsilon')} \, d\varepsilon' \, , \end{equation}where \(c_{s}^{2} = dp/d\varepsilon\) is taken from the derivative of the same Steffen spline that provides \(p(\varepsilon)\), so the integrand costs no extra table lookup. The integral is accumulated row by row over the tabulated energy densities with adaptive Gauss–Kronrod quadrature (
gsl_integration_qag, 61-point rule, absolute and relative tolerances \(10^{-9}\), at most 1000 subintervals), each step adding \(\Delta h\) between two consecutive rows to the running total. Where the integration starts depends onzero_stopping_condition: with it true the reader prepends a zero row and \(h = 0\) is placed at \(\varepsilon = 0\), and with it false \(h = 0\) is placed at the lowest tabulated row, which is then the surface.A closed form that cancels, and what replaces it. The denominator \(\mathcal{D}\) of the tidal apsidal constant, \(\eqref{eq:k2den}\), is analytically exact but numerically poor at low compactness \(C = M_{*}/R_{*}\). It is \(\mathcal{O}(C^{5})\) assembled from terms that are individually \(\mathcal{O}(C)\), so evaluating it as written cancels five orders. Measured against 50-digit arithmetic the relative error reaches \(2.6 \times 10^{-11}\) at \(C = 0.052\), the lightest star of an SLy sequence, and \(4.7 \times 10^{-6}\) at \(C = 0.005\).
The \(C^{5}\) in the numerator of \(\eqref{eq:k2}\) cancels it analytically, so the module divides both by \(C^{5}\) and evaluates \(\mathcal{D}/C^{5}\) as a series in \(C\) below a threshold. Every coefficient of that series is linear in \(Y\), so it is two tables evaluated by Horner. Twenty-one terms give a truncation error of \(2.5 \times 10^{-18}\) at \(C = 0.10\) and \(1.4 \times 10^{-14}\) at \(C = 0.15\), while the closed form reaches about \(10^{-13}\) there and improves as \(C\) grows. The two cross near \(C = 0.15\), which is where the module switches between them, and neither branch exceeds about \(10^{-13}\) anywhere. The expression itself is that of Postnikov, Prakash and Lattimer [10].
The exterior \(\ell = 2\) homogeneous solutions have a similar structure – associated Legendre functions of the second kind, whose closed forms build a small number by cancelling large ones – and lose about five digits at \(C = 0.05\). They are left in closed form here, matching the reference implementation, and the loss is recorded as a known limitation at the light end of a sequence rather than corrected.
The baryon mass. Unlike the mass and the metric functions, \(M_{b}\) is not an integration constant of the ODE system but a quadrature over the star, \(\eqref{eq:Mb}\), and likewise its second-order correction \(\eqref{eq:dMb}\). Both are evaluated with the same adaptive Gauss–Kronrod routine (
gsl_integration_qag, 61-point rule) over \([R_{\epsilon}, R_{*}]\), with a relative tolerance of \(10^{-8}\) and at most 1000 subintervals; the absolute tolerance is left at zero because the scale of the integrand varies by orders of magnitude from one star of a sequence to the next. The integrands are evaluated from the splines of the already-solved background and perturbations, so neither quadrature requires re-solving anything.
References
[1] M. D. Duez, Y. T. Liu, S. L. Shapiro, and M. Shibata (2006). Evolution of magnetized, differentially rotating neutron stars: Simulations in full general relativity, Phys. Rev. D 73, 104015
[2] Hartle, J. B. (1967). Slowly rotating relativistic stars. I. Equations of structure. The Astrophysical Journal, 150, 1005.
[3] Lindblom, L. (1992). Determining the nuclear equation of state from neutron-star masses and radii. The Astrophysical Journal, 398, 569-573.
[4] Hartle, J. B., & Thorne, K. S. (1968). Slowly rotating relativistic stars. II. Models for neutron stars and supermassive stars. The Astrophysical Journal, 153, 807.
[5] Yagi, K., & Yunes, N. (2013). I-Love-Q relations in neutron stars and their applications to astrophysics, gravitational waves, and fundamental physics. Physical Review D, 88(2), 023009.
[6] Binnington, T., & Poisson, E. (2009). Relativistic theory of tidal Love numbers. Physical Review D, 80(8), 084018.
[7] Hinderer, T. (2008). Tidal Love numbers of neutron stars. The Astrophysical Journal, 677(2), 1216.
[8] Reina, B., & Vera, R. (2015). Revisiting Hartle’s model using perturbed matching theory to second order: amending the change in mass. Classical and Quantum Gravity, 32(15), 155008.
[9] Conde-Ocazionez, C., Yin, T., Noronha-Hostler, J., & Yunes, N. (2025). Highly-accurate neutron star modeling in the Hartle-Thorne Approximation. arXiv:2505.19400.
[10] Postnikov, S., Prakash, M., & Lattimer, J. M. (2010). Tidal Love numbers of neutron and self-bound quark stars. Physical Review D, 82(2), 024016.