Struct feos_core::PhaseEquilibrium
source · [−]pub struct PhaseEquilibrium<U, E, const N: usize>(_);
Expand description
A thermodynamic equilibrium state.
The struct is parametrized over the number of phases with most features being implemented for the two phase vapor/liquid or liquid/liquid case.
Contents
Implementations
pub fn bubble_point_tx(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
pressure: Option<QuantityScalar<U>>,
liquid_molefracs: &Array1<f64>,
vapor_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
pub fn bubble_point_tx(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
pressure: Option<QuantityScalar<U>>,
liquid_molefracs: &Array1<f64>,
vapor_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
Calculate a phase equilibrium for a given temperature and composition of the liquid phase.
pub fn bubble_point_px(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
temperature: Option<QuantityScalar<U>>,
liquid_molefracs: &Array1<f64>,
vapor_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
pub fn bubble_point_px(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
temperature: Option<QuantityScalar<U>>,
liquid_molefracs: &Array1<f64>,
vapor_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
Calculate a phase equilibrium for a given pressure and composition of the liquid phase.
pub fn dew_point_tx(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
pressure: Option<QuantityScalar<U>>,
vapor_molefracs: &Array1<f64>,
liquid_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
pub fn dew_point_tx(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
pressure: Option<QuantityScalar<U>>,
vapor_molefracs: &Array1<f64>,
liquid_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
Calculate a phase equilibrium for a given temperature and composition of the vapor phase.
pub fn dew_point_px(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
temperature: Option<QuantityScalar<U>>,
vapor_molefracs: &Array1<f64>,
liquid_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
pub fn dew_point_px(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
temperature: Option<QuantityScalar<U>>,
vapor_molefracs: &Array1<f64>,
liquid_molefracs: Option<&Array1<f64>>,
options: (VLEOptions, VLEOptions)
) -> EosResult<Self> where
QuantityScalar<U>: Display,
Calculate a phase equilibrium for a given pressure and composition of the vapor phase.
impl<U: EosUnit, E: EquationOfState> PhaseEquilibrium<U, E, 3> where
QuantityScalar<U>: Display + LowerExp,
impl<U: EosUnit, E: EquationOfState> PhaseEquilibrium<U, E, 3> where
QuantityScalar<U>: Display + LowerExp,
pub fn heteroazeotrope_t(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
x_init: (f64, f64),
options: VLEOptions,
bubble_dew_options: (VLEOptions, VLEOptions)
) -> EosResult<Self>
pub fn heteroazeotrope_t(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
x_init: (f64, f64),
options: VLEOptions,
bubble_dew_options: (VLEOptions, VLEOptions)
) -> EosResult<Self>
Calculate a heteroazeotrope (three phase equilbrium) for a binary system and given temperature.
pub fn heteroazeotrope_p(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
x_init: (f64, f64),
options: VLEOptions,
bubble_dew_options: (VLEOptions, VLEOptions)
) -> EosResult<Self>
pub fn heteroazeotrope_p(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
x_init: (f64, f64),
options: VLEOptions,
bubble_dew_options: (VLEOptions, VLEOptions)
) -> EosResult<Self>
Calculate a heteroazeotrope (three phase equilbrium) for a binary system and given pressure.
pub fn tp_flash(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
pressure: QuantityScalar<U>,
feed: &QuantityArray1<U>,
init_vle_state: Option<&PhaseEquilibrium<U, E, 2>>,
options: VLEOptions,
non_volatile_components: Option<Vec<usize>>
) -> EosResult<Self>
pub fn tp_flash(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
pressure: QuantityScalar<U>,
feed: &QuantityArray1<U>,
init_vle_state: Option<&PhaseEquilibrium<U, E, 2>>,
options: VLEOptions,
non_volatile_components: Option<Vec<usize>>
) -> EosResult<Self>
Perform a Tp-flash calculation. If no initial values are given, the solution is initialized using a stability analysis.
The algorithm can be use to calculate phase equilibria of systems containing non-volatile components (e.g. ions).
pub fn pure_t(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
initial_state: Option<&PhaseEquilibrium<U, E, 2>>,
options: VLEOptions
) -> EosResult<Self> where
QuantityScalar<U>: Display + LowerExp,
pub fn pure_t(
eos: &Rc<E>,
temperature: QuantityScalar<U>,
initial_state: Option<&PhaseEquilibrium<U, E, 2>>,
options: VLEOptions
) -> EosResult<Self> where
QuantityScalar<U>: Display + LowerExp,
Calculate a phase equilibrium for a pure component and given temperature.
pub fn pure_p(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
initial_state: Option<&Self>,
options: VLEOptions
) -> EosResult<Self> where
QuantityScalar<U>: Display + LowerExp,
pub fn pure_p(
eos: &Rc<E>,
pressure: QuantityScalar<U>,
initial_state: Option<&Self>,
options: VLEOptions
) -> EosResult<Self> where
QuantityScalar<U>: Display + LowerExp,
Calculate a phase equilibrium for a pure component and given pressure.
pub fn vapor_pressure(
eos: &Rc<E>,
temperature: QuantityScalar<U>
) -> Vec<Option<QuantityScalar<U>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
pub fn vapor_pressure(
eos: &Rc<E>,
temperature: QuantityScalar<U>
) -> Vec<Option<QuantityScalar<U>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
Calculate the pure component vapor pressures of all components in the system for the given temperature.
pub fn boiling_temperature(
eos: &Rc<E>,
pressure: QuantityScalar<U>
) -> Vec<Option<QuantityScalar<U>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
pub fn boiling_temperature(
eos: &Rc<E>,
pressure: QuantityScalar<U>
) -> Vec<Option<QuantityScalar<U>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
Calculate the pure component boiling temperatures of all components in the system for the given pressure.
pub fn vle_pure_comps_t(
eos: &Rc<E>,
temperature: QuantityScalar<U>
) -> Vec<Option<PhaseEquilibrium<U, E, 2>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
pub fn vle_pure_comps_t(
eos: &Rc<E>,
temperature: QuantityScalar<U>
) -> Vec<Option<PhaseEquilibrium<U, E, 2>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
Calculate the pure component phase equilibria of all components in the system for the given temperature.
pub fn vle_pure_comps_p(
eos: &Rc<E>,
pressure: QuantityScalar<U>
) -> Vec<Option<PhaseEquilibrium<U, E, 2>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
pub fn vle_pure_comps_p(
eos: &Rc<E>,
pressure: QuantityScalar<U>
) -> Vec<Option<PhaseEquilibrium<U, E, 2>>>ⓘ where
QuantityScalar<U>: Display + LowerExp,
Calculate the pure component phase equilibria of all components in the system for the given pressure.
impl<U, E, const N: usize> PhaseEquilibrium<U, E, N> where
QuantityScalar<U>: Display,
QuantityArray1<U>: Display,
E: EquationOfState,
impl<U, E, const N: usize> PhaseEquilibrium<U, E, N> where
QuantityScalar<U>: Display,
QuantityArray1<U>: Display,
E: EquationOfState,
pub fn update_chemical_potential(
&mut self,
chemical_potential: &QuantityArray1<U>
) -> EosResult<()>
Check if the two states form a trivial solution
Trait Implementations
impl<U, E, const N: usize> Display for PhaseEquilibrium<U, E, N> where
QuantityScalar<U>: Display,
QuantityArray1<U>: Display,
E: EquationOfState,
impl<U, E, const N: usize> Display for PhaseEquilibrium<U, E, N> where
QuantityScalar<U>: Display,
QuantityArray1<U>: Display,
E: EquationOfState,
Auto Trait Implementations
impl<U, E, const N: usize> !RefUnwindSafe for PhaseEquilibrium<U, E, N>
impl<U, E, const N: usize> !Send for PhaseEquilibrium<U, E, N>
impl<U, E, const N: usize> !Sync for PhaseEquilibrium<U, E, N>
impl<U, E, const N: usize> Unpin for PhaseEquilibrium<U, E, N> where
U: Unpin,
impl<U, E, const N: usize> UnwindSafe for PhaseEquilibrium<U, E, N> where
E: RefUnwindSafe,
U: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more