Skip to main content

Total

Trait Total 

Source
pub trait Total<N: Dim = Dyn, D: DualNum<f64> + Copy = f64>: Residual<N, D>{
    type RealTotal: Total<N, f64>;
    type LiftedTotal<D2: DualNum<f64, Inner = D> + Copy>: Total<N, D2>;

    // Required methods
    fn re_total(&self) -> Self::RealTotal;
    fn lift_total<D2: DualNum<f64, Inner = D> + Copy>(
        &self,
    ) -> Self::LiftedTotal<D2>;
    fn ideal_gas_model(&self) -> &'static str;
    fn ln_lambda3(&self, temperature: D) -> OVector<D, N>;

    // Provided methods
    fn ideal_gas_molar_helmholtz_energy(
        &self,
        temperature: D,
        molar_volume: D,
        molefracs: &OVector<D, N>,
    ) -> D { ... }
    fn ideal_gas_helmholtz_energy(
        &self,
        temperature: Temperature<D>,
        volume: MolarVolume<D>,
        moles: &OVector<D, N>,
    ) -> MolarEnergy<D> { ... }
}
Expand description

A total Helmholtz energy model consisting of a Residual model and an IdealGas part.

Required Associated Types§

Source

type RealTotal: Total<N, f64>

Source

type LiftedTotal<D2: DualNum<f64, Inner = D> + Copy>: Total<N, D2>

Required Methods§

Source

fn re_total(&self) -> Self::RealTotal

Source

fn lift_total<D2: DualNum<f64, Inner = D> + Copy>( &self, ) -> Self::LiftedTotal<D2>

Source

fn ideal_gas_model(&self) -> &'static str

Source

fn ln_lambda3(&self, temperature: D) -> OVector<D, N>

Provided Methods§

Source

fn ideal_gas_molar_helmholtz_energy( &self, temperature: D, molar_volume: D, molefracs: &OVector<D, N>, ) -> D

Source

fn ideal_gas_helmholtz_energy( &self, temperature: Temperature<D>, volume: MolarVolume<D>, moles: &OVector<D, N>, ) -> MolarEnergy<D>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<I: IdealGas + 'static, C: Deref<Target = EquationOfState<Vec<I>, R>> + Clone, R: ResidualDyn + 'static, D: DualNum<f64> + Copy> Total<Dyn, D> for C

Source§

type RealTotal = C

Source§

type LiftedTotal<D2: DualNum<f64, Inner = D> + Copy> = C

Source§

impl<I: IdealGasAD<D>, R: Residual<Const<N>, D>, D: DualNum<f64> + Copy, const N: usize> Total<Const<N>, D> for EquationOfState<[I; N], R>

Source§

type RealTotal = EquationOfState<[<I as IdealGasAD<D>>::Real; N], <R as Residual<Const<N>, D>>::Real>

Source§

type LiftedTotal<D2: DualNum<f64, Inner = D> + Copy> = EquationOfState<[<I as IdealGasAD<D>>::Lifted<D2>; N], <R as Residual<Const<N>, D>>::Lifted<D2>>