pub struct Pets { /* private fields */ }Implementations§
Source§impl Pets
impl Pets
pub fn new(parameters: Rc<PetsParameters>) -> Self
pub fn with_options( parameters: Rc<PetsParameters>, options: PetsOptions, ) -> Self
Trait Implementations§
Source§impl EntropyScaling<SIUnit> for Pets
impl EntropyScaling<SIUnit> for Pets
fn viscosity_reference( &self, temperature: SINumber, _: SINumber, moles: &SIArray1, ) -> EosResult<SINumber>
fn viscosity_correlation(&self, s_res: f64, x: &Array1<f64>) -> EosResult<f64>
fn diffusion_reference( &self, temperature: SINumber, volume: SINumber, moles: &SIArray1, ) -> EosResult<SINumber>
fn diffusion_correlation(&self, s_res: f64, x: &Array1<f64>) -> EosResult<f64>
fn thermal_conductivity_reference( &self, temperature: SINumber, volume: SINumber, moles: &SIArray1, ) -> EosResult<SINumber>
fn thermal_conductivity_correlation( &self, s_res: f64, x: &Array1<f64>, ) -> EosResult<f64>
Source§impl EquationOfState for Pets
impl EquationOfState for Pets
Source§fn components(&self) -> usize
fn components(&self) -> usize
Return the number of components of the equation of state.
Source§fn subset(&self, component_list: &[usize]) -> Self
fn subset(&self, component_list: &[usize]) -> Self
Return an equation of state consisting of the components
contained in component_list.
Source§fn compute_max_density(&self, moles: &Array1<f64>) -> f64
fn compute_max_density(&self, moles: &Array1<f64>) -> f64
Return the maximum density in Angstrom^-3. Read more
Source§fn residual(&self) -> &[Box<dyn HelmholtzEnergy>]
fn residual(&self) -> &[Box<dyn HelmholtzEnergy>]
Return a slice of the individual contributions (excluding the ideal gas)
of the equation of state.
Source§fn ideal_gas(&self) -> &dyn IdealGasContribution
fn ideal_gas(&self) -> &dyn IdealGasContribution
Return the ideal gas contribution. Read more
Source§fn evaluate_residual<D>(&self, state: &StateHD<D>) -> D
fn evaluate_residual<D>(&self, state: &StateHD<D>) -> D
Evaluate the residual reduced Helmholtz energy $\beta A^\mathrm{res}$.
Source§fn evaluate_residual_contributions<D>(
&self,
state: &StateHD<D>,
) -> Vec<(String, D)>
fn evaluate_residual_contributions<D>( &self, state: &StateHD<D>, ) -> Vec<(String, D)>
Evaluate the reduced Helmholtz energy of each individual contribution
and return them together with a string representation of the contribution.
Source§fn validate_moles<U>(
&self,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>, EosError>where
U: EosUnit,
fn validate_moles<U>(
&self,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>, EosError>where
U: EosUnit,
Check if the provided optional mole number is consistent with the
equation of state. Read more
Source§fn max_density<U>(
&self,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
fn max_density<U>(
&self,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
Calculate the maximum density. Read more
Source§fn second_virial_coefficient<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
fn second_virial_coefficient<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
Calculate the second virial coefficient $B(T)$
Source§fn third_virial_coefficient<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
fn third_virial_coefficient<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
Calculate the third virial coefficient $C(T)$
Source§fn second_virial_coefficient_temperature_derivative<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
fn second_virial_coefficient_temperature_derivative<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
Calculate the temperature derivative of the second virial coefficient $B’(T)$
Source§fn third_virial_coefficient_temperature_derivative<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
fn third_virial_coefficient_temperature_derivative<U>(
&self,
temperature: Quantity<f64, U>,
moles: Option<&Quantity<ArrayBase<OwnedRepr<f64>, Dim<[usize; 1]>>, U>>,
) -> Result<Quantity<f64, U>, EosError>where
U: EosUnit,
Calculate the temperature derivative of the third virial coefficient $C’(T)$
Source§impl MolarWeight<SIUnit> for Pets
impl MolarWeight<SIUnit> for Pets
fn molar_weight(&self) -> SIArray1
Auto Trait Implementations§
impl Freeze for Pets
impl !RefUnwindSafe for Pets
impl !Send for Pets
impl !Sync for Pets
impl Unpin for Pets
impl !UnwindSafe for Pets
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.