Skip to content

Equations of State (flexmesa.eos)

The flexmesa.eos subpackage ports MESA's 7-component thermodynamic Equation of State (eos/) across Safe Rust (crates/flexmesa-eos) and JAX (float64). Every evaluation populates the canonical 26-slot thermodynamic state vector res[0..26] alongside exact analytical first and second logarithmic density and temperature partial derivatives (d_dlnd[0..26], d_dln_t[0..26]) and optional composition partials (d_dxa):

  1. Ideal (eval_ideal_eos): Neutral ideal gas plus thermal radiation pressure for reference and outer boundary baselines.
  2. HELM (eval_helm_eos): Timmes & Swesty (2000) Helmholtz free-energy table with biquintic electron-positron interpolation, recursive @jax.custom_jvp Horner basis derivatives, and Yakovlev & Shalybkov (1989) Coulomb corrections.
  3. PC (eval_pc_eos): Potekhin & Chabrier (2010) analytical degenerate ionized plasma and Coulomb crystal EOS for white dwarf cores and neutron star envelopes.
  4. Skye (eval_skye_eos): Jermyn et al. (2021) unified third-order forward-mode automatic differentiation (Order3 / nested jax.jacfwd) free-energy minimizer with smooth translational entropy blending across the liquid-to-solid Coulomb crystallization transition (\(\Gamma_{\mathrm{crit}} \approx 175\)).
  5. FreeEOS, OPAL/SCVH & CMS (eval_free_eos, eval_opal_scvh_eos, eval_cms_eos): 4D \((X, Z, \log_{10} Q, \log_{10} T)\) tabulated bicubic spline evaluators covering partially ionized stellar envelopes, solar-like interiors, and giant-planet hydrogen-helium mixtures.
  6. Polygonal \(C^2\) Blending & Root-Finding Inversions (eos_dt_get, eos_pt_get): Smooth quintic smootherstep blending (\(S_5(u) = 6u^5 - 15u^4 + 10u^3\)) across component boundaries in the \((\log_{10}\rho, \log_{10}T)\) plane, and damped Newton-Raphson inversions from \((P_{\mathrm{gas}}, T)\) or \((s, T)\) to \(\ln\rho\).

For physical derivations and phase diagrams, see Equations of State (eos).


Quick Usage Example

import numpy as np
import flexmesa.eos as eos
import flexmesa.net as net

net_info = net.get_net_info("basic.net")
xa = np.array([0.70, 2.0e-5, 0.28, 3.0e-3, 1.0e-3, 6.0e-3, 2.0e-3, 9.98e-3])
out = eos.eos_dt_get(
    rho=100.0,
    temp=1.5e7,
    chem_id=net_info.chem_id,
    xa=xa,
)
print(
    f"ln P_gas={out.res[eos.I_LN_PGAS]:.6f}, "
    f"grad_ad={out.res[eos.I_GRAD_AD]:.5f}, "
    f"Gamma_1={out.res[eos.I_GAMMA1]:.5f}"
)

Package Overview (flexmesa.eos)

flexmesa.eos

Equation of State (eos) module for FlexMESA (Waves 3a & 3b.1).

Exposes the canonical 26-slot thermodynamic state vector (eos_def), \(C^2\)-continuous polygonal quintic blending (eos_blend), Aparicio (1998) 20-point Gauss-Legendre/Gauss-Laguerre relativistic Fermi-Dirac integrals (gauss_fermi), ground-state ionization energy offsets (ion_offset), analytical neutral ideal gas plus radiation (ideal), Helmholtz biquintic / bicubic electron-positron EOS (helm), Potekhin-Chabrier (pc) and Jermyn et al. (2021) Skye (skye) plasma/crystallization EOS, and the unified eosDT_get blend and PT/DE inverse solvers (solver).


Core State Vector, Blending & 4D Tables (flexmesa.eos.core)

flexmesa.eos.core

Core EOS schema, polygonal blending, and ground-state ionization offsets.

Provides canonical Safe Rust (backend="rust"), derived JAX (backend="jax"), and automatic dispatch (backend="auto") interfaces for eos_def, eos_blend, and ion_offset.

EosEvalOutput dataclass

Complete output of an EOS evaluation at a single thermodynamic state.

Attributes:

Name Type Description
res ndarray | ndarray

26-channel thermodynamic state vector of shape (26,) (f64).

d_dlnd ndarray | ndarray

Partial derivatives (d res / d ln rho)_T of shape (26,).

d_dln_t ndarray | ndarray

Partial derivatives (d res / d ln T)_rho of shape (26,).

quintic_blend_jax

quintic_blend_jax(alpha0)

Evaluate the \(C^2\) quintic blend polynomial and derivative in JAX.

Parameters:

Name Type Description Default
alpha0 Array

Raw blend coordinate (dimensionless, scalar or (*batch,)).

required

Returns:

Type Description
tuple[Array, Array]

Tuple (s, ds_dalpha0) clamped to [0, 1] outside [0, 1].

quintic_blend

quintic_blend(alpha0, *, backend='auto')

Evaluate the \(C^2\) quintic blend polynomial and derivative.

Parameters:

Name Type Description Default
alpha0 float | Array

Raw blend coordinate in [0, 1] (dimensionless).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
tuple[float | Array, float | Array]

Tuple (s, ds_dalpha0).

blend_eos_results

blend_eos_results(
    alpha_in,
    d_alpha_dlog_t_in,
    d_alpha_dlog_rho_in,
    linear_blend,
    res_1,
    res_2,
    *,
    backend="auto",
)

Blend two 26-channel EOS evaluations (Do_Blend in eosdt_support.f90).

Parameters:

Name Type Description Default
alpha_in float | Array

Raw blend coordinate in [0, 1] (dimensionless).

required
d_alpha_dlog_t_in float | Array

Partial derivative d(alpha_0) / d(log10 T).

required
d_alpha_dlog_rho_in float | Array

Partial derivative d(alpha_0) / d(log10 rho).

required
linear_blend bool

If True, blend linearly; otherwise apply \(C^2\) quintic smoothing.

required
res_1 EosEvalOutput

First EOS state evaluation (weighted by alpha).

required
res_2 EosEvalOutput

Second EOS state evaluation (weighted by 1 - alpha).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

Blended [EosEvalOutput] with chain-rule partial derivatives.

is_contained

is_contained(coords, x, y)

Return True if point (x, y) lies inside the polygon coords.

Parameters:

Name Type Description Default
coords ndarray

Polygon vertices of shape (N, 2) in (logRho, logT) space.

required
x float

Horizontal coordinate (e.g., log10(rho) in g cm^-3).

required
y float

Vertical coordinate (e.g., log10(T) in K).

required

Returns:

Type Description
bool

True when the winding number around (x, y) is non-zero.

min_distance_to_polygon_jax

min_distance_to_polygon_jax(coords, p)

Compute the differentiable minimum distance from p to polygon coords.

Parameters:

Name Type Description Default
coords Array

Polygon vertices of shape (N, 2) (float64).

required
p Array

Query point of shape (2,) (float64).

required

Returns:

Type Description
Array

Minimum distance scalar (float64) regularized by eps = 1e-10_f32 on

Array

interior segment projections.

min_distance_to_polygon

min_distance_to_polygon(coords, x, y, *, backend='auto')

Compute the minimum distance from (x, y) to polygon coords.

Parameters:

Name Type Description Default
coords ndarray | Array

Polygon vertices of shape (N, 2) (float64).

required
x float | Array

First coordinate (float64).

required
y float | Array

Second coordinate (float64).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
float | Array

Tuple (d, dd_dx, dd_dy) on "rust" or via jax.value_and_grad on

float | Array

"jax".

compute_ion_offset_from_za

compute_ion_offset_from_za(xa, z, a, *, backend='auto')

Compute the ground-state ionization energy offset in erg g^-1.

Parameters:

Name Type Description Default
xa ndarray | Array

Species mass fractions of shape (N_species,) (dimensionless).

required
z ndarray | list[int]

Atomic numbers \(Z_k\) of shape (N_species,) (int).

required
a ndarray | Array

Mass numbers \(A_k\) of shape (N_species,) (float64).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
float | Array

Ionization energy offset \(\Delta E_{\mathrm{ion}}\) in erg g^-1.

nuclide_arrays_jax

nuclide_arrays_jax(chem_id)

Return (azion, acmi, a_baryon) as jnp.float64 arrays for chem_id.

Parameters:

Name Type Description Default
chem_id Sequence[int]

1-based MESA nuclide identifiers of length N_species.

required

Returns:

Type Description
tuple[Array, Array, Array]

Tuple (azion, acmi, a_baryon) of shape (N_species,) in float64.

pack_dt_jvp

pack_dt_jvp(r_p, t_p, dr, dt, primal_out)

Assemble (primal, tangent) for (rho, T) custom_jvp EOS rules.

Parameters:

Name Type Description Default
r_p Array

Primal mass density \(\rho\) in g cm^-3.

required
t_p Array

Primal temperature \(T\) in K.

required
dr Array

Tangent \(\delta \rho\) in g cm^-3.

required
dt Array

Tangent \(\delta T\) in K.

required
primal_out tuple[Array, Array, Array]

Tuple (res, d_dlnd, d_dln_t) at (r_p, t_p).

required

Returns:

Type Description
tuple[tuple[Array, Array, Array], tuple[Array, Array, Array]]

(primal_out, (dres, zero, zero)) matching logarithmic EOS partials.

compute_ion_offset

compute_ion_offset(xa, chem_id)

Compute the ground-state ionization offset from xa and chem_id.

Parameters:

Name Type Description Default
xa ndarray

Species mass fractions of shape (N_species,) (dimensionless).

required
chem_id list[int] | ndarray

1-based MESA nuclide identifiers of shape (N_species,).

required

Returns:

Type Description
float

Ionization energy offset \(\Delta E_{\mathrm{ion}}\) in erg g^-1.


Aparicio Gauss-Fermi Integrals (flexmesa.eos.fermi)

flexmesa.eos.fermi

Relativistic Fermi-Dirac integrals via Aparicio (1998) quadrature.

Provides the Tier B dual-track (backend="auto" | "rust" | "jax") Python and JAX interfaces for dfermi (eos_fermi_dirac_integral in gauss_fermi.f90).

dfermi_jax

dfermi_jax(dk, eta, theta)

Evaluate Aparicio (1998) dfermi in branchless JAX float64.

Parameters:

Name Type Description Default
dk Array

Fermi-Dirac order \(k\) (dimensionless).

required
eta Array

Degeneracy parameter \(\eta = \mu_e / (k_{\mathrm{B}} T)\).

required
theta Array

Relativity parameter \(\theta = k_{\mathrm{B}} T / (m_e c^2)\).

required

Returns:

Type Description
tuple[Array, Array, Array]

Tuple (fd, fd_deta, fd_dtheta) of float64 JAX arrays.

dfermi

dfermi(dk, eta, theta, *, backend='auto')

Evaluate the generalized relativistic Fermi-Dirac integral dfermi.

Parameters:

Name Type Description Default
dk float

Fermi-Dirac order \(k\) (dimensionless).

required
eta float | ndarray | Array

Degeneracy parameter \(\eta = \mu_e / (k_{\mathrm{B}} T)\) (scalar or 1D array of shape (N_zones,)).

required
theta float | ndarray | Array

Relativity parameter \(\theta = k_{\mathrm{B}} T / (m_e c^2)\) (scalar or 1D array of shape (N_zones,)).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
tuple[float | ndarray | Array, float | ndarray | Array, float | ndarray | Array]

Tuple (fd, fd_deta, fd_dtheta).


Analytical & Free-Energy Evaluators (ideal, helm, pc, skye)

flexmesa.eos.ideal

Neutral ideal-gas plus Planckian radiation equation of state (ideal.f90).

Provides the Tier B dual-track (backend="auto" | "rust" | "jax") Python and JAX interfaces for ideal_eos (eos/private/ideal.f90).

eval_ideal_eos

eval_ideal_eos(temp, rho, abar, zbar, xa, chem_id)

Evaluate the neutral ideal-gas + radiation EOS from xa and chem_id.

Parameters:

Name Type Description Default
temp float

Temperature \(T\) in K (scalar).

required
rho float

Mass density \(\rho\) in g cm^-3 (scalar).

required
abar float

Mean baryon number \(\bar{A}\) (dimensionless).

required
zbar float

Mean charge \(\bar{Z}\) (dimensionless).

required
xa ndarray

Species mass fractions of shape (N_species,).

required
chem_id list[int] | ndarray

1-based MESA nuclide identifiers of shape (N_species,).

required

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] containing res, d_dlnd, and d_dln_t of shape

EosEvalOutput

(26,).

eval_ideal_eos_from_weights

eval_ideal_eos_from_weights(
    temp, rho, abar, zbar, xa, weights, a, *, backend="auto"
)

Evaluate the neutral ideal-gas + radiation EOS (ideal.f90).

Parameters:

Name Type Description Default
temp float | Array

Temperature \(T\) in K (scalar).

required
rho float | Array

Mass density \(\rho\) in g cm^-3 (scalar).

required
abar float | Array

Mean baryon number \(\bar{A}\) (dimensionless).

required
zbar float | Array

Mean charge \(\bar{Z}\) (dimensionless).

required
xa ndarray | Array

Species mass fractions of shape (N_species,).

required
weights ndarray | Array

Atomic weights \(W_k\) in amu of shape (N_species,).

required
a ndarray | Array

Baryon numbers \(A_k\) of shape (N_species,).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] containing res, d_dlnd, and d_dln_t of shape

EosEvalOutput

(26,).

eval_ideal_eos_zones

eval_ideal_eos_zones(
    temp,
    rho,
    abar,
    zbar,
    xa,
    weights,
    a,
    *,
    parallel=True,
    backend="auto",
)

Evaluate the neutral ideal-gas + radiation EOS across N_zones zones.

Parameters:

Name Type Description Default
temp ndarray | Array

Zone temperatures \(T\) in K of shape (N_zones,).

required
rho ndarray | Array

Zone mass densities \(\rho\) in g cm^-3 of shape (N_zones,).

required
abar float

Mean baryon number \(\bar{A}\) (dimensionless).

required
zbar float

Mean charge \(\bar{Z}\) (dimensionless).

required
xa ndarray | Array

Species mass fractions of shape (N_species,).

required
weights ndarray | Array

Atomic weights \(W_k\) in amu of shape (N_species,).

required
a ndarray | Array

Baryon numbers \(A_k\) of shape (N_species,).

required
parallel bool

Whether to use the Rayon worker pool on the "rust" backend.

True
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] with res, d_dlnd, and d_dln_t of shape

EosEvalOutput

(N_zones, 26).

pack_free_energy_thermo_jax

pack_free_energy_thermo_jax(
    t_v,
    d_v,
    f_v,
    df_dt,
    df_dd,
    d2f_dt2,
    d2f_dtdd,
    d2f_dd2,
    mu,
    ln_free_e,
    etaele,
    phase,
    latent_ddlnt,
    latent_ddlnrho,
    frac_idx,
)

Assemble the 26-channel MESA state from free-energy partials.

flexmesa.eos.helm

Timmes & Swesty (2000) HELM equation of state (eos_helm_eval.f90).

Provides the Tier B dual-track (backend="auto" | "rust" | "jax") Python and native @jax.jit interfaces for the 26-channel MESA HELM equation of state (helmeos2 and do_convert_helm_results).

eval_helm_eos

eval_helm_eos(temp, rho, abar, zbar, *, backend='auto')

Evaluate the 26-channel HELM equation of state (eos_helm_eval.f90).

Parameters:

Name Type Description Default
temp float | Array

Temperature \(T\) in K (scalar).

required
rho float | Array

Mass density \(\rho\) in g cm^-3 (scalar).

required
abar float | Array

Mean atomic weight \(\bar{A}\) (dimensionless).

required
zbar float | Array

Mean atomic charge \(\bar{Z}\) (dimensionless).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

Tuple (out, d_dabar, d_dzbar) where out is an [EosEvalOutput]

ndarray | Array

containing (res, d_dlnd, d_dln_t) of shape (26,) and d_dabar,

ndarray | Array

d_dzbar are 26-element composition partial derivative arrays.

eval_helm_eos_zones

eval_helm_eos_zones(
    temp, rho, abar, zbar, *, parallel=True, backend="auto"
)

Evaluate the 26-channel HELM EOS across N_zones stellar zones.

Parameters:

Name Type Description Default
temp ndarray | Array

Zone temperatures \(T\) in K of shape (N_zones,).

required
rho ndarray | Array

Zone mass densities \(\rho\) in g cm^-3 of shape (N_zones,).

required
abar ndarray | Array

Zone mean atomic weights \(\bar{A}\) of shape (N_zones,).

required
zbar ndarray | Array

Zone mean atomic charges \(\bar{Z}\) of shape (N_zones,).

required
parallel bool

Whether to use the Rayon worker pool on the "rust" backend.

True
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] with res, d_dlnd, and d_dln_t of shape

EosEvalOutput

(N_zones, 26).

flexmesa.eos.pc

Potekhin-Chabrier (PC) electron-ion plasma EOS (eospc_eval.f90).

Provides the Tier B dual-track (backend="auto" | "rust" | "jax") Python and JAX interfaces for get_pc_alfa, eval_pc_eos, and eval_pc_eos_zones.

eval_pc_eos_jax

eval_pc_eos_jax(
    rho,
    temp,
    abar,
    zbar,
    xa,
    azion,
    acmi,
    *,
    include_radiation=True,
    pc_gamma_start_crystal=170.0,
    pc_gamma_full_crystal=180.0,
    mass_fraction_limit=0.0001,
    solver_mode="jax",
)

Evaluate 26-channel PC EOS in JAX ("jax" native or "rust_ffi").

get_pc_alfa_jax

get_pc_alfa_jax(
    log_rho,
    log_t,
    abar,
    zbar,
    use_gamma_limit=True,
    log_rho1=2.999,
    log_rho2=2.8,
    log_t1=7.6,
    log_t2=7.7,
    log_gamma_e_all_helm=-1.8,
    log_gamma_e_all_pc=-1.7,
)

Evaluate Get_PC_alfa (eospc_eval.f90 lines 31-96) in JAX.

get_pc_alfa

get_pc_alfa(
    log_rho,
    log_t,
    abar,
    zbar,
    *,
    use_gamma_limit=True,
    log_rho1=2.999,
    log_rho2=2.8,
    log_t1=7.6,
    log_t2=7.7,
    log_gamma_e_all_helm=-1.8,
    log_gamma_e_all_pc=-1.7,
    backend="auto",
)

Evaluate Get_PC_alfa (eospc_eval.f90 lines 31-96).

Parameters:

Name Type Description Default
log_rho float | Array

Base-10 log mass density \(\log_{10} \rho\) in g cm^-3.

required
log_t float | Array

Base-10 log temperature \(\log_{10} T\) in K.

required
abar float | Array

Mean atomic weight \(\bar{A}\).

required
zbar float | Array

Mean atomic charge \(\bar{Z}\).

required
use_gamma_limit bool

Whether to use \(\log_{10} \Gamma_e\) thresholds.

True
log_rho1 float

Upper \(\log_{10} \rho\) threshold for pure PC.

2.999
log_rho2 float

Lower \(\log_{10} \rho\) threshold below which PC is zero.

2.8
log_t1 float

Lower \(\log_{10} T\) threshold when T limits are used.

7.6
log_t2 float

Upper \(\log_{10} T\) threshold when T limits are used.

7.7
log_gamma_e_all_helm float

\(\log_{10} \Gamma_e\) threshold for pure HELM.

-1.8
log_gamma_e_all_pc float

\(\log_{10} \Gamma_e\) threshold for pure PC.

-1.7
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
tuple[float | Array, float | Array, float | Array]

Tuple (alfa, d_alfa_dlogT, d_alfa_dlogRho).

eval_pc_eos

eval_pc_eos(
    rho,
    temp,
    abar,
    zbar,
    chem_id,
    xa,
    *,
    include_radiation=True,
    pc_gamma_start_crystal=170.0,
    pc_gamma_full_crystal=180.0,
    mass_fraction_limit=0.0001,
    solver_mode="jax",
    backend="auto",
)

Evaluate the 26-channel Potekhin-Chabrier (PC) equation of state.

Parameters:

Name Type Description Default
rho float | Array

Mass density \(\rho\) in g cm^-3 (scalar).

required
temp float | Array

Temperature \(T\) in K (scalar).

required
abar float | Array

Mean atomic weight \(\bar{A}\).

required
zbar float | Array

Mean atomic charge \(\bar{Z}\).

required
chem_id Sequence[int]

1-based MESA nuclide identifiers of length N_species.

required
xa ndarray | Array

Species mass fractions of shape (N_species,).

required
include_radiation bool

Whether to include photon radiation pressure/energy.

True
pc_gamma_start_crystal float

\(\Gamma_i\) onset of crystallization.

170.0
pc_gamma_full_crystal float

\(\Gamma_i\) completion of crystallization.

180.0
mass_fraction_limit float

Minimum species mass fraction included in PC.

0.0001
solver_mode str

JAX evaluation mode ("jax" native or "rust_ffi").

'jax'
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] with res, d_dlnd, and d_dln_t of shape (26,).

eval_pc_eos_zones

eval_pc_eos_zones(
    rho,
    temp,
    abar,
    zbar,
    xa,
    azion,
    acmi,
    *,
    include_radiation=True,
    pc_gamma_start_crystal=170.0,
    pc_gamma_full_crystal=180.0,
    mass_fraction_limit=0.0001,
    parallel=True,
    solver_mode="jax",
    backend="auto",
)

Evaluate the 26-channel PC EOS across N_zones stellar zones.

Parameters:

Name Type Description Default
rho ndarray | Array

Zone mass densities \(\rho\) in g cm^-3 of shape (N_zones,).

required
temp ndarray | Array

Zone temperatures \(T\) in K of shape (N_zones,).

required
abar ndarray | Array

Zone mean atomic weights \(\bar{A}\) of shape (N_zones,).

required
zbar ndarray | Array

Zone mean atomic charges \(\bar{Z}\) of shape (N_zones,).

required
xa ndarray | Array

Species mass fractions of shape (N_zones, N_species).

required
azion ndarray | Array

Species atomic charges \(Z_i\) of shape (N_species,).

required
acmi ndarray | Array

Species atomic weights \(A_i\) in amu of shape (N_species,).

required
include_radiation bool

Whether to include photon radiation pressure/energy.

True
pc_gamma_start_crystal float

\(\Gamma_i\) onset of crystallization.

170.0
pc_gamma_full_crystal float

\(\Gamma_i\) completion of crystallization.

180.0
mass_fraction_limit float

Minimum species mass fraction included in PC.

0.0001
parallel bool

Whether to use the Rayon worker pool on "rust".

True
solver_mode str

JAX evaluation mode ("jax" native or "rust_ffi").

'jax'
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] with res, d_dlnd, and d_dln_t of shape

EosEvalOutput

(N_zones, 26).

flexmesa.eos.skye

Jermyn et al. (2021) Skye plasma/crystallization EOS (skye.f90).

Provides the Tier B dual-track (backend="auto" | "rust" | "jax") Python and JAX interfaces for get_skye_alfa, get_skye_alfa_simple, and eval_skye_eos.

get_skye_alfa_jax

get_skye_alfa_jax(log_rho, log_t, abar, zbar)

Evaluate Get_Skye_alfa (skye.f90 lines 36-117) in JAX.

Parameters:

Name Type Description Default
log_rho Array

Base-10 log mass density \(\log_{10} \rho\) in g cm^-3.

required
log_t Array

Base-10 log temperature \(\log_{10} T\) in K.

required
abar Array

Mean atomic weight \(\bar{A}\).

required
zbar Array

Mean atomic charge \(\bar{Z}\).

required

Returns:

Type Description
tuple[Array, Array, Array]

Tuple (alfa, d_alfa_dlogT, d_alfa_dlogRho).

get_skye_alfa_simple_jax

get_skye_alfa_simple_jax(
    log_rho,
    log_t,
    log_rho_min_for_any_skye=_SKYE_RHO_ANY_DEFAULT,
    log_rho_min_for_all_skye=_SKYE_RHO_ALL_DEFAULT,
    log_t_min_for_any_skye=_SKYE_T_ANY_DEFAULT,
    log_t_min_for_all_skye=_SKYE_T_ALL_DEFAULT,
)

Evaluate Get_Skye_alfa_simple (skye.f90 lines 120-173) in JAX.

Parameters:

Name Type Description Default
log_rho Array

Base-10 log mass density \(\log_{10} \rho\) in g cm^-3.

required
log_t Array

Base-10 log temperature \(\log_{10} T\) in K.

required
log_rho_min_for_any_skye float

Lower \(\log_{10} \rho\) threshold for Skye.

_SKYE_RHO_ANY_DEFAULT
log_rho_min_for_all_skye float

Upper \(\log_{10} \rho\) threshold for Skye.

_SKYE_RHO_ALL_DEFAULT
log_t_min_for_any_skye float

Lower \(\log_{10} T\) threshold for Skye.

_SKYE_T_ANY_DEFAULT
log_t_min_for_all_skye float

Upper \(\log_{10} T\) threshold for Skye.

_SKYE_T_ALL_DEFAULT

Returns:

Type Description
tuple[Array, Array, Array]

Tuple (alfa, d_alfa_dlogT, d_alfa_dlogRho).

get_skye_alfa

get_skye_alfa(
    log_rho, log_t, abar, zbar, *, backend="auto"
)

Evaluate Get_Skye_alfa (skye.f90 lines 36-117).

Parameters:

Name Type Description Default
log_rho float | Array

Base-10 log mass density \(\log_{10} \rho\) in g cm^-3.

required
log_t float | Array

Base-10 log temperature \(\log_{10} T\) in K.

required
abar float | Array

Mean atomic weight \(\bar{A}\).

required
zbar float | Array

Mean atomic charge \(\bar{Z}\).

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
float | Array

Tuple (alfa, d_alfa_dlogT, d_alfa_dlogRho) where alfa == 0 means

float | Array

pure Skye and alfa == 1 means pure HELM/other.

get_skye_alfa_simple

get_skye_alfa_simple(log_rho, log_t, *, backend='auto')

Evaluate Get_Skye_alfa_simple (skye.f90 lines 120-173).

Parameters:

Name Type Description Default
log_rho float | Array

Base-10 log mass density \(\log_{10} \rho\) in g cm^-3.

required
log_t float | Array

Base-10 log temperature \(\log_{10} T\) in K.

required
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
tuple[float | Array, float | Array, float | Array]

Tuple (alfa, d_alfa_dlogT, d_alfa_dlogRho).

eval_host_dt_jvp

eval_host_dt_jvp(rho, temp, host_cb)

Evaluate a (rho, temp) host EOS callback with exact custom_jvp.

eval_skye_eos_jax

eval_skye_eos_jax(
    rho,
    temp,
    abar,
    zbar,
    chem_id,
    xa,
    *,
    skye_use_ion_offsets=True,
    skye_solid_mixing_rule="PC",
    mass_fraction_limit=0.0001,
)

Evaluate the 26-channel Skye EOS in JAX via native forward-mode AD.

Parameters:

Name Type Description Default
rho Array

Mass density \(\rho\) in g cm^-3 (scalar).

required
temp Array

Temperature \(T\) in K (scalar).

required
abar Array

Mean atomic weight \(\bar{A}\).

required
zbar Array

Mean atomic charge \(\bar{Z}\).

required
chem_id Sequence[int]

1-based MESA nuclide identifiers of length N_species.

required
xa Array

Species mass fractions of shape (N_species,).

required
skye_use_ion_offsets bool

Whether to include neutral ground-state offsets.

True
skye_solid_mixing_rule str

Solid mixing rule ("PC" or "Ogata").

'PC'
mass_fraction_limit float

Minimum species mass fraction included in Skye.

0.0001

Returns:

Type Description
tuple[Array, Array, Array]

Tuple (res, d_dlnd, d_dln_t) of JAX arrays with shape (26,).

eval_skye_eos

eval_skye_eos(
    rho,
    temp,
    abar,
    zbar,
    chem_id,
    xa,
    *,
    skye_use_ion_offsets=True,
    skye_solid_mixing_rule="PC",
    mass_fraction_limit=0.0001,
    backend="auto",
)

Evaluate the 26-channel Jermyn et al. (2021) Skye equation of state.

Parameters:

Name Type Description Default
rho float | Array

Mass density \(\rho\) in g cm^-3 (scalar).

required
temp float | Array

Temperature \(T\) in K (scalar).

required
abar float | Array

Mean atomic weight \(\bar{A}\).

required
zbar float | Array

Mean atomic charge \(\bar{Z}\).

required
chem_id Sequence[int]

1-based MESA nuclide identifiers of length N_species.

required
xa ndarray | Array

Species mass fractions of shape (N_species,).

required
skye_use_ion_offsets bool

Whether to include neutral ground-state offsets.

True
skye_solid_mixing_rule str

Solid mixing rule ("PC" or "Ogata").

'PC'
mass_fraction_limit float

Minimum species mass fraction included in Skye.

0.0001
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] with res, d_dlnd, and d_dln_t of shape (26,).

eval_skye_eos_zones

eval_skye_eos_zones(
    rho,
    temp,
    abar,
    zbar,
    xa,
    z,
    acmi,
    a,
    *,
    skye_use_ion_offsets=True,
    skye_solid_mixing_rule="PC",
    mass_fraction_limit=0.0001,
    parallel=True,
    backend="auto",
)

Evaluate the 26-channel Skye EOS across N_zones stellar zones.

Parameters:

Name Type Description Default
rho ndarray | Array

Zone mass densities \(\rho\) in g cm^-3 of shape (N_zones,).

required
temp ndarray | Array

Zone temperatures \(T\) in K of shape (N_zones,).

required
abar ndarray | Array

Zone mean atomic weights \(\bar{A}\) of shape (N_zones,).

required
zbar ndarray | Array

Zone mean atomic charges \(\bar{Z}\) of shape (N_zones,).

required
xa ndarray | Array

Species mass fractions of shape (N_zones, N_species).

required
z Sequence[int] | ndarray | Array

Species integer atomic charges \(Z_i\) of shape (N_species,).

required
acmi ndarray | Array

Species atomic weights \(W_i\) in amu of shape (N_species,).

required
a ndarray | Array

Species baryon numbers \(A_i\) of shape (N_species,).

required
skye_use_ion_offsets bool

Whether to include neutral ground-state offsets.

True
skye_solid_mixing_rule str

Solid mixing rule ("PC" or "Ogata").

'PC'
mass_fraction_limit float

Minimum species mass fraction included in Skye.

0.0001
parallel bool

Whether to use the Rayon worker pool on "rust".

True
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] with res, d_dlnd, and d_dln_t of shape

EosEvalOutput

(N_zones, 26).


Thermodynamic Root-Finding Inversions (flexmesa.eos.solver)

flexmesa.eos.solver

Top-level eosDT_get 7-level cascade, 4D table evaluators, and PT/DE inverse solvers (eos/public).

Provides the Tier B dual-track (backend="auto" | "rust" | "jax") Python and JAX interfaces for [eos_dt_get], [eos_pt_get], [eval_opal_scvh_eos], [eval_free_eos], [eval_cms_eos], [eos_dt_get_t], [eos_dt_get_rho], [eos_pt_get_t], [eos_pt_get_pgas], and [eos_gamma_de_get].

eos_dt_get_jax

eos_dt_get_jax(
    rho,
    temp,
    chem_id,
    xa,
    *,
    use_skye=True,
    use_pc=False,
    pc_use_gamma_limit=True,
    skye_solid_mixing_rule="PC",
    use_cms=False,
    use_free_eos=True,
    use_opal_scvh=True,
    solver_mode="jax",
)

Evaluate eosDT_get in native JAX (or solver_mode="rust_ffi").

eos_dt_get

eos_dt_get(
    rho,
    temp,
    chem_id,
    xa,
    *,
    use_skye=True,
    use_pc=False,
    pc_use_gamma_limit=True,
    skye_solid_mixing_rule="PC",
    use_cms=False,
    use_free_eos=True,
    use_opal_scvh=True,
    backend="auto",
    solver_mode="jax",
)

Evaluate the unified 7-level eosDT_get cascade (eosdt_eval.f90).

Parameters:

Name Type Description Default
rho float | Array

Mass density \(\rho\) in g cm^-3 (scalar).

required
temp float | Array

Temperature \(T\) in K (scalar).

required
chem_id Sequence[int]

1-based MESA nuclide identifiers of length N_species.

required
xa ndarray | Array

Species mass fractions of shape (N_species,).

required
use_skye bool

Whether Skye is enabled.

True
use_pc bool

Whether PC is enabled when Skye is disabled.

False
pc_use_gamma_limit bool

Whether PC uses \(\log_{10} \Gamma_e\) limits.

True
skye_solid_mixing_rule str

Solid mixing rule ("PC" or "Ogata").

'PC'
use_cms bool

Whether CMS H/He EOS is enabled.

False
use_free_eos bool

Whether FreeEOS 4D tables are enabled.

True
use_opal_scvh bool

Whether OPAL/SCVH 4D tables are enabled.

True
backend Backend

Execution backend ("auto", "rust", or "jax").

'auto'
solver_mode str

JAX mode ("jax" for native JAX or "rust_ffi").

'jax'

Returns:

Type Description
EosEvalOutput

[EosEvalOutput] with res, d_dlnd, and d_dln_t of shape (26,).

eval_opal_scvh_eos

eval_opal_scvh_eos(
    rho,
    temp,
    chem_id,
    xa,
    *,
    backend="auto",
    solver_mode="jax",
)

Evaluate OPAL/SCVH 4D tabulated EOS standalone at (rho, T).

eval_free_eos

eval_free_eos(
    rho,
    temp,
    chem_id,
    xa,
    *,
    backend="auto",
    solver_mode="jax",
)

Evaluate FreeEOS 4D tabulated EOS standalone at (rho, T).

eval_cms_eos

eval_cms_eos(
    rho,
    temp,
    chem_id,
    xa,
    *,
    include_radiation=True,
    backend="auto",
    solver_mode="jax",
)

Evaluate Chabrier, Mazevet & Soubiran (CMS) EOS standalone.


Compiled Rust Extension Bridge (flexmesa._rust)

Low-level Safe Rust PyO3 bindings exposed via flexmesa._rust for equations of state (_ArrF64 denotes a float64 NumPy ndarray).

eos_py

  • eos_basic_result_names (() -> list[str]): Returns the 26 canonical eos_def result channel names (0..26).
  • eos_blend_results ((alpha_in: float, d_alpha_dlog_t_in: float, d_alpha_dlog_rho_in: float, linear_blend: bool, res_1: _ArrF64, d_dlnd_1: _ArrF64, d_dln_t_1: _ArrF64, res_2: _ArrF64, d_dlnd_2: _ArrF64, d_dln_t_2: _ArrF64) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Blends two 26-channel EOS outputs (res_1, res_2) and their logarithmic derivatives using blend_eos_results.
  • eos_compute_ion_offset ((xa: _ArrF64, chem_id: list[int]) -> float): Computes the ground-state ionization energy offset (\(\mathrm{erg\,g^{-1}}\)) from species mass fractions xa and 1-based MESA chem_id identifiers.
  • eos_compute_ion_offset_from_za ((xa: _ArrF64, z: list[int], a: _ArrF64) -> float): Computes the ground-state ionization energy offset (\(\mathrm{erg\,g^{-1}}\)) directly from (xa, z, a).
  • eos_dfermi ((dk: float, eta: float, theta: float) -> tuple[float, float, float]): Evaluates the relativistic Fermi-Dirac integral dfermi(dk, eta, theta), returning (fd, fd_deta, fd_dtheta).
  • eos_dfermi_zones ((dk: float, eta: _ArrF64, theta: _ArrF64, parallel: bool = True) -> _ArrF64): Evaluates dfermi across nz zones, returning an (nz, 3) array of [fd, fd_deta, fd_dtheta].
  • eos_eval_ideal ((temp: float, rho: float, abar: float, zbar: float, xa: _ArrF64, chem_id: list[int]) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates the neutral ideal-gas + radiation EOS at a single zone from (temp, rho, abar, zbar, xa, chem_id).
  • eos_eval_ideal_from_weights ((temp: float, rho: float, abar: float, zbar: float, xa: _ArrF64, weights: _ArrF64, a: _ArrF64) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates the neutral ideal-gas + radiation EOS at a single zone directly from (temp, rho, abar, zbar, xa, weights, a).
  • eos_eval_ideal_zones ((temp: _ArrF64, rho: _ArrF64, abar: float, zbar: float, xa: _ArrF64, weights: _ArrF64, a: _ArrF64, parallel: bool = True) -> _ArrF64): Evaluates the neutral ideal-gas + radiation EOS across nz zones at fixed composition, returning an (nz, 78) array packing [res[0..26], d_dlnd[0..26], d_dln_t[0..26]].
  • eos_is_contained ((coords: _ArrF64, x: float, y: float) -> bool): Evaluates is_contained on an (N, 2) polygon coordinate array and a 2D point (x, y).
  • eos_min_distance_to_polygon ((coords: _ArrF64, x: float, y: float, dx_d1: float = 1.0, dx_d2: float = 0.0, dy_d1: float = 0.0, dy_d2: float = 1.0) -> tuple[float, float, float]): Evaluates min_distance_to_polygon on an (N, 2) polygon coordinate array and a 2D dual point (x, y) with first-order tangent seeds (dx_d1, dx_d2) and (dy_d1, dy_d2).
  • eos_quintic_blend ((alpha0: float) -> tuple[float, float]): Evaluates the \(C^2\) quintic blend polynomial and its derivative (s, ds_dalpha0) at alpha0.

eos_helm_py

  • eos_eval_helm ((temp: float, rho: float, abar: float, zbar: float) -> tuple[_ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64]): Evaluates the 26-channel HELM equation of state at a single zone (temp, rho, abar, zbar), returning (res, d_dlnd, d_dln_t, d_dabar, d_dzbar).
  • eos_eval_helm_zones ((temp: _ArrF64, rho: _ArrF64, abar: _ArrF64, zbar: _ArrF64, parallel: bool = True) -> _ArrF64): Evaluates eval_helm_eos across nz zones, returning an (nz, 130) array packing [res[0..26], d_dlnd[0..26], d_dln_t[0..26], d_dabar[0..26], d_dzbar[0..26]].
  • eos_helm_cell_data ((log_temp: float, din: float) -> tuple[float, float, float, float, _ArrF64, _ArrF64, _ArrF64, _ArrF64]): Returns the HelmCell data (t_lo, dth, d_lo, dd, fi_f, fi_dpdf, fi_ef, fi_xf) for a single (log_temp, din) lookup.
  • eos_helm_cells_batch ((log_temp: _ArrF64, din: _ArrF64) -> tuple[_ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64]): Returns batched HelmCell arrays (t_lo, dth, d_lo, dd, fi_f, fi_dpdf, fi_ef, fi_xf) across nz zones for vectorized @jax.jit evaluation.
  • eos_opal_scvh_cells_batch ((log_rho: _ArrF64, log_temp: _ArrF64, ix_1based: int = 5, iz_1based: int = 2) -> tuple[_ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64, _ArrF64]): Returns batched OPAL/SCVH cell bounds and 64-coefficient vertex arrays (q0, q1, t0, t1, v00, v10, v01, v11) across nz zones for (ix, iz).

eos_pc_skye_py

  • eos_eval_pc ((rho: float, temp: float, abar: float, zbar: float, chem_id: list[int], xa: _ArrF64, include_radiation: bool = True, pc_gamma_start_crystal: float = 170.0, pc_gamma_full_crystal: float = 180.0, mass_fraction_limit: float = 1.0e-4) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates the 26-channel Potekhin-Chabrier (PC) equation of state at a single zone (rho, temp, abar, zbar, chem_id, xa).
  • eos_eval_pc_zones ((rho: _ArrF64, temp: _ArrF64, abar: _ArrF64, zbar: _ArrF64, xa_flat: _ArrF64, azion: _ArrF64, acmi: _ArrF64, include_radiation: bool = True, pc_gamma_start_crystal: float = 170.0, pc_gamma_full_crystal: float = 180.0, mass_fraction_limit: float = 1.0e-4, parallel: bool = True) -> _ArrF64): Evaluates PC across nz zones at (rho, temp, abar, zbar, xa_flat, azion, acmi), returning an (nz, 78) array packing [res[0..26], d_dlnd[0..26], d_dln_t[0..26]].
  • eos_eval_skye ((rho: float, temp: float, abar: float, zbar: float, chem_id: list[int], xa: _ArrF64, skye_use_ion_offsets: bool = True, skye_solid_mixing_rule: str = "PC", mass_fraction_limit: float = 1.0e-4) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates the 26-channel Jermyn et al. (2021) Skye equation of state at a single zone (rho, temp, abar, zbar, chem_id, xa).
  • eos_eval_skye_zones ((rho: _ArrF64, temp: _ArrF64, abar: _ArrF64, zbar: _ArrF64, xa_flat: _ArrF64, z: list[int], acmi: _ArrF64, a: _ArrF64, skye_use_ion_offsets: bool = True, skye_solid_mixing_rule: str = "PC", mass_fraction_limit: float = 1.0e-4, parallel: bool = True) -> _ArrF64): Evaluates Skye across nz zones at (rho, temp, abar, zbar, xa_flat, z, acmi, a), returning an (nz, 78) array packing [res[0..26], d_dlnd[0..26], d_dln_t[0..26]].
  • eos_get_pc_alfa ((log_rho: float, log_t: float, abar: float, zbar: float, use_gamma_limit: bool = True, log_rho1: float = 2.999, log_rho2: float = 2.8, log_t1: float = 7.6, log_t2: float = 7.7, log_gamma_e_all_helm: float = -1.8, log_gamma_e_all_pc: float = -1.7) -> tuple[float, float, float]): Evaluates Get_PC_alfa (eospc_eval), returning (alfa, d_alfa_dlogT, d_alfa_dlogRho).
  • eos_get_skye_alfa ((log_rho: float, log_t: float, abar: float, zbar: float) -> tuple[float, float, float]): Evaluates Get_Skye_alfa (skye), returning (alfa, d_alfa_dlogT, d_alfa_dlogRho).
  • eos_get_skye_alfa_simple ((log_rho: float, log_t: float) -> tuple[float, float, float]): Evaluates get_Skye_alfa_simple (skye), returning (alfa, d_alfa_dlogT, d_alfa_dlogRho).

eos_solver_py

  • eos_cms_slice_coeffs ((ix_1b: int) -> tuple[float, float, int, float, float, int, _ArrF64]): Returns (log_t_min, delta_log_t, num_log_ts, log_rho_min, delta_log_rho, num_log_rhos, coeffs_flat) for a precomputed 4D CMS slice (ix_1b in 1..=11).
  • eos_dt_slice_coeffs ((kind: int, ix_1b: int, iz_1b: int) -> tuple[float, float, int, float, float, int, _ArrF64]): Returns (log_q_min, del_log_q, num_log_qs, log_t_min, del_log_t, num_log_ts, coeffs_flat) for a precomputed 4D OPAL/SCVH (kind=0) or FreeEOS (kind=1) slice (ix_1b, iz_1b).
  • eos_eval_cms ((rho: float, temp: float, chem_id: list[int], xa: _ArrF64, include_radiation: bool = True) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates Chabrier, Mazevet & Soubiran (CMS) H/He EOS standalone.
  • eos_eval_free_eos ((rho: float, temp: float, chem_id: list[int], xa: _ArrF64) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates FreeEOS 4D tabulated EOS standalone at (rho, temp, chem_id, xa).
  • eos_eval_opal_scvh ((rho: float, temp: float, chem_id: list[int], xa: _ArrF64) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates OPAL/SCVH 4D tabulated EOS standalone at (rho, temp, chem_id, xa).
  • eos_eval_opal_scvh_zones ((rho: _ArrF64, temp: _ArrF64, chem_id: Sequence[int], xa: _ArrF64, parallel: bool = True) -> _ArrF64): Evaluates OPAL/SCVH 4D tabulated EOS across nz zones at (chem_id, xa), returning an (nz, 78) array [res[0..26], d_dlnd[0..26], d_dln_t[0..26]].
  • eos_eval_gamma_de_get ((abar: float, zbar: float, rho: float, energy: float, gamma: float = 1.6666666666666667) -> tuple[float, float, _ArrF64, _ArrF64, _ArrF64]): Evaluates the closed-form ideal \(\gamma\)-law \((\rho, E)\) inverse solver eos_gamma_DE_get(abar, zbar, rho, energy, gamma).
  • eos_eval_dt_get ((rho: float, temp: float, chem_id: list[int], xa: _ArrF64, use_skye: bool = True, use_pc: bool = False, pc_use_gamma_limit: bool = True, skye_solid_mixing_rule: str = "PC", use_cms: bool = False, use_free_eos: bool = True, use_opal_scvh: bool = True) -> tuple[_ArrF64, _ArrF64, _ArrF64]): Evaluates the unified top-level eosDT_get 7-level cascade (CMS -> Skye -> PC -> FreeEOS -> OPAL/SCVH -> HELM -> ideal) at (rho, temp, chem_id, xa).
  • eos_eval_dt_get_rho ((temp: float, which_other: int, other_value: float, chem_id: list[int], xa: _ArrF64, log_rho_guess: float = 0.0, use_skye: bool = True, use_pc: bool = False, use_cms: bool = False, use_free_eos: bool = True, use_opal_scvh: bool = True, logrho_tol: float | None = None, other_tol: float | None = None) -> tuple[float, float, _ArrF64, _ArrF64, _ArrF64]): Evaluates eosDT_get_Rho solving for rho at fixed temp and res[which_other] == other_value.
  • eos_eval_dt_get_t ((rho: float, which_other: int, other_value: float, chem_id: list[int], xa: _ArrF64, log_t_guess: float = 6.0, use_skye: bool = True, use_pc: bool = False, use_cms: bool = False, use_free_eos: bool = True, use_opal_scvh: bool = True, logt_tol: float | None = None, other_tol: float | None = None) -> tuple[float, float, _ArrF64, _ArrF64, _ArrF64]): Evaluates eosDT_get_T solving for T at fixed rho and res[which_other] == other_value.
  • eos_eval_pt_get ((pgas: float, temp: float, chem_id: list[int], xa: _ArrF64, use_skye: bool = True, use_pc: bool = False, pc_use_gamma_limit: bool = True, skye_solid_mixing_rule: str = "PC", use_cms: bool = False, use_free_eos: bool = True, use_opal_scvh: bool = True, log_pgas: float | None = None, log_t: float | None = None) -> tuple[float, float, float, float, _ArrF64, _ArrF64, _ArrF64]): Evaluates eosPT_get at (pgas, temp, chem_id, xa).
  • eos_eval_pt_get_pgas ((temp: float, which_other: int, other_value: float, chem_id: list[int], xa: _ArrF64, log_pgas_guess: float = 10.0, use_skye: bool = True, use_pc: bool = False, use_cms: bool = False, use_free_eos: bool = True, use_opal_scvh: bool = True) -> tuple[float, float, _ArrF64, _ArrF64, _ArrF64]): Evaluates eosPT_get_Pgas solving for pgas at fixed temp and res[which_other] == other_value.
  • eos_eval_pt_get_t ((pgas: float, which_other: int, other_value: float, chem_id: list[int], xa: _ArrF64, log_t_guess: float = 6.0, use_skye: bool = True, use_pc: bool = False, use_cms: bool = False, use_free_eos: bool = True, use_opal_scvh: bool = True) -> tuple[float, float, _ArrF64, _ArrF64, _ArrF64]): Evaluates eosPT_get_T solving for T at fixed pgas and res[which_other] == other_value.