A master equation for reactive solute transport in porous media