The paper proposes a mathematical model of multiphase flows in porous media. It is assumed that the phase velocities are described by Navier-Stokes type equations that include additional terms responsible for phase transitions and mechanical interactions between phases. An algorithm for the numerical treatment of the model is proposed. Numerical simulations demonstrate the feasibility of such an approach. The investigation is oriented to the simulation of CO2 sequestration.