《1. Introduction》

1. Introduction

Under the framework of the Paris Agreement, achieving carbon neutrality by the middle of the century is the fundamental solution to cope with the climate crisis. Along with electrification, hydrogen, and sustainable bioenergy, carbon capture, utilization, and storage (CCUS) is key in achieving a net-zero energy system. CCUS is the only group of technology that contributes both to removing hard-to-abate CO2 emissions and directly reducing emissions in the key sectors [1]. In geological sequestration, CO2 is captured from a power plant or industrial facility and compressed; it is then transported to and injected as a supercritical fluid into depleted oil and gas reservoirs and deep saline aquifers for long-term storage. The basis for CCUS’s potential is the huge global storage capacity that exists in geological formations and the availability and proximity of potential injection sites to power generation plants. However, such injections present significant technical challenges in regard to ensuring the safety of injection operations and minimizing the probability of leakage through geological faults and naturally connected cracks on a time scale of hundreds or even thousands of years, with controllable costs. In addressing these challenges, accurate prediction of the behavior of injected CO2 is important to the long-term success of carbon sequestration, because even small leakage rates over long time periods can unravel the positive outcomes of net sequestered CO2 [2–5]. Furthermore, reservoirs’ geomechanical responses associated with the impact of high rates of injection of CO2 on natural fractures are crucial in determining earthquake effects [6,7]. Here, accurate prediction of the fate of injected CO2 and the related responses of geological formations must encompass physical models governed by multiphase flow, multicomponent transport, rock mechanics, thermodynamic phase behavior, chemical reactions within both fluid and rock, and the coupling of all these phenomena over multiple temporal and spatial scales. This effort requires high accuracy in the physical models used and in their corresponding numerical approximations. Aside from geological carbon storage, CO2 enhanced oil recovery (EOR), in which oil recovery is improved by injecting CO2 into oil reservoirs, is another key method in CCUS. Recent work [8] has demonstrated that the amount of sequestrated CO2 in storage-driven CO2 EOR can exceed the amount of emissions from burning the produced oil, resulting in net-zero or even negative CO2 emissions.

In this work, we use the implicit parallel accurate reservoir simulator (IPARS) developed at the Center for Subsurface Modeling at the University of Texas at Austin to simulate the geological carbon sequestration processes. IPARS provides a framework that supports both stand-alone and coupled simulations of several physical models. The models include single and two-phase flow, a black oil model, an equation-of-state (EOS) compositional flow model, a thermal and geomechanics model, and so forth [9–13]. IPARS has been used extensively for field-scale benchmark and experimental studies related to CO2 storage in geological formulations [13–16]. More specifically, the EOS compositional flow model is adopted to simulate the CO2 storage process in a deep saline aquifer. Both CO2 and brine are modeled as hydrocarbon components in the compositional model to account for the effect of CO2 dissolution into brine. The Peng–Robinson EOS [17] is used for CO2-brine phase behavior and property calculations. A flash calculation follows to determine the mole fractions of CO2 and water in two equilibrium phases. In particular, this module is enhanced to model CO2-brine phase behavior for CO2 geological sequestration applications [18,19]. The compositional flow module contains advanced petrophysical models, including a novel three-phase, hysteretic relative permeability model and an implicit texture foam model for the accurate characterization of cyclic injection processes and foam-assisted recovery processes [5,20,21]. These models account for the residual gas-trapping effect during geological carbon storage processes. IPARS has also been used for coupled flow and mechanics simulations to study poro-elastic and poro-plastic effects during geological carbon storage [5,22]. The flow modules in IPARS are formulated on general hexahedral grids using the mass-conservative multipoint flux mixed finite-element (MFMFE) method [10]. Moreover, IPARS supports multiple preconditioners and nonlinear solvers, such as Bi-conjugate gradient stabilized (BCGS) method, algebraic multigrid (AMG), and generalized minimal residual (GMRES) method. The simulator can handle millions of grid blocks with a message passing interface (MPI) library for parallel distributed memory computations in a high-performance computing environment [11].

Design and control problems in reservoir well management are challenging, as the forward problem involves coupled multiphysics simulations, which are highly nonlinear, multiscale, computationally expensive, and under geological uncertainties. From an optimization point of view, derivative-free optimizations are popular. These methods include particle swarm, simulated annealing (SA), genetic algorithms (GAs), and evolution strategy (ES), to name a few [23–25]. These global optimization methods enjoy the flexibility of using existing reservoir simulation software; hence, they have been extensively utilized for case studies. Another group of methods utilize stochastic approximations of the gradients, such as simultaneous perturbation stochastic approximation (SPSA) [26] and the stochastic simplex approximate gradient (StoSAG) [27], to name a few. Adjoint methods have also been applied to reservoir well optimizations [28,29]. Nevertheless, large-scale applications are still computationally demanding.

Recently, machine learning, reduced-order modeling, and other types of surrogate models have also been extensively integrated into subsurface simulations for speedups [30–32]. Bayesian optimization (BO) has emerged as a powerful solution for control and optimization problems when the objective functions are expensive to evaluate or potentially intractable. BO has been shown to be successful in machine learning for hyperparameter tuning [33], as well as in several scientific domains such as material design, robotics, and environmental monitoring [34–36], especially for low-dimensional problems [37]. Compared with other derivative-free methods, BO leverages a machine learning technique, Gaussian process regression, which permits analytical tractability when performing Bayesian inference. The combination of an acquisition function to statistical inference allows an exploration–exploitation trade-off in searching the surrogate solution space. BO has been used for uncertainty quantification for a benchmark reservoir model [38]. In this work, we adopt the BO framework to optimize the injection well scheduling in geological carbon sequestration with data from the Cranfield reservoir in Mississippi, USA.

This paper is organized as follows: Section 2 introduces the mathematical modeling of carbon sequestration processes, Section 3 introduces BO and its coupling with the reservoir simulation, the experiments and results are discussed in Section 4, and Section 5 presents the conclusions.

《2. Mathematical modeling of the carbon sequestration process》

2. Mathematical modeling of the carbon sequestration process

《2.1. Compositional flow model》

2.1. Compositional flow model

In this work, we adopt the parallel, EOS, and compositional flow module in IPARS to model the process of geological carbon storage in a depleted reservoir or a deep saline aquifer. We assume that isothermal flow, water, and Nc hydrocarbon components form a three-phase flow system—namely, an aqueous phase, a nonaqueous liquid phase, and a gaseous phase. Let Φ denote the current fluid fraction (i.e., porosity), Sα the saturation of phase α, ρα the mass density of phase α, q the injection/production rate of component i in phase α, the mole fraction of component i in phase α, uα the volumetric velocity of phase α, and D the diffusion–dispersion tensor of component i in phase α. The mass conservation equation of component i for a multiphase flow system is then given as follows:

where t is the time variable; o is oil phase; w is water phase; g is gas phase.

Let κ denote the absolute permeability tensor of the porous rock matrix, krα the relative permeability, μα the viscosity, and pα the reference phase pressure; g is the magnitude of the gravitational acceleration and z is the depth. The volumetric velocity of phase α, μα, is described by Darcy’s law:

The capillary pressure equations, auxiliary equations, and initial and boundary conditions are supplemented to close the system [39,40]. The primary variables chosen to solve the system are a reference phase pressure pα and the Nc component concentrations S1, S2, …, . A slightly compressible and a cubic Peng–Robinson EOS [17] are used for the water and hydrocarbon phases, respectively. The phase equilibrium is calculated using the Rachford–Rice equation and the isofugacity criteria.

《2.2. Hysteretic relative permeability and foam models》

2.2. Hysteretic relative permeability and foam models

One of the lessons learned from gas injection in oil reservoirs is that the gas volumetric swept efficiency is inherently low due to gravity override caused by low gas viscosity, density, and formation heterogeneity. Therefore, methods to improve the volumetric sweep efficiency are valuable. Gas mobility can be reduced by the alternative injection of gas and water (WAG). During the injection of a water slug, gas is trapped by capillary forces in high gas saturation regions, so that gas flow is diverted into regions with lower gas saturation in the subsequent gas slug [41]. However, WAG effectiveness is limited, and WAG is not very efficient in highly heterogeneous or thick reservoirs. Hence, surfactant-alternatinggas (SAG) can be introduced as a second remedy to reduce gas mobility. The in situ generated foam increases the gas apparent viscosity and blocks high permeability streaks, thereby diverting the flow from high permeability to low permeability and unswept regions [42].

The UTHYST model [20] offers a simple approach to calculate the cycle-dependent irreversible hysteresis behavior of the relative permeability for any phase. It models the monotonically increasing trapped saturation including caplillary-desaturation effect at high trapping numbers, also uses a dynamic Land coefficient in threephase porous media flow. More details on the model and validations can be found in Ref. [20].

An improved foam model based on the implicit texture foam model in Computer Modelling Group (CMG) STARS has recently been developed and implemented in IPARS [21]. The model proposed a new foam generation function that captures ① the transition of coarse foam to strong foam, ② the foam shear-thinning rheology, and ③ the foam generation hysteresis observed through experiments. The model has been calibrated and validated with experimental data. More details can be found in Ref. [21].

《3. Bayesian optimization》

3. Bayesian optimization

Consider a general optimization problem:

where represents the d-dimensional control variables, A is the feasible set. BO utilizes a Gaussian process to represent the objective function . A Gaussian process is a distribution over functions, defined by its mean function and covariance function :

It posts a prior belief over the possible objective function and, during training, iteratively refines the model by updating the Bayesian posterior conditioned on observed data. The covariance function can take many forms; here, we use the Matérn kernel [43,44]:

where  and  are the Gamma function and the Bessel function of order ν , respectively.

With the Gaussian process representing the belief about the objective function , an acquisition function, denoted by   , is used to select what point in will be evaluated next via a proxy optimization:

where  denotes the set of observations at the nth iteration with .

Expected improvement (EI) is one of the widely used acquisition functions [45,46]:

where  is the best candidate among  is the posterior standard deviation of the Gaussian process at n iterations;  is the probability density function of the standard normal distribution; is the cumulative distribution function of the standard normal distribution. EI encourages both exploration and exploitation—intuitively, it takes higher values when the surrogate mean is high (exploitation) and the surrogate variance is high (exploration). The hyperparameter ε > 0 allows more flexibility in the exploration–exploitation trade-off [46]

Contextual improvement (CI) is proposed in Ref. [47] as a simple yet effective heuristic that replaces the hyperparameter ε in EI with 

It is shown in Ref. [47] that CI is much more robust to poor priors.

In summary, the pseudo-code of the BO is given in Algorithm 1 [48].

《3.1. Parallel and distributed BO》

3.1. Parallel and distributed BO

In this work, we adopt a batch implementation of BO based on parallel Thompson sampling (TS) [49]. The acquisition function of TS can be formulated as follows [50]:

where is parametrized by θ and 

 This algorithm is described as Algorithm 2 [49], below. It can be implemented in a fully parallel and distributed manner; therefore, it can take full advantage of multiple processors on a supercomputer [49].

《3.2. Coupling with the reservoir simulator》

3.2. Coupling with the reservoir simulator

The International Business Machines (IBM) Corporation Bayesian Optimization Accelerator (BOA) is hosted on the IBM server. It is coupled to the reservoir simulator IPARS, which runs on an in-house cluster, via an interface function. Fig. 1 illustrates the schematic of the BOA-IPARS coupling. For each batch, the reservoir simulations are run on a local computer cluster in parallel, concurrently; when the simulations finish, results are post-processed to calculate the objective function values. The objective function values are then passed to the IBM cloud for the BOA computations; next, new evaluation points suggested by BOA are returned to the cluster, and simulations are initiated for the next batch.

《Fig. 1》

Fig. 1. Schematic of the BOA-IPARS coupling.

《4. Numerical experiments》

4. Numerical experiments

《4.1. The Cranfield reservoir model》

4.1. The Cranfield reservoir model

The Cranfield site, which is located in Mississippi, USA, is a depleted reservoir with a salt-cored dome geological structure. The Bureau of Economic Geology (BEG) research team at the University of Texas initiated a field-scale CO2 sequestration pilot project at the depleted Cranfield site in December 2009 [15]. By 2015, around 0.5 million metric tons of CO2 had been injected into the Cranfield field. The reservoir model contains an 80 ft × 7200 ft × 7200 ft (1 ft = 0.3048 m) domain at a depth of 9901 ft, which is discretized into a distorted hexahedral mesh of 20 × 144 × 144 elements with block dimensions of 4 ft × 50 ft × 50 ft. Five injection wells are simulated. Since the flow model entails no-flow boundary conditions, eight pseudo-production wells are assigned to the boundaries of the reservoir to mimic open-boundary conditions (Fig. 2). The pseudo-production wells are constrained at a constant bottom-hole pressure equal to the initial reservoir pressure, which is 4650 psi (1 psi = 6.894757 kPa); the initial reservoir temperature is 125 °C. The reservoir is assumed to be initially saturated with brine. Both CO2 and brine are modeled as hydrocarbon components in the compositional model to account for the effect of CO2 dissolution into the brine. The Peng–Robinson EOS [17] is used for the CO2-brine phase behavior and the property calculations. A flash calculation follows to determine the mole fractions of CO2 and water in the two equilibrium phases. 

《Fig. 2》

Fig. 2. Distribution of the wells in the reservoir model, the five injectors are modeled from real injection wells in the field, the pseudo boundary wells mimic the open flow boundary conditions on three boundaries of the reservoir model.

Table 1 [15] provides a summary of the pressure, volume, and temperature (PVT) data. The binary interaction coefficients and volume shift parameters used in the EOS are modified according to published correlations that were fitted on experimental data for the solubility of CO2 in brine and the density of brine [18,19,51]. The history-matched full-tensor permeability, porosity, relative permeability, and capillary pressure curves are used [15] (Figs. 3–5). The Cranfield reservoir data has been used for many numerical simulation studies on geological carbon storage [5,13,15,22].

《Table 1》

Table 1 EOS data for CO2 sequestration in Cranfield [15].

《Fig. 3》

Fig. 3. Reservoir initial porosity.

《Fig. 4》

Fig. 4. Reservoir vertical permeability in logarithmic scale (logpermx). md: millidarcy.

《Fig. 5》

Fig. 5. Relative permeability and capillary pressure curves. krg: gas phase relative permeability; krw: water phase relative permeability; Pc: capillary pressure.

《4.2. Baseline simulations》

4.2. Baseline simulations

The effect of gas mobility control techniques, including WAG and SAG [25], is demonstrated by simulating the four injection schemes summarized in Table 2: continuous CO2 injection, WAG without relative permeability hysteresis modeling, WAG with relative permeability hysteresis modeling, and SAG with relative permeability hysteresis modeling. In the four simulation studies, the gas injections are rate-controlled, such that the total amount of CO2 injected in the four cases is equal. The design allows an unbiased comparison of CO2 storage volume for each injection and simulation strategy. The simulation results for the CO2 distribution at the end of the injections—both views from the top and the bottom—are presented in Fig. 6 for each of the four cases. As expected, during the continuous CO2 injection (Fig. 6(a)), the gas plume migrates upwards due to low gas density and viscosity until it reaches the sealing caprock; it then migrates horizontally, resulting in poor sweep efficiency at the bottom part of the reservoir. This scenario is unfavorable from a sequestration standpoint: After 16 years of injection, most of the injected gas is produced through the boundary wells. The significant effect of relative permeability hysteresis modeling is illustrated by comparing the performances of case (Fig. 6(b)) and case (Fig. 6(c)). Both cases simulate a 20- year WAG process; case (Fig. 6(c)) enables relative permeability hysteresis modeling, while case (Fig. 6(b)) does not. The prediction in case (Fig. 6(c)) shows a broader CO2 swept area at the bottom of the reservoir in comparison with case (Fig. 6(b)). The relative permeability hysteresis accounts for the capillary trapping of the gas phase, leading to the prediction of more CO2 storage volume. As summarized in Table 3, without including the relative permeability effect, the WAG process results in 9% less cumulative CO2 storage volume compared with continuous CO2 injection; when the relative permeability effect is considered, the WAG process can result in a 55% increase in the cumulative CO2 storage volume.

《Table 2》

Table 2 Summary of CO2 injection schemes.

《Table 3》

Table 3 Summary of CO2 storage volumes for different injection schemes.

1 Mscf = 28.317 m3 .

The prominent effect of SAG in gas mobility control is shown in Fig. 6(d). As the liquid/gas mobility ratio is reduced by the in situ generation of foam, the gas phase can invade the lowpermeability area and overcome gravity segregation. The vertical gas sweep efficiency is significantly improved in comparison with both the continuous CO2 injection and WAG. The amount of CO2 storage volume in each of the injection cases is summarized in Table 3, showing that SAG significantly improves the CO2 storage volume by 77% compared with continuous CO2 injection. The SAG simulation with the injection schedule in Table 2 is set as the baseline for the injection cycle optimization in the next subsection.

《Fig. 6》

Fig. 6. Simulation results of CO2 distribution as gas saturation (Sgas) at the end of injection for each of the injection cases. (a) Continuous CO2 injection; (b) WAG without relative permeability hysteresis; (c) WAG with relative permeability hysteresis; (d) SAG with relative permeability hysteresis.

《4.3. BO for gas/surfactant injection scheduling》

4.3. BO for gas/surfactant injection scheduling

The objective is to optimize the gas/surfactant injection cycles in order to maximize the cumulative carbon storage volume in the reservoir model described above within a specific injection period. Let T denote the total injection time, rinj,i the CO2 injection rate of the injection well i, Ninj the total number of the injection wells, rprod,i the CO2 production rate of the production well i, and Nprod the total number of production wells. The optimization problem is then formulated as follows:

where the control variables C1, C2, …,CN+1 are the injection stop times for each of the CO2 injection cycles (with CN+1= T) (K is the number of cycles), and S0, S1, S2, …, SN are the injection terminating times for each of the surfactant injection cycles (with S0 = 0). A maximum of four injection cycles Ninj = 4 ) and a total injection time of 20 years  (T = 20) are predetermined.

In the BO experiments, we used the Matérn 52 covariance kernel for the Gaussian process and the CI acquisition function. A number of 15 function evaluations were assigned to initialize the Gaussian process. Aside from the initialization, the computing budget was set to a maximum number of 200 function evaluations. For the batch BO, we used a batch size of five. We also experimented with GAs and the covariance matrix adaptation (CMA)-evolution strategy (ES) [25] on the same optimization problem; for the implementation of these algorithms, we used the open-source ES package Distributed Evolutionary Algorithms in Python (DEAP) [52].

The results from the best experiment of BO are summarized in Table 4. It is noticeable that the baseline SAG scheme is targeted at five injection cycles, starting with a gas injection cycle. The optimized SAG scheme only has two injection cycles, starting with a surfactant injection cycle. The results are consistent with the physical mechanism of in situ foam generation—an initial cycle with surfactant injection will facilitate foam generation at an early stage of the entire injection scheme. Compared with the baseline SAG schedule, the optimized schedule achieves 16% more CO2 storage volume within a 20-year injection plan and reduces 56% of the water and surfactant usage.

《Table 4》

Table 4 Optimized gas/surfactant schemes via BO compared with continuous gas injection and the baseline injection scheme. 

We test the robustness of the BO algorithm by comparing its performance with the other two algorithms in repeated experiments. The experiments with each algorithm are repeated three times. Fig. 7 compares the performance of the best runs among the repeated experiments for each of the three algorithms. The experiments show that BO finds a better solution than the GA and CMA-ES, with a smaller number of function evaluations. More specifically, BO reaches its best observation, 1.31 × 108 Mscf (1 Mscf = 28.317 m3 ), after 73 function evaluations, whereas CMAES reaches 1.28 × 108 Mscf after 183 function evaluations. BO achieves competitive objective function values with 60% fewer function evaluations. These results demonstrate the efficiency of BO. Fig. 8 plots the overall performance of the three algorithms through repeated experiments. The solid line represents the mean of the function values, and the shaded area represents one standard deviation. These repeated experiments demonstrate the robustness of the algorithmic advantages of the batch BO.

《Fig. 7》

Fig. 7. Comparison of the performance of the best runs by BO, GA, and CMA-ES.

《Fig. 8》

Fig. 8. Comparison of the overall performance of BO, GA, and CMA-ES.

《5. Conclusions and discussion》

5. Conclusions and discussion

The proposed framework represents a first attempt to incorporate high-fidelity physical models and machine learning techniques that scale up to field-scale applications of geological carbon sequestration. We coupled a high-fidelity compositional reservoir simulator, IPARS, with the IBM BOA to optimize injection well scheduling in order to maximize the cumulative CO2 storage volume with in situ generated foam as a gas mobility control technique. In this framework, the forward simulations using IPARS strictly honor the complicated physics during geological carbon sequestration. The compositional flow model, which includes a hysteretic, relative permeability model and a foam model, can simulate the three major trapping mechanisms of CO2 storage— namely, structural trapping, residual trapping, and solubility trapping. BO was demonstrated to be successful in the design and to control where the objective functions are expensive to evaluate. Here, the BO consists of two components: a Gaussian process machine learning model that builds a Bayesian surrogate for the objective function, and an acquisition function that decides the sequence of sampling points. The Gaussian process allows the usage of Bayesian statistics for analysis and grants tractability regarding the uncertainties in the unknown objective function values where evaluations are not available, which is used by the acquisition function to balance the exploration–exploitation trade-off. The combination of these two components enables an efficient search of the surrogate solution space.

We applied this framework to field-scale carbon storage with field data from the Cranfield reservoir site to design injection cycles for foam-assisted carbon storage. Our numerical experiments showed that the optimized injection scheme achieves 16% more gas storage volume and 56% less water/surfactant usage compared with the baseline case. We further conducted a comparison study to examine the performance and robustness of BO and compare them with those of other commonly used algorithms, including a GA and CMA-ES. The results demonstrate the superior efficiency and robustness of the BO algorithm, in that it achieves competitive objective function values with a much smaller number of function evaluations. The results show the promise of further applications of BO for other control and well management applications in CCUS projects, such as optimization with economic constraints, optimization for well placements, and so forth. Since IPARS includes geomechanics modules that are efficiently coupled with the compositional flow model, the framework can be easily extended to include geomechanics effects during carbono¯ storage. Furthermore, the framework can be extended to consider BO under geological uncertainties.

《Acknowledgments》

Acknowledgments

Xueying Lu and Mary F. Wheeler are have been supported under the Center for Subsurface Modeling Affiliates Program, United States of America and the National Science Foundation, United States of America (1911320, Collaborative Research: High-Fidelity Modeling of Poromechanics with Strong Discontinuities).