jesterTOV.eos.metamodel.MetaModel_EOS_model#

class MetaModel_EOS_model(
kappas=(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
v_nq=[0.0, 0.0, 0.0, 0.0, 0.0],
b_sat=17.0,
b_sym=25.0,
nsat=0.16,
nmin_MM_nsat=0.75,
nmax_nsat=12,
ndat=200,
crust_name='DH',
max_n_crust_nsat=0.5,
min_n_crust_nsat=2e-13,
ndat_spline=10,
proton_fraction=None,
)[source]#

Bases: Interpolate_EOS_model

Meta-model equation of state for nuclear matter.

This class implements the meta-modeling approach for nuclear equation of state as described in Somasundaram et al. (Phys. Rev. C 103, 045803, 2021). The EOS is constructed by combining a realistic crust model with a meta-model for core densities based on nuclear empirical parameters (NEPs).

For a more detailed introduction into the metamodel approach, see Margueron et al. (Phys.Rev.C 97 (2018) 2, 025805).

The meta-model uses a kinetic + potential energy decomposition:

\[\varepsilon(n, \delta) = \varepsilon_{\mathrm{kin}}(n, \delta) + \varepsilon_{\mathrm{pot}}(n, \delta)\]

where \(\delta = (n_n - n_p)/n\) is the isospin asymmetry parameter.

The kinetic part is based on a Thomas-Fermi gas with relativistic corrections, while the potential part uses a polynomial expansion around saturation density \(n_{\rm{sat}}\), taking into account non-quadratic contributions to the symmetry energy.

__init__(
kappas=(0.0, 0.0, 0.0, 0.0, 0.0, 0.0),
v_nq=[0.0, 0.0, 0.0, 0.0, 0.0],
b_sat=17.0,
b_sym=25.0,
nsat=0.16,
nmin_MM_nsat=0.75,
nmax_nsat=12,
ndat=200,
crust_name='DH',
max_n_crust_nsat=0.5,
min_n_crust_nsat=2e-13,
ndat_spline=10,
proton_fraction=None,
)[source]#

Initialize the meta-model EOS with nuclear empirical parameters.

The meta-model approach parameterizes nuclear matter using empirical parameters measured from finite nuclei and infinite nuclear matter calculations. This implementation combines a realistic crust model with a meta-model description of the core using nuclear empirical parameters (NEPs).

Reference: Somasundaram et al., Phys. Rev. C 103, 045803 (2021)

Physical Framework: The meta-model decomposes the energy density as:

\[\varepsilon(n, \delta) = \varepsilon_{\mathrm{kin}}(n, \delta) + \varepsilon_{\mathrm{pot}}(n, \delta)\]

where \(\delta = (n_n - n_p)/n\) is the isospin asymmetry parameter.

Parameters:
  • kappas (tuple[Float, Float, Float, Float, Float, Float], optional) – Meta-model expansion coefficients \((\kappa_{\mathrm{sat}}, \kappa_{\mathrm{sat2}}, \kappa_{\mathrm{sat3}}, \kappa_{\mathrm{NM}}, \kappa_{\mathrm{NM2}}, \kappa_{\mathrm{NM3}})\). Controls the density dependence of kinetic energy corrections in the Thomas-Fermi gas approximation. These parameters modify the kinetic energy beyond the non-relativistic limit. Defaults to (0.0, 0.0, 0.0, 0.0, 0.0, 0.0).

  • v_nq (list[float], optional) – Quartic isospin coefficients \(v_{\mathrm{nq},\alpha}\) for symmetry energy expansion up to \(\delta^4\) terms. These control the high-order isospin dependence of the potential energy contribution. Defaults to [0.0, 0.0, 0.0, 0.0, 0.0].

  • b_sat (Float, optional) – Saturation parameter \(b_{\mathrm{sat}}\) controlling potential energy cutoff function. Higher values lead to sharper exponential cutoffs at high density. Defaults to 17.0.

  • b_sym (Float, optional) – Symmetry parameter \(b_{\mathrm{sym}}\) for isospin-dependent cutoff corrections. Modifies the cutoff parameter as \(b = b_{\mathrm{sat}} + b_{\mathrm{sym}} \delta^2\). Defaults to 25.0.

  • nsat (Float, optional) – Nuclear saturation density \(n_0\) [\(\mathrm{fm}^{-3}\)]. The density at which symmetric nuclear matter reaches its minimum energy per nucleon. Defaults to 0.16.

  • nmin_MM_nsat (Float, optional) – Starting density for meta-model region as fraction of \(n_0\). Must be above the crust-core transition density. Defaults to 0.75 (= 0.12/0.16).

  • nmax_nsat (Float, optional) – Maximum density for EOS construction in units of \(n_0\). Determines the high-density reach of the neutron star model. Defaults to 12.

  • ndat (Int, optional) – Number of density points for meta-model region discretization. Higher values provide smoother interpolation at computational cost. Defaults to 200.

  • crust_name (str, optional) – Crust model name (e.g., ‘DH’, ‘BPS’) or path to custom .npz file containing crust EOS data. The crust provides low-density EOS data below nuclear saturation. Defaults to ‘DH’.

  • max_n_crust_nsat (Float, optional) – Maximum crust density as fraction of \(n_0\). Defines the crust-core transition region where spline matching occurs. Defaults to 0.5.

  • ndat_spline (Int, optional) – Number of points for smooth spline interpolation across crust-core transition. Ensures thermodynamic consistency and causality preservation. Defaults to 10.

  • proton_fraction (bool | float | None, optional) –

    Proton fraction treatment strategy:

    • None: Calculate \(\beta\)-equilibrium (charge neutrality + weak equilibrium)

    • float: Use fixed proton fraction value throughout the star

    • bool: Use simplified uniform composition model

    \(\beta\)-equilibrium is the physical condition for neutron star matter. Defaults to None.

Note

The meta-model uses a Thomas-Fermi kinetic energy approximation with relativistic corrections controlled by the \(\kappa\) parameters, combined with a potential energy expansion around saturation density with an exponential cutoff at high densities. This approach provides a flexible framework for exploring nuclear physics uncertainties in neutron star structure calculations.

Methods

__init__([kappas, v_nq, b_sat, b_sym, nsat, ...])

Initialize the meta-model EOS with nuclear empirical parameters.

compute_b(delta)

compute_cs2(n, p, e, x, delta, f_1, f_star, ...)

compute_energy_nucleons(x, f_1, f_star, ...)

Compute the nucleon-only energy per nucleon \(e(n, \delta)\) [MeV].

compute_f_1(delta)

Equation (14) in Margueron et al.

compute_f_star(delta)

compute_f_star2(delta)

compute_f_star3(delta)

compute_pressure_nucleons(x, f_1, f_star, ...)

Compute the nucleon-only pressure [MeV fm-3].

compute_proton_fraction(v_sat, v_sym2, n)

Compute proton fraction from beta-equilibrium condition.

compute_u(x, b)

Computes an array of N+1 u values for all alphas

compute_v(v_sat, v_sym2, delta)

Compute an array of length N+1 containing the v coefficients for the potential energy

compute_x(n)

Defined right before equation (2) in Margueron et al.

construct_eos(params)

Construct the complete equation of state from nuclear empirical parameters.

esym(v_sat, v_sym2, n)

Symmetry energy \(e_{\rm sym}(n)\) [MeV].

get_required_parameters()

Return list of nuclear empirical parameters required by MetaModel.

interpolate_eos(n, p, e)

Convert physical EOS quantities to geometric units and compute auxiliary quantities.

u(x, b, alpha)

Defined right after equation (40) in Margueron et al. Note that Somasundaram et al. has more than 1 b parameter, compared to Margueron et al., but the definition of u is similar.

compute_b(delta)[source]#
compute_cs2(
n,
p,
e,
x,
delta,
f_1,
f_star,
f_star2,
f_star3,
b,
v,
u,
)[source]#
compute_energy_nucleons(x, f_1, f_star, f_star2, f_star3, v, u)[source]#

Compute the nucleon-only energy per nucleon \(e(n, \delta)\) [MeV].

This returns the kinetic plus potential energy per nucleon for the nuclear matter part only — electrons are not included. The result is an intermediate quantity passed to compute_cs2(), which adds the electron contribution before computing the sound speed. The final energy density stored in EOSData is obtained by integrating the total cs2 (nucleons + electrons) via the thermodynamic identity, so it consistently includes electrons.

Return type:

Array

compute_f_1(delta)[source]#

Equation (14) in Margueron et al.

compute_f_star(delta)[source]#
compute_f_star2(delta)[source]#
compute_f_star3(delta)[source]#
compute_pressure_nucleons(x, f_1, f_star, f_star2, f_star3, b, v, u)[source]#

Compute the nucleon-only pressure [MeV fm-3].

Returns the pressure of nuclear matter (protons + neutrons) only:

\[P_{\rm nuc}(n, \delta) = n^2 \frac{\partial e(n, \delta)}{\partial n}\]

Electrons are not included here. This is an intermediate quantity used inside compute_cs2() to evaluate the nuclear incompressibility \(K_{\rm nuc}\). The total cs2 from compute_cs2() adds the electron incompressibility and enthalpy, and integrating that total cs2 via the thermodynamic identity yields the final pressure stored in EOSData, which does include electrons.

Return type:

Array

compute_proton_fraction(v_sat, v_sym2, n)[source]#

Compute proton fraction from beta-equilibrium condition.

Solves the beta-equilibrium condition:

\[\mu_n - \mu_p = \mu_e\]

using the quadratic approximation \(\mu_n - \mu_p \approx 4 e_{\rm sym}(n) \delta\) together with the self-consistent symmetry energy from esym(). Protons and neutrons are treated as having equal rest mass (\(m_n = m_p\)).

While this does not perform an exact root-finding step, it provides a good approximation that is much more efficient to evaluate during sampling than a full root-finder.

Parameters:
  • v_sat (Array) – Potential energy coefficients for isospin-symmetric matter, shape (N+1,).

  • v_sym2 (Array) – Potential energy coefficients for the isospin-asymmetric part, shape (N+1,).

  • n (Array) – Number density [\(\mathrm{fm}^{-3}\)].

Return type:

Float[Array, 'n_points']

Returns:

Float[Array, “n_points”] – Proton fraction \(x_p = n_p/n\) as a function of density.

compute_u(x, b)[source]#

Computes an array of N+1 u values for all alphas

compute_v(v_sat, v_sym2, delta)[source]#

Compute an array of length N+1 containing the v coefficients for the potential energy

Return type:

Array

compute_x(n)[source]#

Defined right before equation (2) in Margueron et al.

construct_eos(params)[source]#

Construct the complete equation of state from nuclear empirical parameters.

This method builds the full EOS by combining the crust model with the meta-model core, ensuring thermodynamic consistency and causality.

Parameters:

params (dict[str, float]) –

Nuclear empirical parameters including:

  • E_sat: Saturation energy per nucleon [\(\mathrm{MeV}\)] (default: -16.0)

  • K_sat: Incompressibility at saturation [\(\mathrm{MeV}\)]

  • Q_sat, Z_sat: Higher-order saturation parameters [\(\mathrm{MeV}\)]

  • E_sym: Symmetry energy [\(\mathrm{MeV}\)]

  • L_sym: Symmetry energy slope [\(\mathrm{MeV}\)]

  • K_sym, Q_sym, Z_sym: Higher-order symmetry parameters [\(\mathrm{MeV}\)]

Return type:

EOSData

Returns:

EOSData – Complete EOS with all required arrays

esym(v_sat, v_sym2, n)[source]#

Symmetry energy \(e_{\rm sym}(n)\) [MeV].

Computed as the difference in energy per nucleon between pure neutron matter (\(\delta = 1\)) and symmetric nuclear matter (\(\delta = 0\)):

\[e_{\rm sym}(n) = e(n, \delta=1) - e(n, \delta=0)\]

This self-consistent approach uses the full metamodel kinetic and potential energy (including the u-function corrections) rather than the NEP polynomial approximation, giving more accurate proton fractions especially below saturation density.

Parameters:
  • v_sat (Array) – Potential energy coefficients for isospin-symmetric matter, shape (N+1,).

  • v_sym2 (Array) – Potential energy coefficients for the isospin-asymmetric part, shape (N+1,).

  • n (Array) – Number density array [\(\mathrm{fm}^{-3}\)].

Return type:

Array

Returns:

Symmetry energy at each density point [MeV].

get_required_parameters()[source]#

Return list of nuclear empirical parameters required by MetaModel.

Return type:

list[str]

Returns:

list[str] – [“E_sat”, “K_sat”, “Q_sat”, “Z_sat”, “E_sym”, “L_sym”, “K_sym”, “Q_sym”, “Z_sym”]

u(x, b, alpha)[source]#

Defined right after equation (40) in Margueron et al. Note that Somasundaram et al. has more than 1 b parameter, compared to Margueron et al., but the definition of u is similar. For a single u value