Multiple Phase Behavior in Porous Media During CO2 or Rich-Gas Flooding