Equilibrium constants
MultiComponentFlash.initial_guess_K
MultiComponentFlash.initial_guess_K!
MultiComponentFlash.solve_rachford_rice
MultiComponentFlash.wilson_estimate
MultiComponentFlash.wilson_estimate
MultiComponentFlash.wilson_estimate!
MultiComponentFlash.solve_rachford_rice
— Functionsolve_rachford_rice(K, z, [V]; <keyword arguments>)
Compute vapor mole fraction V
for given equilibrium constants K
and mole fractions z
.
Arguments
K
- Equal length to z
, containing the equilibrium constants for each component. z
- Mole fractions. Should sum up to unity.
Keyword arguments
tol = 1e-12
: Tolerance for solve.maxiter=1000
: Maximum number of iterationsad=false
: Use automatic differentiation (ForwardDiff) instead of analytical gradient.analytical=true
: Use analytical solutions for 2 and 3 components.
Examples
julia> solve_rachford_rice([0.5, 1.5], [0.3, 0.7])
0.8000000000000002
MultiComponentFlash.initial_guess_K!
— Methodinitial_guess_K(eos, cond)
In-place version of initial_guess_K
.
MultiComponentFlash.initial_guess_K
— Methodinitial_guess_K(eos, cond)
Produce a plausible initial guess for K values for eos
under current cond
.
MultiComponentFlash.wilson_estimate!
— Methodwilson_estimate!(K, properties, p, T)
Update a vector K in-place with K-values from wilson_estimate
.
MultiComponentFlash.wilson_estimate
— Methodwilson_estimate(properties, p, T)
Create vector of K-values that holds the wilson_estimate
for each species.
MultiComponentFlash.wilson_estimate
— Methodwilson_estimate(p, T, ω, p_c, T_c)
Estimate K-values for a given acentric factor ω and pressure and temperature at current and critical conditions.
Reference Vapor-Liquid Equilibrium. XI. A New Expression for the Excess Free Energy of Mixing by GM Wilson