1 Introduction

Carbonate reservoirs contain over 50 % of current proven oil reserves Ehrenberg and Nadeau (2005), Schlumberger Ltd (2020), BP plc (2020). Improved oil recovery is challenging in carbonates, primarily because of their complex heterogeneities. Importantly, carbonate rocks also exhibit significant aqueous solubility. This means that during waterflood, contact with the reservoir rock can significantly alter the injected brine chemistry. Any water-based flooding process that requires injection of chemicals, even simple brines, is plagued by alteration of the injection composition due to mineral dissolution and precipitation, and by adsorption and ion exchange with the porous-rock minerals. Oil-displacement processes that require specifically tailored laboratory chemical formulations can be changed enough by rock interaction to be ineffective under field conditions.

A pertinent example is low-salinity waterflooding (LSW), in which injected brine is typically more dilute compared to the in situ brine. LSW is appealing because of its simplicity and low cost. Although extensively studied, the oil-recovery mechanism(s) of LSW remains obscure (Sohal et al. 2016; Purswani et al. 2017; Katende and Sagala 2019; Bartels et al. 2019; Hao et al. 2019). There is some consensus that injected brine compositions should be chosen to alter rock wettability toward more water wet by controlling, for example, surface charge at the rock/brine interface and/or by detaching asphaltene molecules from the rock surfaces (Norrman et al. 2018; Hu et al. 2018; Collini et al. 2020; Shaik et al. 2020). Mineral surface chemistry is a sensitive function of in situ brine composition, in particular aqueous pH. In reactive porous media, chemical-flooding formulations devised in the laboratory do not transfer directly to field applications.

The goal of this work is to establish how carbonate rock changes brine chemistry during flow through a reactive porous medium. We provide a new tool to establish injection compositions that achieve the desired compositions in the pores of the rock. When flowing in a carbonate rock, aqueous compositions are altered by rock dissolution/precipitation kinetics and mass transfer of multiple minerals, ion exchange/adsorption on those minerals, initial reservoir \({\text {CO}}_{2}\) level, and solute dispersion, among others. As the solution brine composition adjusts during flow in a reactive rock, so do rock surface compositions in equilibrium with the pore solutions. Local crude oil/brine/rock wettability depends on both surface and bulk compositions, although the exact mechanism(s) for wettability alteration is not currently known.

Our computation methodology is that of transport in reactive porous media which has a rich history, e.g. (Steefel et al. 2005; Tournassat and Steefel 2019). In the specific case of aqueous flow in carbonate media, considerable effort has also been expended (Nasralla et al. 2015; Chandrasekhar et al. 2016; Korrani et al. 2016; Farajzadeh et al. 2017; Eftekhari et al. 2017; Maes and Geiger 2018; Bonto et al. 2019). With the exception of Maes and Geiger (2018) who use a lattice Boltzmann approach, all works approximate numerically the continuum convective mass-transport equations. Many researchers (Nasralla et al. 2015; Chandrasekhar et al. 2016; Korrani et al. 2016; Farajzadeh et al. 2017; Bonto et al. 2019) couple their in-house numerical transport codes with the well-documented and verified reactive-species equilibria calculated by a USGS code called PHREEQC (Parkhurst and Appelo 1999). Unfortunately, only Korrani et al. (2016) test their calculations against experiment. Few researchers evaluate surface species that are essential to understanding of surface wettability. To our knowledge, no efforts include all effects of dissolution kinetics and mass transfer, ion exchange, and dispersion for multiple aqueous-reaction species in the bulk and at the surface. There are similar efforts to account for such effects in a geochemical context (Fantle and DePaolo 2006; Zhang et al. 2020). However, these works do not consider multiple reacting species with ion exchange, dispersion, and realistic dissolution and mass-transfer kinetics. None utilizes available open-source codes.

In our description of reactive flow in carbonate rock, we include hydrodynamic dispersion, kinetic and mass-transfer effects in the dissolution of calcite together with exchange reactions on clay, and calcite surface equilibria. Our 1D single-phase reactive-transport code is built on PHREEQC. To ascertain surface-charge density profiles, we include surface speciation equilibria.

Here, we focus on the general theoretical formulation and on the validation of the numerics by benchmarking against separate analytic solutions of reactive transport, ion-exchange dynamics, and tracer dispersion. In a companion paper, model comparison is made to experimental ion-concentration histories from flow through Indiana limestone core plugs (Indiana Limestone Institute 1979). Application of our findings to examine in situ compositions relevant for LSW will be addressed in a companion paper. Below we describe our theoretical approach followed by example calculations. Description and validation of the numerical approach are outlined in Supporting Information.

2 Theory

Prediction of aqueous compositions during frontal displacement through porous carbonate rock is a challenge because of the rock reactivity, and because of the involved speciation chemistry in the bulk aqueous and rock-surface phases. For example, Table 1 lists typical carbonate species and their equilibrium constants. In general, the convection–diffusion equation must be written for each element including aqueous speciation reactions, rock reaction kinetics, rock surface adsorption/ion exchange and surface ion complexation (Lake et al. 2003; Felder and Rousseau 2005; Al-Shalabi et al. 2014; Yutkin et al. 2018), and axial dispersion. Here, we consider a 1D reactive transport model.

2.1 Reactive Transport

Tables 1 and 2 describe the species that participate in the aqueous phase-carbonate reactions, along with their equilibrium constants at ambient temperature for bulk and surface chemistry, respectively (Yutkin et al. 2018). Units in the equilibrium constants are listed to aid the reader. Table 2 is slightly changed from that of Yutkin et al. (2018)) to include sodium surface species in reaction \({\text {S}}_{6}\). The symbol > in Table 2 denotes species at the calcite surface in surface concentration units. Each of the bulk aqueous species, in addition to chloride ions, must be tracked during flow through a porous carbonate rock. This is a daunting task, especially when several reactive reservoir minerals, such as anhydrite and/or dolomite, are present in addition to calcite. We assume insignificant reactive loss of the minerals under typical conditions of low-salinity waterflood. All aqueous species are in reaction equilibrium at ambient temperature.

Table 1 Solution equilibrium reactions and equilibrium constants, K (298 K) from PHREEQC database (Charlton and Parkhurst 2011)

To account for aqueous equilibrium reactions, we conserve element masses (Felder and Rousseau 2005; Al-Shalabi et al. 2014). During frontal displacement in a 1D reactive porous medium, conservation of element i demands that (Yeh and Tripathi 1991; Steefel and Lasaga 1994; Walter et al. 1994; Qiao et al. 2015; Eftekhari et al. 2017)

$$\begin{aligned} \varphi \frac{\partial {{C}_{i{\mathrm{E}}}}}{\partial t}+(1-\varphi ){{a}_{V_n}}\frac{\partial {{n}_{i{\mathrm{E}}}}}{\partial t}+u\frac{\partial {{C}_{i{\mathrm{E}}}}}{\partial x}={{D}_{i{\mathrm{E}}}}\frac{{{\partial }^{2}}{{C}_{i{\mathrm{E}}}}}{\partial {{x}^{2}}}+(1-\varphi ){{a}_{V_r}}{{r}_{i{\mathrm{E}}}} \end{aligned}$$
(1)

where \(\varphi\) is the fluid-accessible porosity; \({{C}_{i{\mathrm{E}}}}(t,x)\) is the ith element pore molar concentration; \({{a}_{V_n}}\) is mineral surface area per solids volume for species adsorption; \(a_{V_r}\) is reactive mineral surface area per solids volume; \({{n}_{i{\mathrm{E}}}}(t,x)\) is the adsorbed molar concentration of element i on solid surfaces per unit solids area (\({\hbox {mol/m}}^{2}\)); t is time, x is axial distance; u is superficial velocity (i.e., \(u / \varphi\) is the frontal advance rate); \({{D}_{i{\mathrm{E}}}}\) is the dispersion coefficient of element i; and \({{r}_{i{\mathrm{E}}}}\) is the net production rate of element i from minerals per unit solids surface area (\({\hbox {mol/m}}^{{2}}/\text {s}\)). All aqueous species are in reaction equilibrium as enumerated in Table 1, except for Reaction 6 for the carbonate mineral which is accounted for separately by dissolution reaction kinetics. Element concentrations are those of all aqueous species j in Table 1:

$$\begin{aligned} {{C}_{i{\mathrm{E}}}} \equiv \sum \limits _{j}^{{}}{{{s}_{ij}}}{{C}_{j}} \end{aligned}$$
(2)

where \({{C}_{j}}\) is the concentration of species j in the pores and \(s_{ij}\) is the stoichiometric coefficient of element i in species j. Likewise, the adsorbed element amounts are related to adsorbed species j in Table 2 by

$$\begin{aligned} (1-\varphi ){{a}_{V_n}}{{n}_{i{\mathrm{E}}}} \equiv \sum \limits _{k}^{{}}{{{\varphi }_{k}}{{a}_{Vk}}\sum \limits _{j}^{{}}{{{p}_{ijk}}}}{{n}_{jk}} \end{aligned}$$
(3)

where \({{\varphi }_{k}}\) is the volume fraction of mineral k; \({{a}_{Vk}}\) is the surface area per unit solid volume of mineral k; \({{n}_{jk}}(t,x)\) is the molar concentration of species j adsorbed on mineral k per unit solid area (\({\hbox {mol/m}}^{{2}}\)); and \({{p}_{ijk}}\) is the stoichiometric coefficient of element i in species j adsorbed on mineral k. Table 2 lists typical surface species for carbonate rock (Yutkin et al. 2018).

Table 2 Surface complexation reactions and corresponding equilibrium constants, \(K_{\mathrm{S}}\) (298 K) from Yutkin et al. (2018)

The element dispersion term is given by the expression

$$\begin{aligned} {{D}_{i{\mathrm{E}}}}\frac{{{\partial }^{2}}{{C}_{i{\mathrm{E}}}}}{\partial {{x}^{2}}}\equiv \sum \limits _{j}^{{}}{{{s}_{ij}}}{{D}_{{\mathrm{L}}j}}\frac{{{\partial }^{2}}{{C}_{j}}}{\partial {{x}^{2}}} \end{aligned}$$
(4)

where \({{D}_{{\mathrm{L}}j}}\) is the longitudinal dispersion coefficient of species j. Lastly, the element mineral dissolution rate in Eq. 1 is expressed for minerals k as

$$\begin{aligned} (1-\varphi ){{a}_{V_r}}{{r}_{i{\mathrm{E}}}}\equiv \sum \limits _{k}^{{}}{{{\varphi }_{k}}{{a}_{Vk}}{{r}_{ik}}} \end{aligned}$$
(5)

where \({{r}_{ik}}\) is the net production rate of element i from mineral k per unit surface area of the solid (\({\hbox {mol/m}}^{{2}}/\text {s}\)).

The boundary conditions for Eq. 1 by Danckwerts (1953), and Pearson (1959) prescribe continuity of the flux of each species at the column inlet and outlet. When written in terms of elements i, these boundary conditions become

$$\begin{aligned} uC_{iE_{\infty }} = uC_{i{\mathrm{E}}}(t, 0) - D_{i{\mathrm{E}}}\frac{\partial C_{i{\mathrm{E}}}(t, 0)}{\partial x} \quad \ at\ x = 0 \end{aligned}$$
(6)

and

$$\begin{aligned} \frac{\partial C_{i{\mathrm{E}}}(t, L)}{\partial x} = 0 \quad \ at\ x = L \end{aligned}$$
(7)

with

$$\begin{aligned} D_{i{\mathrm{E}}}\frac{\partial C_{i{\mathrm{E}}}(t,0)}{\partial x} \equiv \sum \limits _{j}s_{ij}D_{{\mathrm{L}}j}\frac{\partial C_{j}(t,0)}{\partial x} \end{aligned}$$
(8)

where \(x = 0\) is the medium inlet and \(x = L\) is the medium outlet.

Equations 18 are general. For our particular application to limestone rock, we consider only reactive calcite and combined ion exchange on calcite and clay minerals. We include clay as an adsorptive mineral because of the ion-exchange characteristics we find in our Indiana Limestone corefloods described in a companion paper. For the aqueous phase, Table 1 lists 12 species not including excess water. To this number, we add any brine species that do not participate in the carbonate-reaction or ion-exchange equilibria. Because we consider brine as an aqueous \({\hbox {NaCl/CaCl}}_2\) mixture, chloride ions are added as a species. Table 2 lists another eight surface reaction species denoted by the prefix >. Following all bulk and surface species is a challenge. However, when those species are in local equilibrium, only elements need be tracked (Al-Shalabi et al. 2014; Yutkin et al. 2018).

In our example calculations and experimental corefloods, there is no free gas phase, and Reaction 1 does not participate, although it is pertinent to reservoir simulations. As a result, the concentration of aqueous carbon dioxide in the water-filled pores of the medium is set by calcite equilibrium. In the remaining Reactions 3–10 in Table 1, there are four independent elements: sodium, calcium, hydrogen (sans excess water), and carbonate, i.e., carbon and oxygen appear in all species in a 3/1 ratio. There is no need to impose electroneutrality in Reactions 3–10 because each is charge-neutral (Al-Shalabi et al. 2014; Yutkin et al. 2018). Sodium ions do not originate from calcite dissolution. Consequently, Reactions 9 and 10 only occur when sodium ions are present in the aqueous brine. Chloride ion becomes the fifth independent element. Overall electroneutrality is imposed on the brine. Once the transient profiles of the elements and corresponding aqueous species are established, surface-species concentration profiles follow from the known surface-reaction equilibria in Table 2. Implicit in the surface calculations is the assumption that reactive minerals remain in excess and are not depleted to alter rock porosity.

Not all element balances contain all terms in Eq. 1. For example, chloride ions do not participate in ion exchange and in carbonate-species reactions. Consequently, for chloride ions, ion-exchange and reaction-rate terms are absent, and Eq. 1 reads

$$\begin{aligned} \varphi \frac{\partial C_{{\text {Cl}}^{-}}}{\partial t} + u \frac{\partial C_{{\text {Cl}}^{-}}}{\partial x} = D_{\mathrm{L}} \frac{{\partial }^2 C_{{\text {Cl}}^{-}}}{\partial x^2} \end{aligned}$$
(9)

The dispersion coefficient in Eq. 9 does not have a species-specific subscript because all aqueous species in Table 1 are dilute and have about the same aqueous molecular diffusion coefficients, \(D_{\mathrm{m}} \sim 10^{-9} \, {\hbox {m}}^{{2}}/\text {s}\). Equation 9 indicates that chloride ions behave as an ideal tracer. Without dispersion, chloride ions transport along the core as a salinity wave with no holdup (Pope et al. 1978).

Conversely, calcium retains all terms in Eq. 1. Thus, we have that

$$\begin{aligned} \varphi \sum \limits _{j=1}^{3}{{{s}_{ij}}}\frac{\partial {{C}_{j}}}{\partial t}+{{\varphi }_{2}}{{a}_{V2}}\frac{\partial {{n}_{i}}}{\partial t}+u\sum \limits _{j=1}^{3}{{{s}_{ij}}}\frac{\partial {{C}_{j}}}{\partial x}=\sum \limits _{j=1}^{3}{{{s}_{ij}}}{{D}_{L}}\frac{{{\partial }^{2}}{{C}_{j}}}{\partial {{x}^{2}}}+{{\varphi }_{1}}{{a}_{V1}}{{r}_{1}} \end{aligned}$$
(10)

where i designates calcium. To understand the role of dispersion, we vary the longitudinal dispersion Péclet number, \({Pe}_{\mathrm{L}} = uL/D_{\mathrm{L}}\). Table 1 indicates that calcium species \(j = 1-3\) correspond to \({\text {Ca}}^{2+}\), \({\hbox {CaOH}}^+\), \({\hbox {CaHCO}}^+_3\) aqueous ions, respectively. We label mineral 1 as calcite. Mineral 2 represents adsorptive minerals including calcite and clay. On calcite and clays, sodium/calcium ion exchange obeys local equilibrium or

$$\begin{aligned} \frac{\partial {{n}_{{\text {Ca}}^{2+}}}}{\partial t}=\frac{\partial {{n}_{{\text {Ca}}^{2+}}}}{\partial {{C}_{{\text {Ca}}^{2+}}}}\frac{\partial {{C}_{{\text {Ca}}^{2+}}}}{\partial t} \end{aligned}$$
(11)

where the ion-exchange isotherm \({{n}_{\mathrm{Ca}}}({{C}_{{\text {Ca}}^{2+}}})\) is specified by classical mass action demonstrated in Appendix B

$$\begin{aligned} \frac{{{y}_{{\text {Ca}}^{2+}}}}{{{(1-{{y}_{{\text {Ca}}^{2+}}})}^{2}}}=\left[ \frac{{{K}_{\rm CaNa}}{{n}_{{\mathrm{{CEC}}}}}}{{{C}_{{\text {Cl}}^{-}}}} \right] \frac{{{x}_{{\text {Ca}}^{2+}}}}{{{(1-{{x}_{{\text {Ca}}^{2+}}})}^{2}}} \end{aligned}$$
(12)

In Eq. 12, \({{y}_{{\text {Ca}}^{2+}}}=2{{n}_{{\text {Ca}}^{2+}}}/{{n}_{{\mathrm{{CEC}}}}}\), \({{x}_{{\text {Ca}}^{2+}}}=2{{C}_{{\text {Ca}}^{2+}}}/{{C}_{{\text {Cl}}^{-}}}\), \({{K}_{CaNa}}\), is the ion-exchange equilibrium constant, \({{C}_{{\text {Cl}}^{-}}}=2{{C}_{{\text {Ca}}^{2+}}}+{{C}_{{\text {Na}}^+}}\) and \({{n}_{{\mathrm{{CEC}}}}}=2{{n}_{{\text {Ca}}^{2+}}}+{{n}_{{\text {Na}}^+}}\) is the cation exchange capacity expressed in units of mole of total exchange sites per unit surface area. In adopting Eq. 12, we assume that ion-exchange rates are fast and that local equilibrium in attained. However, typical clay minerals in reservoir rock occur in book stacks, and the assumption of local equilibrium may be questioned (Mansa et al. 2017; Khoury 2019; Zhang et al. 2001; Wilson et al. 2014; Khalifa and Morad 2015). It is traditional to express exchange capacity in equivalents per liter of pore volume, or \({\mathrm{{CEC}}} = {10^{-3}}n_{{\mathrm{{CEC}}}}a_{V_2} \varphi _2/\varphi\) (Pope et al. 1978; Hill and Lake 1978). From Eq. 12, ion-exchange amounts depend directly on ion-exchange capacity and inversely on chloride-ion concentration.

The remaining term to specify in Eq. 10 is the dissolution rate of calcite. We utilize the expression derived by Yutkin et al. (2018, Appendix A):

$$\begin{aligned} {{r}_{1}}={{k}_{\mathrm{{rxn}}}}\sqrt{{{K}_{\mathrm{SP}}}}\left[ 1-{{C}_{{\text {Ca}}^{2+}}}{{C}_{{\text {CO}}_3^{2-}}}/{{K}_{\mathrm{SP}}} \right] \end{aligned}$$
(13)

where \(k_{\mathrm{{rxn}}}\) is the intrinsic dissolution reaction-rate constant (m/s) and \(K_{\mathrm{SP}}\) is the solubility product of calcium carbonate (i.e., \(K_6\) in Table 1). Based on the extensive review of Morse and Arvidson (2002) and the references therein, we find that Eq. 13 is experimentally verified. At low pH, \(k_{\mathrm{{rxn}}}\) is a strongly increasing function of hydrogen-ion concentration. At pH values above about 6, however, \(k_{\mathrm{{rxn}}}\) is constant at approximately \(10^{-5} \, \hbox {m/s}\) under ambient conditions (Morse and Arvidson 2002).

Equation 13, however, does not account for the convective mass-transfer resistance encountered by the dissolving calcium and carbonate ions (Bird et al. 2007). For pH values less than about 10, Appendix A in SI demonstrates that

$$\begin{aligned} {{r}_{1}} = \frac{{{k}_{\mathrm{m}}}\left[ ({{K}_{\mathrm{SP}}}/C_{{\text {CO}}_3^{2-}}^{{}})-{{C}_{Ca^{2+}}} \right] }{\left[ 1+{{k}_{\mathrm{m}}}\sqrt{{{K}_{\mathrm{SP}}}}/({{k}_{\mathrm{{rxn}}}}C_{{\text {CO}}_3^{2-}}) \right] } \end{aligned}$$
(14)

where \(k_{\mathrm{m}}\) is the convection–diffusion mass transfer coefficient appropriate to flow through porous media (Bird et al. 2007). Expressions for the mass transfer coefficient in packed beds are available in Rexwinkel et al. (1997) and Bird et al. (2007, page 486). We adopt Eq. 14 to quantify the dissolution kinetics of calcite.

2.2 Numerics

Numerical solution of Eqs. 1014 along with Eq. 1, 6, and 7 written for carbonate, sodium, and hydrogen elements is challenging. All species in Table 1 must be accounted for through Eq. 2. We use the 1D explicit central finite-difference implementation of the publicly available PHREEQC code of the US Geological Survey (Charlton and Parkhurst 2011; Yutkin et al. 2018) along with the well-documented extensive aqueous chemistry speciation calculations embodied in PHREEQC. Implementation details are described in Appendix C of SI. Appendix C also benchmarks our numerics against the derived analytic solutions. Distances and times in the species profiles and histories below are dimensionless and reported as x/L and \(ut/\varphi L = PV\), respectively. Table 3 lists the pertinent parameters of the example calculations below unless otherwise noted.

In the calculations that follow, reaction and mass-transfer rates are varied through reaction and mass-transfer Damköhler numbers: \({{Da}}_{\mathrm{{rxn}}} = \varphi _1 a_{V_1}k_{\mathrm{{rxn}}}L/u\) and \({{Da}}_{\mathrm{{mt}}} = \varphi _1 a_{V_1}k_mL/u\), respectively. Ion-exchange strength is gauged through the cation exchange capacity (\({CEC}\)), and dispersion is varied through the Péclet number: \({Pe}_{\mathrm{L}} = uL/D_{\mathrm{L}}\).

Table 3 Summary of PHREEQC input parameters

3 Results and Discussion

We outline the theoretical results in the order of ion exchange alone, mineral reaction alone, and combined ion exchange with mineral reaction. The roles of reaction rates, mass transport rates, cation exchange capacity, and dispersion are discussed as appropriate. We consider ion exchange alone first.

3.1 Ion Exchange

Figures 1 and 2 illustrate the role of ion exchange for sodium/calcium exchange on calcite/clay minerals with no dispersion. Logarithmic concentration profiles at 0.5 PV injected are shown on the left, and histories are shown on the right. Calcite mineral is inert (i.e., \({{Da}}_{\mathrm{{rxn}}} = 0\)). Cation exchange capacity is 0.345 mol/L pore fluid in Fig. 1 and \(3.45 \times 10^{-3} \, \hbox {mol/L}\) in Fig. 2, respectively. These values cover a range characteristic of Berea sandstone (Hill and Lake 1978; Pope et al. 1978). The equilibrium exchange constant \(K_{\mathrm{CaNa}}\) is \(6600 \, {\hbox {m}}^{{-1}}\), estimated from Hill and Lake (1978), Pope et al. (1978). Equations 9 and 10 are solved for calcium (solid lines) and chloride ions (dotted lines). Sodium-ion concentrations (dashed lines) follow from electroneutrality. The initial values of calcium, sodium, and chloride concentrations are 0.1 M, 0.005 M, and 0.205 M, respectively. The corresponding injected concentrations are calcium = 0 M, sodium = 0.01 M, and chloride = 0.01 M. These compositions remain in all subsequent figures.

Fig. 1
figure 1

Semilogarithmic species concentration a profiles at \(ut/\varphi L = 0.5\) injected pore volumes b effluent histories with no mineral dissolution and no dispersion. \({\text{CEC}}\) = 0.345 mol/L higher than typically found in sandstones. Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

Fig. 2
figure 2

Semilogarithmic species concentration a profiles at \(ut/\varphi L = 0.5\) injected pore volumes b effluent histories for no mineral dissolution, no dispersion, and a small ion-exchange capacity of \(3.45 \times \ 10^{-3} \, \hbox {mol/L}\). Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

Examination of the calcium ion-exchange profiles in Fig. 1a reveals a salinity shock dropping the calcium concentration from the initial porous-medium value of 0.1 M down to \(4 \times 10^{-3} \, \hbox {M}\). The calcium concentration behind the salinity shock is set according to equal rock adsorption of calcium at the initial and injected chloride concentrations outlined in Appendix C of SI. A zone of constant calcium concentration (at \(4 \times 10^{-3} \, \hbox {M}\)) follows the salinity shock. This zone precedes a spreading-wave zone of calcium desorption from the rock surface (Hill and Lake 1978). The fastest wave of this zone corresponds to the calcium concentration of \(4 \times 10^{-3} \, \hbox {M}\) and penetrates out to about \(x/L = 0.35\) where it intersects the salinity-induced zone. The slowest calcium concentration wave corresponds to zero injected calcium and penetrates out to about \(x/L = 0.01\). There are four calcium-concentration zones in the column: the initial calcium concentration, the salinity-induced concentration zone behind the indifferent salinity wave, a spreading calcium desorption zone, and a final injected-concentration zone. Because hydronium ions are not involved in classical sodium/calcium mass-action ion exchange, there is no effect of pH on ion exchange. With no mineral reaction, injected hydronium ions simply flush those initially present. Chloride behaves as an inert tracer; sodium follows from charge balance. At a \({\text{CEC}}\) of 0.345 mol/L, washout of the ion-exchangeable calcium in Fig. 1a takes many pore volumes. Even without rock or aqueous-phase reactions, ion exchange significantly alters injection chemistry. Detailed information on ion-exchange wave dynamics is available in Appendix C of SI.

Figure 2 illustrates the importance of the cation exchange capacity on concentration profiles (a) and histories (b) under the same conditions as those in Fig. 1. However, the cation exchange capacity is lowered by a factor of 100 to \(3.45 \times 10^{-3}\) mol/L. With the considerably lower ion-exchange capacity, much less calcium resides on the rock surface. As observed in Fig. 2a, the abrupt calcium-concentration decline remains at the chloride tracer front but the salinity zone collapses. Spreading calcium desorption waves emanate directly following the tracer chloride wave. Washout of the exchangeable calcium in Fig. 2b is much more extensive than that in Fig. 1.

Figure 3 investigates the role of axial dispersion on classical sodium/calcium ion exchange, where the amount of dispersion is characterized by a longitudinal Péclet number of \({Pe}_{\mathrm{L}} = 100\). The remaining conditions are identical to those in Fig. 1. As anticipated, all shock fronts smooth with the calcium zone spreading more at the rear than at the front. The injected concentrations do not reach the column outlet for many pore volumes. Hydrodynamic dispersion completely smears the constant salinity zone. The seemingly large(er) dispersion is due to the ordinate logarithmic scale. The 1D advective algorithm in PHREEQC well captures ion exchange in porous media (see Appendix C for validation against analytic solutions).

Fig. 3
figure 3

Semilogarithmic concentration a profiles at \(ut/\varphi L = 0.5\) injected pore volumes and b effluent histories for ion exchange with dispersion (\({Pe}_{\mathrm{L}} = 100\)) and with no mineral dissolution. \({\text{CEC}}\) = 0.345 \(\hbox {mol/L}\). Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

3.2 Mineral Reaction

Figures 4, 5, and 6 report the effects of calcite dissolution on concentration profiles and histories with no ion exchange or dispersion. Injected and initial column conditions are the same as those in Figs. 1, 2, and 3. Figure 4 illustrates the role of the reaction Damköhler numbers between \(10^{-3}\) and \(10^2\) for a fixed mass-transfer Damköhler number of 100, large enough for mass transfer to have no effect. The reaction front proceeds through the medium at the frontal advance rate. For all \({Da}_{\mathrm{{rxn}}}\), there is a reaction zone at the beginning of the reactive medium where calcite dissolves. Beyond that reaction zone, calcium concentration is constant: dissolution products are convected away as fast as they dissolve. At \({Da}_{\mathrm{{rxn}}} \ge 10\), however, the injected solution beyond the narrow inlet zone reaches equilibrium with the carbonate rock. No further dissolution occurs. Because reaction Damköhler numbers are very large in reservoir applications, this result confirms our previous order-of-magnitude estimates that rock dissolution occurs at the injection wellbore (Yutkin et al. 2018). Consequently, once past the reaction zone, any rock-dissolution-based mechanisms in low salinity waterfloods are impossible (Chen et al. 2017). From the corresponding concentration histories in Fig. 4, rock reaction neither speeds nor slows species transport advance. Reaction kinetics does not cause tailing of the effluent concentrations as sometimes reported (Austad et al. 2015). Rather, effluent concentrations are constant after breakthrough and approach rock equilibrium for high reaction Damköhler numbers.

Figure 5 is identical to Fig. 4, except that the mass-transfer Damköhler number varies between \(10^{-3}\) and \(10^2\) for a fixed \({Da}_{\mathrm{{rxn}}} = 100\), characteristic of rock equilibrium beyond the narrow inlet reaction zone. Concentration profiles and histories are similar to those in Fig. 4 except for a weaker dependence on \({Da}_{\mathrm{{mt}}}\). Mass transfer slows dissolution kinetics dictated by Eq. 14. Beyond the reaction zone, the dissolution product concentrations are constant.

Figure 6 is identical to Figs. 4 and 5, except now sodium, hydronium (i.e., pH), and chloride concentration profiles and histories are also shown in addition to that for calcium. \({Da}_{\mathrm{{rxn}}} = 100\) and \({Da}_{\mathrm{{mt}}} = 10^4\) indicating local equilibrium beyond the reaction zone. Calcium concentrations repeat those in Figs. 4 and 5. Sodium and chloride concentrations overlap at the particular values chosen for the calculations. pH profiles provide fascinating insight. At the initial column concentrations of calcium = 0.1 M; sodium = 0.005 M; and chloride = 0.205 M, the equilibrium pH in the column is 8.6 (Yutkin et al. 2018). Injected pH is 7 (not shown on the scale of the graph). However, after the reaction zone, calcite dissolution raises the pH from 7 to almost 10. Thus, rock reaction controls aqueous chemistry occurring during a displacement process. In our calculations, \({\hbox {CO}}_2\) is confined to the aqueous phase. In reservoirs, however, \({\text {CO}}_{2}\) may be present as free gas and/or dissolved in oil phases. In which case, we find pH is controlled by \({\text {CO}}_{2}\) concentration in the reservoir. Therefore, composition design of advanced waterflooding processes should account for conditions expected in a reservoir, including \({\text {CO}}_{2}\) sources or sinks.

Fig. 4
figure 4

Semilogarithmic calcium concentration a profiles at \(ut/\varphi L = 0.5\) injected pore volumes b effluent histories for calcite dissolution reaction with no ion exchange or dispersion. Reaction Damköhler numbers range from 10 to \(10^{-4}\) at a fixed mass-transfer Damköhler number of 100. Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M; pH = 8.6. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

Fig. 5
figure 5

Semilogarithmic calcium concentration a profiles at \(ut/\varphi L = 0.5\) injected pore volumes b effluent histories for calcite dissolution reaction with no ion exchange or dispersion. Mass-transfer Damköhler numbers range from to 10 to \(10^{-4}\) at a fixed reaction Damköhler number of 100. Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M; pH = 8.6. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

Fig. 6
figure 6

Semilogarithmic species concentration and pH a profiles at \(ut/\varphi L = 0.5\) injected pore volumes and b effluent histories for calcite dissolution reaction with no ion exchange or dispersion. Reaction Damköhler number is 100 and mass-transfer Damköhler number is \(10^4\). Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M; pH = 8.6. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

3.3 Ion Exchange and Mineral Reaction

Figures 7, 8, 9, and 10 reflect simultaneous mineral dissolution and ion exchange. Conditions are the same as those in the preceding figures. Figures 7, 8, and 9 do not include dispersion, whereas Fig. 10 does with \(Pe_{\mathrm{L}} = 100\). For these four figures, \(Da_{\mathrm{{rxn}}} = 100\) and \(Da_{\mathrm{{mt}}} = 10^4\) again signifying local equilibrium beyond the reaction zone. All ion concentration profiles and histories in Fig. 7, except those for pH, are virtually indistinguishable from those in Fig. 1. At a \({\text{CEC}}\) of 0.345 mol/L, ion exchange dominates reaction chemistry. Classical ion exchange is independent of pH. Thus, the pH profile and history in Fig. 7 arise because of calcite dissolution. Injected pH (= 7) rises at the column inlet to approximately 9.6, similar to Fig. 6, but then falls to 9.25 near the salinity front. This is due to the ion-exchange salinity zone influencing aqueous chemistry in addition to calcite dissolution. With reaction chemistry alone in Fig. 6, the pH remains at 9.9 up to the salinity shock. In the history of Fig. 7b, breakthrough of the salinity-shock wave occurs at one pore volume followed by the salinity zone, by spreading ion-exchange waves, and, finally, by rock-reaction equilibrium concentrations.

Fig. 7
figure 7

Semilogarithmic species concentration and pH a profiles at \(ut/\varphi L = 0.5\) injected pore volumes and b effluent histories for calcite dissolution reaction with ion exchange. No dispersion. Reaction Damköhler number is 100 and mass-transfer Damköhler number is \(10^4\). \({\text{CEC}}\) = 0.345 mol/L. Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M; pH = 8.6. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

Figure 8 is identical to Fig. 7, except that more species are portrayed. Particularly important are the profile and history of the \(\beta\)-plane surface charge density, \(\sigma _{\beta }\). Since the calcite surface contains equal numbers of negative and positive sites (Yutkin et al. 2018), the \(\beta\)-plane charge governs the subsequent adsorption of charged aqueous species. For the conditions of Fig. 8, \(\sigma _{\beta }\) is positive at 0.95 μ\(\mathrm{C/cm}^2\) initially in the core and falls to essentially neutral as the waterflood proceeds. The charge density in the \(\beta\)-plane depends on aqueous sodium and \({\text {CO}}_{2}\) concentrations. Sodium ions in Reaction \({\text {S}}_{\text {6}}\) disfavor Reaction \({\text {S}}_{\text {5}}\) and expose negative charge obtained though Reaction \({\text {S}}_{\text {3}}\). Therefore, although positively charged, adsorbed sodium ions promote negative charge density in the \(\beta\)-plane. Additional aqueous \({\text {CO}}_{2}\) creates more aqueous bicarbonate ions that also makes the \(\beta\)-plane more negative via reaction \({\text {S}}_{\text {3}}\) in Table 2. Figure 8 highlights the power of our reactive-transport model, because surface charge density is often thought to play an important role in reservoir wettability.

Fig. 8
figure 8

Semilogarithmic species concentration, pH, and \(\beta\)-plane surface charge density a profiles at \(ut/\varphi L = 0.5\) injected pore volumes and b effluent histories for calcite dissolution reaction with ion exchange. No dispersion. Reaction Damköhler number is 100 and mass-transfer Damköhler number is \(10^4\). -plane surface charge density a profiles at \({\text{CEC}}\) = 0.345 mol/L. Surface charge is from the surface complexation model of Yutkin et al. (2018). Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M; pH = 8.6. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

If the cation exchange capacity is lowered to \(CEC = 3.45\times 10^{-3} \, \hbox {mol/L}\) in Fig. 9, the resulting concentration profiles and histories are not exactly the same as those in Fig. 6 for reaction alone. Even at a low \({\text{CEC}}\), the fingerprints of ion exchange are visible. Figure 9 resembles more closely Fig. 2 for ion exchange alone. The spreading waves of calcium desorption surprisingly overpower rock dissolution. However, in Fig. 9b, the calcium concentration is set by calcite equilibrium (at \(\sim \ 1.2\times 10^{-4} \, \hbox {M}\)), contrary to zero calcium concentration in Fig. 2b at large throughput (not shown in the figure). Finally, Fig. 10 repeats Fig. 7 but now with dispersion at a longitudinal Péclet number of \(Pe_{\mathrm{L}} = 100\). Remnants of Fig. 9 are seen, but are smoothed, as expected.

Fig. 9
figure 9

Semilogarithmic species concentration and pH a profiles at \(ut/\varphi L = 0.5\) injected pore volumes, b effluent histories with mineral dissolution and ion exchange. No dispersion. \({\text{CEC}}\) = \(3.45 \times 10^{-3} \, \mathrm {mol/L}\). \(Da_{\mathrm{{rxn}}} = 100\) and \(Da_{\mathrm{{mt}}} = 10^4\). Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M; chloride = 0.205 M; pH = 8.6. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M, pH = 7

Fig. 10
figure 10

Semilogarithmic species concentration and pH a profiles at \(ut/\varphi L = 0.5\) injected pore volumes and b effluent histories for calcite dissolution reaction with ion exchange and dispersion. Reaction Damköhler number is 100 and mass-transfer Damköhler number is \(10^4\). \(CEC = 0.345\) mol/L and \(Pe_{\mathrm{L}} = 100\). Initial column concentrations are calcium = 0.1 M; sodium = 0.005 M, chloride = 0.205 M; pH = 8.6. Injected concentrations are calcium = 0 M; sodium = 0.01 M; chloride = 0.01 M; pH = 7

4 Conclusions

This work studies numerically the 1D simultaneous reactive transport, mass-transfer, ion exchange, and dispersion during flow through a calcium-carbonate porous medium. Dissolved aqueous carbonate species are in equilibrium as is ion-exchange kinetics. Carbonate dissolution kinetics is quantified by a rigorous rate expression. The key to the modeling effort is the continuum mass conservation of elements. All aqueous carbonate and brine species are followed as is pH and \({\text {CO}}_{2}\). For the first time, equilibrium surface species are also followed including the surface charge density and zeta potentials during frontal displacement provided that pore-solution concentrations are not strongly influenced by surface equilibria. Because reaction kinetics are fast, as characterized by the reaction and mass transfer Damköhler numbers, injected pore solutions attain equilibrium with the carbonate rock except for a narrow zone near the medium entrance.

All results are obtained using the open-source software PHREEQC, including aqueous speciation and numerical solution to the 1D transport equations. Because of the highly nonlinear coupled behavior of species during mineral dissolution and surface ion exchange, we have performed careful verification of the PHREEQC transport code against analytic solutions over a wide range of the input parameter values, and, where applicable, we have reported the reliability ranges. Currently, our model implementation is restricted to a single mineral but is readily extended to multiple minerals. We assert that 1D transport in the reactive porous media with the simultaneous and coupled bulk and surface speciation, ion exchange, and dispersion is well captured by the open-source code PHREEQC. Our calculations provide a new tool to assess how injected aqueous brine solutions alter upon contact with reactive rock. Accordingly, effective in situ brine formulation can be designed to improve oil recovery from reactive-mineral reservoirs.