Three-phase equilibrium and partitioning calculations for CO2 sequestration in saline aquifers