jaxprop.helpers_props module#

class jaxprop.helpers_props.FluidState(fluid_name: str = None, identifier: str = None, pressure: jax.Array = nan, temperature: jax.Array = nan, density: jax.Array = nan, enthalpy: jax.Array = nan, entropy: jax.Array = nan, internal_energy: jax.Array = nan, compressibility_factor: jax.Array = nan, isobaric_heat_capacity: jax.Array = nan, isochoric_heat_capacity: jax.Array = nan, heat_capacity_ratio: jax.Array = nan, speed_of_sound: jax.Array = nan, isothermal_compressibility: jax.Array = nan, isentropic_compressibility: jax.Array = nan, isothermal_bulk_modulus: jax.Array = nan, isentropic_bulk_modulus: jax.Array = nan, isobaric_expansion_coefficient: jax.Array = nan, isothermal_joule_thomson: jax.Array = nan, joule_thomson: jax.Array = nan, gruneisen: jax.Array = nan, viscosity: jax.Array = nan, conductivity: jax.Array = nan, is_two_phase: jax.Array = nan, quality_mass: jax.Array = nan, quality_volume: jax.Array = nan, surface_tension: jax.Array = nan, subcooling: jax.Array = nan, superheating: jax.Array = nan, pressure_saturation: jax.Array = nan, temperature_saturation: jax.Array = nan, supersaturation_degree: jax.Array = nan, supersaturation_ratio: jax.Array = nan)[source]#

Bases: Module

Attributes:
fluid_name
identifier

Methods

at_index(idx)

Extract a single FluidState at the given index from a batched FluidState.

flipped()

Return a new FluidState where all array-valued fields are reversed in order.

items()

Dict-style iteration

keys()

Dict-style iteration

stack(states)

Combine a list of FluidState into a batched FluidState (values stacked into arrays).

to_dict([include_aliases])

Return dict of numeric properties, with optional aliases.

values()

Dict-style iteration

at_index(idx: int) FluidState[source]#

Extract a single FluidState at the given index from a batched FluidState.

This returns a new FluidState with the same fluid_name and identifier, and each property reduced to the element at position idx along the first axis.

Parameters:
idxint

Index along the first dimension to extract.

Returns:
FluidState

A new FluidState representing the state at the specified index.

compressibility_factor: Array = nan#
conductivity: Array = nan#
density: Array = nan#
enthalpy: Array = nan#
entropy: Array = nan#
flipped() FluidState[source]#

Return a new FluidState where all array-valued fields are reversed in order.

Scalars and 0-D arrays are left unchanged, while 1-D or N-D arrays are flipped along their first axis. Metadata fields (fluid_name, identifier) are copied unchanged.

fluid_name: str = None#
gruneisen: Array = nan#
heat_capacity_ratio: Array = nan#
identifier: str = None#
internal_energy: Array = nan#
is_two_phase: Array = nan#
isentropic_bulk_modulus: Array = nan#
isentropic_compressibility: Array = nan#
isobaric_expansion_coefficient: Array = nan#
isobaric_heat_capacity: Array = nan#
isochoric_heat_capacity: Array = nan#
isothermal_bulk_modulus: Array = nan#
isothermal_compressibility: Array = nan#
isothermal_joule_thomson: Array = nan#
items()[source]#

Dict-style iteration

joule_thomson: Array = nan#
keys()[source]#

Dict-style iteration

pressure: Array = nan#
pressure_saturation: Array = nan#
quality_mass: Array = nan#
quality_volume: Array = nan#
speed_of_sound: Array = nan#
classmethod stack(states: list[FluidState]) FluidState[source]#

Combine a list of FluidState into a batched FluidState (values stacked into arrays).

subcooling: Array = nan#
superheating: Array = nan#
supersaturation_degree: Array = nan#
supersaturation_ratio: Array = nan#
surface_tension: Array = nan#
temperature: Array = nan#
temperature_saturation: Array = nan#
to_dict(include_aliases: bool = False)[source]#

Return dict of numeric properties, with optional aliases.

values()[source]#

Dict-style iteration

viscosity: Array = nan#
jaxprop.helpers_props.extract_vars(name)[source]#