Two-phase flash at specified temperature and pressure by direct
minimization of the reduced Gibbs energy, following the formulation of
Michelsen (1982).
The minimization variables are the scaled heavy-phase mole numbers
, so the light phase is
and the admissible region is . The Gibbs energy is
minimized with a Newton step based on a modified Cholesky decomposition
(Murray), combined with a line search that first computes the largest
step compatible with the bounds and then backtracks on the Gibbs energy.
For ArModel the heavy phase is always evaluated with the liquid root.
The light phase uses the stable root by default, but it can be forced to
the liquid root with light_root="liquid" (useful for liquid-liquid
splits). For GeModel, both phases are described by activity
coefficients and the initial split is obtained from stability analysis.
Examples
result=flash_second_order(model,z,T,P)
References
M. L. Michelsen, “The isothermal flash problem. Part II. Phase-split
calculation”, Fluid Phase Equilibria 9 (1982) 21-40.
W. Murray (ed.), Numerical Methods for Unconstrained Optimization,
Academic Press (1972).
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
Functions
public function flash_second_order(model, z, T, P_spec, k0, light_root, iters, tol, max_iters) result(flash)
Find a two-phase split at fixed temperature and pressure by minimizing
the reduced Gibbs energy with a second-order method.