1 Introduction

Modeling transient flow of reservoir fluids with large variations in compositions requires a compositional model (Ju et al. 2012; Cho et al. 2018). It has become mainstream to simulate multiphase flow such as miscible gas injection and depletion of volatile oil/gas-condensate reservoirs. In most published models, for example, Fussell and Fussell (1979), Coats (1980), Young and Stephenson (1983), and Chien et al. (1985), water is treated as an independent component where hydrocarbon components are not allowed to dissolve. This assumption is appropriate for gas injection where the components are hard to dissolve in the aqueous phase. CO2 flooding, however, is not suited for this assumption because CO2 solubility in water is much higher than that of hydrocarbons, whose effect cannot be neglected in the simulation process. This is especially true when CO2 is injected into previously waterflooded reservoirs or into tight oil reservoirs where connate water saturation is up to 50%. Enick and Klara (1992) and Chang et al. (1998) demonstrated that the CO2 dissolved in the formation brine accounts for a significant fraction of the total amount of CO2 injected into the reservoir and the CO2 solubility has a substantially adverse effect on the ultimate recovery. Therefore, a reliable and efficient compositional simulator including CO2 solubility in water is needed to achieve more accurate simulation results.

The first challenge to develop such a simulator is how to model the phase behavior in the aqueous phase. Many researchers have experimentally studied the binary CO2/water system (King et al. 1992; Valtz et al. 2004; Guo et al. 2014) and proposed numerous approaches to model the behavior (Pedersen et al. 2001; Spycher et al. 2003). The traditional fugacity approach that uses the cubic equation of state (EOS) with the van der Waals (vdW) mixing rule correlates the phase behavior of hydrocarbon mixtures accurately as long as appropriate binary interaction parameters are selected (Zhao and Lvov 2016). However, it is insufficient to obtain reliable results for a mixture containing strongly polar components like water. Over the past three decades, much effort has been devoted to modifying or replacing the vdW one-fluid mixing rule for the challenging vapor–liquid equilibrium calculation (Zhao and Lvov 2016).

Among the modern approaches presented in the literature, a method of the type “EOS + excess Gibbs free energy” (EOS/Gex) is the most adequate for modeling mixtures with highly asymmetric components. Mixing rules proposed by Huron and Vidal (1979) and Wong and Sandler (1992), belonging to the EOS/Gex type, have been extensively used and applied to highly challenging phase equilibria. Compared with the Huron–Vidal mixing rule, the Wong–Sandler (WS) mixing rule satisfies the quadratic mole fraction dependence of the second virial coefficient and predicts the same excess Helmholtz energy at infinite pressure as a function of composition as that obtained from a selected activity coefficient model (Zhao and Lvov 2016). Many studies show the combination of WS mixing rule with non-random, two-liquid (NRTL) parameters gives the best results for water-containing polar mixtures compared to other mixing rules coupling cubic EOS (Valderrama 2003). Jaubert and Mutelet (2004) and Jaubert et al. (2010) proposed a group contribution-based thermodynamic model (PPR78 EOS) which combines, at a constant packing fraction, the Peng–Robinson (PR) EOS and a van Laar-type Gex model. Their article demonstrates that using classical mixing rules, the PPR78 model is able to estimate the temperature-dependent Kij (the binary interacting coefficient) for any mixtures containing alkanes, aromatics, naphthenes, CO2, N2, H2S, and mercaptans. The innovative part of their work is to establish a predictive model that is able to estimate the interactions from mere knowledge of the structure of molecules within the petroleum blend. They proved that the PPR78 model can reliably predict the vapor–liquid equilibrium (VLE) of very asymmetric systems, which points out a new trend to predict the phase behavior of polar–nonpolar systems.

In addition to the EOS approach, Li and Nghiem (1986) used Henry’s law to estimate CO2 solubility in distilled water and used the scaled particle theory to take into account the presence of salt in the aqueous phase. The fugacity coefficients of light components that are considered soluble in the aqueous phase (e.g., methane, ethane, propane, and CO2) can be derived from Henry’s constant, and for hydrocarbon phase, they are calculated by the conventional cubic EOS with the vdW mixing rule. A time-consuming three-phase flash calculation is accomplished to obtain the phase equilibrium of the water–oil–gas system. Enick and Klara (1990) used the Krichevsky–llinskaya equation to correlate the solubility of CO2 in water, and the decreased solubility of CO2 in brine was accounted for empirically by a single factor correlated with the weight percent of dissolved solids. Chang et al. (1998) also proposed an empirical correlation for the solubility of CO2 in distilled water as a function of temperature. The solubility in distilled water can be adjusted further for the effect of salinity to obtain the solubility of CO2 in brine. Apart from this simple correlation, Chang et al. proposed an isothermal, three-dimensional composition model with both fully implicit and implicit pressure explicit saturation formulations. The innovative point of their work is that CO2 fugacity coefficients in the aqueous phase are computed internally from the correlation and the equal-fugacity constraint of CO2 for aqueous and hydrocarbon phases is introduced to solve the aqueous composition. Yan and Stenby (2009, 2010) used the PR EOS modified by Søreide and Whitson to describe the phase equilibrium between CO2 and brine. A one-dimensional slim tube simulator combined with a multiphase flash subroutine was proposed to model CO2 flooding considering the influence of CO2 solubility, where the aqueous phase was treated as an inert phase or only dissolving CO2.

To consider the CO2 solubility in water, the existing reservoir compositional simulation is either with the aid of Henry’s law or with empirical correlations. Although the EOS/Gex approach is used widely in predicting the fluid phase equilibrium of polar components in process design, this model has never been integrated into reservoir simulation to fulfill the challenging simulation of CO2 flooding including CO2 equilibria between water and oil. In this work, we validate the EOS/Gex model by reproducing the experimental PVT data of the binary CO2–H2O system and then provide formulations about how to integrate the EOS/Gex model into the reservoir compositional simulation. Finally, we compare the simulation performance of our model with the existing compositional model. The simulation results of this study help to improve the accuracy of the numerical simulation of the oil recovery process involving CO2, which will, in turn, improve the quality of the reservoir performance prediction and the reliability of the economic calculations.

2 General description of the model

The simulator described here is an isothermal, three-dimensional compositional model. Fully implicit formulations are presented which are able to treat water, oil, and gas flow through reservoirs of heterogeneous permeability and porosity. It is designed to model the compositional flow process considering the CO2 phase equilibrium between the aqueous phase and the hydrocarbon phase. This simulator does not model the three-hydrocarbon-phase phenomenon that has been observed for some CO2/hydrocarbon systems.

The model consists of mass balance equations for water and nc hydrocarbon components and associated constraint equations. Oil- and gas-phase densities and fugacities are calculated from the PR EOS, while the CO2 fugacity in the aqueous phase, adjusted by a salting-out coefficient, is calculated by PR EOS with WS mixing rule (we denote the model proposed in this paper as the PR–WS model). Oil and gas viscosities are calculated by the Lohrenz et al. (1964) method. The fluid flow is simulated with Darcy’s law, incorporating viscous, gravitational, and capillary forces.

Formulation assumptions are an instantaneous equilibrium between gas and oil phases in each grid, and only CO2 is considered mutually soluble in water and oil. One reason for this is that the CO2 solubility in water is significantly larger than other hydrocarbon components. Another reason is that when large quantities of CO2 are injected during CO2 flooding, it becomes the dominant component dissolved in water compared to other relatively highly soluble constituents like H2S. This assumption is able to simplify the phase behavior calculation in the aqueous phase and reduce computation time greatly. Moreover, an equal-fugacity constraint of CO2 between water and oil is used to characterize partitioning CO2 in water and oil.

3 The PR–WS composition model

3.1 Reservoir model equations

Mass balance-type equations are used to describe the multicomponent multiphase flow in porous media. These equations can be divided into three parts (Young and Stephenson 1983): (1) mass balance equations describing component flow, (2) phase equilibrium relationships, and (3) constraint equations that require the phase saturation to sum to unity and the mole fraction in each phase to sum to unity.

For simplicity of development, the specific model assumptions are summarized as follows: (1) The dispersion and gravity forces are neglected, (2) only CO2 is considered mutually soluble in water and oil, and water has no mass exchange with the hydrocarbon, (3) the effect of gas (mainly CO2) on the aqueous viscosity is not considered because it was found to be very small, and (4) aqueous phase properties, such as the formation volume factor, water compressibility, and water viscosity, are calculated by empirical correlations.

With these assumptions,

  1. (1)

    The \(\;n_{\text{c}} + 1\) mass balance equations:

$$\begin{aligned} F_{i} & = \frac{\partial }{\partial t}\left[ {V\phi (S_{\text{o}} \rho_{\text{o}} x_{i} + S_{\text{g}} \rho_{\text{g}} y_{i} { + }S_{\text{w}} \rho_{\text{w}} x_{{{\text{w}}\,{\text{CO}}_{ 2} }} \delta_{{i,\,{\text{CO}}_{2} }} )} \right] \\ & \quad - \Delta \left[ {T(\lambda_{\text{o}} \rho_{\text{o}} x_{i} \Delta \varPhi_{\text{o}} + \lambda_{\text{g}} \rho_{\text{g}} y_{i} \Delta \varPhi_{\text{g}} { + }\lambda_{\text{w}} \rho_{\text{w}} x_{{{\text{w}}\,{\text{CO}}_{ 2} }} \delta_{{i , {\text{CO}}_{ 2} }} \Delta \varPhi_{\text{w}} )} \right] \\ & \quad + q_{i} = 0\quad \quad \quad (i = 1,2, \ldots ,n_{\text{c}} ) \\ \end{aligned}$$
(1)
$$F_{\text{w}} = \frac{\partial }{\partial t}\left[ {V\phi S_{\text{w}} \rho_{\text{w}} x_{{{\text{wH}}_{ 2} {\text{O}}}} } \right] - \Delta \left[ {T\left( {\lambda_{\text{w}} \rho_{\text{w}} x_{{{\text{wH}}_{ 2} {\text{O}}}} \Delta \varPhi_{\text{w}} } \right)} \right] + q_{\text{w}} = 0,$$
(2)

\(\delta_{{i,{\text{CO}}_{ 2} }}\) is the Kronecker delta, where \(\delta_{{i,{\text{CO}}_{ 2} }} { = }1\), if component i is CO2; otherwise, \(\delta_{{i,{\text{CO}}_{ 2} }} { = 0}\).

Transmissibility is calculated by

$$T = \frac{KA}{\Delta L}.$$
(3)

Phase mobility is determined by

$$\lambda_{\text{p}} = \frac{{K_{\text{rp}} }}{{\mu_{\text{p}} }}\quad {\text{p}} = {\text{w, o, g}} .$$
(4)

Phase potential difference between grid blocks i and j is defined as

$$\Delta \varPhi_{{{\text{p}},i,j}} = \Delta \varPhi_{{{\text{p}},j}} - \Delta \varPhi_{{{\text{p}},i}} = p_{{{\text{p}},j}} - p_{{{\text{p}},i}} .$$
(5)
  1. (2)

    The \(\;n_{\text{c}} + 1\) fugacity equations (for a three-phase block)

$$F_{\text{eh}} = f_{{i,{\text{o}}}} - f_{{i,{\text{g}}}} = 0\quad i = 1,2, \ldots ,n_{\text{c}} .$$
(6)
$$F_{\text{ew}} = f_{{{\text{CO}}_{ 2} , {\text{w}}}} - f_{{{\text{CO}}_{ 2} ,{\text{h}}}} = 0\quad h = {\text{o, g}} .$$
(7)

where h is one of the hydrocarbon phases (o or g), expressing that oil- and gas-phase fugacities must be equal for each hydrocarbon component, and CO2 fugacities in hydrocarbon phase and aqueous phase must be equal too.

  1. (3)

    Six constraint equations

Capillary pressure constraints:

$$F_{\text{pcow}} = p_{\text{c,ow}} - \left( {p_{\text{o}} - p_{\text{w}} } \right) = 0.$$
(8)
$$F_{\text{pcgo}} = p_{\text{c,go}} - \left( {p_{\text{g}} - p_{\text{o}} } \right) = 0.$$
(9)

Saturation or volume constraint:

$$F_{\text{s}} { = }S_{\text{o}} { + }S_{\text{g}} { + }S_{\text{w}} .$$
(10)

Component mole fraction constraints:

$$F_{\text{po}} = \sum\limits_{i = 1}^{{n_{\text{c}} }} {x_{i} } - 1 = 0.$$
(11)
$$F_{\text{pg}} = \sum\limits_{i = 1}^{{n_{\text{c}} }} {y_{i} } - 1 = 0.$$
(12)
$$F_{\text{pw}} = x_{{{\text{wH}}_{ 2} {\text{O}}}} { + }x_{{{\text{w}}\,{\text{CO}}_{2} }} - 1 = 0.$$
(13)

The equations and unknown variables are listed in Table 1. Linear constraint equations (Fpcow, Fpcgo, Fs, Fpo, Fpg, and Fpw) are used to remove two pressures, one saturation, and three-component mole fractions. Finally, only \(\;2n_{\text{c}} + 2\) nonlinear equations and variables are left, which is the full set of equations and variables. This full set can be further divided into primary and secondary equations and variables. Gaussian elimination is used to solve for the \(\;n_{\text{c}} + 1\) unknowns of \(y_{i},i = 1, \ldots ,n_{\text{c}} - 1\); x1 and \(x_{{{\text{w}}\,{\text{CO}}_{2} }}\) in terms of the remaining \(\;n_{\text{c}} + 1\) unknowns \(x_{i} ,\;i = 2, \ldots ,n_{\text{c}} - 1\); Sw, Sg, and po. The remaining \(\;n_{\text{c}} + 1\) unknowns are the primary unknowns, while the eliminated unknowns are secondary unknowns used in this work (Table 2). The linearized primary equations, after eliminating the secondary unknowns using the constraint equations, form a set of \(\;n_{\text{c}} + 1\) equations in terms of \(\;n_{\text{c}} + 1\) primary unknowns, and the linear system is solved iteratively, and the secondary unknowns are then computed through back-substitution.

Table 1 Equations and unknown variables in the reservoir simulation model
Table 2 Primary and secondary variables in the case of the three-phase block

To initialize the simulation, a two-phase oil–gas flash is performed first to compute oil and gas compositions and densities (for the three-phase block), and CO2 mol fraction in water is assigned to zero for all grid blocks. Aqueous phase properties are calculated from empirical correlations. During simulation, a flash calculation is performed in Newton iterations with mass balance equations. Table 3 lists the selection of primary variables when phase appearance or disappearance happens.

Table 3 Primary variable selection

3.2 Fugacity of CO2 in water

PR EOS with the WS mixing rule with the NRTL model is used to calculate CO2 fugacity and its derivative in water. “Appendix 1” gives the derivation of the WS mixing rule for PR EOS (Wong and Sandler 1992). The calculation procedure is: (1) A successive substitution method is used to apply a flash calculation for the binary CO2/water system, (2) interaction parameters for the WS mixing rule at the specified reservoir temperature are evaluated by fitting experimental data using flashing results, and (3) fitting parameters and PR EOS with the WS mixing rule are used to generate CO2 fugacity and derivatives in reservoir simulation.

Experimental data used in this work are from Bamberger et al. (2000) for the high-pressure (vapor–liquid) equilibrium of binary systems of CO2/water from 313 to 353 K and pressures between 1 and 14 MPa. Figures 1 and 2 show comparisons of the measured data and the calculated results, and Table 8 (Appendix 2) displays the calculated results. The absolute deviation of the calculated composition from the experimental data for CO2 is around 2%. Table 4 lists the evaluated interaction parameters at temperatures of 323, 333, and 353 K. The interaction data at 333 K are used in the following simulation examples of CO2 flooding.

Fig. 1
figure 1

Pressure–mole fraction diagram of CO2 at 323, 333, and 353 K calculated from the PR EOS with the WS mixing rule. Experimental data are taken from Bamberger et al. (2000)

Fig. 2
figure 2

Pressure–mole fraction diagram of H2O at 323, 333, and 353 K calculated from the PR EOS with the WS mixing rule. Experimental data are taken from Bamberger et al. (2000)

Table 4 Interaction parameters of the WS mixing rule evaluated from fitting published literature data (Bamberger et al. 2000) for the binary CO2–H2O system

The calculated fugacity in distilled water can be adjusted further for the effect of salinity to obtain the fugacity of CO2 in brine:

$$\ln \left( {\frac{{f_{{i{\text{s}}}} }}{{f_{i} }}} \right) = k_{{i{\text{s}}}} m_{\text{s}} .$$
(14)

Clever and Holland (1968) and Bakker (2003) give the salting-out coefficients for the CO2/NaCl system, both of which achieve satisfactory results. Bakker’s kis is given by:

$$k_{{{\text{CO}}_{ 2} , {\text{s}}}} = 0. 1 1 5 7 2- 6. 0 2 9 3\times 10^{ - 4} T_{\text{cels}}^{{}} + 3. 5 8 1 7\times 10^{ - 6} T_{\text{cels}}^{ 2} - 3. 7 7 7 2\times 10^{ - 9} T_{\text{cels}}^{3} .$$
(15)

Figure 3 displays a pressure–mole fraction diagram of CO2 at 323, 333, and 353 K calculated from the PR EOS with the WS mixing rule at a salinity of 4 and 6 mol/kg. It achieves a good match with the experimental data from Rumpf et al. (1994), which indicates that the proposed fugacity-adjust method is reliable.

Fig. 3
figure 3

Pressure–mole fraction diagram of CO2 at 323 and 353 K calculated by the PR EOS with WS mixing rule at a salinity of 4 and 6 mol/kg. Experimental data are taken from Rumpf et al. (1994)

3.3 Aqueous phase properties

Aqueous phase properties, like formation volume factor (Bw), water compressibility (cw), and water viscosity, can be simply correlated with the methods displayed in “Appendix 3.” Initially, Bw and cw should be evaluated at the CO2 saturated condition. For an undersaturated condition, linear interpolation is suggested by Chang et al. (1998). However, we found that aqueous phase properties are virtually proportional to the CO2 solubility. Hence, we replaced Rsw in Eqs. 35 and 37 with the mole fraction of CO2 in water to avoid cumbersome CO2 solubility prediction. This assumption introduces trivial error for the undersaturated condition because no more than a few percent of CO2 is in the aqueous phase. The effect of gas on aqueous viscosity is not considered because it was found to be very small (Whitson and Brulé 2000).

4 Simulation results

The simulation described here includes one- and three-dimensional CO2 flooding problems. For each problem, the PR–WS model is compared to the conventional model where the solubility of CO2 in water is ignored. Water is present but is immobile in all calculations to have a better understanding of phase equilibria of CO2. The CO2/methane/butane/decane system is used for the hydrocarbon content. The reservoir temperature is 333 K for all calculations, and interaction parameters for the WS mixing rule are taken from the evaluated data in Table 4 at 333 K. The capillary force, dispersion, and gravity are neglected for all simulations.

4.1 One-dimensional CO2 flooding

Four runs are designed to simulate a one-dimensional CO2 flooding problem. The model uses a number of 20 × 1 × 1 grid blocks with dimensions of 7.5 m × 60 m × 30 m. Permeability and porosity are 20 mD and 0.2, respectively. To investigate the adverse effects of CO2 solubility on the oil recovery, the following simplifications are included: (1) Water compressibility and rock compressibility are zero and (2) water viscosity is a constant with a value of 0.5 cP. The initial oil composition is 0.05/0.15/0.2/0.6 for the CO2/methane/butane/decane system. The initial water saturation of run1, run2, and run3 is 0.2, 0.4, and 0.6, respectively. No gas is present at the beginning of the simulation. An injection well injects CO2 at x = 150 with a gas rate of 4500 m3/d at standard conditions, and a production well produces at x = 0 on deliverability at 14 MPa (Table 5).

Table 5 Model data of the one-dimensional problem

Figure 4 shows oil and gas rates at the standard condition versus time, and Fig. 5 displays the oil recovery factor versus time simulated by the PR–WS model and the conventional model. For convenience, an asterisk (*) is appended to the name of simulation results of the conventional model. ΔRFmax is defined as the maximum absolute difference of recovery factors calculated by the PR–WS and conventional models within the time span. The turning point is defined as the limit where the oil rate of the PR–WS model starts to exceed that of the conventional model, which indicates that delayed oil is going to be recovered.

Fig. 4
figure 4

Oil and gas rates at standard conditions versus time simulated by the PR–WS model (dashed line) and the conventional model (solid line with an asterisk (*) appended to the name of the legend). a run1. b run2. c run3

Fig. 5
figure 5

Oil recovery factor versus time simulated by the conventional model and the PR–WS model (ΔRFmax is defined as the maximum absolute difference of recovery factors calculated by the two models within the simulation span). a run1. b run2. c run3

The oil and gas rate in run1 calculated by the PR–WS model is slightly lower than the conventional model because there is not much water present in the reservoir (Sw = 0.2). Run1 does not reach its turning point on account of too short production time or too small CO2 injection rate. ΔRFmax is at the end of the simulation with a value of 0.73%. Run2 displays a significant difference between the oil and gas rates of the PR–WS and conventional models. The turning point is around 1550 days. ΔRFmax locates at the turning point with a value of 1.93%, which shows around 2% of oil recovery is delayed. The phenomenon of delaying is enlarged in run3 when water saturation is increased to 0.6. This simulation shows that 4.11% of recovery is delayed, and the turning point is advanced to 1050 days. We observe that for a constant CO2 injection rate, the amount of oil present in the reservoir is a key factor which influences the time of the turning point, while the amount of water is a key factor which affects the value of ΔRFmax. Finally, the gas rate of the PR–WS model in the three runs is always smaller than the conventional model because a significant portion of injected CO2 is dissolved in water, which can be considered as “lost” in the aqueous phase.

To further understand the CO2 equilibria between water and oil, Fig. 6 shows CO2 and decane distribution versus distance for the PR–WS model and conventional models, and Fig. 7 displays the mole fraction of CO2 in brine versus distance at the time 600, 1200, and 1800 days for the three runs. With the advance of CO2 into the reservoir, mole fractions of hydrocarbon components like decane gradually decrease along the displacing direction. The solubility of CO2 in the one-dimensional problem at 14 MPa with a 4 mol/kg of sodium chloride is 1.4% (mol/mol) (0.80 mol/kg). These distribution curves show that CO2 breakthrough happens before the turning point because only half of the reservoir water is in a saturated condition at the breakthrough (as shown in run2 at 1200 days).

Fig. 6
figure 6

CO2 and decane distributions versus distance at the times 600, 1200, and 1800 days (the coordinate axis in the figure indicates the displacement direction and the component distribution at the different time) a run1. b run2. c run3

Fig. 7
figure 7

Mole fraction of CO2 in brine versus distance at the time 600, 1200, and 1800 days for the three runs. a run1. b run2. c run3

Figure 8 shows the ratio of injected CO2 dissolved in the aqueous phase. From run1 to run3, 2%, 4%, and 7% of injected CO2 is dissolved in the aqueous phase, respectively. The amount of CO2 that dissolved in the aqueous phase, in the three runs, is nearly proportional to the water saturation in the reservoir, which indicates that if water alternating gas is implemented or CO2 is injected after water flooding, the solubility effects of CO2 should be highly pronounced. We next investigate the influence of salinity on the dissolution of CO2 in the aqueous phase. The model setup is the same as run2 except for the salinity: run2_0 means zero salinity, while run2_4 means 4 mol/kg salinity in the aqueous phase. Figure 9 displays a comparison of CO2 solubility in water for run2_4 and run2_0 at the time 600, 1200, and 1800 days. Zero salinity increases CO2 solubility in water from 1.4% to 2.1% (mol/mol). Besides, the ratio of injected CO2 dissolved in the aqueous phase also increases from 4.0% to 6.4% for run2_4.

Fig. 8
figure 8

Ratio of injected CO2 dissolved in the aqueous phase for the three runs

Fig. 9
figure 9

Comparison of the CO2 dissolution in water at zero and 4 mol/kg of NaCl in run2 at the time 600, 1200, and 1800 days

4.2 Three-dimensional CO2 flooding

The model used to simulate a three-dimensional CO2 flooding problem is derived from the SPE1 project (Odeh 1981). CO2 is injected into a stratified reservoir with an anisotropic permeability of 500, 50, and 200 mD in the three layers with a thickness of 20, 30, and 50 ft. The porosity is uniform and equal to 0.3. Relative permeability data, initial oil composition, reservoir temperature, and injection and production schemes are inherited from the one-dimensional simulation. Aqueous properties, like formation volume factor (Bw), water compressibility (cw), and water viscosity, are calculated by correlations in “Appendix 3.” We denote this simulation as run_SPE1 (Table 6).

Table 6 Model data of three-dimensional problem

Figure 10 displays the mole fraction of CO2 in brine in the 300 grid blocks at the time 4000, 8000, and 14,600 days, respectively. The injected CO2 travels much faster in the upper layer (k1 = 500 mD) as its permeability is higher than the other two layers. A gas breakthrough is going to happen because the injected CO2 spreads to the production well (the grid painted in warm color in Fig. 10c). A sharp increase in the gas rate in Fig. 11 also affirms the gas breakthrough. In addition, the oil rates from the PR–WS model and the conventional model are very close at the end of the simulation, indicating a turning point in the near future. Finally, it is easy to draw a conclusion that around 1% of oil recovery is delayed and 5% of injected CO2 is dissolved in the aqueous phase (Fig. 12).

Fig. 10
figure 10

Mole fraction of CO2 in brine in 300 grid blocks at time 4000 days (a), 8000 days (b), and 14600 days (c)

Fig. 11
figure 11

Oil and gas rates at the standard conditions versus time simulated by the conventional and PR–WS models

Fig. 12
figure 12

Oil recovery factor versus time simulated by the conventional and PR–WS models

Highly stratified reservoirs cause uneven displacement in this simulation. Although CO2 is injected in the lower layer (k3 = 200 mD), it travels much faster in the upper layer (k1) compared to the other two layers. We can speculate that a serious gas breakthrough will happen in the upper layer (k1). In this case, mobility control measures like water alternating gas or simultaneous water alternating gas will be helpful, and certainly, the adverse effect of CO2 solubility in water should be more pronounced than in this example. Moreover, neglecting gravity may fail to consider the upward migration of CO2 due to the buoyancy, thereby mispredicting the development of CO2 flooding. For example, if CO2 is injected at the bottom of the oil-bearing layer where the permeability is relatively high, neglecting the gravity would underestimate the oil recovery because the simulation wrongly predicts a quick gas breakthrough in the bottom layer. On the contrary, such as the run_SPE1, neglecting the gravity would overestimate the performance because the simulation delays the gas breakthrough in the upper layer. For a high permeable reservoir, the gravity effect is trivial because CO2 moves much faster horizontally than vertically, but for a unconventional formation, considering the effect of gravity is recommended to achieve an accurate simulation result.

4.3 The efficiency of the formulation

Computing time required for a formulation is of interest since a comparison of overall efficiencies of different formulations is helpful in continuing development efforts. Table 7 lists the average number of iterations needed per time step for the PR–WS and conventional models and their time ratio in the five runs. Figure 13 shows these results in a graph for comparison. For CO2 injection problems, the conventional model converges in 3–7 Newton iterations per time step with an average value of 4.51, and the PR–WS model needs 4–8 iterations with an average value of 5.34. Generally, the PR–WS model spends 57% more time than the conventional model. Calculating CO2 fugacity and its derivatives in the aqueous phase is time-consuming, which is the main reason why the computational complexity is significantly increased.

Table 7 Newton iteration per time step and time ratio in the five runs (time ratio is defined as the ratio of simulation time of the PR–WS model and the conventional model)
Fig. 13
figure 13

Comparison of Newton iterations per time step and time ratio in the five runs

5 Conclusions

An implicit formulation has been described for simulation of three-dimensional CO2 flooding problems, including CO2 equilibria between water and oil. In this model, the aqueous phase is treated as a binary CO2/water system and only CO2 is considered mutually soluble in the aqueous phase and the hydrocarbon phase. The fugacity of CO2 in the aqueous phase is calculated by PR EOS and WS mixing rule with NRTL parameters, while oil- and gas-phase densities and fugacities are modeled by PR EOS with a one-fluid mixing rule. Detailed findings are summarized as follows:

  1. 1.

    PR EOS and the WS mixing rule with the NRTL model are an accurate approach to predict the phase behavior of the binary CO2/water system. The proposed method with salinity effect correction achieves a good match with the experimental data.

  2. 2.

    Selecting natural variables and full implicit natural variables of the PR–WS model enhances efficiency as well as reliability. For the test example of CO2 flooding, this model converges in 4–8 iterations per time step and the total simulation time is 57% more than the conventional model.

  3. 3.

    CO2 flooding examples show that a significant amount of injected CO2 is dissolved in water and is unavailable for mixing with oil. For example, the run3 displays up to 7% of injected CO2 is dissolved in the aqueous phase, which results in a delayed oil recovery of 4%.

  4. 4.

    The gas rate of the PR–WS model in all examples is smaller than the conventional model because a significant portion of injected CO2 is dissolved in water, which can be considered as “lost” in the aqueous phase.

  5. 5.

    CO2 breakthrough happens in advance of the turning point where the delayed oil starts to be recovered. In field applications, the delayed oil is hard to recover due to serious gas breakthrough.