Solution flow in a porous medium with impurity adsorption