Computational methods for multiphase flows in porous media