Thermodynamic Simulation of Carbonate Cements-Water-Carbon Dioxide Equilibrium in Sandstone for Prediction of Precipitation/Dissolution of Carbonate Cements

Carbonate cements, such as calcite, dolomite, ferrocalcite and ankerite, play important roles in the formation of pores in sandstones: precipitation of carbonate cements modifies pores and inhibits compaction, while dissolution creates secondary pores. This work proposed a precipitation-dissolution model for carbonate cements-CO2-H2O system by means of ion equilibrium concentration ([M2+], M = Ca, Mg, Fe or Mn) with different factors, such as temperature, depth, pH, PCO2, variable rock composition and overpressure. Precipitation-dissolution reaction routes were also analyzed by minimization of the total Gibbs free energy (ΔG). Δ[M2+], the variation of [Ca2+], [Fe2+], [Mg2+] or [Mn2+] for every 100 m of burial depths, is used to predict precipitation or dissolution. The calculation results indicate that the increasing temperature results in decrease of equilibrium constant of reactions, while the increasing pressure results in a relatively smaller increase of equilibrium constant; As a result, with increasing burial depth, which brings about increase of both temperature and pressure, carbonate cements dissolve firstly and produces the maximal dissolved amounts, and then precipitation happens with further increasing depth; For example, calcite is dissolving from 0.0 km to 3.0 km with a maximal value of [Ca2+] at depth of 0.8 km, and then precipitates with depth deeper than 3.0 km. Meanwhile, with an increasing CO2 mole fraction in the gaseous phase from 0.1% to 10.0% in carbonate systems, the aqueous concentration of metal ions increases, e.g., dissolved amount of CaFe0.7Mg0.3(CO3)2 increases and reaches maximum of 1.78 mmol·L-1 and 8.26 mmol·L-1 at burial depth of 0.7 km with CO2 mole fraction of 0.1% and 10.0%, respectively. For the influence of overpressure in the calcite system, with overpressure ranging from 36 MPa to 83 MPa, pH reaches a minimum of 6.8 at overpressure of 51 MPa; meanwhile, Δ[Ca2+] increases slightly from -2.24 mmol·L-1 to -2.17 mmol·L-1 and remains negative, indicating it is also a precipitation process at burial depth of 3.9 km where overpressure generated. The method used in this study can be applied in assessing burial precipitation-dissolution processes and predicting possible pores in reservoirs with carbonate cement-water-carbon dioxide.


Introduction
For petroleum reservoirs, about one-third are consisted of carbonate rocks, which include calcite and binary or ternary carbonates with Mg, Fe or Mn, e.g., dolomite (CaMg(CO 3 ) 2 ), ferrocalcite (Ca 0.9 Fe 0.1 CO 3 ) and ankerite (CaFe 0.5 Mn 0.5 (CO 3 ) 2 ) [1,2]. Within these carbonate reservoirs, secondary pores are considered as the main storage space, and was formed via water-rock interaction at different burial depths during diagenesis [3][4][5]. Besides, for diagenesis of source rocks, organic acid and CO 2 can be released into sandstone pores and may lead to the dissolution of carbonate and formation of secondary pores [6]. And in recent years, to cut CO 2 emission into the atmosphere from fossil-fuel power stations, geological sequestration or underground storage of CO 2 in depleted oil and gas reservoirs has been investigated [7][8][9][10]; as a result, the initial physic-chemical equilibrium between the fluid and carbonate cements can be disturbed and dissolution or precipitation of carbonate cements may occur accordingly [11]. Prediction of precipitation-dissolution of carbonates can be also applied in microbially induced calcium-carbonate precipitation(MICP), in which nucleation sites and enzyme of urease and carbonic anhydrate play important roles for this biochemical process, while factors of the calcium concentration (Ca 2+ ), the concentration of dissolved inorganic carbon and the pH are critical for formation of carbonates [12][13][14].
To predict precipitation/dissolution of carbonate cements at different burial depth with CO 2 , systems of calcite or dolomite-water-carbon dioxide under acidic condition were typically analyzed via ion equilibrium as well as minimization of Gibbs free energy (ΔG) and equilibrium constant [15,16]. For example, for the carbonate cements, Δ[Ca 2+ ], the variation of [Ca 2+ ] for every 100 m of burial depths, was analyzed in calcite and dolomite system [3,16]: if Δ[Ca 2+ ] is positive, dissolution of carbonate happens; otherwise, precipitation takes place.
During diagenesis of carbonate cements, the main factors concerned include temperature, pressure, pH, P CO 2 , variable rock composition, hydrologic regime, fluid composition, organic acid anion, etc. [17,18]. Among these factors, temperatures play an important role: For the rock-H 2 O-CO 2 system at different temperatures of 55˚C, 70˚C and 100˚C, the corrosion of feldspars, silica and clay minerals intensifies with increasing temperature [19]. For CO 2 in these systems, aqueous concentration of metal ions increased with increasing P CO 2 in carbonate cements [20,21].
Within carbonates, there are binary or ternary minerals of carbonate cements with Mg, Fe or Mn, which are common in reservoir of sandstones [1]; these carbonates are important in formation of secondary pores via precipitation/dissolution within systems of carbonates-H 2 O-CO 2 in reservoirs. However, study on thermodynamic equilibrium model and ionic concentrations in these binary or ternary minerals has been few reported. Meanwhile, effect of variable rock composition in ankerite, e.g., CaFe x Mg 1-x (CO 3 ) 2 (0 x 1) during diagenesis is also a concern in thermodynamic calculation because of unavailability of thermodynamic data.
Overpressure, another factor that influences thermodynamic equilibrium as well as dissolution/precipitation, can be found at reservoirs where fluid pressure exceeds the hydrostatic pressure [22]. The reason of overpressure can be attributed to disequilibrium compaction, diagenesis and hydrocarbon generation, which involves in total organic carbon and hydrogen index [22]. Overpressure generated in source rock can be estimated via parameters of hydrogen index and total organic carbon [23], and can also be used to analyze dissolution/precipitation of carbonate cements in source rocks.
In this work, the authors 1) calculated ΔG and equilibrium constant of reactions in carbonate cements-water-carbon dioxide systems via chemical thermodynamic principles, 2) used Δ[M 2+ ] (M = Ca 2+ , Fe 2+ , Mg 2+ , or Mn 2+ ) to predict precipitation/dissolution in systems of carbonate cements-water-carbon dioxide, and 3) discussed the parameters, e.g., temperature, pressure, depth, pH, P CO 2 and overpressure, that influence the chemical equilibrium and precipitation/dissolution. This model can be applied in carbonate cements with binary or ternary minerals in ferrocalcite and ankerite (CaFe x Mg 1-x (CO 3 ) 2 , 0 x 1) systems for prediction of precipitation/dissolution in sandstone reservoirs.

Method
The thermodynamic equilibrium model Temperature and pressure are important parameters in diagenesis at different burial depth; a temperature gradient of 0.03 K/m and a pressure gradient of 1.0 MPa/100m with a surface pressure of 10 5 Pa are given in this work.
The main reactions and equilibrium constant expressions in water-carbon dioxide system and carbonate cement dissociations are listed in Table 1.
In the current work, the concentrations of carbonate were used because in dilute solutions, concentrations of carbonates are approximately equal to the activities, and the calculation process can be simplified [16].
Based on ΔG, the equilibrium constant of reactions (K) can be calculated via Eq 7: in which ΔG 0 is the standard Gibbs free energy of the reaction at 298.15K and 10 5 Pa, T is the absolute temperature in Kelvin, and R is the gas constant (8.314 JÁK −1 Ámol −1 ).
In the system of calcite-water-carbon dioxide, the charge balance equations or electroneutrality are calculated by the positive and negative ions as followed [28]: For the systems of the dolomite or ankerite, Eq 8 can be revised as Eq 9.
According to the equilibrium expressions of H 2 O-CO 2 (Table 1), electroneutrality equation (Eq 9) with different carbon dioxide pressure (P CO 2 ) and the equilibrium constants (K or K ' ) of carbonate, the quartic equation related to [H + ] can be obtained via Eqs 10 and 11, as followed:

Thermodynamic data of ferrocalcite and ankerite
The standard Gibbs free energy of formation (Δ f G 0 ) of minerals can be found from databases or literatures [29][30][31], while neither equilibrium constant nor Δ f G 0 for ferrocalcite (Ca 0.9 Fe 0.1 CO 3 ) and ankerite (CaFe 0.5 Mg 0.5 (CO 3 ) 2 ) can be found to calculate the equilibrium concentration. However, a linear correlation exists between Gibbs free energies of formation of calcite-like carbonate and the corresponding aqueous divalent cations, and can be used to estimate the basic thermodynamic value of ferrocalcite (Ca 0.9 Fe 0.1 CO 3 ) [32]. Meanwhile, the equation of ankerite dissociation (Eq 12) can be deduced by combining calcite dissociation and Eq 13, and the corresponding equilibrium constant of ankerite dissociation (CaFe 0.5 Mg 0.5 (CO 3 ) 2 ), K 8 , is shown in Eq 14, while K Ã is the equilibrium constant of Eq 13: The thermodynamic data used in this work are shown in Table 3.
Because of the instability in solution, carbonic acid can be treated as CO 2 (g) dissolved in water as CO 2 (aq) [35,36]. When T T c 0.98, Bhirud Equation in Eq 16 can be applied to calculate its molar volume; when T T c >0.98, molar volume is considered as a constant because the influence of temperature and pressure on molar volume is slight in the liquid phase [37].
Where: u 0 and u 1 are dimensionless and are a function of T r ¼ T T c .
To verify the estimated thermodynamic data obtained by the current thermodynamic calculation method (TCM), the Helgeson-Kirkham-Flowers (HKF) equation was used for comparison [38]. The equilibrium constants of bicarbonate (K 3 ) and water dissociation (K 4 ) were selected and calculated by methods of TCM and HKF, respectively, and the results and relative differences are listed in Table 4; the results indicate that TCM is an effective Table 3. The thermodynamic data of carbonate minerals. Data from [33] and [34] are marked as− a and− b . The effect of variable composition in ankerite system and overpressure in carbonate systems The thermodynamic method was used to analyze the influence of variable rock composition in the ankerite system (CaFe Overpressure is defined as fluid pressure exceeding the hydrostatic pressure, and is always found in the burial depth from 3.2 km and 3.9 km; for example, overpressure was reported with variation up to 83 MPa at 3.9 km in smulation experiments [23]. Based on the values of overpressure from 36 MPa to 83 MPa, a CaFe(CO 3 ) 2 system with 800 mg/g of hydrogen index at a burial depth of 3.9 km was selected, and data of Δ r G and equilibrium constant were calculated, as listed in Table 5.
The overall methodology is shown in Fig 1: the minimization of ΔG and equilibrium constant of reactions were calculated in carbonate cements-water-carbon dioxide systems via ]. The influence of 1) temperature, 2) pressure and 3) burial depth on equilibrium constant of calcite-H 2 O-CO 2 was firstly analyzed. As shown in Table 6, when the temperature increases from 301.15 K to 478.15 K, lgK decreases from -8.53 to -9.69; meanwhile, when the pressure increases from 15 to 70 MPa at 301.15 K, lgK increase slightly from -8.53 to -7.82. The result indicates that temperature has a higher impact on lgK on an opposite direction, as compared with pressure. As a result, when the burial depth increases from 1.5 km to 6.0 km, the temperature increases from 343.15 K to 478.15K and pressure increases from 15 MPa to 60 MPa; meanwhile, lgK decreases from -8.69 to -9.39.
Based on the aforementioned method, the equilibrium constants of carbonates-H 2 O-CO 2 at different depths were then calculated, as shown in Fig 2. The results indicate that lgK are negative at different burial depth, while the ΔG are positive (ΔG = −RT ln K), indicating that those processes cannot take place automatically.
For the water-carbon dioxide system in Fig 2A, the equilibrium constant of carbon dioxide dissolving in water and forming carbonic acid, lgK 1 , ranges from -1.12 to -1.97 and reaches the minimum of -1.97 at depth of 4.0 km. LgK 2 (the equilibrium constant of carbonic acid dissociation) reaches the maximum of -6.23 at about 1.5 km, and then decreases continuously with further increasing depth. The equilibrium constant of secondary dissociation of carbonic acid, lgK 3 , ranges from -10.31 to -8.60 at the depth from 0.0 km to 7.0 km, which is about three orders of magnitude lower than K 2 . Furthermore, the equilibrium constant of water dissociation, lgK 4 , is increasing from -14.00 to -10.10 with increasing burial depth.
For the equilibrium constant of carbonate cement dissociation in Fig 2B, calcite (K 5 ) and magnesite (K 10 ) show a similar trend of decreasing with burial depth increased. Meanwhile, the equilibrium constant of ferrocalcite dissociation (K 7 ) locates between those of calcite (K 5 ) and siderite (K 11 ); in the mean time, the equilibrium constants of dolomite (K 6 ), CaFe 0.5 Mg 0.5 (CO 3 ) 2 (K 8 ), CaFe(CO 3 ) 2 (K 9 ) and CaFe 0.5 Mn 0.5 (CO 3 ) 2 (K 12 ) in Fig 2C are several orders of magnitude lower than those of other carbonate cements in Fig 2B. Through the  Fig 3A, with the CO 2 mole fraction at 0.1%, the systems of calcite, dolomite, magnesite and rhodochrosite are shown a trend of dissolving because Δ[M 2+ ] are positive at depth from 0.0 km to 3.2 km, 2.7 km, 1.8 km and 2.0 km, respectively, indicating the secondary pores may form during this dissolution process; and in this dissolution process, the systems of calcite, dolomite, magnesite and rhodochrosite produce maximal concentrations of 1.37, 0.52, 1.35 and 0.58 mmolÁL -1 at depth of 0.8 km, 0.7 km, 0.5 km and 0.5 km. As to systems of calcite and dolomite, the amount of dolomite dissolved was smaller than that of calcite at different depth, thus the dolomitization of limestone may decrease the porosity [39,40]. With further increasing depth deeper than 3.2 km, 2.7 km, 1.8 km and 2.0 km in cements of calcite, dolomite, magnesite and rhodochrosite, respectively, Δ[M 2+ ] turns to negative, suggesting that precipitation occurs in these systems.
On the other hand, carbon dioxide partial pressure has effect on these systems of carbonate cements-water-carbon dioxide, as shown in Fig 3: with increasing CO 2 mole fraction, the systems of calcite, dolomite, magnesite and rhodochrosite still show a similar trend of dissolving firstly and then precipitating with the increasing depth, while the maximal values are also obtained at the same depths. Nevertheless, the maxima of dissolving amount in systems of calcite, dolomite, magnesite and rhodochrosite were obtained near depth of 0.5-0.8 km, and increase by about four times with the partial pressure of carbon dioxide increasing from 0.1% to 10.0%, indicating that increasing partial pressure of CO 2 results in the instability or dissolution of these carbonate cements, thus promoting the formation of secondary pore [41].
The  firstly followed by precipitation. For example, in the CaFe 0.5 Mg 0.5 (CO 3 ) 2 system, dissociation happens within 0.0-3.0 km and precipitation occurs with depth deeper than 3.0 km, which is similar to the results reported by [1]: in Wilcox (Eocene) sandstones, ankerite (CaFe 0.5 Mg 0.5 (CO 3 ) 2 ) precipitates at depths deeper than 3.2 km. The slight difference in depth can be attributed to geological factors, such as the burial history, organic acid anions and chemical compaction. In Fig 3D-3F, with the carbon dioxide mole fraction increasing from 0.1% to 10.0%, the maximal amounts of dissolved cements increase and obtained near depth of 0.7-0.9 km. For example, the maximal dissolved siderite (FeCO 3 ) at depth of 0.7 km increases from 0.21 mmolÁL -1 to 0.86 mmolÁL -1 with CO 2 mole fraction increasing from 0.1% to 10.0%.
The relationship between carbonate species concentration and P CO 2 in ankerite (CaFe 0.5 Mg 0.5 (CO 3 ) 2 ) system at depth of 2.5 km For carbonate cements-H 2 O-CO 2 systems with different cements and CO 2 mole fraction, carbonate species, e.g., HCO 3 and CO 3

The pH at different depth in carbonate cements-H 2 O-CO 2 systems
The relationship between pH at different CO 2 mole faction and depth in carbonate cement systems was also analyzed and is shown in Fig 5. For the calcite system in Fig 5A, the pH decreases from 7.9 to 5.8 with increasing burial depth from 0.0 km to 7.0 km at CO 2 mole fraction 0.1%, and this variation can be attributed to the dissolution of primary minerals [42]. It is worth to note that as the depth increases from 0.0 km to 1.0 km, pH decreases sharply from 7.9 to 6.4. For the effect of CO 2 mole fraction, pH decreases from 6.0 to 5.3 and to 4.6 with CO 2 mole fraction increasing from 0.1% to 1.0% and to 10.0%, respectively, at depth of 4.0 km. Other carbonate cements in Fig 5B-5H show a similar trend of decreasing pH with increasing CO 2 mole fraction. Among these cements, the siderite-water-carbon dioxide system produces the lowest pH of 3.5 at depth of 4.0 km (CO 2 mole fraction 10.0%), which can be attributed to hydrolysis of ferrous ion [43].

The main dissolved species generated during the dissolution process in carbonate cements
To find the main species generated during the dissolution/precipitation process, the relationship between calcium and bicarbonate ion at different depth was analyzed. In Fig 6A of the calcite system, ½HCO À 3 is increasing from 1.21 mmolÁL -1 to a maximum of 4.32 mmolÁL -1 as depth ranging from 0.0 km to 0.8 km with CO 2 mole fraction of 0.1%; with depth deeper than 0.8 km, ½HCO À 3 is decreasing to 0.59 mmolÁL -1 at 7.0 km. Other carbonate cements also show a similar trend.
For the effect of CO 2 , with increasing CO 2 mole fraction from 0.1% to 10.0%, ½HCO À 3 increases remarkably at the same depth, as shown in Fig 6. For example, ½HCO À 3 in the calcite system increases from 4.32 mmolÁL -1 to 20.07 mmolÁL -1 with CO 2 mole fraction increasing from 0.1% to 10.0% at depth of 0.8 km.
The relationship between [Ca 2+ ] and ½HCO À 3 was studied as well, and a linear relationship was found, as shown in Fig 7: in the calcite system, ½HCO À 3 increases from 1.21 mmolÁL -1 to 4.32 mmolÁL -1 at 0.1% of CO 2 mole fraction when depth increasing from 0.0 km to 0.8 km, and [Ca 2+ ] increases linearly from 0.61 mmolÁL -1 to 2.16 mmolÁL -1 (Fig 7A). With increasing CO 2 mole fraction from 0.1% to 10.0%, there is still a linear relationship in other carbonate cements, as shown in  Ankerite consists of variable compositions, and the influence of variable composition on precipitation/dissolution was analyzed. As shown in Fig 8A, Δ[Ca 2+ ] indicates that ankerite (CaFe x Mg 1-x (CO 3 ) 2 , 0 x 1) system dissolves at depth smaller than 3.5 km with a maximal dissolved amount at depth of 0.8 km, but precipitates with depth deeper than 3.5 km. With the increasing Fe content (from ank2 to ank7), the amount of dissolved or precipitated carbonates is also increased. Meanwhile, CaFe(CO 3 ) 2 (ank10) is an exception: the amount of precipitation or dissolution is the lowest among these ankerite cements. The reason can be attributed to that the end-member of CaFe(CO 3 ) 2 mainly exists as a two-phase mineral with both calcite and siderite [44]. On the effect of CO 2 , Δ[Ca 2+ ] increases by about four times with CO 2 mole fraction increasing from 0.1% to 10.0%, which is shown in Fig 8, indicating that the amount of dissolved carbonate cements also increases with increasing CO 2 mole fraction.
The relationship between pH and concentration of [Ca 2+ ] in ankerite-H 2 O-CO 2 system was also studied. As shown in Fig 9A of ank2    increase and emerge at lower pHs, e.g., 0.80 mmolÁL -1 at pH = 5.5 for 0.1% of CO 2 , 1.72 mmolÁL -1 at pH = 4.8 for 1.0% of CO 2 , and 3.70 mmolÁL -1 at pH = 4.2 for 10.0% of CO 2 in system of ank2. With increment of Fe content in ankerite (CaFe x Mg 1-x (CO 3 ) 2 , 0 x 1) system, as shown in Fig 9A-9D), the maximum of [Ca 2+ ] also increases as well. The ank10 (CaFe(CO 3 ) 2 ) is an exception: as shown in Fig 9E, [Ca 2+ ] varies from 0.3 mmolÁL -1 to 2.5 mmolÁL -1 in CaFe (CO 3 ) 2 at CO 2 mole fraction of 10.0%, which is the lowest in ankerite system, and can also be attributed to that the end-member of CaFe(CO 3 ) 2 does not exist as one-phase mineral [44].
The influence of overpressure on carbonate cements-H 2 O-CO 2 The pressure variation during diagenesis can be applied to estimate the overpressure and to calculate the equilibrium constant. Effect of overpressure on carbonates systems was studied at depth of 3.9 km with 800 mg/g of hydrogen index where overpressure generated. As shown in Fig 10A, with the increasing overpressure, the equilibrium constants of 1) formation of carbonic acid (K 1 ), 2) formation of bicarbonate (K 2 ) and 3) water dissociation (K 4 ) decrease. Meanwhile, the equilibrium constants of dissociation of carbonate cements (K 5 -K 13 ) increase with increasing overpressure in Fig 10B and 10C. For example, over ferrocalcite (Ca 0.9 Fe 0.1 CO 3 ), the equilibrium constant (K 7 ) ranges from 7.8×10 −12 to 2.2×10 −11 with overpressure increasing from 36 MPa to 83 MPa. The equilibrium constants of dolomite (K 6 ), CaFe 0.5 Mg 0.5 (CO 3 ) 2 (K 8 ) and CaFe(CO 3 ) 2 (K 9 ) are several orders of magnitude lower than those of other carbonate cements. The relationship between overpressure and pH was also analyzed, as shown in Fig 10D. The overpressure ranging from 36 MPa to 83 MPa at CO 2 mole fraction of 0.1% leads to a minimal pHs of 6.8, 6.2, 6.3 and 6.4 at 51 MPa in the systems of calcite, ferrocalcite (Ca 0.9 Fe 0.1 CO 3 ), ank10(CaFe(CO 3 ) 2 ) and ankerite(CaFe 0.5 Mn 0.5 (CO 3 ) 2 ), respectively. Meanwhile, system of siderite (FeCO 3 ) produces the lowest pH at this range of overpressure.
Effect of overpressure on Δ[Ca 2+ ] was studied as well. As shown in Fig 10E, in the calcite system, with increasing overpressure from 36 MPa to 83 MPa, Δ[Ca 2+ ] increases slightly from -2.24 mmolÁL -1 to -2.17 mmolÁL -1 and remains negative, indicating it is still a precipitation process at depth of 3.9 km where overpressure generated. Other carbonate cements also show a similar trend of precipitation at depth of 3.9 km where overpressure generated, and the magnesite system produces the lowest Δ[Ca 2+ ] from -3.79 mmolÁL -1 to -3.75 mmolÁL -1 . This result is helpful to predict the accumulated space or reservoir formed in sandstone and source rock during diagenesis.

Conclusions
The minimization of ΔG and equilibrium constant of reactions in carbonate cements-watercarbon dioxide systems were calculated via chemical thermodynamic principles. Δ[M 2+ ], calculated from equilibrium concentration, was applied to predict the precipitation/dissolution process.
The results indicate that with increasing burial depth, carbonate cements with binary or ternary minerals in ferrocalcite and ankerite (CaFe x Mg 1-x (CO 3 ) 2 , 0 x 1) dissolve firstly and produce maximal dissolved amounts, while precipitation happens later. For example, calcite is dissolving from 0.0 km to 3.0 km with the maximal value of [Ca 2+ ] obtained at depth of 0.8 km, and then precipitates with deeper depth than 3.0 km.
On effect of CO 2 mole fraction, with the increasing CO 2 mole fraction from 0.1% to 10.0% in carbonate system, the aqueous concentrations of metal species show a similar trend of increase firstly and then decrease. For example, dissolved amount of CaFe 0.7 Mg 0.3 (CO 3 ) 2 increases and reaches a maximum of 1.78 mmolÁL -1 at a burial depth of 0.7 km with CO 2 mole fraction at 0.1%, while 8.26 mmolÁL -1 is obtained at the same depth of 0.7 km with 10.0% of CO 2 .
For the influence of overpressure generated during diagenesis, with the overpressure ranging from 36MPa to 83 MPa in calcite system, Δ[Ca 2+ ] increases slightly from -2.24 mmolÁL -1 mmolÁL -1 to -2.17 mmolÁL -1 mmolÁL -1 , indicating it is also a precipitation process at burial depth of 3.9 km where overpressure generated.