epcsaft.reference#

Read solvent and infinite-dilution references solved by the native model.

Mixture.reference constructs these immutable physical-input snapshots at temperature in K and pressure in Pa. Log fugacity fields are natural logarithms of dimensionless fugacity coefficients, not logarithms of Pa. Activity coefficients use the declared molality or solvent reference.

class epcsaft.reference.Reference#

Retain the physical inputs and native reference fugacity solution.

Variables:
  • component_ids (tuple of str) – Component order for all compositions and returned component quantities.

  • T (float) – Reference temperature in K.

  • P (float) – Reference pressure in Pa.

  • solvent_fractions (tuple of float) – Dimensionless solvent-only mole fractions in component order.

  • ion_indices (tuple of int) – Zero-based component positions in declared ion order; solvent-only references refuse access with IonicReferenceUnavailable.

  • stoichiometry (tuple of int) – Dimensionless positive formula counts in ion order; solvent-only references refuse access with IonicReferenceUnavailable.

  • log_fugacity (tuple of float) – Dimensionless natural-log ionic fugacity-coefficient limits in ion order; solvent-only references refuse access.

  • molality (float) – Zero formula molality in mol/kg solvent at the analytic limit; solvent-only references refuse access.

  • convergence_error (float or None) – None: the analytic limit has no terminal sequence comparison. Solvent density and association diagnostics describe its inner calculations; solvent-only references refuse access.

  • pure_solvent_log_fugacity (float or None) – Dimensionless natural-log pure-solvent fugacity coefficient at the stored T and P. None retains native unavailability, not zero.

Notes

Created by Mixture.reference with copied physical inputs and native reference results. Ionic properties/methods refuse solvent-only references. The native model and reference records are internal constructor inputs; use the model’s reference method to obtain a consistent snapshot. ALG-REFERENCE defines the dilution limit and its convergence diagnostic.

P: float#
T: float#
activity(molality: float) → Activity#

Evaluate electrolyte activities along this reference’s formula dilution path.

Parameters:

molality (float) – Finite, strictly positive formula molality in mol/kg solvent at the stored T (K) and P (Pa). Zero molality raises ParameterError.

Returns:

activity – Dimensionless molality-scale mean ionic coefficient and osmotic coefficient, single-ion quantities and native availability diagnostics.

Return type:

Activity

Raises:
  • ParameterError – The reference is solvent-only, or formula/composition inputs are invalid.

  • EosError – A liquid state or reference evaluation fails.

Notes

Stoichiometric counts convert formula molality to individual-ion molalities. Single-ion quantities retain the declared native reference convention; only neutral combinations are convention-invariant (ALG-REFERENCE).

component_ids: tuple[str, ...]#
property convergence_error: float | None#

Read convergence_error, documented in the Reference Attributes section.

henry_constants(*, solutes: collections.abc.Sequence[str]) → list[epcsaft._core.HenryConstant]#

Evaluate neutral-solute fugacity-based Henry constants in a pure solvent.

Parameters:

solutes (sequence of str) – Nonempty, distinct neutral component identifiers excluding the solvent. Results are sorted by component index, regardless of this input order.

Returns:

constants – H_i^px = lim(f_i/x_i) in Pa, sorted by component_index, with dimensionless x_i and fugacity f_i in Pa. An ion-containing model or failed reference evaluation returns unavailable entries with status and message; inspect each henry_constant_px before use.

Return type:

list of HenryConstant

Raises:

ParameterError – This is an ionic Reference, a solute name is unknown, the solvent composition is not pure, or the solute set is empty, repeated or contains the solvent.

property ion_indices: tuple[int, int]#

Read ion_indices, documented in the Reference Attributes section.

property log_fugacity: tuple[float, float]#

Read log_fugacity, documented in the Reference Attributes section.

property molality: float#

Read molality, documented in the Reference Attributes section.

property pure_solvent_log_fugacity: float | None#

Read pure_solvent_log_fugacity, documented in the Reference Attributes section.

solvent_activity(*, x: collections.abc.Sequence[float]) → SolventActivity#

Evaluate solvent activity for an explicit liquid composition.

Parameters:

x (sequence of float) – Dimensionless mole fractions in component order, at stored T and P.

Returns:

activity – Dimensionless solvent fugacity relative to the pure-liquid reference and the practical osmotic coefficient when available. An unavailable pure reference, zero solvent fraction or failed liquid-density solve returns status/cause with unavailable values. Osmotic unavailability has its own osmotic_cause and can coexist with available activity.

Return type:

SolventActivity

Raises:

ParameterError – With an available pure reference, the composition has the wrong length, nonfinite or negative entries, or violates normalization or charge balance.

Notes

The native definition is a_w = f_w / f_w_pure at the same K and Pa; its logarithm is natural. It does not replace ionic mean activities.

solvent_fractions: tuple[float, ...]#
property stoichiometry: tuple[int, int]#

Read stoichiometry, documented in the Reference Attributes section.

Re-exported names#