Skip to main content

FluidParam

Enum FluidParam 

Source
#[repr(u8)]
pub enum FluidParam {
Show 57 variants T = 19, P = 20, Q = 21, QMass = 22, Tau = 23, Delta = 24, DMolar = 25, HMolar = 26, SMolar = 27, CpMolar = 28, Cp0Molar = 29, CvMolar = 30, UMolar = 31, GMolar = 32, HelmholtzMolar = 33, HMolarResidual = 34, SMolarResidual = 35, GMolarResidual = 36, HMolarIdealGas = 37, SMolarIdealGas = 38, UMolarIdealGas = 39, DMass = 40, HMass = 41, SMass = 42, CpMass = 43, Cp0Mass = 44, CvMass = 45, UMass = 46, GMass = 47, HelmholtzMass = 48, HMassIdealGas = 49, SMassIdealGas = 50, UMassIdealGas = 51, DynamicViscosity = 52, Conductivity = 53, SurfaceTension = 54, Prandtl = 55, SoundSpeed = 56, IsothermalCompressibility = 57, IsobaricExpansionCoefficient = 58, IsentropicExpansionCoefficient = 59, FundamentalDerivativeOfGasDynamics = 60, AlphaR = 61, DAlphaRDTauConstDelta = 62, DAlphaRDDeltaConstTau = 63, Alpha0 = 64, DAlpha0DTauConstDelta = 65, DAlpha0DDeltaConstTau = 66, D2Alpha0DDelta2ConstTau = 67, D3Alpha0DDelta3ConstTau = 68, BVirial = 69, CVirial = 70, DBVirialDT = 71, DCVirialDT = 72, Z = 73, PIP = 74, Phase = 85,
}
Expand description

CoolProp fluids input/output parameters.

ยงExamples

Conversion between &str:

use std::str::FromStr;

use rfluids::prelude::*;

assert_eq!(FluidParam::Conductivity.as_ref(), "conductivity");
assert_eq!(FluidParam::from_str("conductivity"), Ok(FluidParam::Conductivity));
assert_eq!(FluidParam::try_from("L"), Ok(FluidParam::Conductivity));

Conversion between u8:

use rfluids::prelude::*;

assert_eq!(u8::from(FluidParam::SMass), 42);
assert_eq!(FluidParam::try_from(42), Ok(FluidParam::SMass));

Conversion between f64:

use rfluids::prelude::*;

assert_eq!(FluidParam::try_from(42.0), Ok(FluidParam::SMass));

Conversion between FluidInputPair:

use rfluids::prelude::*;

assert_eq!(
    <(FluidParam, FluidParam)>::from(FluidInputPair::PT),
    (FluidParam::P, FluidParam::T)
);
assert_eq!(FluidInputPair::try_from((FluidParam::T, FluidParam::P)), Ok(FluidInputPair::PT));

ยงSee Also

Variantsยง

ยง

T = 19

Temperature [K].

ยง

P = 20

Pressure [Pa].

ยง

Q = 21

Mole-based vapor quality [dimensionless, from 0 to 1].

ยง

QMass = 22

Mass-based vapor quality [dimensionless, from 0 to 1].

ยง

Tau = 23

Reciprocal reduced temperature = TCritical T [dimensionless].

ยง

Delta = 24

Reduced density = DMass/ DMassCritical [dimensionless].

ยง

DMolar = 25

Molar density [mol/mยณ].

ยง

HMolar = 26

Molar specific enthalpy [J/mol].

ยง

SMolar = 27

Molar specific entropy [J/mol/K].

ยง

CpMolar = 28

Molar specific heat at constant pressure [J/mol/K].

ยง

Cp0Molar = 29

Ideal gas molar specific heat at constant pressure [J/mol/K].

ยง

CvMolar = 30

Molar specific heat at constant volume [J/mol/K].

ยง

UMolar = 31

Molar specific internal energy [J/mol].

ยง

GMolar = 32

Molar specific Gibbs energy [J/mol].

ยง

HelmholtzMolar = 33

Molar specific Helmholtz energy [J/mol].

ยง

HMolarResidual = 34

Residual molar specific enthalpy [J/mol].

ยง

SMolarResidual = 35

Residual molar specific entropy [J/mol/K].

ยง

GMolarResidual = 36

Residual molar specific Gibbs energy [J/mol].

ยง

HMolarIdealGas = 37

Ideal gas molar specific enthalpy [J/mol].

ยง

SMolarIdealGas = 38

Ideal gas molar specific entropy [J/mol/K].

ยง

UMolarIdealGas = 39

Ideal gas molar specific internal energy [J/mol].

ยง

DMass = 40

Mass density [kg/mยณ].

ยง

HMass = 41

Mass specific enthalpy [J/kg].

ยง

SMass = 42

Mass specific entropy [J/kg/K].

ยง

CpMass = 43

Mass specific heat at constant pressure [J/kg/K].

ยง

Cp0Mass = 44

Ideal gas mass specific heat at constant pressure [J/kg/K].

ยง

CvMass = 45

Mass specific heat at constant volume [J/kg/K].

ยง

UMass = 46

Mass specific internal energy [J/kg].

ยง

GMass = 47

Mass specific Gibbs energy [J/kg].

ยง

HelmholtzMass = 48

Mass specific Helmholtz energy [J/kg].

ยง

HMassIdealGas = 49

Ideal gas mass specific enthalpy [J/kg].

ยง

SMassIdealGas = 50

Ideal gas mass specific entropy [J/kg/K].

ยง

UMassIdealGas = 51

Ideal gas mass specific internal energy [J/kg].

ยง

DynamicViscosity = 52

Dynamic viscosity [Paยทs].

ยง

Conductivity = 53

Thermal conductivity [W/m/K].

ยง

SurfaceTension = 54

Surface tension [N/m].

ยง

Prandtl = 55

Prandtl number [dimensionless].

ยง

SoundSpeed = 56

Sound speed [m/s].

ยง

IsothermalCompressibility = 57

Isothermal compressibility [1/Pa].

ยง

IsobaricExpansionCoefficient = 58

Isobaric expansion coefficient [1/K].

ยง

IsentropicExpansionCoefficient = 59

Isentropic expansion coefficient [dimensionless].

ยง

FundamentalDerivativeOfGasDynamics = 60

Fundamental derivative of gas dynamics [dimensionless].

ยง

AlphaR = 61

Residual Helmholtz energy contribution [dimensionless].

ยง

DAlphaRDTauConstDelta = 62

Derivative of residual Helmholtz energy contribution with Tau [dimensionless].

ยง

DAlphaRDDeltaConstTau = 63

Derivative of residual Helmholtz energy contribution with Delta [dimensionless].

ยง

Alpha0 = 64

Ideal gas Helmholtz energy contribution [dimensionless].

ยง

DAlpha0DTauConstDelta = 65

Derivative of ideal gas Helmholtz energy contribution with Tau [dimensionless].

ยง

DAlpha0DDeltaConstTau = 66

Derivative of ideal gas Helmholtz energy contribution with Delta [dimensionless].

ยง

D2Alpha0DDelta2ConstTau = 67

Second derivative of ideal gas Helmholtz energy contribution with Delta [dimensionless].

ยง

D3Alpha0DDelta3ConstTau = 68

Third derivative of ideal gas Helmholtz energy contribution with Delta [dimensionless].

ยง

BVirial = 69

Second virial coefficient [dimensionless].

ยง

CVirial = 70

Third virial coefficient [dimensionless].

ยง

DBVirialDT = 71

Derivative of second virial coefficient with T [dimensionless].

ยง

DCVirialDT = 72

Derivative of third virial coefficient with T [dimensionless].

ยง

Z = 73

Compressibility factor [dimensionless].

ยง

PIP = 74

Phase identification parameter [dimensionless].

ยง

Phase = 85

Phase index [dimensionless].

Implementationsยง

Sourceยง

impl FluidParam

Source

pub const fn from_repr(discriminant: u8) -> Option<FluidParam>

Try to create Self from the raw representation

Trait Implementationsยง

Sourceยง

impl AsRef<str> for FluidParam

Sourceยง

fn as_ref(&self) -> &str

Converts this type into a shared reference of the (usually inferred) input type.
Sourceยง

impl Clone for FluidParam

Sourceยง

fn clone(&self) -> FluidParam

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl Copy for FluidParam

Sourceยง

impl Debug for FluidParam

Sourceยง

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Sourceยง

impl Eq for FluidParam

Sourceยง

impl<'_derivative_strum> From<&'_derivative_strum FluidParam> for &'static str

Sourceยง

fn from(x: &'_derivative_strum FluidParam) -> &'static str

Converts to this type from the input type.
Sourceยง

impl From<FluidParam> for &'static str

Sourceยง

fn from(x: FluidParam) -> &'static str

Converts to this type from the input type.
Sourceยง

impl From<FluidParam> for u8

Sourceยง

fn from(value: FluidParam) -> Self

Converts to this type from the input type.
Sourceยง

impl FromStr for FluidParam

Sourceยง

type Err = ParseError

The associated error which can be returned from parsing.
Sourceยง

fn from_str(s: &str) -> Result<FluidParam, <Self as FromStr>::Err>

Parses a string s to return a value of this type. Read more
Sourceยง

impl Hash for FluidParam

Sourceยง

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 ยท Sourceยง

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Sourceยง

impl PartialEq for FluidParam

Sourceยง

fn eq(&self, other: &FluidParam) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Sourceยง

impl StructuralPartialEq for FluidParam

Sourceยง

impl TryFrom<&str> for FluidParam

Sourceยง

type Error = ParseError

The type returned in the event of a conversion error.
Sourceยง

fn try_from(s: &str) -> Result<FluidParam, <Self as TryFrom<&str>>::Error>

Performs the conversion.
Sourceยง

impl TryFrom<f64> for FluidParam

Sourceยง

type Error = ParseError

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: f64) -> Result<Self, Self::Error>

Performs the conversion.
Sourceยง

impl TryFrom<u8> for FluidParam

Sourceยง

type Error = ParseError

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementationsยง

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.