In this chapter, we present  an application of an iterative ensemble smoother for a history-matching case with a reservoir simulator. The application is realistic and represents an actual oil reservoir with production data. This case focuses on formulating the history-matching problem with consistent error statistics. The chapter shows how we can use ensemble methods to estimate high-dimensional parameter sets and additional model controls by conditioning the model on fluid production rates.

1 Reservoir Modeling

In petroleum engineering, reservoir engineers use parameter-estimation methods to improve the characterization of oil reservoirs. Oil reservoirs are permeable layers in the subsurface that are bounded by structural or stratigraphic elements that create seals (traps) on the reservoir’s top and sides. For example, the seals can be, e.g., shale layers with low permeability or impermeable faults. We have only limited knowledge of the reservoir properties. We obtain coarse information about the large-scale reservoir structure from seismic data, and we have localized point information from core samples from test wells. With additional assumptions about the depositional environment, it is possible to build a geologic model of the reservoir. However, the model will always be an approximation of reality.

The geologic model and the seismic data form the basis for well planning, drilling and production. Therefore, any improvement of the reservoir model can significantly impact the reservoir economy. For example, one can define a reservoir-simulation model used to simulate the production of existing and planned wells from the geologic model. Typically, the predicted oil production is initially vastly different from the actual oil production due to flaws in the reservoir model.

2 History Matching Reservoir Models

The reservoir model has the form of Eq. (2.34), which we write as

(21.1)

Here \({\mathbf {x}}\) denotes the initialization of the dynamical variables (e.g., oil, water, gas, pressure), \(\boldsymbol{\theta }\) represents all the uncertain reservoir parameters such as the three-dimensional porosity and permeability fields, fault multipliers, structural surfaces, etc. The uncertain control variables in \({\mathbf {u}}\) represent the production of oil, water, and gas from the production wells and the injection of water and gas through the injection wells. For predictions, we specify the controls in \({\mathbf {u}}\), while for a historical simulation, we use the observed well-rates in \({\mathbf {u}}\). Typically, one assumes that the uncertain model parameters in \(\boldsymbol{\theta }\) dominate the model errors, and we have set \({\mathbf {q}}=0\). In Eq. (21.1), \({\mathbf {y}}\) represents the predicted measurements corresponding to each well’s produced oil, water, and gas.

We define the data-assimilation problem as estimating or updating the uncertain model initial conditions \({\mathbf {x}}\), model parameters \(\boldsymbol{\theta }\), and model control parameters \({\mathbf {u}}\), given the prior information and the observed production and injection. If the reservoir could deliver all the production data enforced through \({\mathbf {u}}\), there would be no misfit between observed and predicted data and consequently no model update. However, the reservoir model can generally not deliver the observed historical production data enforced on the model. Thus, we update model parameters to fit the observed production better. Hence, the name history matching.

Methods for parameter estimation in petroleum engineering typically sample the posterior pdf in Eq. (2.43) while assuming Gaussian priors and neglecting the model errors \({\mathbf {q}}\). For this joint parameter-state estimation problem, a filtering approach requires recursive updates of the parameters and dynamical state, which typically introduces dynamical inconsistencies and adds to the computation time by numerous stops and restarts of the model  (Evensen et al., 2007; Gu & Oliver, 2005; Haugen et al., 2008; Reynolds et al., 2006; Seiler et al., 2007; Skjervheim et al., 2009). For this reason, Skjervheim et al. (2011)  introduced  the use of ensemble smoothers for reservoir history matching. Following Skjervheim et al. (2011), there was a rapid development of iterative ensemble smoothers such as the EnRML (Chen & Oliver, 2012, 2013) and the ESMDA (Emerick & Reynolds, 2013). Recent papers (Evensen, 2018, 2019, 2021; Evensen & Eikrem, 2018; Evensen et al., 2019; Raanes et al., 2019) have  analyzed and further developed the iterative smoothers and enhanced their performance.

Fig. 21.1
figure 1

Petroleum case: Prior and posterior fault multiplier realizations. The prior distribution is log-uniform on the interval 0.001 to 1.0 for all faults

Fig. 21.2
figure 2

Petroleum case: The plots show the prior and posterior ensembles of predicted and observed production of oil (OPR), gas (GPR), and water (WPR) for the well OP2, from top to bottom. The left plots show the ensemble of predicted rates, while in the right column we present the ensemble of historical rates used to force the model. The green curves are the prior realizations of predicted rates, and the red curves are the corresponding updated realizations. The blue curves are the prior control-rates realizations used to force the model, while the orange curves are the updated realizations

3 Example

We will now present an example from Evensen (2021), who discussed the consistent formulation of the history-matching problem and illustrated its solution. Evensen (2021) particularly emphasized that one needs to consider the uncertainties of the model controls and include their temporal error correlations to compute a consistent update. The model was a realistic but straightforward reservoir model with six producing wells and three injectors. The uncertain parameters included the model porosity and seven fault multipliers. Evensen (2021) found that by updating the porosity field, the fault multipliers, and the model controls, one obtained an updated ensemble of models that fit the production data within their prescribed uncertainty. The assimilation method was the subspace EnRML from Algorithm 5.

Figures 21.1 and 21.2 present some history-matching results from a case where we have assumed substantial time correlations in the rate errors, which Evensen  (2021) found to be the most realistic. He sampled the prior fault-multiplier realizations from a log-uniform distribution on the interval 0.001 to 1.0 for all the faults. Thus, with a log-scale on the y-axis, the samples would appear uniformly distributed. In Fig. 21.1, the circles of different colors denote the updated ensembles of multipliers. Notably, the F3, F4, and F5 faults are closed after the conditioning. Evensen (2021) also updated the model’s three-dimensional porosity field (not shown). The left plots in Fig. 21.2 show the prior and posterior ensembles of model-predicted oil, gas, and water production rates from top to bottom. The plots to the right in Fig. 21.2 present the prior and posterior historical rates, which we use as control variables in the simulation model. We observe a weak reduction in the ensemble variance for OPR and WPR. At the same time, for GPR, there is a significant update with both reduced gas production and a lower posterior ensemble variance. The updated model parameters and controls result in the posterior ensemble prediction shown by the red curves. The posterior ensemble fits the observations within their two standard deviations error bars.

We point out that the example from Evensen  (2021) is the first time the conditioning process includes the model controls as variables to be updated. This approach resolves previously reported issues related to overfitting the measured rates and underestimating the posterior ensemble variance. We refer to the paper for a detailed discussion.