Fluid Displacement and Solid Formation in a Porous Medium Using Invasion Percolation in a Gradient with Pore Blocking