A Thermodynamic Analysis of Three Phase Equilibria in Binary and Ternary Systems for Applications in RESS, SAS, PGSS.