Thermodynamics and kinetics for mixed calcium carbonate and calcium sulfate precipitation