Non-equilibrium two-phase flow in porous media