Calcium Carbonate Solubility Curve Obtained by Arc-Length Continuation​
Authors: Housam Binous

​The dissolution of calcium carbonate in water is strongly influenced by the pH of the solution because carbonate species undergo successive acid-base equilibria. In aqueous media, dissolved inorganic carbon exists mainly as carbonic acid (H2CO3), bicarbonate (HCO
-
3
), and carbonate (CO
2-
3
). The dominant species changes with pH according to the dissociation constants pKa1=6.4 and pKa2=10.3. At low pH, carbonate ions are consumed by protonation, which shifts the dissolution equilibrium of calcium carbonate toward greater solubility. As the pH increases, the concentration of carbonate ions rises and the solubility decreases. Our calculation reproduces the figure below reported in Ref. 1:​​
​​The equilibrium dissolution reaction of calcite is​CaCO3(s) ⇌ C
2+
a
+ CO
2-
3
​​and is governed by the solubility product​Ksp = [C
2+
a
][CO
2-
3
] =
-8.48
10
​​Because only a fraction of the dissolved carbonate exists as CO
2-
3
​, the carbonate speciation coefficient must be included in the model. The resulting nonlinear equilibrium equation was solved numerically using an arc-length continuation method. Unlike ordinary parameter continuation, arc-length continuation follows the solution curve geometrically using a predictor-corrector procedure. This approach remains stable even in regions where the slope of the curve changes rapidly.​​
​​The computed diagram shows that the solubility of calcium carbonate decreases continuously as the pH increases. At acidic pH, calcite is highly soluble because carbonate ions are converted into bicarbonate and carbonic acid. Near neutral and alkaline conditions, the carbonate fraction increases, reducing dissolution and stabilizing the solid phase. At high pH, the curve approaches a plateau corresponding to the intrinsic solubility controlled mainly by the solubility product. This behavior is important in natural waters, geological formations, water treatment processes, and scale formation in industrial equipment.​​References: ​[1] https://ressources.univ-lemans.fr/AccesLibre/UM/Pedago/chimie/06/deug/CHIM105B/pdf/sem2prec_3.pdf
In[]:=
(*Calcitesolubilityproduct*)​​Ksp=10^-8.48;​​​​(*Carbonicaciddissociationconstants*)​​Ka1=10^-6.4;​​Ka2=10^-10.3;​​​​Kw=10^-14;(*waterdissociationconstant*)
In[]:=
​​(*Unknowns:S=molarsolubilityofCaCO3andpH​​​​Fordissolution:CaCO3(s)<->Ca2++CO3^2-Iftotaldissolvedcarbonate=S​​​​Carbonatedistribution:​​alpha0=H2CO3fraction​​alpha1=HCO3-fraction​​alpha2=CO3^2-fraction​​​​OnlyCO3^2-entersKsp:​​[Ca2+][CO3^2-]=Kspwith:[Ca2+]=Sand[CO3^2-]=alpha2*S​​​​therefore:alpha2*S^2=Ksp*)​​​​alpha2[h_]:=Ka1*Ka2/(h^2+Ka1*h+Ka1*Ka2);​​​​system[{logS_,pH_}]:=Module[{S,h},S=10^logS;​​h=10^-pH;​​{alpha2[h]S^2-Ksp}];​​​​
(*arc-lengthcontinuation*)​​​​arcLengthBranch[ds_:0.12,nSteps_:250]:=Module[{curve={},logS0,pH0,vars,J,tangent,predictor,eqs,sol,logSPred,pHPred,logSNew,pHNew,i},(*initialpoint*)​​pH0=4.0;​​logS0=Log10[S/.FindRoot[alpha2[10^-pH0]S^2-Ksp==0,{S,10^-1}]];​​AppendTo[curve,{pH0,logS0}];​​​​(*Continuationloop*)​​Do[vars={logS,pH};​​​​(*Jacobian*)J=D[system[{logS,pH}][[1]],{vars}]/.{logS->logS0,pH->pH0};​​​​(*TangentorthogonaltoJacobian*)tangent={-J[[2]],J[[1]]};​​tangent=tangent/Norm[tangent];(*hereoneneedstoforcemotiontowardincreasingpH*)​​​​(*Predictor*)​​predictor={logS0,pH0}+ds*tangent;​​logSPred=predictor[[1]];​​pHPred=predictor[[2]];​​​​(*Corrector*)​​eqs={system[{logS,pH}][[1]]==0,tangent[[1]](logS-logSPred)+tangent[[2]](pH-pHPred)==0};​​sol=Quiet@FindRoot[eqs,{{logS,logSPred},{pH,pHPred}},MaxIterations->100];​​logSNew=logS/.sol;​​pHNew=pH/.sol;​​​​If[NumericQ[logSNew]&&NumericQ[pHNew]&&3<=pHNew<=14,​​AppendTo[curve,{pHNew,logSNew}];​​logS0=logSNew;​​pH0=pHNew;];​​​​,{i,1,nSteps}];curve];​​​​​​(*computebranch*)​​curve=arcLengthBranch[];​​​​
In[]:=
(*plotofsolubilityversuspH*)​​solubilityPlot=ListLinePlot[curve,PlotStyle->{Darker@Red,Dashed,Thick},Frame->True,FrameLabel->{Style["pH",14],Style["log S",14]},PlotRange->{{4,14},{-5,0.0}},ImageSize->400,GridLines->Automatic,AspectRatio->1]