jesterTOV.eos module
The equation of state (EOS) module provides classes and functions for modeling neutron star matter equations of state.
- class jesterTOV.eos.Interpolate_EOS_model[source]
Bases:
objectBase class to interpolate EOS data.
- interpolate_eos(n: Float[Array, 'n_points'], p: Float[Array, 'n_points'], e: Float[Array, 'n_points'])[source]
Given n, p and e, interpolate to obtain necessary auxiliary quantities.
- Parameters:
n (Float[Array, n_points]) – Number densities. Expected units are n[fm^-3]
p (Float[Array, n_points]) – Pressure values. Expected units are p[MeV / fm^3]
e (Float[Array, n_points]) – Energy densities. Expected units are e[MeV / fm^3]
- Returns:
Interpolated values of n, p, hs (enthalpy) e, and dloge_dlogps.
- Return type:
- class jesterTOV.eos.MetaModel_EOS_model(kappas: tuple[Float, Float, Float, Float, Float, Float] = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), v_nq: list[float] = [0.0, 0.0, 0.0, 0.0, 0.0], b_sat: Float = 17.0, b_sym: Float = 25.0, nsat: Float = 0.16, nmin_MM_nsat: Float = 0.75, nmax_nsat: Float = 12, ndat: Int = 200, crust_name: str = 'DH', max_n_crust_nsat: Float = 0.5, ndat_spline: Int = 10, proton_fraction: bool | float | None = None)[source]
Bases:
Interpolate_EOS_modelMetaModel_EOS_model is a class to interpolate EOS data with a meta-model.
- Parameters:
Interpolate_EOS_model (object) – Base class of interpolation EOS data.
- compute_cs2(n: Array, p: Array, e: Array, x: Array, delta: Array | float, f_1: Array, f_star: Array, f_star2: Array, f_star3: Array, b: Array, v: Array)[source]
- compute_energy(x: Array, f_1: Array, f_star: Array, f_star2: Array, f_star3: Array, b: Array, v: Array) Array[source]
- compute_pressure(x: Array, f_1: Array, f_star: Array, f_star2: Array, f_star3: Array, b: Array, v: Array) Array[source]
- compute_proton_fraction(coefficient_sym: list, n: Array) Float[Array, 'n_points'][source]
Computes the proton fraction for a given number density.
- Parameters:
n (Float[Array, "n_points"]) – Number density in fm^-3.
- Returns:
Proton fraction as a function of the number density.
- Return type:
Float[Array, “n_points”]
- class jesterTOV.eos.MetaModel_with_CSE_EOS_model(nsat: Float = 0.16, nmin_MM_nsat: Float = 0.75, nmax_nsat: Float = 12, ndat_metamodel: Int = 100, ndat_CSE: Int = 100, **metamodel_kwargs)[source]
Bases:
Interpolate_EOS_modelMetaModel_with_CSE_EOS_model is a class to interpolate EOS data with a meta-model and using the CSE.
- construct_eos(NEP_dict: dict, ngrids: Float[Array, 'n_grid_point'], cs2grids: Float[Array, 'n_grid_point']) tuple[source]
Construct the EOS
- Parameters:
NEP_dict (dict) – Dictionary with the NEP keys to be passed to the metamodel EOS class.
ngrids (Float[Array, n_grid_point]) – Density grid points of densities for the CSE part of the EOS.
cs2grids (Float[Array, n_grid_point]) – Speed-of-sound squared grid points of densities for the CSE part of the EOS.
- Returns:
EOS quantities (see Interpolate_EOS_model), as well as the chemical potential and speed of sound.
- Return type:
- class jesterTOV.eos.MetaModel_with_peakCSE_EOS_model(nsat: Float = 0.16, nmin_MM_nsat: Float = 0.75, nmax_nsat: Float = 12, ndat_metamodel: Int = 100, ndat_CSE: Int = 100, **metamodel_kwargs)[source]
Bases:
Interpolate_EOS_modelMetaModel_with_peakCSE_EOS_model is a class to interpolate EOS data with a meta-model and using the CSE. The parametrization of the CSE is based on the peakCSE model, which is a Gaussian peak with a logit growth rate, in order to guarantee consistency with pQCD at the highest densities.
- Parameters:
Interpolate_EOS_model (object) – Base class of interpolation EOS data.
- jesterTOV.eos.construct_family(eos: tuple, ndat: Int = 50, min_nsat: Float = 2) tuple[Float[Array, 'ndat'], Float[Array, 'ndat'], Float[Array, 'ndat'], Float[Array, 'ndat']][source]
Solve the TOV equations and generate the M, R and Lambda curves for the given EOS.
- Parameters:
- Returns:
log(pcs), masses in solar masses, radii in km, and dimensionless tidal deformabilities
- Return type:
tuple[Float[Array, “ndat”], Float[Array, “ndat”], Float[Array, “ndat”], Float[Array, “ndat”]]
- jesterTOV.eos.construct_family_nonGR(eos: tuple, ndat: Int = 50, min_nsat: Float = 2) tuple[Float[Array, 'ndat'], Float[Array, 'ndat'], Float[Array, 'ndat'], Float[Array, 'ndat']][source]
Solve the post-TOV equations and generate the M, R and Lambda curves.
- Parameters:
- Returns:
log(pcs), masses in solar masses, radii in km, and dimensionless tidal deformabilities
- Return type:
tuple[Float[Array, “ndat”], Float[Array, “ndat”], Float[Array, “ndat”], Float[Array, “ndat”]]
- jesterTOV.eos.load_crust(name: str) tuple[Array, Array, Array][source]
Load a crust file from the default directory.
Key Classes
- class jesterTOV.eos.MetaModel_EOS_model(kappas: tuple[Float, Float, Float, Float, Float, Float] = (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), v_nq: list[float] = [0.0, 0.0, 0.0, 0.0, 0.0], b_sat: Float = 17.0, b_sym: Float = 25.0, nsat: Float = 0.16, nmin_MM_nsat: Float = 0.75, nmax_nsat: Float = 12, ndat: Int = 200, crust_name: str = 'DH', max_n_crust_nsat: Float = 0.5, ndat_spline: Int = 10, proton_fraction: bool | float | None = None)[source]
Bases:
Interpolate_EOS_modelMetaModel_EOS_model is a class to interpolate EOS data with a meta-model.
- Parameters:
Interpolate_EOS_model (object) – Base class of interpolation EOS data.
- compute_cs2(n: Array, p: Array, e: Array, x: Array, delta: Array | float, f_1: Array, f_star: Array, f_star2: Array, f_star3: Array, b: Array, v: Array)[source]
- compute_energy(x: Array, f_1: Array, f_star: Array, f_star2: Array, f_star3: Array, b: Array, v: Array) Array[source]
- compute_pressure(x: Array, f_1: Array, f_star: Array, f_star2: Array, f_star3: Array, b: Array, v: Array) Array[source]
- compute_proton_fraction(coefficient_sym: list, n: Array) Float[Array, 'n_points'][source]
Computes the proton fraction for a given number density.
- Parameters:
n (Float[Array, "n_points"]) – Number density in fm^-3.
- Returns:
Proton fraction as a function of the number density.
- Return type:
Float[Array, “n_points”]
Mathematical Background
The metamodel equation of state is based on the formulation from Margueron et al. (2021), which provides a flexible framework for modeling nuclear matter at various densities.
The total energy density is given by:
where \(n\) is the baryon number density and \(\delta = 1 - 2Y_p\) is the isospin asymmetry parameter.