Interestingly enough, one of the most difficult aspects of making VLE calculations may not be the twophase splitting calculation itself, but knowing whether or not a mixture will actually split into two (or even more) phases for a pressure and temperature condition.
A singlephase detection routine has to be simultaneously introduced at this stage to detect whether the system is in a true singlephase condition at the given pressure and temperature or whether it will actually split into twophases. Several approaches may be used here: the BringBack technique outlined by Risnes et al. (1981), and Phase Stability Criteria introduced by Michelsen (1982), among others. Here we describe Michelsen’s stability test.
Michelsen (1982) suggested creating a secondphase inside any given mixture to verify whether such a system is stable or not. It is the same idea behind the BringBack procedure (Risnes et al., 1981), but this test additionally provides straightforward interpretation for the cases where trivial solutions are found
(K_{i}’s —> 1). The test must be performed in two parts, considering two possibilities: the second phase can be either vaporlike or liquidlike. The outline of the method is described below, following the approach presented by Whitson and Brule (2000).
 Calculate the mixture fugacity (f_{zi}) using overall composition z_{i}.
 Create a vaporlike second phase,
 Use Wilson’s correlation to obtain initial K_{i}values.
 Calculate secondphase mole numbers, Y_{i}:
$${Y}_{i}={z}_{i}{K}_{i}$$
 Obtain the sum of the mole numbers,
$${S}_{v}={\displaystyle \sum _{i}^{n}{Y}_{i}}$$
 Normalize the secondphase mole numbers to get mole fractions:
$${y}_{i}=\frac{{Y}_{i}}{{S}_{v}}$$
 Calculate the secondphase fugacity (f_{yi}) using the corresponding EOS and the previous composition.
 Calculate corrections for the Kvalues:
$${R}_{i}=\frac{{f}_{xi}}{{f}_{yi}}\frac{1}{{S}_{v}}$$$${K}_{i}^{(n+1)}={K}_{i}^{(n)}{R}_{i}$$  Check if:
 Convergence is achieved:
$$\sum _{i}^{n}{({R}_{i}1)}^{2}<1\cdot {10}^{10}$$
 A trivial solution is approached:
$$\sum _{i}^{n}{(\mathrm{ln}\text{}{K}_{i})}^{2}1\cdot {10}^{4}$$
If a trivial solution is approached, stop the procedure.
If convergence has not been attained, use the new Kvalues and go back to step (b).
 Convergence is achieved:

Create a liquidlike second phase,
Follow the previous steps by replacing equations (17.15), (17.16), (17.17), and (17.18) by (17.22), (17.23), (17.24), and (17.25) respectively.
$${Y}_{i}={z}_{i}/{K}_{i}$$$${S}_{L}={\displaystyle \sum _{i}^{n}{Y}_{i}}$$$${x}_{i}=\frac{{Y}_{i}}{{S}_{L}}$$$${R}_{i}=\frac{{f}_{xi}}{{f}_{zi}}{S}_{L}$$
The interpretation of the results of this method follows:
 The mixture is stable (singlephase condition prevails) if:
 Both tests yield S < 1 (S_{L} < 1 and S_{V} < 1),
 Or both tests converge to trivial solution,
 Or one test converges to trivial solution and the other gives S < 1.
 Only one test indicating S > 1 is sufficient to determine that the mixture is unstable and that the twophase condition prevails. The same conclusion is made if both tests give S > 1, or if one of the tests converges to the trivial solution and the other gives S > 1.