jaxprop.fluid module#

The common fluid constructor and public runtime fluid type.

class jaxprop.fluid.Fluid(name, method='coolprop', backend=None, identifier=None, *, table_options=None, model_options=None, **options)[source]#

Bases: object

Construct the selected evaluator without wrapping its numerical calls.

method selects the numerical implementation and physical model. backend selects its CoolProp source, with None resolving to HEOS for single-source methods. Table and calibration settings use their respective option mappings. A binary model takes configured components and fixed mass fractions through model_options.

The result is the actual evaluator, such as FluidCoolProp or FluidPerfectGas. Evaluator classes are registered virtual subclasses, so isinstance(result, Fluid) works without adding a wrapper or changing their JAX PyTrees. Virtual rather than physical inheritance also prevents Python from initializing the already constructed result a second time.

Methods

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

Evaluate through the selected concrete object's common interface.

backend: str | None#
capabilities: FluidCapabilities#
configuration: FluidConfiguration#
critical_point: FluidState#
get_state(input_type, prop_1, prop_2, *, generalize_quality=False, supersaturation=False, errors='raise', **options) → FluidState[source]#

Evaluate through the selected concrete object’s common interface.

This declaration documents the runtime/type-checking contract; actual objects use their own implementation directly through virtual subclass registration, without inheriting this method.

identifier: str | None#
model: str#
name: str#
provider: str#
reference_id: tuple#
references: SourceReferences#
triple_point_liquid: FluidState#
triple_point_vapor: FluidState#