pub struct EquationOfStateAD<I, R, const N: usize> { /* private fields */ }Expand description
An equation of state consisting of a residual model and an ideal gas model.
Implementations§
Trait Implementations§
Source§impl<I: ParametersAD, R: ParametersAD, const N: usize> ParametersAD for EquationOfStateAD<I, R, N>
impl<I: ParametersAD, R: ParametersAD, const N: usize> ParametersAD for EquationOfStateAD<I, R, N>
Source§type Parameters<D: DualNum<f64> + Copy> = ([<I as ParametersAD>::Parameters<D>; N], <R as ParametersAD>::Parameters<D>)
type Parameters<D: DualNum<f64> + Copy> = ([<I as ParametersAD>::Parameters<D>; N], <R as ParametersAD>::Parameters<D>)
The type of the structure that stores the parameters internally.
Source§fn params<D: DualNum<f64> + Copy>(&self) -> Self::Parameters<D>
fn params<D: DualNum<f64> + Copy>(&self) -> Self::Parameters<D>
Return the parameters in the given data type.
Source§fn params_from_inner<D: DualNum<f64> + Copy, D2: DualNum<f64, Inner = D> + Copy>(
(ideal_gas, residual): &([I::Parameters<D>; N], R::Parameters<D>),
) -> Self::Parameters<D2>
fn params_from_inner<D: DualNum<f64> + Copy, D2: DualNum<f64, Inner = D> + Copy>( (ideal_gas, residual): &([I::Parameters<D>; N], R::Parameters<D>), ) -> Self::Parameters<D2>
Lift the parameters to the given type of dual number.
Source§fn wrap<const N: usize>(self) -> HelmholtzEnergyWrapper<Self, f64, N>
fn wrap<const N: usize>(self) -> HelmholtzEnergyWrapper<Self, f64, N>
Wraps the model in the HelmholtzEnergyWrapper struct, so that it can be used
as an argument to StateAD and PhaseEquilibriumAD constructors.
Source§impl<I: ParametersAD, R: ResidualHelmholtzEnergy<N>, const N: usize> ResidualHelmholtzEnergy<N> for EquationOfStateAD<I, R, N>
impl<I: ParametersAD, R: ResidualHelmholtzEnergy<N>, const N: usize> ResidualHelmholtzEnergy<N> for EquationOfStateAD<I, R, N>
Source§fn compute_max_density(&self, molefracs: &SVector<f64, N>) -> f64
fn compute_max_density(&self, molefracs: &SVector<f64, N>) -> f64
Return a density (in reduced units) that corresponds to a dense liquid phase.
fn residual_helmholtz_energy_density<D: DualNum<f64> + Copy>( (_, residual): &([I::Parameters<D>; N], R::Parameters<D>), temperature: D, partial_density: &SVector<D, N>, ) -> D
fn residual_molar_helmholtz_energy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn residual_chemical_potential<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> SVector<D, N>
fn pressure<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn residual_molar_entropy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn residual_molar_enthalpy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn dp_drho<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> (D, D, D)
Source§impl<I: IdealGasAD, R: ResidualHelmholtzEnergy<N>, const N: usize> TotalHelmholtzEnergy<N> for EquationOfStateAD<I, R, N>
impl<I: IdealGasAD, R: ResidualHelmholtzEnergy<N>, const N: usize> TotalHelmholtzEnergy<N> for EquationOfStateAD<I, R, N>
const IDEAL_GAS: &str = I::IDEAL_GAS
fn ln_lambda3<D: DualNum<f64> + Copy>( (ideal_gas, _): &([I::Parameters<D>; N], R::Parameters<D>), temperature: D, ) -> SVector<D, N>
fn helmholtz_energy_density<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, partial_density: &SVector<D, N>, ) -> D
fn molar_helmholtz_energy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn chemical_potential<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> SVector<D, N>
fn molar_entropy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn molar_enthalpy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn molar_isochoric_heat_capacity<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn molar_isobaric_heat_capacity<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> D
fn pressure_entropy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> SVector<D, 2>
fn pressure_enthalpy<D: DualNum<f64> + Copy>( parameters: &Self::Parameters<D>, temperature: D, molar_volume: D, molefracs: &SVector<D, N>, ) -> SVector<D, 2>
Auto Trait Implementations§
impl<I, R, const N: usize> Freeze for EquationOfStateAD<I, R, N>
impl<I, R, const N: usize> RefUnwindSafe for EquationOfStateAD<I, R, N>where
R: RefUnwindSafe,
I: RefUnwindSafe,
impl<I, R, const N: usize> Send for EquationOfStateAD<I, R, N>
impl<I, R, const N: usize> Sync for EquationOfStateAD<I, R, N>
impl<I, R, const N: usize> Unpin for EquationOfStateAD<I, R, N>
impl<I, R, const N: usize> UnwindSafe for EquationOfStateAD<I, R, N>where
R: UnwindSafe,
I: UnwindSafe,
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
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.