API Reference
Solver
TOV.Solver.solve_tov — Function
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.
TOV.Solver.Star — Type
Star{T}Structuring containing the definition and solution of a relativistic star.
Equation of State
TOV.EOS.AbstractEOS — Type
AbstractEOSAbstract supertype for all Equations of State. By convention in this library:
ρrefers to rest-mass density (ρ₀).ϵrefers to total energy density.Prefers to pressure.
TOV.EOS.Polytrope — Type
Polytrope{T} <: AbstractEOSAnalytic polytropic equation of state: P = K * ρ^Γ ϵ = ρ + P / (Γ - 1) Here ρ is the rest-mass density.
TOV.EOS.PiecewisePolytrope — Type
PiecewisePolytrope{T} <: AbstractEOSPiecewise polytropic EOS where P = Ki * ρ^Γi in each region. Ensures continuity of P and thermodynamic variables.
TOV.EOS.TabulatedEOS — Type
TabulatedEOS{T} <: AbstractEOSEOS defined by tabulated values of rest-mass density (ρ), pressure (P), and energy density (ϵ).
TOV.EOS.ConstantDensity — Type
ConstantDensity{T} <: AbstractEOSEOS 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.
Analysis & Visualization
TOV.Analysis.solve_sequence — Function
solve_sequence(eos::AbstractEOS, ρ_range)Generate a sequence of stars for central densities in ρ_range.
TOV.Analysis.Sequence — Type
Sequence{E<:AbstractEOS}A sequence of stellar models (equilibrium configurations) for a given EOS.
TOV.Analysis.check_causality — Function
check_causality(star::Star)Check if the speed of sound exceeds the speed of light (c=1) anywhere in the star. Returns (iscausal, maxcs).
TOV.Analysis.find_stability_branch — Function
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).
Makie.plot — Function
Makie.plot(star::Star)Create a 4-panel dashboard for a single star.
Makie.plot(seq::Sequence)Plot the Mass-Radius curve for a sequence.