API Reference

Solver

TOV.Solver.solve_tovFunction
solve_tov(eos::AbstractEOS, P_c::Real; r_init=1e-8, r_max=100.0)

Solve the TOV equations for a given EOS and central pressure.

source
TOV.Solver.StarType
Star{T}

Structuring containing the definition and solution of a relativistic star.

source

Equation of State

TOV.EOS.AbstractEOSType
AbstractEOS

Abstract supertype for all Equations of State. By convention in this library:

  • ρ refers to rest-mass density (ρ₀).
  • ϵ refers to total energy density.
  • P refers to pressure.
source
TOV.EOS.PolytropeType
Polytrope{T} <: AbstractEOS

Analytic polytropic equation of state: P = K * ρ^Γ ϵ = ρ + P / (Γ - 1) Here ρ is the rest-mass density.

source
TOV.EOS.PiecewisePolytropeType
PiecewisePolytrope{T} <: AbstractEOS

Piecewise polytropic EOS where P = Ki * ρ^Γi in each region. Ensures continuity of P and thermodynamic variables.

source
TOV.EOS.TabulatedEOSType
TabulatedEOS{T} <: AbstractEOS

EOS defined by tabulated values of rest-mass density (ρ), pressure (P), and energy density (ϵ).

source
TOV.EOS.ConstantDensityType
ConstantDensity{T} <: AbstractEOS

EOS where energy density is constant: ϵ = ϵc. P is independent variable, but ϵ returns constant. ρ (rest-mass) is ill-defined for this toy model usually, but we can define it to be equal to ϵ for simplicity or 0. However, to satisfy dMb equation, we might want to just set ρ=ϵ? Schwarzschild interior usually implies incompressible fluid. We set ρ = ϵ for simplicity in M_b calculation, or define it formally.

source

Analysis & Visualization

TOV.Analysis.check_causalityFunction
check_causality(star::Star)

Check if the speed of sound exceeds the speed of light (c=1) anywhere in the star. Returns (iscausal, maxcs).

source
TOV.Analysis.find_stability_branchFunction
find_stability_branch(seq::Sequence)

Identify the stable and unstable branches of the sequence. Returns a vector of symbols :stable or :unstable for each star. Criterion: dM/dρ_c > 0 is stable (usually).

source
Makie.plotFunction
Makie.plot(star::Star)

Create a 4-panel dashboard for a single star.

source
Makie.plot(seq::Sequence)

Plot the Mass-Radius curve for a sequence.

source