Simulating temporal evolution of pressure in two-phase flow in porous media