Numerical approximation of multiphase flows in porous media