Stability of an acid front moving through porous rock