A numerical and analytical study on calcite dissolution and gypsum precipitation