Introduction

Recent discoveries of reservoirs with high concentrations of carbon dioxide (CO2) have boosted the research and applications of EOR methods involving this gas. In Brazil, the pre-salt carbonate reservoirs can have up to 50% of the molar fraction of CO2. This high percentage of CO2 in the reservoirs, together with the long distance from the coast, limitations of handling, drainage and storage of the gas produced, as well as the possible environmental impacts caused by the release of this gas into the atmosphere, made the technique of water alternating CO2 injection (CO2-WAG) one of the main special recovery methods to be used in these reservoirs. In fact, this method has already been used by Petrobras in the Lula field, in the Santos Basin, since 2011, but the increase in its recovery factor cannot yet be safely estimated.

In fields with a high percentage of CO2, it is extremely relevant to investigate the best type of recovery, such as continuous gas injection (CGI), injection of water alternated with CO2 (CO2-WAG), simultaneous injection of water and CO2 (SWAG), as well as the reinjection of the natural gas produced (hydrocarbon gas) or other gases. Regarding the miscibility of CO2 in the oil, we can still have immiscible WAG (IWAG) and miscible WAG (MWAG). The type of gas injected is also a highlight; applications with CO2 injections have produced better results than hydrocarbons or other gases (Christensen et al. 1998). The literature results also showed higher efficiency of CO2-WAG injections compared to pure CO2 injections (Duchenne et al. 2014). However, these recovery methods present high operating costs due to the gas, which represents a large fraction of the total cost, besides requiring compression and gas injection equipment, especially for CO2. The main problems encountered were related to the early arrival of water or gas (breakthrough), injectivity in the wells and formation of asphaltenes and hydrates. For CO2 injection, severe corrosion problems were also observed, although they also occur with other types of gases at lower intensity (Christensen et al. 1998).

Studies and production results have shown that the use of CO2 as an injection fluid can also be very attractive in highly heterogeneous and fractured reservoirs, such as in pre-salt carbonate reservoirs, increasing oil recovery (Christensen et al. 1998; Brown et al. 2013; Laochamroonvorapongse et al. 2014; Teklu et al. 2016). In fact, Laochamroonvorapongse et al. (2014) presented analytical tools to monitor the performance in the miscible WAG injection (MWAG) in carbonate reservoirs. The results showed the efficiency of these tools in analyzing producer–injector connectivity and in evaluating WAG performance. Teklu et al. (2016) studied the CO2-WAG injection with low salinity water (LS-WAG-CO2) in the recovery of carbonate reservoirs. The WAG method studied involved only one cycle, and the results were 14% and 25% increases in oil recovery in two samples of carbonates. Brown et al. (2013) developed a three-dimensional, three-phase and parallel simulator to treat a large computational effort involving CO2 in the WAG process in a carbonate reservoir model. The algorithms were developed to calculate three-phase relative permeability and capillary pressure, including the effects of gas entrapment and relative permeability hysteresis. They concluded that it was extremely important to correctly model the entrapment of oil, water and gas, because the incorrect estimation of the imprisoned fluids resulted in the over or underestimation of the CO2 stored in the reservoir and the increase in the oil recovery.

Thus, the process of alternating water and gas injection aims to increase the efficiency of sweeping and, consequently, the recovery factor of the reservoir. The continuous injection of CO2 can cause a high gas mobility in the reservoir, which could lead to the early arrival of this gas in the wells (early breakthrough). One way to overcome this problem is to make it miscible in the reservoir fluid, to delay the effect. Thus, increased efficiency will occur more strongly above the minimum miscibility pressure (MMP) (Christensen et al. 1998; Kulkarni and Rao 2005). A combination of the advantages of CO2 and water injections is expected by improving microscopic displacement and macroscopic sweeping efficiency (Christensen et al. 2001), respectively, reducing the residual oil. As is known, the efficiency of macroscopic sweeping due to water is obtained by the product of vertical and horizontal sweeping efficiencies. In turn, the efficiency of the microscopic displacement occurs with the decrease in the gas mobility and capillary forces, guaranteeing greater efficiency in the displacement due to the gas, by causing a low interfacial tension between the oil and gas phases, tending to zero when the gas becomes miscible in the reservoir fluid (Egermann et al. 2006). Because recovery efficiency is the product of vertical and horizontal efficiencies with displacement efficiencies, these expected and combined effects will result in increased reservoir recovery. Batruny and Babadagli (2015) showed that a large volume of water initially injected significantly reduces the miscibility of the gas in the oil, hindering the oil recovery. In their work, there was a critical limit for the initial water volume injection. Wang et al. (2017) carried out experiments to measure the minimum miscibility pressure (MMP) and to guarantee the CO2 miscibility condition, to evaluate the recovery and the reduction in permeability caused by asphaltene and inorganic deposition in low permeability sandstone reservoirs. Laochamroonvorapongse et al. (2014) also studied the miscible and immiscible conditions. Teklu et al. (2016) experimentally verified the condition of miscibility using rising bubble apparatus (RBA) and multiple mixing cell (MMC). Kulkarni and Rao (2005) showed that the results with WAG recovery were better than CGI and the miscible condition was more favorable than the immiscible. Duchenne et al. (2014) investigated the microscopic efficiency of CO2 in the WAG injection well above the minimum pressure of miscibility (MMP) in the samples. They found recovery factors of the order of 80%, measured through a precise system of monitoring the saturations of the three phases and by calculating the volume produced. Wang et al. (2020) studied the transition from immiscible to near miscible conditions in CO2-WAG injection and continuous CO2 in two simple models (1D and 2D). These models were used to analyze two physical mechanisms, namely compositional effects and low interfacial tension (IFT). The first produced oil stripping effects while the second implied an increased mobility of oil phase due to enhanced film formation. The latter was studied through two different models, Betté and Coats, due to an alteration in the oil relative permeability. The authors used tracer analysis in simulations to demonstrate the effect of combining both mechanisms, a viscous crossflow between non-preferential and preferential flow paths. They concluded that IFT effects could have a great impact on the fluid behavior and the oil recovery in near miscible WAG injection. However, their work did not consider the impact of relative permeability hysteresis and aqueous solubility of CO2 in these mechanisms and the optimization of operational parameters in CO2-WAG.

In WAG recovery, there is also the need to optimize several parameters, the main ones being the relation between the water injected and gas flows, known as WAG ratio, and the duration of the cycle of alternating injections, known as the WAG cycle. A few studies have focused on the CO2-WAG injection optimization process (Rahmawati et al. 2013; Panjalizadeh et al. 2015; Chen and Reynolds 2017; You et al. 2020). This is largely due to the EOR optimization processes requiring many simulations, with high computational and financial costs. Rahmawati et al. (2013) used an optimization approach called mixed integer for nonlinear problems (MINLP) and an optimization method called Nelder–Mead simplex reflection to maximize the NPV. However, they studied only a single cycle of gas (hydrocarbon) injection followed by water and used only top hole pressure (THP) as the control variable. Chen and Reynolds (2017) employed a method called ensemble based for the simultaneous optimization of bottom hole pressures (BHP), well rates and inflow control valves (ICVs). Spiteri and Juanes (2006) did not use any optimization method to maximize the recovery, using three WAG cycles, 1:1 WAG ratio, BHP constants and 100% of voidage replacement (VREP) as constant parameters. You et al. (2020) developed a robust computational framework that couples artificial neural networks (ANN) and multi-objective optimization in CO2-EOR recovery. They used multiple-objective optimization to maximize oil recovery, CO2 storage volume and project NPV. The authors concluded that this multi-objective optimization could provide a significant insight into the decision-making process of the CO2-EOR project. They also failed to consider the impact of physical phenomena and main operational parameters in the optimization process, such as the WAG ratio and cycle. In none of the reviewed articles was the reinjection of the CO2 produced by the reservoir evaluated. Therefore, the development of a methodology that is efficient in optimizing CO2 reinjection in WAG processes in carbonates is an important gap in the literature.

The WAG injection recovery method involves more complexity due to the occurrence of the relative permeability hysteresis caused by the injection alternation (imbibition and drainage processes) that occurs during the recovery method. Thus, the compositional simulation of a WAG injection becomes more complex, as they affect the capillary pressures and relative permeabilities in the two and three-phase systems; also, other phenomena are involved, such as solubility and diffusion. The current knowledge involved in the three-phase flow is limited, and quantifying and predicting the results of these processes is therefore difficult. Measuring the relative permeability is very difficult, costly and time-consuming. Thus, many correlations have been proposed to calculate the relative permeability in the three-phase system from available biphasic data. Phenomena such as solubility also have relevant roles, are poorly evaluated in the WAG injection and are often ignored. Thus, using a compositional simulator, we aim to adequately represent the multiphase flow and the mass transfer of the gas phase components to the oil phase and vice versa. Wang et al. (2017) performed the analysis of permeability reduction due to asphaltene precipitation and solubility. Some articles have studied only the three-phase relative permeability and hysteresis (Shahverdi et al. 2011; Spiteri and Juanes 2006), while other articles have only evaluated the solubility effects of CO2 due to altered salinity in the water injected (Kulkarni and Rao 2005; Teklu et al. 2016). However, in the case of the WAG model, it is not possible to determine the effect of capillary pressure. Brown et al. (2013) have developed algorithms to calculate three-phase relative permeability and capillary pressure and thus to include the effects of gas entrapment and relative permeability hysteresis. Few articles on WAG considered the occurrence of physical phenomena in the recovery process.

It is fundamental to model the fluids and to adjust the state equations to study the optimal number of pseudo-components in the compositional model, to evaluate the influence of rock wettability (hysteresis in WAG) and the solubility of CO2 in water. This type of injection was also strongly influenced by rock type, injection strategy, gas miscibility and well spacing (Christensen et al. 1998).

This article aims to develop an optimization framework to understand the advantages and disadvantages of recovery in carbonate reservoirs, focusing on the water alternated with CO2 injection. For this, we employed the fast genetic algorithm to optimize the main parameters related with this recovery method and compositional simulator for modeling the physical phenomena (hysteresis and solubility) and reinjection of the CO2 produced by the reservoir.

Methodology

The methodology was developed to provide the modeling to evaluate the CO2-WAG recovery, making the analyses more realistic considering: carbonate reservoir modeling, PVT handling, physical phenomena involved and reinjection of the CO2 produced, in order to maximize the NPV through global optimization, considering the costs in the process. The flowchart of the general methodology is shown in Fig. 1.

Fig. 1
figure 1

Flowchart of the general methodology

Carbonate reservoir model

The geological model was elaborated by Mello et al. (2013) and represents a typical region of a carbonate reservoir with grainstone facies. This model was built using RMS® software. It was elaborated considering the relation between the petrophysical properties (porosity and permeability) and interparticle porosity relation (Lucia 2002). In this model, porosity ranges from 6.8 to 18.7% with a mean of 11.8% and a wide permeability range (30 to 2233 mD) with a mean of 426 mD were used. The transform between permeability and interparticle porosity can be defined for each of the three petrophysical classes. Reduced major axis (RMA) transforms calculated based on data presented by Lucia (2002) for petrophysical class 3 (dolostones) are given by the equation:

$$k = \left( {2.884. 10^{3} } \right) \cdot \emptyset_{ip}^{4.275}$$
(1)

where k is the permeability in mD and \(\emptyset_{ip}\) is the porosity as a fraction. The relation between the vertical and horizontal permeabilities is 0.1 (Lucia 2002).

PVT handling

PVT data published by Moortgat et al. (2010) were used herein. For handling PVT data, the method of Scanavini et al. (2013) was used. This method uses the critical properties suggested by Katz and Firoozabadi (1978) and the simultaneous regression by the method of least squares of Levenberg–Maarqdt (Levenberg 1944) for calibrating EOS. More details of this method can be seen in Scanavini et al. (2013).

Physical phenomena modeling

Results from the literature have shown that ignoring the physical phenomena that occur in WAG recovery may over or underestimate the results, leading to inconsistent results and conclusions regarding the data observed in the production. We therefore briefly describe the models used in the modeling of relative permeability hysteresis and solubilization of CO2 in water.

Relative permeability hysteresis

Hysteresis refers to the phenomenon of directional saturation, exhibited by the relative permeability curves, when a given phase saturation of a fluid is increased or decreased. In a two-phase system, the relative permeability of oil decreases as the water injection is performed, until the residual oil saturation is reached. At the same time, the relative permeability of water increases until a maximum value is reached, when the oil is injected until the water stops draining. This oil can flow back through the same pores that were previously emptied by the water cycle, that is, the relative permeability of oil can increase along the same path. However, the relative permeability of water presents hysteresis because the drainage and imbibition curves do not follow the same process. As a result, the new minimum irreducible water saturation value does not return to the original connate water saturation.

In a multiphase flow, a typical CO2 injection process, which includes injecting water alternately with CO2, causes changes in saturations during each cycle. These changes in saturation also result in changes in the relative permeability of the non-wetting and intermediate phases. These are related to the effect that CO2 has on the relative permeability of water after the first CO2 injection cycle. In the same way, CO2 is affected by the relative permeability of water.

This work used the model of Larsen and Skauge (1998) to reproduce the behavior of relative permeability curves in the imbibition and drainage processes, valid for water-wet systems as the one used herein. This model is incorporated in the GEM compositional simulator of CMG® and is also known as 3P-WAG model (CMG 2019). The main feature of the model is the reduction in gas mobility with the increase in mobile water saturation. Figure 2 shows the hysteresis of the relative permeability of gas in two cycles of water alternated with gas injection. We can see a significant reduction in the relative permeability of gas from the first to the second process of increasing gas saturation.

Fig. 2
figure 2

Hysteresis loops during three-phase flow with the reduction in gas permeability (Larsen and Skauge 1998)

In this model, the gas phase (non-wetting phase) hysteresis model follows the theory of Land (1968) and Carlson (1981). The water phase (wetting phase) model interpolates between two-phase and three-phase relative permeability curves, whereby the three-phase water relative permeability is interpreted as the relative permeability after gas flooding. The final element of the model is the reduction in the minimal oil saturation (Som) used in Stone’s first model for three-phase oil relative permeability. For the non-wetting phase (gas), consider a typical drainage process (increasing gas saturation) reaching a maximum gas saturation (Sgm) followed by an imbibition process (decreasing gas saturation) leading to a trapped gas saturation (Sgr). The trapped gas saturation is given by Eq. 2:

$$S_{gr} = S_{gcrit} + \frac{{\left( {S_{gm} - S_{gcrit} } \right)}}{{1 + C\left( {S_{gm} - S_{gcrit} } \right)}}$$
(2)

where C is Land’s parameter, calculated to be consistent with Sgcrit and the maximum Sg. Sgcrit is the critical gas saturation.

The gas relative permeability on the drainage to imbibition scanning curve is given by:

$$K_{rg} \left( {S_{g} } \right) = K_{rg}^{\text{drain}} \left( {S_{gf} } \right)$$
(3)

The free gas saturation (Sgf) is calculated from Land’s equation:

$$S_{gf} = S_{gcrit} + \frac{1}{2}\left\{ {\left( {S_{g} - S_{gr} } \right) + \sqrt {\left( {S_{g} - S_{gr} } \right)^{2} + \frac{4}{C}\left( {S_{g} - S_{gr} } \right)} } \right\}$$
(4)

If the gas saturation once again decreases, then a secondary drainage curve will follow. The secondary drainage curves are calculated using the following equation:

$$K_{rg}^{\text{drain}} = \left[ {K_{rg}^{\text{input}} - K_{rg}^{\text{input}} \left( {S_{g}^{\text{start}} } \right)} \right]\left[ {\frac{{S_{\text{wcon}} }}{{S_{w}^{\text{start}} }}} \right]^{\alpha } + \left[ {K_{rg}^{\text{imb}} \left( {S_{g}^{\text{start}} } \right)} \right]$$
(5)

In this equation, \(K_{rg}^{\text{drain}}\) is the relative permeability calculated for the secondary drainage, \(K_{rg}^{\text{input}}\) is the input relative permeability at Sg, \(K_{rg}^{\text{input}} \left( {S_{g}^{\text{start}} } \right)\) is the input relative permeability at the gas saturation at the start of the secondary drainage curve, Swcon is the connate water saturation, \(S_{w}^{\text{start}}\) is the water saturation at the start of the secondary drainage curve, \(K_{rg}^{\text{imb}} \left( {S_{g}^{\text{start}} } \right)\) is the relative permeability at the start of the secondary drainage process (that is the Krg at the end of the imbibition curve), and α is the reduction exponent input.

The term raised to exponent α in Eq. (5) accounts for reduction in the gas phase relative permeability in the presence of mobile water. Equation (5) implies that the gas phase relative permeability is a function of the history of both the gas and water phase saturations. Further imbibition curves are handled by transforming the saturation using Land’s Eq. (4) with the trapped gas saturation Sgr defined as the maximum trapped gas over all the WAG cycles. The transformed saturation is then verified on the secondary drainage curve. If Stone’s first model for the three-phase oil relative permeability model is used, the minimal residual oil saturation Som may be modified to account for the trapped gas saturation:

$$Som_{{\rm mod}} = Som - \left[ {a\left( {S_{g} - S_{gf} } \right)} \right]$$
(6)

where “a” is the input by the user in the compositional simulator (CMG 2019).

It has been observed that water mobility following a gas flood is significantly reduced relative to its mobility in the original oil–water system. In addition to the usual two-phase relative permeability curve (oil–water flow), another curve for a three-phase flow scenario, which represents the water relative permeability following a gas flood, is required.

For an imbibition process (Sw increasing), the relative permeability is interpolated between the two- and three-phase curves as follows:

$$K_{rw}^{imb} = K_{rw}^{W2} \left( {1 - \frac{{S_{g}^{I} }}{{Sg_{ \hbox{max} } }}} \right) + K_{rw}^{W3} \left( {\frac{{S_{g}^{I} }}{{Sg_{ \hbox{max} } }}} \right)$$
(7)

In this equation, \(K_{rw}^{imb}\) is the calculated imbibition relative permeability, \(K_{rw}^{W2}\) is the relative permeability at Sw read from the two-phase curve, \(K_{rw}^{W3}\) is the three-phase relative permeability at Sw, Sgmax is the maximum attainable gas saturation (1 − Swcon − Soirg), \(S_{g}^{I}\) is the gas saturation at the start of the increasing water saturation (imbibition) process, Swcon is the connate water saturation, and Soirg is the irreducible oil.

A subsequent drainage relative permeability will be calculated by interpolation between the imbibition curve and either the three-phase curve or the two-phase curve, depending on the gas saturation.

Thus, for this model three constants are required: constant α that assumes a constant value for the case of the rock to be water wet (as the model employed herein); constant a also depends on the rock wettability; and Sgrmax, which is the maximum residual gas saturation (CMG 2019).

Parameter a was assumed to be equal to the work by Larsen and Skauge (1998), and the other two parameters were obtained from the work by Laboissière et al. (2013). The three-phase water relative permeability was assumed to be 25% of the biphasic, an experimental observation due to Rogers et al. (2000), because of the absence of isoperm data. Thus, the values assumed were: α = 4.9, Sgrmax = 0.22 e a = 1.1.

Aqueous solubility of CO2

Data from the literature of coefficients of CO2 aqueous solubilization and light hydrocarbons in the water formation were acquired. If the temperature is above 200 °C, for example, the solubility may be as high as 18% of the mass fraction. Even so, it is very common not to even consider by Henry’s Law the aqueous solubility of these components in compositional simulation studies.

For estimating Henry’s constant (dissolution) of the CO2 in the reservoir brine, the parameter adjustment found in Duan and Sun (2003) and Sander (1999) was calibrated using the Winprop software of CMG®.

CO2 was determined to have a solubility of 0.799627 mol/kg at a temperature of 58.2 °C (the same as the PVT data used), 6400 psi (initial pressure of the reservoir) and salinity of 200,000 ppm (solution of 3.42 molal).

For determining the Henry constant, we used the Sander relation:

$$k_{H} \underline{\underline{\text{def}}} \frac{{S_{{{\text{species }}\left( {\text{solution}} \right)}} \left( {\frac{\text{mol}}{g}} \right) R T}}{{P M_{\text{species}} }} \left( {\text{atm}} \right)$$
(8)
$$k_{{H\left( {\text{inv}} \right)}}^{px} \left( {psi} \right)\underline{\underline{\text{def}}} \frac{{k_{H} T\left( K \right) 14.69}}{12.2} \left( {\text{psi}} \right)$$
(9)

For the initial estimation of the volume of infinite dilution of CO2 in the brine, Enick’s relation (Enick and Klara 1990) was used:

$$V_{{{\text{dil}}\left( H \right)}}^{\infty } = \frac{{\left( {1799.36 - 17.8218*T + 0.06599297*T^{2} - 1.05786*10^{ - 4} T^{3} + 6.2275*10^{ - 8} T^{4} } \right)}}{{10^{3} }}\left( {\frac{l}{\text{mol}}} \right)$$
(10)

For the calculations, we considered that the salinity of the water formation and the water injection was 200,000 ppm (Lake 2007). For the solubilization of supercritical compounds, such as carbon dioxide, methane, ethane and propane in brine, Henry’s Law modified by Harvey (1996) was used. The parameters were taken from Duan and Sun (2003), Harvey (1996) and Haynes (2014) and adjusted in the Winprop software of CMG® by means of a flash liberation and regression. The values found are shown in Table 1.

Table 1 Solubility parameters of supercritical compounds in brine

CO2 recycling

The CO2 produced to be reinjected into the reservoir was recycled using keywords of the GEM software of CMG®. The recycling option in GEM allows mimicking certain processes in surface facilities, such as the stripping of certain components and the addition of a makeup stream. It defines the pressure and temperature conditions of the separators, the wells of which participate in the recycling, as well as the fraction of CO2 produced that will be reinjected (CMG 2019).

Selection of main parameters

This section presents the optimization parameters selected to evaluate the CO2-WAG recovery. These parameters were chosen because they are the parameters that most impact the NPV maximization: the WAG cycle duration (period between the beginning of the water injection and the end of the gas injection), WAG ratio (ratio between water and CO2 injection rates), maximum oil rate production, water and gas injection rates, limits of water cut (WCUT) and gas–oil ratio (GOR).

Adjustment of numerical control

The numerical adjustment was made to minimize three main components: the processing time, the percentage of error in the material balance and the percentage of failures in the simulation. For this, we used maximum timestep control, showing that the timestep size could have significant impact on the simulator performance. Normal variation per timestep was also used, applying maximum change in specific variables: pressure, saturation and global composition. The values were reached through manual tuning in order to improve the numerical performance. The WAG injections were only able to be completed until the end time using AIM (adaptive implicit method). Parallel processing was also used to reduce the computational time, specifying the number of parallel threads to be used in each simulation.

Optimization process

For the optimization process, we employed a global optimization method called fast genetic algorithm (FGA) which is more efficient than basic genetic algorithms. This algorithm was used to optimize all the cases (described in the next section).

Fast genetic algorithm (FGA)

This optimization method was successfully applied in the optimization processes with inflow control valves in the intelligent wells (Sampaio et al. 2015a), closed-loop optimization (Sampaio et al. 2015b) and in the well rates optimization under production constraints (Sampaio et al. 2019). In this work, this algorithm was used in the performance of CO2-WAG recovery.

Genetic algorithms (GA) are an extremely efficient search technique in scanning the solution space and in finding solutions close to the optimal solution, being indicated in problems especially difficult (the so-called NP-Complete problems), given the high number of variables. These algorithms are based on the simulation of the evolution of species through selection, mutation and reproduction (Goldberg 1989, Koza 1992, Mitchell 1996). It uses a population of structures called chromosomes or individuals, which are then subjected to genetic operators such as recombination and mutation, among others, that simulate reproduction and genetic mutation, respectively. Each individual is submitted to an evaluation that determines its quality as a solution to the problem. This evaluation determines which chromosomes will apply genetic operators to generate offspring.

The performance of a GA depends heavily on which operators are used in the algorithm. There are those that are easier to implement computationally, that make up the so-called simple GA (SGA), but that are less efficient in finding the global maximum (Mitchell 1996). Among these simpler operators are: single-point crossover, mutation and crossover with static rates, method of fitness selection by roulette wheel and evaluation with direct application of the objective function. Single-point crossover is the simplest form: a single crossover position is chosen at random and the parts of the two parents after the crossover position are exchanged to form two offspring. Static rates for crossover and mutation are also present in the SGA. These rates remain fixed throughout the execution of the algorithm, but have different characteristics at the beginning and end. In the selection known as roulette wheel, a proportion of the wheel is assigned to each of the possible selections based on their fitness value. This could be achieved by dividing the fitness of a selection by the total fitness of all the selections, thereby normalizing them to 1. Then, a random selection is made similarly to the way the roulette wheel is rotated. Finally, the simple evaluation can be made using the objective function directly in problem to be solved.

As this work aims at the good performance of the GA, the operators that present the best efficiency in the convergence of the best individuals used are presented below. The algorithm used, called the fast genetic algorithm (FGA), uses advanced operators: uniform crossover, mutation and crossover with deterministic rates, selection of parents by uniform stochastic sampling and modification of the evaluation function by Sigma Scaling. A brief explanation of each of these operators is provided as follows.

In the uniform crossover, a mask of random binary numbers is used and applied to the two individuals selected for the crossing. Where number zero appears on the mask, the gene for each individual is preserved, that is, there is no exchange of genes. Where number one is on the mask, there is an exchange of genes between individuals in that position. As this type of crossing has a greater capacity to combine schemes than those of a single point, whether large or small, its performance is eventually superior and tends to obtain the best results. Hu and Di Paolo (2007) showed the efficiency gain of the genetic algorithm when using the uniform crossover for an air traffic problem.

Deterministic rates for mutation and crossover can modify these parameters depending on the algorithm execution time. Using high crossover rates with low mutation rates alongside large population size refers to the diversity in the large population; however, in the small population size, the mutation rates become larger in order to provide diversity and to increase the search quality, bringing diversity to the population using crossover rates and mutation rates to increase the efficiency of the GA (Hassanat et al. 2019).

In the uniform stochastic sampling, the individuals are mapped to contiguous segments of a line, such that each individual segment is equal in size to its fitness exactly as in the roulette wheel selection. Equally spaced pointers are placed over the line in the same number as the individuals to be selected. Considering N the number of individuals to be selected, then the distance between the pointers is 1/N and the position of the first pointer is given by a randomly generated number in the range [0, 1/N]. Thus, the individuals with the highest evaluation will have a greater chance of reproducing, as they will be represented by larger line segments, without totally excluding the possibility of reproduction of individuals with lower evaluation, although with less probability of occurring, just as occurs in nature, improving the selection (Mitchell 1996).

Sigma scaling is a variant of linear scaling whereby an individual’s fitness is scaled according to its deviation from the mean fitness of the population, measured in standard deviations. Diwaker and Dhull (2011) published an article specifically to analyze the effects of sigma scaling on GA performance. They concluded that it prevents the GA from premature convergence, maintains diversity in the population and always improves the performance of GA.

Thus, by replacing each simple operator by an advanced operator that improves the efficiency at each stage of the algorithm, we can ensure that replacing the SGA with the FGA will make the search for the optimal solution more efficient. Table 2 presents a summary of the SGA operators and the changes in the FGA for better understanding the algorithms.

Table 2 SGA and FGA operators

To solve the problem proposed herein, a program was coupled to the commercial reservoir simulator. The genes in this study are the values of parameters previously mentioned. Thus, the methodology used can be considered an optimal strategy of the WAG injection at different times over the exploitation of the field to maximize the NPV.

Case studies

This section presents the case studies in which the methodology will be applied and the reservoir model, with one producer and one injector, in order to also analyze the influence between producer–injector.

Reservoir model

The simulation model used is shown in Fig. 3; the rock and fluid properties are based on the Brazilian pre-salt field, a model previously used by Mello (2015). For the petrophysical data of the model, only grainstone facies were considered. The dimensions of the grid are of 20 × 20 × 7 blocks, each block being 200ft × 200ft × 30ft in size. The grid used in the models was Cartesian. The oil used was light oil with 27API, bubble pressure of 5581 psi and initial water saturation of 13.5%. The initial pressure of the field was 6400 psi and the minimum miscibility pressure was estimated at 4400 psi, the maximum MMP calculated by GlasØ (1985).

Fig. 3
figure 3

Model employed, representing a region between the producer and the injector of a synthetic model of a Brazilian pre-salt field

Well configurations

One producer and one injector were used, in a configuration of a quarter of five spots, all vertical, with 200ft in length. The producer and injector wells were completed in all the layers of the model. The operational restrictions of the wells are listed in Table 3.

Table 3 Operational restrictions of the wells

These values remained fixed throughout the optimization process. An operating condition, voidage replacement (VREP), was also used to limit the maximum amount of water injected to the total volume of fluid produced, so as to avoid the high pressurization of the reservoir.

Optimization parameters

For optimizing the WAG injection, the following parameters were used:

  • Limit water cut (WCUTlim): maximum water cut to reach the maximum NPV. These values assumed 0.1 to 1.0;

  • Gas–oil ratio (GOR): maximum value of gas–oil ratio;

  • Maximum oil produced (STO): maximum oil production rate;

  • Maximum water injection (STW): maximum water injection rate;

  • Maximum gas injection (STG): maximum gas injection rate.

  • Only for case 5 is there an additional parameter:

  • Fraction of CO2 reinjection (recycling): fraction between 0.1 and 1. This value is the fraction of CO2 produced that will be reinjected in the reservoir;

The ranges of the values of each variable are shown in Table 4. As can be seen, the FGA is composed of variables with two ranges, one from 0.1 to 1 and the other from 3000 to 12,000. This was possible by dividing the population of the FGA into two subpopulations, each with different intervals, that evolve in parallel and are used in the same evaluation. The crossover and mutation operators had to be adapted to respect these intervals.

Table 4 Range of each parameter used in the optimization process

Fast genetic algorithm (FGA)

Table 5 presents the FGA parameters used in each control variable. The stopping criterion used in this optimization was established when 15 generations occurred without increasing the maximum NPV. The population size was defined by tests made previously. The size was six times the number of control variables. The rates of mutation and crossover have values varying linearly along the execution of the algorithm; mutation rate begins with 0.1, increasing until reaching 0.9. The crossover rate had an inverse behavior.

Table 5 Fast genetic algorithm parameters

Although GAs are indicated for especially difficult problems, with a high number of variables, the number of variables herein was reduced. This was done aiming at the next stage, which is the application in a complete reservoir model where we have not only one producer–injector pair, but several pairs. This results in a high number of variables, where the FGA has better computational efficiency and has its application recommended.

Economic scenario

The values for the probable scenario are shown in Table 6. The economic base model is selected following a simplified Brazilian fiscal regime, assuming: 25% of the corporate tax rate, 10% of the royalties, 9% of the social benefit contributions and 10-year linear depreciation. Also presented are data on the CO2 production costs in the reservoir and the cost of reinjection (NETL 2017). In all the cases studied, the investments were not considered.

Table 6 Economic data for a probable economic scenario

Cases

To carry out this work, five cases were created. Case 1 was the base case, without modeling phenomena and without the reinjection of CO2 produced. Case 2 added the modeling of the relative permeability hysteresis to case 1. Hence, case 2 was created to analyze the effects of hysteresis in relative permeability in relation to case 1, without modeling. Case 3 added the modeling of CO2 solubility to the water in case 1. This case was created to analyze the effects of aqueous solubility in relation to case 1. Case 4 added the modeling of relative permeability hysteresis and aqueous solubility to case 1. This was done to jointly analyze the effects of hysteresis of relative permeability and CO2 solubility in water. Finally, case 5 added relative permeability hysteresis, aqueous solubility and CO2 recycling to case 1. In this case, we can analyze the effects of the modeled phenomena together with the reinjection of the CO2 produced. The modeling of each case is summarized in Table 7.

Table 7 Modeling implemented in each case

For each case, we created four options. These options had different WAG cycle values. The first option has a 6-month WAG cycle. The other three options have WAG cycles equal to 12, 18 and 24 months, as shown in Table 8. These options were created to find the best WAG cycle for each case.

Table 8 WAG cycle for each case selected in this work

As can be seen, we have 5 cases, each with 4 options, totalizing 20 scenarios to be equally optimized. All the cases were optimized with the parameters listed in “Optimization parameters” section. The only difference between cases in the optimization is the inclusion of the parameter that defines the fraction of CO2 to be reinjected in case 5. All the other cases used the same parameters in the optimization process. Thus, cases 1 to 4 had five parameters and only case 5 has six optimization parameters.

Results and discussions

Table 9 provides the results of the optimization process; case 1 shows that the best option was A, with a 6-month WAG cycle. In this option, we can verify the greater oil recovery obtained. However, this increase in oil production was accompanied by higher water production and injection, while lower CO2 injection was obtained. This option can thus achieve the maximum NPV. In our comparisons, as explained earlier, this case will be considered the base case to establish relations between all the cases.

Table 9 Results of case 1 (without physical phenomena modeling and reinjection)

Figure 4 provides the graphs for the water and CO2 injection rate curves, cumulative production and water injection for case 1. There is alternation between the water and CO2 injections, the injection of water being more expressive than CO2. In fact, the best WAG ratio for this case was 14.67. This graph also shows 49 cycles of water alternating with CO2 over 30 years.

Fig. 4
figure 4

Graphs of (a) water and CO2 injection rate curves and (b) cumulative productions and water injection for WAG recovery in case 1

For the results of case 2, Table 10 shows that even with hysteresis modeling, option A was also the best option. The oil production and NPV are observed to increase in relation to case 1, showing that the modeling of the hysteresis phenomena presented a favorable result in WAG recovery. In fact, the incorporation of physical phenomena, especially relative permeability hysteresis, favors the oil recovery factor (Spiteri and Juanes 2006; Ghomian 2008). This increase in oil recovery is caused by a reduction in the residual oil saturation by gas trapping, forcing the water flow to non-swept areas. CO2 production, water production and injection decrease in relation to case 1. Note that the injection of CO2 increased four times in relation to the base case. This occurred due to one of the most common problems associated with changes in relative permeability during a WAG process, which is the loss of injectivity (Rogers et al. 2000). Therefore, it becomes necessary to raise the injection to compensate this loss.

Table 10 Results of case 2 (only relative permeability hysteresis)

In Fig. 5, the graphs show the curves for case 2. In this case, the water injection rate is more expressive than CO2, but with a smaller proportion than in the previous case, with the best WAG ratio equal to 3.34. The curves of the oil production and water production and injection are compared with base case.

Fig. 5
figure 5

Graphs of (a) water and CO2 injection rate curves and (b) cumulative production and water injection for WAG recovery in case 2 in comparison with case 1

For case 3, with aqueous solubility of CO2, as shown in Table 11, the best option was A again. As observed, this case increases the NPV more than the other cases. This can also be seen in the lower value of the WAG ratio found. Due to the solubility of CO2 in the water, in this case there is a three times greater CO2 injection than in the base case. This can be explained by the fact that the dissolution of CO2 in the water can prevent a part of the CO2 injected from coming into contact with the oil, which can be compensated by increasing the CO2 injection (Enick and Klara 1992).

Table 11 Results of case 3 (only aqueous solubility of CO2)

In Fig. 6, the graphs show the results for case 3. The WAG ratio was 5.26, lower than the base case and higher than the previous case. We can also see that cumulative water production and injection are higher than in the base case, but the oil production was anticipated in relation to the base case, resulting in higher NPV than the previous cases.

Fig. 6
figure 6

Graphs of (a) water and CO2 injection rate curves and (b) cumulative production and injection for WAG recovery in case 3 in comparison with the base case

For case 4, with the joint modeling of both physical phenomena, as shown in Table 12, the best option was A. In this option, the water production and injection and CO2 production decrease in relation to the base case, increasing the NPV. Oil production was practically the same as in the base case, with the difference of the anticipation of production, as observed in the previous case. In this case, we can observe a mixture of the two effects previously studied.

Table 12 Results of case 4 (with hysteresis and solubility)

Figure 7 presents the graphs for alternated injections and comparison of cumulative productions and injection between case 4 and the base case. Note the reduction in water production and injection at the end of production. In this case, the best WAG ratio was 3.23.

Fig. 7
figure 7

Graphs of (a) water and CO2 injection rate curves and (b) cumulative production and injection for WAG recovery in case 4 in comparison with the base case

Finally, for case 5, with the joint modeling of the physical phenomena and reinjection of the CO2 produced, as shown in Table 13, the best option was A again, with the lowest WAG cycle, lasting 6 months. This was the case with the highest NPV among the all cases analyzed. The oil production increases together with the little increase in water production and injection. The CO2 production also decreases, increasing the NPV, while CO2 injection was a little higher than the base case. The oil production increased 3.9%, and the NPV increased 8.8% in relation to the base case.

Table 13 Results of case 5 (with hysteresis, solubility and CO2 reinjection)

Figure 8 presents the graphs for water and CO2 injection rate curves, besides the cumulative production and injection in case 5. The WAG ratio for this case was 12.93. We can highlight that the cumulative oil production increases in relation to the base case. We can also conclude that the CO2 reinjection had a fundamental role in this case, since CO2 production was the lowest of all the cases, generating the highest oil recovery and resulting in the highest NPV.

Fig. 8
figure 8

Graphs of (a) water and CO2 injection rate curves and (b) cumulative production and injection for WAG recovery in case 5 in comparison with base case

Table 14 reproduces the best solutions of each case to facilitate comparison. Case 5, with physical phenomena and CO2 reinjection modeling, besides being the most realistic case, was the one that provided the best results by increasing the oil production and the NPV in relation to the base case. It can also be observed that the increase in CO2 injections with the modeling of physical phenomena can be significantly reduced with CO2 reinjection modeling. The last column highlights the difference in the NPV of each case in relation to the base case (case1). Case 5 provided a gain of about 10 million dollars over the base case.

Table 14 Comparison between results of option A

Note that the computational cost among the six cases did not vary much (around 720 s) requiring only an adequate adjustment of the numerical control for each case. As the optimization process required several simulations, the total time for the cases remained very close. An additional cost occurred in case 6 due to an extra variable in the optimization.

Table 15 shows the optimized values for each case in option A. These values of the parameters generated the results in Table 14. The best value of the fraction of CO2 produced and reinjected in the reservoir was 0.57, that is, 57% of the CO2 produced was reinjected into the reservoir to maximize NPV.

Table 15 Results of the optimized values of each case in option A

Figure 9a depicts the behavior of the WAG ratio throughout the cases, showing that the modeling of the phenomena demanded the increase in the CO2 injection in relation to the water injection. Figure 9b shows the evolution of the maximum NPV for the base case and case 5 over the generations of the genetic algorithm.

Fig. 9
figure 9

(a) Behavior of WAG ratio in all the cases and (b) evolution of NPV for cases 1 and 5 during the execution of the FGA

Figure 10 shows the results of the sensitivity analysis with all the parameters used, along with the influence of each parameter on the NPV and the ranges of values that influence the results, when analyzed individually. This graph was obtained by analyzing one parameter at a time (OPAAT Analysis) using the CMOST software of CMG® in case 6 option A. As observed, the maximum water injection rate was the parameter that most impacted the WAG recovery. The other parameters that had less influence on NPV were maximum oil rate production and limit of water cut (WCUT). The parameters gas injection rates and gas–oil ratio (GOR) had almost no effect on the results, probably because of the low cost of CO2. It is worth mentioning that the impact of the WAG cycle and WAG ratio were previously measured in the case optimizations, evidencing the great impact on the CO2-WAG recovery.

Fig. 10
figure 10

Sensitivity analysis of the parameters used in this work

Figure 11a shows the evolution of the average pressure of reservoir over the production lifetime. It can be seen that the pressure was above the minimum miscibility pressure (MMP) of 4400 psi, which guarantees the miscibility of the WAG recovery, showing that the process studied herein was of the CO2-MWAG (miscible CO2-WAG) type. Water was injected to pressurize the reservoir until reaching the MMP to enhance the macroscopic sweep efficiency. After the water injection, CO2 was used to improve microscopic displacement efficiency, forming a miscible front with reservoir fluids. Figure 11b depicts the impact of the phenomena and CO2 reinjection on oil recovery. Case 6 presents the greatest increase in recovery in relation to the base case, about 3.4%, reaching the value of 70.7%. This value is significant, since the maximized objective function was the NPV and not the recovery factor.

Fig. 11
figure 11

(a) Average pressure of the reservoir and (b) oil recovery in all the cases after optimizations

Conclusions

The results from modeling the physical phenomena and cyclic reinjection in a CO2-WAG process showed that:

  • It is not enough to analyze the increase in oil recovery in WAG methods, since besides the water and CO2 productions, we have their respective injections, presenting costs that must be reduced to maximize the NPV;

  • The absence of modeling the physical phenomena can cause significant differences in the results;

  • As previously observed by other authors, the modeling of relative permeability hysteresis showed to favor oil recovery, causing loss of injectivity, which can increase injection costs and reduce the benefits of increased recovery;

  • The modeling of the solubility of CO2 in water can raise costs due to the need to increase the injection of CO2 dissolved in water. However, this phenomenon showed to be able to anticipate oil production, positively reflecting in the cash flow;

  • In WAG recovery methods aiming at the reuse of the CO2 produced, it is necessary to model the cyclic reinjection, which showed better results. In fact, the modeling of physical phenomena increases by three or four times the CO2 injection, but the CO2 reinjection modeling can decrease significantly, maximizing the NPV;

  • The results show that the joint modeling of the physical phenomena can have an incremental consequence to the recovery, around 4% in a producer–injector pair. In turn, the modeling of CO2 separation, followed by reinjection, provided the highest NPV among all cases, increasing about 9% in relation to the base case.