jaxprop.binary_mixture package#

Common-pressure/common-temperature binary fluid model.

class jaxprop.binary_mixture.FluidBinaryMixture(name, components, mass_fractions, identifier=None, *, inverse_max_steps=64, inverse_tolerance=1e-10)[source]#

Bases: SourceReferencesMixin, Module

Fixed mass fractions of two component fluids in mechanical/thermal equilibrium.

Parameters:
namestr

User label; component names and backends stay on the component objects.

componentspair of configured fluid objects

Components must provide PT core states and thermal response properties. Native PG/bicubic components remain dynamic JAX model data. Host/hybrid configurations are fixed snapshots; reconstruct to change their models.

mass_fractionspair of nonnegative real scalars

Sum to one, without normalization. Both pure-component limits are valid. Composition is fixed, never an extra positional state input.

identifierstr or None

Stream label preserved on complete returned FluidState objects.

inverse_max_steps, inverse_toleranceint, float

Setup-only iteration budget and scaled residual tolerance for HP/PS.

The main sound speed assumes pressure and temperature relaxation. The named
``speed_of_sound_p`` field retains the distinct frozen-thermal Wood speed.
Component mass fractions are not vapor qualities; saturation is unsupported.
Attributes:
capabilities
components
configuration
critical_point
mixture_ratio
references
triple_point_liquid
triple_point_vapor

Methods

get_state(input_type, prop_1, prop_2, *[, ...])

Return complete broadcast states using a static pair and fixed composition.

get_state_saturation

backend: object#
property capabilities#
property components#
property configuration#
get_state(input_type, prop_1, prop_2, *, generalize_quality=False, supersaturation=False, errors='raise', **options)[source]#

Return complete broadcast states using a static pair and fixed composition.

Numeric inputs and native component parameters remain dynamic. Eager raising reports the first failed row. Transformed supported providers require explicit mask/clip; source/callback clipping is not advertised.

get_state_saturation(*args, **kwargs)[source]#
identifier: object#
inverse_max_steps: int#
inverse_tolerance: float#
mass_fractions: tuple#
property mixture_ratio#
model: str#
name: str#
p_max: object#
p_min: float#
provider: str#
reference_id: tuple#
jaxprop.binary_mixture.FluidMix(name, backend='HEOS', mixture_ratio=None, exceptions=True, identifier=None)[source]#

Translate the former name/mass-ratio constructor once at setup.

The returned object is the canonical FluidBinaryMixture. Per-call failure policies replace exceptions=False; zero ratios are true pure limits.

jaxprop.binary_mixture.FluidTwoComponent#

alias of FluidBinaryMixture

jaxprop.binary_mixture.get_mixture_state(fluid_1, fluid_2, p, T, R)[source]#

Legacy convenience call; reuse a configured binary object in simulations.

Submodules#