The computation of multi-phase equilibrium in compositional reservoir studies