jesterTOV.tov.gr.GRTOVSolver#

class GRTOVSolver[source]#

Bases: TOVSolverBase

Standard General Relativity TOV solver.

Solves the TOV equations:

\[\begin{split}\frac{dr}{dh} &= -\frac{r(r-2m)}{m + 4\pi r^3 p} \\ \frac{dm}{dh} &= 4\pi r^2 \varepsilon \frac{dr}{dh}\end{split}\]

plus the equations for tidal deformability.

__init__()#

Methods

__init__()

construct_family(eos_data, ndat, min_nsat, ...)

Construct M-R-Λ curves by solving for multiple central pressures.

fetch_params(params)

Extract solver-specific parameters from the combined EOS+TOV parameter dict.

get_required_parameters()

GR TOV requires no additional parameters beyond EOS.

solve(eos_data, pc, tov_params)

Solve TOV equations for given central pressure.

get_required_parameters()[source]#

GR TOV requires no additional parameters beyond EOS.

Return type:

list[str]

Returns:

list[str] – Empty list (no extra parameters)

solve(eos_data, pc, tov_params)[source]#

Solve TOV equations for given central pressure.

This function integrates the TOV equations from the center of the star (where r=0, m=0) outward to the surface (where p=0), using the enthalpy as the integration variable. The integration starts slightly off-center to avoid singularities.

The solver uses the Dormand-Prince 5th order adaptive method (Dopri5) with proper error control for numerical stability.

Parameters:
  • eos_data (EOSData) – EOS quantities in geometric units

  • pc (float) – Central pressure [geometric units]

  • tov_params (dict[str, float]) – Not used for GR TOV (empty dict {} — no additional parameters)

Return type:

TOVSolution

Returns:

TOVSolution

Mass, radius, and Love number in geometric units.

Returns NaN values on solver failure (JAX-compatible).

Notes

The integration is performed from center to surface, with the enthalpy decreasing from h_center to 0. Initial conditions are set using series expansions valid near the center.