Porous media filtration with hysteresis