Multiphase transport in porous media