Mechanisms of coupling of deformation, contamination, dissolution and precipitation in porous media