1 Introduction

During miscible CO2 enhanced oil recovery (EOR) and storage in hydrocarbon reservoirs, the performance of the process depends on the small-scale or local, and the field-scale or macroscopic sweep efficiencies. The level of miscibility obtained by the injected gas and the in situ oil phase is a function of the molecular diffusion and dispersion of the injected gas, which affects the local sweep efficiency. On the other hand, permeability heterogeneity, gravity segregation and other factors, influence the field-scale displacement efficiency of the miscible injection process (Blunt et al. 1993; Orr 2004). These effects occur over multiple length scales (i.e. in the range of 10–3 to 103 ft) and can be adequately described using high-resolution geological models which integrate data at different scales (Iranshahr et al. 2014). Although computational abilities have improved recently allowing flow simulation of large-scale multimillion-cell models, the use of high-resolution geocellular model for simulation of miscible flooding processes is still computationally expensive.

Small-scale effects encountered during the simulation of miscible floods such as mixing and molecular diffusion of components between the phases typically occur at small lengths that are at the core to intermediate scale (i.e. in the range of 10–2 to 101 ft). Hence, only grid cell lengths at these scales can adequately capture these effects, which is lower than the normal coarse-scale grid block size used in computationally-efficient field-scale reservoir models and thus, requires more computational resource (Luo et al. 2018). Because of this, the correct calculations of the composition of the oil and gas components at the field scale are hindered when coarse-scale grids are used, a phenomenon frequently encountered in field-scale simulations of CO2 flooding. (Luo et al. 2018). This results in the inaccurate estimations of fluid recovery or retention as the applied coarse-scale grid blocks do not account for the complexities associated with the small-scale molecular interactions between the injected and in situ fluids.

Upscaling techniques can be used to approximate the behaviour of fine-scale miscible CO2 floods correctly on coarser grids while relatively lowering the associated computing costs. Here, coarse-scale models are built from the fine-grid models to yield results for the key petrophysical, fluid flow, and pressure parameters that are comparable to those of the original fine-grid models. Several procedures for upscaling miscible compositional flows have been developed. In compositional simulations, the components are conserved and distributed in the hydrocarbon phases (Christie and Clifford 1998). Since these simulations inherently include sub-grid heterogeneity, molecular diffusion, and dispersion of the components in the phases, they are thus more susceptible to grid coarsening than black-oil simulations. Another frequent occurrence is the incorrect phase splitting due to numerical dispersion, which causes the components flowing in the incorrect phase. Pseudo-functions can be applied to compensate for the numerical effects and the presence of small-scale flow phenomena such as molecular diffusion, viscous fingering, gravity tonguing, and so on (Darman et al. 2002; Rios et al. 2019). Numerous authors have given the compositional upscaling of miscible floods notable attention.

A study by Camy and Emanuel (1977) applied compositional upscaling by altering the phase compositions in the flow equations using factors that were calculated from one-dimensional fine-grid models. Their results showed that the use of pseudo-relative permeability and K-values functions reduces the effects of grid coarsening in compositional simulation. Fayers et al. (1989) modified this approach using a dual-zone mixing (DZM) model which upscales compositional flows to incorporate the omission of small-scale heterogeneities in the coarse-scale grid blocks. Each field-scale block was subdivided into the contacted and bypassed zones so that flash calculations could be done for each zone. Barker and Fayers (1994) developed the idea of transport coefficients, which take into consideration the fine-scale variations in the compositions and behaviour of the phases. This pseudoisation technique is a modification of the DZM method. Transport coefficients and pseudo-relative permeability functions can be used to scaleup compositional modelling problems involving complicated phase behaviours, such as those in porous media with different length scales of heterogeneity. By employing pseudo-relative permeability to scaleup molar fluxes rather than volumetric fluxes and altering the component's molar fluxes within each phase using transport coefficients, Thibeau et al. (1995) performed the dynamic upscaling of compositional flows in their research. The reproduction the fine-grid fluid flow was done using dual-scale simulations (DSS), where only the cells where the pseudo-functions are to be calculated are refined, instead of the conventional representative element volume (REV) simulations where the entire reservoir is finely gridded. Christie and Clifford (1998) upscaled the injection of lean gas into oil at residual saturation in a streamline simulator using an approach that involved transport coefficients (also known as alpha-factors or α-factors), without the addition of pseudo-relative permeability curves.

Jerauld (1998) provided a framework for scaling up a four-component limited-compositional numerical simulator model of a multi-contact miscible water-alternating hydrocarbon gas tertiary flood. To match the full-field, fine-grid, completely compositional reference simulations, the methodology used pseudo-relative permeability functions calculated by a pore-volume weighted method, Stone's method of Stone (1991), and Barker and Thibeau (1997)’s total mobility method during the waterflood phase. Ajose & Mohanty (2003) applied the α–factors method to upscale the flow of components in gas condensate reservoirs. The effects of fracture orientations, gravity, and capillary pressure on the transport coefficients were also examined. The results revealed that these effects had a considerable impact on the transport coefficients, although diffusion effects had little impact. In order to improve the accuracy of the upscaled coarse-scale model, Li and Durlofsky (2016) presented a method for scaling up two-phase oil–gas compositional formulations by iterating the transport coefficients. They concluded that the compositionally upscaling approach can be applied to processes that require a wide range of simulation runs (at changing well operating parameters), such as uncertainty analysis, sensitivity studies and production optimisation problems.

Overall, these studies have demonstrated the importance of employing upscaled transport coefficients during compositional upscaling. They have also demonstrated that the results are more precise when properly tuned transport coefficients are incorporated with pseudo-relative permeability functions. However, the upscaling process i.e. calculating these pseudo-functions, testing their accuracy using full-physics reservoir simulations and manually tuning them to mitigate any accuracies is computationally expensive. Also, these processes are done in a loop which is only terminated when appropriate matches of the fine-scale results are obtained subject to the user’s preference. Hence, an efficient upscaling process that can automatically tune the calculated pseudo-functions is necessary as  it will lead to a reduction in human input and errors, lesser computational expense and more accurate upscaling results in considerably shorter times. To address this problem, this article presents a new method of compositional upscaling.

In this study, we implemented an assisted upscaling method based on an artificial neural network (ANN)  model coupled with a genetic algorithm (GA) to reduce the computing costs and human efforts involved in upscaling miscible displacements. The idea of automatic or assisted history matching, in which the inaccuracies between the observed and simulation-predicted reservoir historical data is decreased using an optimisation algorithm (Alireza and Stephen 2012; Dang et al. 2016; Foroud et al. 2014; Zhang et al. 2012), served as the basis for this technique. First, on fine-scale grids, accurate numerical simulations of miscible CO2 floods were run in two SPE benchmark scenarios. Using a method based on the pseudoisation of the relative permeability and the transport coefficients of each component in the oil and gas phases as a function of the injected gas, the solutions and flow characteristics of the fine-scale grids were upscaled to coarse grids. While the transport coefficients consider phase behaviour and the small-scale molecular diffusion of the component within the oil and gas phases, the pseudoisation of relative permeability captures the field-scale volumetric fluxes of the phases. Manual calibrations of the transport coefficients were first carried out in order to achieve a more accurate match of the dynamics of the fine-scale model. Due to the requirement of several numerical simulations of the coarse-scale models, this method was found to be time-consuming, and hence an automatic upscaling technique was implemented. The assisted upscaling technique was found to yield accurate results at shorter times. To the best of the author’s knowledge, the presented assisted upscaling technique has not been adopted in upscaling literature, especially for the compositional upscaling of miscible floods.

2 Methodology

2.1 Calculation of Pseudo-relative Permeabilities

The pseudo-relative permeability functions used in this study were computed using the mobility-weighted pseudoisation technique of Zhang and Sorbie (1995). This approach does not require the computation of conventional single-phase flow upscaling parameters such as the transmissibility (T*) and the well index (WI*). There are no flow rate restrictions in this approach, and the model accounts for the effects of significant variations in flow rates, which frequently occur as a field develops. The fluxes out of a coarse-scale block used for calculating the pseudo-functions were only computed once (Zhang and Sorbie 1995). This reduces numerical dispersion and captures the interactions of fluid flow caused by fine-scale heterogeneity in the reservoir. This ensures that the volumetric flows of each phase are matched correctly. Thus, the method is also effective for computing the pseudo-functions that approximate the fine-grid solutions and is more robust than the approach of Kyte and Berry (1975) and other pore-volume-weighted methods. For example, these methods only derive pseudo-functions for flow in a single direction, while the method applied in this study can compute two- and three-directional pseudo-functions that suit highly anisotropic or flow-direction-dependent heterogeneous media.

This method has also proven to be effective when the capillary pressure and gravity effects are negligible (Barker and Thibeau 1997; Zhang and Sorbie 1995). In this study, the effects of capillary forces and gravity were neglected. The method is applicable to all flow rates, even in non-communicating layers where the viscous-to-gravity ratio is infinite. To reduce the computational requirements of global upscaling while retaining the accuracy of global upscaling procedures, the pseudo-functions were calculated using a local upscaling technique where the entire reservoir was fine-gridded but the required pseudo-functions were derived from a representative element volume (REV) of the reservoir. This also eliminated the need to inject thousands of pore volumes of the gas to cover the whole saturation range required to estimate the pseudo-functions if a global upscaling was used. Using the local upscaling approach, the REV can experience the required overall saturation ranges at considerably smaller pore volumes of gas injected.

The pseudo-functions were computed as functions of flow in the principal flow direction, the horizontal direction. Figure 1a depicts the schematics of the 4 × 4 upscaling for a 2D coarse block in Case 1, while Fig. 1b shows the 10 × 10 × 5 upscaling for a 3D coarse block in Case 2.

Fig. 1
figure 1

Schematics of a 4 × 4 upscaling for a 2D coarse block in Case 1, and b 10 × 10 × 5 upscaling for a 3D coarse block in Case 2

The fine-scale and coarse-scale grid flowrate out of the coarse grid boundary in the x-direction, \({\overline{q} }_{t, x}\) are equal and is given as:

$${\overline{q} }_{t, x}= \sum_{k= {k}_{1}}^{{k}_{4}}{\left({q}_{t}\right)}_{k,i4}$$
(1)

or

$${\overline{q} }_{t,x}= \sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({q}_{t}\right)}_{k,{i}_{10}}, \,\mathrm{for\, a \,}3\mathrm{D \,reservoir\, model}$$
(2)

The average saturation of the phases within the coarse grid block, \({\overline{S} }_{p}\) is calculated using a pore-volume-weighted approach and given as:

$${\overline{S} }_{p}= \frac{\sum_{i= {i}_{1}}^{{i}_{4}}\sum_{k= {k}_{1}}^{{k}_{4}}{\left({V}_{p}{S}_{p}\right)}_{i4,k}}{\sum_{i= {i}_{1}}^{{i}_{4}}\sum_{k= {k}_{1}}^{{k}_{4}}{\left({V}_{p}\right)}_{i4,k}}$$
(3)

or

$${\overline{S} }_{p}= \frac{\sum_{i= {i}_{1}}^{{i}_{10}}\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({V}_{p}{S}_{p}\right)}_{{i}_{10},k}}{\sum_{i= {i}_{1}}^{{i}_{10}}\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({V}_{p}\right)}_{{i}_{10},k}},\,\mathrm{ for \,a }\,3\mathrm{D\, reservoir\, model}$$
(4)

where Vp is the pore volume of the grid block. The fractional flow of the phase p in the x-direction out of a coarse grid cell, \({\overline{f} }_{px}\) is given as:

$${\overline{f} }_{px}= \frac{\sum_{k= {k}_{1}}^{{k}_{4}}{\left({\overline{q} }_{p}\right)}_{{i}_{4}k}/{\mu }_{p, {i}_{4}k}\left({c}_{{i}_{4}k}\right)}{\sum_{k= k}^{{k}_{4}}{\left({\overline{q} }_{t}\right)}_{{i}_{4}k}/{\mu }_{{p,i}_{4}k}\left({c}_{{i}_{4}k}\right)}$$
(5)

or

$${\overline{f} }_{px}= \frac{\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({\overline{q} }_{p}\right)}_{{i}_{10}k}/{\mu }_{p, {i}_{10}k}\left({c}_{{i}_{10}k}\right)}{\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({\overline{q} }_{t}\right)}_{{i}_{10}k}/{\mu }_{{p,i}_{10}k}\left({c}_{{i}_{10}k}\right)},\,\mathrm{ for \,a }\,3\mathrm{D\, reservoir\, model}$$
(6)

where i, j, and k represent x–, y–, and z–directions, respectively, \({\overline{q} }_{p}\) is the flowrate of phase, p across the coarse grid boundary in the x-direction. \({\mu }_{p}\) is the viscosity in centipoise (cP) of the phase, p and it is used to weight the phase flowrate through the coarse-grid block boundary, \({\overline{q} }_{p}\). Given that the flood is miscible, the viscosity, \({\mu }_{p, {i}_{n}k}\) is a function of the solvent concentration, \({c}_{{i}_{n}k}\), where n is the grid block number. The inclusion of this parameter could also extend this method to immiscible floods. In this case, the viscosity, \({\mu }_{p, {i}_{n}k}\) would be a function of the saturation, \({S}_{p}\) of the phase, p. The denominators of Eqs. (5) and (6) define the total flow rates of the phases across the coarse grid boundary in the principal direction(s) of fluid flow, while the numerators represent the flowrates of phase, p out of the coarse grid cell (Zhang and Sorbie 1995). A transmissibility-weighted averaging was applied to derive the mean total pseudo-mobility in the x-direction, \({\overline{\lambda }}_{tx}\).

$${\overline{\lambda }}_{tx}= \frac{\sum_{i= {i}_{1}}^{{i}_{4}}\sum_{k= {k}_{1}}^{{k}_{4}}{\left({T}_{x}{\lambda }_{t}\right)}_{i4,k}}{\sum_{i= {i}_{1}}^{{i}_{4}}\sum_{k= {k}_{1}}^{{k}_{4}}{\left({T}_{x}\right)}_{i4,k}}$$
(7)

or

$${\overline{\lambda }}_{tx}= \frac{\sum_{i= {i}_{1}}^{{i}_{10}}\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({T}_{x}{\lambda }_{t}\right)}_{{i}_{10},k}}{\sum_{i= {i}_{1}}^{{i}_{10}}\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({T}_{x}\right)}_{{i}_{10},k}},\,\mathrm{ for\, a\, }3\mathrm{D \,reservoir\, model}$$
(8)

where \({\lambda }_{t}\) is the total mobility.

Finally, the pseudo-relative permeabilities curves in the x-direction are then computed by joining the fractional flow and total mobility equations, as:

$${\overline{k} }_{rp}= {\overline{f} }_{px}{\overline{\mu }}_{p}{\overline{\lambda }}_{tx}$$
(9)

where \({\overline{\mu }}_{p}\) is the volumetric-averaged phase viscosity computed from the fine-grid blocks that constitute a coarse grid block. The horizontal and vertical permeabilities of each cell were upscaled as the arithmetic averages of the fine-grid block permeabilities using a pore-volume-weighted approach presented by Eqs. (10) and (11), accordingly. This method of permeability averaging was preferred to harmonic averaging because if a high permeability contrast exists between the blocks, the harmonic average may underestimate the connectivity of the blocks at the interface as it tends to be biased towards lower values.

The average permeability in the x-direction of a coarse grid block, \({\overline{k} }_{x}\) is given as:

$${\overline{k} }_{x}= \frac{\sum_{i= {i}_{1}}^{{i}_{4}}\sum_{k= {k}_{1}}^{{k}_{4}}{\left({V}_{p}{K}_{x}\right)}_{i4,k}}{\sum_{i= {i}_{1}}^{{i}_{4}}\sum_{k= {k}_{1}}^{{k}_{4}}{\left({V}_{p}\right)}_{i4,k}}$$
(10)

or

$${\overline{k} }_{x}= \frac{\sum_{i= {i}_{1}}^{{i}_{10}}\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({V}_{p}{K}_{x}\right)}_{{i}_{10},k}}{\sum_{i= {i}_{1}}^{{i}_{10}}\sum_{j= {j}_{1}}^{{j}_{10}}\sum_{k= {k}_{1}}^{{k}_{5}}{\left({V}_{p}\right)}_{{i}_{10},k}},\,\mathrm{ for\, a \,}3\mathrm{D\, reservoir \,model}$$
(11)

During the upscaling of absolute permeability, the permeability variation within the fine-scale model is made more homogeneous. Numerical dispersion is also increased in the coarse-scale model by the corresponding increase in the grid block sizes in the longitudinal and transverse directions, while the level of mixing or molecular diffusion is reduced compared to the fine-scale model. Thus, an efficient upscaling procedure should be able to effectively reduce numerical dispersion and match the level of mixing in the fine-scale reference model. The numerical dispersion can be calculated as (Akinyele and Stephen 2020):

$${D}_{num}= \frac{v}{2} \left(\Delta x- \frac{v\Delta t}{\phi }\right)$$
(12)

where v\(\left|v\right|\)\({v}_{x}\) is the flux in the longitudinal direction. This assumption is valid when velocity in the transverse direction is small compared to that in the longitudinal direction. \(\Delta x\) is the grid-cell size, \(\Delta t\) is the time step, and \(\phi\) is porosity.

The application of pseudo-fractional flows to calculate the pseudo-relative permeability ensures that the volumetric phase and component molar flowrates are accurately matched. The transmissibility weighting of the total pseudo-mobility also guarantees the adequate calibration of the pressure-dependent fluid properties. Equations (1), (3), (5), (7) and (10) calculate the pseudo-functions of 2D models, while Eqs. (2), (4), (6), (8), and (11) present the pseudo-functions of three-dimensional models. The pseudo-relative permeability curves were generated for two-phase (oil–water and oil–gas) flows, and the Stone II model was used to calculate the three-phase relative permeability functions.

2.2 Calculation of the Transport Coefficients

Transport coefficients are used to correlate the fluxes of reservoir fluids out of a field-scale coarse grid block to the average compositions of the fluids in that block (Barker et al. 2005; Barker and Fayers 1994; Fayers et al. 2007). By utilising them, the fluxes of the components in the oil and gas phases are modified to consider the behaviour of the sub-grid phase and the interactions between the flows. The transport coefficients are calculated using fine-grid simulations that consider the reservoir heterogeneity's small-scale characteristics.

The transport coefficients used in this study were derived from the output of fine-scale models. These factors were estimated for flow in the x-direction in the 2D model, and the x- and y-directions in the 3D model to reduce the complexity of the upscaling procedure. The computed transport coefficients were presented as a function of the overall mole fraction of the injected gas \({(z}_{{CO}_{2}})\). Figure 2 presents a local two-coarse-block region showing the outflow boundary and the region within a coarse grid block. The fine grid is shown by the light lines, and the coarse grid is shown by the heavy lines.

Fig. 2
figure 2

A local two-coarse-block region showing the outflow boundary and the region within a coarse grid block. The light lines represent the fine grid, while the heavy lines show the coarse grid

The procedure outlined below was employed to compute the transport coefficients:

  • We specified a region R on the fine grid that corresponds to one grid block in the coarse grid model. The outflow boundary at the interface of the region in the x-direction was labelled B, as shown in Fig. 2.

  • At chosen time steps, the molar flux (in mol per unit volume) of the component in the oil and gas phases out of the region R through the outflow boundary B was calculated (see Fig. 2). The flux of the components in the oil phase out of the region R was calculated as:

    $${\left({\rho }_{o}{x}_{i}\right)}_{B}= \frac{\sum_{B}\Delta y\Delta z{\rho }_{o}{u}_{ox}{x}_{i}}{\sum_{B}\Delta y\Delta z{u}_{ox}}$$
    (13)
    $${\left({\rho }_{o}{x}_{i}\right)}_{R}= \frac{\sum_{B}\Delta x\Delta y\Delta z{\rho }_{o}{u}_{ox}{x}_{i}}{\sum_{B}\Delta x\Delta y\Delta z{u}_{ox}}$$
    (14)

and flux of the components in the gas phase out of the region R was calculated as:

$${\left({\rho }_{g}{y}_{i}\right)}_{B}= \frac{\sum_{B}\Delta y\Delta z{\rho }_{g}{u}_{gx}{y}_{i}}{\sum_{B}\Delta y\Delta z{u}_{gx}}$$
(15)
$${\left({\rho }_{g}{y}_{i}\right)}_{R}= \frac{\sum_{B}\Delta x\Delta y\Delta z{\rho }_{g}{u}_{gx}{y}_{i}}{\sum_{B}\Delta x\Delta y\Delta z{u}_{gx}}$$
(16)
  • We then calculated the transport coefficients as:

    $${\alpha }_{oi}= \frac{{\left({\rho }_{o}{x}_{i}\right)}_{B}}{{\left({\rho }_{o}{x}_{i}\right)}_{R}}$$
    (17)
    $${\alpha }_{gi}= \frac{{\left({\rho }_{g}{y}_{i}\right)}_{B}}{{\left({\rho }_{g}{y}_{i}\right)}_{R}}$$
    (18)

    and then tabulated them versus \({z}_{{{\text{CO}}}_{2}}\). The denominator defines the sum of these quantities over the fine-grid cells (or region, R) that make up a coarse grid block. Equations 13, 15, and 17 compute the transport coefficients for a 2D models, while Eqs. (14), (16) and (18) present the transport coefficients for a three-dimensional model.

In the upscaled models, it can occasionally be impractical to produce pseudo-functions for each coarse block and flow direction (Barker and Thibeau 1997; Li and Durlofsky 2016). As a result, in this work, we avoided this expense by extracting a representative element of volume (REV) to calculate the pseudo-functions, a method known as REV pseudoisation (Barker and Fayers 1994; Barker and Thibeau 1997; Jákupsstovu et al. 2001). The calculated pseudo-functions were then assigned based on the classification of the coarse grid cells into various rock types depending on the permeability value of the grid cell. The resulting permeabilities are typically lower when absolute permeability is upscaled, which reduces the small-scale permeability heterogeneity in the coarse-scale model. The loss of small-scale reservoir heterogeneities leads to underestimations of recoveries in coarsened models. Additionally, there might be a change in the well pressures from the fine to the coarse grid, and the producers' bottom-hole pressure (BHP) might drop below the minimum miscibility pressure (MMP), which is not ideal for miscible displacements. By performing numerical simulations of single-phase flow in the first model, we evaluated the effectiveness of the pseudoisation strategy. The pressures were closely matched, which suggests an efficient absolute permeability upscaling.

2.3 Improving the Upscaling Results: Calibrating the transport coefficients

2.3.1 Scenario 1: Manual Tuning

When performing the upscaling procedure described above, it is assumed that the quantities of the coarse-scale grids are the fine-scale averages. This assumption is logical, but it is not always true since there is frequently a mismatch between the phase fluxes of the integrated fine-scale and those of the coarse-scale. However, accurate calibration and the removal of this mismatch are crucial for the results of the upscaling to be reliable. As described in the studies by Barker and Thibeau (1997), Chen et al. (2008) and Li and Durlofsky (2016), it is possible to increase the accuracy of the upscaling results by adjusting some of the derived upscaled coarse-scale quantities, such as the transport coefficients, absolute permeability, or the endpoints of the relative permeabilities. Similar to reservoir history matching, this tuning is done to reduce or eliminate disparities between the fine- and coarse-scale models in terms of phase and composition flowrates and/or any other performance indicator.

For the miscible flooding upscaling under consideration, the accuracy of the results was significantly affected by calibrating the transport coefficients of CO2 in the oil and gas phases, i.e. \({\alpha }_{o,{{\text{CO}}}_{2}}\) and \({\alpha }_{g,{{\text{CO}}}_{2}}\). Li and Durlofsky (2016) and Zhang and Sorbie (1995) have reported that during compositional upscaling, transport coefficients take precedence over pseudo-relative permeability functions (kr). So, in this study, we adjusted the transport coefficients iteratively until adequate solutions were achieved in order to obtain a suitable fit between the fine-grid model and the upscaled models. We do concede that iterating on more coarse-scale quantities might be advantageous for various upscaling problems. Given the initial estimates of \({\alpha }_{o,{{\text{CO}}}_{2}}\) and \({\alpha }_{g,{{\text{CO}}}_{2}}\) computed from Eqs. (18) and (19), the coarse-scale compositional flow equations were solved. The fluxes of the component i in the phase p, \({\left({u}_{px}{y}_{i}\right)}^{c}\) or \({\left({u}_{px}{x}_{i}\right)}^{c}\) for the gas and oil phase, respectively, through the coarse interface were then calculated. Based on this mismatch, an updated \({\alpha }_{p,{{\text{CO}}}_{2}}\) was calculated as:

$${\alpha }_{p,{{\text{CO}}}_{2}}^{n+1}=d{\alpha }_{p,{{\text{CO}}}_{2}}^{v}+ \left(1-d\right)\frac{\sum_{B}{\left({u}_{px}{y}_{i}\right)}^{f}}{{\left({u}_{px}{y}_{i}\right)}^{c}} {\alpha }_{p,{{\text{CO}}}_{2}}^{v}$$
(19)

where d represents the damping, which is used to prevent rapid changes in \({\alpha }_{p,{{\text{CO}}}_{2}}^{v}\), superscript v denotes the current iteration, and n + 1 is the following iteration. \({\left({u}_{px}{y}_{i}\right)}^{f}\) is the total flux of the component in the gas phase across the boundary in the fine scale grids and can be interchanged with \({\left({u}_{px}{x}_{i}\right)}^{f}\) for computations involving the oil phase. To obtain the coarse-scale parameters required for Eq. (19), the time step has to be repeated numerous times within the coarse-scale simulation. It took six iterations to find a good match, indicating that the procedure was computationally expensive. This strategy of tuning transport coefficient instead of kr is particularly effective in multi-contact miscible floods because relative permeability effects are minimal, and mass transfer between the phases is good, as is the case in this study.

To assess the accuracy of the solutions of the upscaled and the standard coarse models, the errors of the production rates of the phases and some selected components were calculated. The relative error (RE), which was used to determine the error, is as follows:

$${\text{RE}}= \frac{1}{n}\sum_{i= 1}^{n}\frac{\left|{R}_{t}^{c}- {R}_{t}^{f}\right|}{{R}_{t}^{f}} \times 100\%$$
(20)

where \({R}_{t}^{c}\) and \({R}_{t}^{f}\) are the oil or gas production rates at timestep, t for the coarse and fine grids, respectively. Based on the computational expense of performing each iteration, a relative error less than 10% is regarded as acceptable for this procedure. This value is sufficient for this numerical exercise since the goal of the manual iteration procedure is not to find the best upscaling solution, but rather, to show that its usefulness in providing more accurate upscaling solutions than the non-calibrated procedure.

2.3.2 Scenario 2: Assisted Calibration of the Transport Coefficients Using an ANN-Based Optimisation Routine

The procedure of calibrating the transport coefficients described in the previous section was only stopped when a suitable result was attained based on the engineer’s discretion. This was a time-consuming process as multiple numerical simulation runs were required to achieve this suitable match. Also, the solution provided was not the optimum solution as computational expense was given precedence over accuracy. To address this, we treated the calibration as a multi-objective optimisation problem where the objective(s) was the reduction of the mismatch between the predictions of the upscaled coarse-scale models and the fine-scale model. For simplicity, the proposed methodology was applied to the upscaling of Case 1.

The assisted upscaling workflow focused on calibrating the transport coefficients using the observed predictions of the fine-scale model as targets. It required solving an inverse problem for which the solution would be non-unique since many combinations of parameter settings would yield a similar model response. From the optimisation perspective, the calibration process can be defined as follows:

$$\underset{\mathit{x }\in\Omega }{{\text{min}}}{\Vert O\left(x\right)-y\Vert }^{2}$$
(21)

where \(y\in {R}^{m}\) denotes the vector of measured observations from the fine-scale simulation and \(O\left(x\right)\in {R}^{m}\) is upscaling solutions. x represents the optimisation variables which belong to feasible domain \(\Omega\). The objective of this inverse problem was to obtain an x such that the distance between the resulting upscaling output and the fine-gridded simulation is minimised or eliminated, although the latter may be impossible. In summary, the optimisation variables in this problem were the transport coefficient of the components in the oil and gas phases, and the objective function was the minimisation of the root mean-squared error (RMSE) between the fine- and coarse-scale production rates.

The RMSE of each quantity is given as:

$${\sigma }_{m}= \sqrt{\frac{1}{{N}_{d}}\sum_{t=1}^{{N}_{d}}{({e}^{\left(t\right)})}^{2}}$$
(22)

where \({e}^{(t)}= \frac{{R}_{c}^{t}- {R}_{f}^{t}}{{R}_{f}^{t}}\), \({N}_{d}\) is the number of the observed points i.e. the simulation time steps; \({R}_{c}^{t}\) and \({R}_{f}^{t}\) are production rates of the metric, m considered for the fine-scale and the upscaled coarse-scale models corresponding to timestep, t, respectively. Sixteen metrics were considered in the preliminary objective function, the total RMSE which is given as:

$$\mathrm{Total\, RMSE}=\sum_{i=1}^{n}\left({\sigma }_{{\text{m}}}\right)$$
(23)

2.4 Sensitivity Analysis

A sensitivity analysis was carried out to reduce the number of input variables to those that significantly affect the objective function. The simulation runs needed to evaluate the impact of the transport coefficients on the initial objective function, the overall RMSE, were generated using the Plackett–Burman design. Recall that each full-physics simulation takes ten minutes to run. The sensitivities of the input variables to the objective function were assessed by varying one variable at a time. The impacts of each variable were then expressed as the % contribution of each variable to changes in the values of the objective function, as shown in:

$$\% {\text{contribution}}= \frac{\left|{Y}_{i,\mathrm{ max}}- {Y}_{i,\mathrm{ min}}\right| }{\sum \left|{Y}_{i, {\text{max}}}- {Y}_{i, {\text{min}}}\right|} \times 100\%$$
(24)

where \({Y}_{i, {\text{max}}}\) and \({Y}_{i, {\text{min}}}\) are the maximum and minimum values of the objective function(s) evaluated for the minimum and maximum values of each variable i, respectively. The denominator represents the sum of the numerator for all the variables. The input variables having a % contribution of less than 5% were regarded as insignificant. Based on the results, eight parameters were retained for constructing the proxy model of the final objective function. The Pareto chart of the sensitivity analysis is presented in Fig. 3.

Fig. 3
figure 3

Summary of the sensitivities of input variable on the objective function

Thus, the significant input variables are \({\alpha }_{o,{{\text{CO}}}_{2}}\), \({\alpha }_{o,{\text{compt}}5}\), \({\alpha }_{o,{\text{compt}}7}\), \({\alpha }_{g,{{\text{CO}}}_{2}}\), \({\alpha }_{g,{{\text{C}}}_{1}}\), \({\alpha }_{g,c{\text{ompt}}3}\), \({\alpha }_{g,{\text{compt}}4}\) and \({\alpha }_{g,{\text{compt}}5}\), and the final RMSE was given as:

$${{\text{RMSE}}= f(\alpha }_{o,{{\text{CO}}}_{2}},{\alpha }_{o,{\text{compt}}5},{\alpha }_{o,{\text{compt}}7},{\alpha }_{g,{{\text{CO}}}_{2}},{\alpha }_{g,{{\text{C}}}_{1}},{\alpha }_{g,{\text{compt}}3},{\alpha }_{g,{\text{compt}}4},{\alpha }_{g,{\text{compt}}5})$$
(25)

Thus, the objective function of the assisted upscaling procedure was:

$${{\text{min}}\{ f(\alpha }_{o,{{\text{CO}}}_{2}},{\alpha }_{o,{\text{compt}}5},{\alpha }_{o,{\text{compt}}7},{\alpha }_{g,{{\text{CO}}}_{2}},{\alpha }_{g,{{\text{C}}}_{1}},{\alpha }_{g,{\text{compt}}3},{\alpha }_{g,{\text{compt}}4},{\alpha }_{g,{\text{compt}}5})\}$$
(26)

2.5 The Surrogate Model of the Objective Function

We used experimental design to generate the simulation runs that were combined with proxy modelling to build an approximation model of the intended objective function in order to reduce computation cost. Experimental design and proxy modelling are well-established approaches in petroleum engineering, particularly in modelling reservoir performance (Agada et al. 2017; Aghbash and Ahmadi 2012; Aghdam and Ghorashi 2017; Dai et al. 2017; Karimaie et al. 2017). The application of an efficient experimental design ensures that maximum information on the relationship between the objective function and the multidimensional optimisation variables is obtained at a minimum amount of computational cost. In conjunction with approximation models, they can be used for sensitivity analysis and for approximating the objective function. The approximated objective function can then be optimised using a reasonable optimisation algorithm.

In petroleum engineering, approximation models of the desired objective function are built using data-driven proxy modelling techniques, as well as experimental designs like Box-Behnken, central-composite, fractional factorial, Latin-hypercube designs, etc., such as artificial neural networks (Costa et al. 2014). Ogbeiwi et al. (2020) also conducted a thorough analysis of experimental design and proxy modelling methods and their applicability to optimisation problems. In this study, we constructed approximate models of the desired objective function using an artificial neural network (ANN). The simulation runs required to build the approximation model were generated using a space-filling Latin Hypercube Design (LHD). Although the ANN is often criticised for its weakness to extrapolate on samples outside the training range, the use of the LHD-derived training samples mitigates this limitation. As a pseudo-Monte Carlo sampling technique, the LHD systematically generates the values of the parameter samples from a multidimensional solution using the idea of stratified sampling. This ensures that the data-driven proxy model is constructed using a design that fully explores the parameter spaces of the input variables. A parameter space is the range of possible values of a variable of interest, and the minimum and maximum values of this range represent the lower and upper boundaries, respectively.

ANNs are systems for processing information that resembles biological neural network architectures. They are often distinguished by the number of neurons and layers as well as their connectivity, and they are made up of several artificial neurons that are highly interconnected and function as processors (Negash et al. 2017). The neurons and their connection weights are used to model the correlations between the inputs and outputs. In this study, the ANN training task was done by setting the weights and biases of the network so that it approximated the RMSE produced from the responses of the full-physics numerical simulation models.

This study used a feed-forward, backward propagation multi-layered neural network (BPNN) architecture. A feed-forward ANN with only one hidden layer and enough neurons in this layer, as opposed to other ANN architectures like feed-backward and self-organising neural networks, can effectively fit any finite input–output fitting problem (Negash et al. 2017). For our ANN, we defined a tangent-sigmoid transfer function. Each fine and coarse-scale full-physics simulation run takes 40 and 10 min, respectively. In MATLAB (Mathworks Inc 2019), the BPNN architecture was developed so that the input layer of the ANN model has 8 layers, which is equal to the number of input variables. Recall that the output variable was the final RMSE given in Eq. (23) when n = 8. Using the design obtained from the Latin-Hypercube design, ninety-six full-physics numerical simulations and computations of the objective function were performed to train the ANN model. Given the advantages of the LHD, this number was sufficient to cover the parameter space required to construct a surrogate model for eight input variables. A hidden layer containing 20 neurons was specified to connect to the input layer by weights and a transfer function:

$${a}_{i}^{1}={\text{tansig}}\left({y}_{i}+{b}_{i}^{1}\right), i=1-20$$
(27)
$${\text{with}}: {y}_{i}= \sum_{j=1}^{20}{X}_{ij}; { X}_{ij}= {X}_{j} .{ w}_{ij}^{1}$$
(28)

where \({X}_{ij}\) is the variable in the input layer, \({w}_{ij}^{1}\) represents the corresponding weight of the jth neuron of the input layer that connects with the ith neuron of the hidden layer, and \({b}_{i}^{1}\) is the bias value of the ith neuron in the hidden layer. A tangent-sigmoid transfer activation function was specified as follows:

$${\text{tansig}}\left(x\right)= \frac{2}{1+ {e}^{-2x}}-1$$
(29)

The choice of these parameters was influenced by a sensitivity analysis that was done to predict their best values. In the ANN model, the feedforward network calculates the output from the vectors of initial weights and bias values that are initiated by the backpropagation process. The difference between the actual RMSEs and the proxy predicted RMSEs was used to gauge the estimation's accuracy. The Levenberg–Marquardt algorithm is used to modify the weights and biases of the ANN model as training progresses. A bigger volume of data may often be employed in the training cycle to produce a more accurate model as this modification is made.

The coefficient of determination, also known as the R2 goodness of fit, was used to verify the ANN model’s correctness. Fourteen additional simulations/evaluations of the objective function were used to test the accuracy of resulting NN model.

The R2 goodness of fit is given as:

$${R}^{2}=1-\frac{{{\text{SS}}}_{{\text{res}}}}{{{\text{SS}}}_{{\text{tot}}}}$$
(30)

where \({{\text{SS}}}_{{\text{tot}}}= {\sum_{i=1}^{{N}_{d}}[\left|{{y}_{t}}^{(i)}- {\overline{y} }_{t}\right|]}^{2}\) is the total sum of squares, and represents the sum of the variation of the experimental values around its mean value \(({\overline{ y} }_{t})\), and \({{\text{SS}}}_{{\text{res}}}= {\sum_{i=1}^{{N}_{d}}[\left|{e}^{(i)}\right|]}^{2}\) is the residual sum of squares.

2.6 The Optimisation Algorithm

In most cases, the derivative information is expensive to get or might not be available, and the assisted calibration method necessitates overly expensive full-physics simulations. Recent advances in computing power have made it possible to apply optimisation techniques to assisted-history-matching problems, a framework that can also be implemented in upscaling problems. In this study, we applied a meta-heuristic algorithm, the Genetic Algorithm to the optimisation framework. The GA has an advantage for multidimensional, nonlinear optimisation problems like the present one which could contain many local minima in which other, non-evolutionary optimisation methods might get stuck (Foroud et al. 2014). They do this by generating many probable solutions and then evaluating each of these to determine its level of fitness. By applying GA operators, better solutions evolve from the previous solutions and this process is repeated until a specified criterion for the optimal solutions is met. Thus, the GA can also converge to the global optimum solution, adapt to many kinds of dynamic input, and is independent of the forward model structure. This assures that its settings can be chosen with flexibility.

The GA framework involves population generation, evaluation, reproduction, elitism, crossover and mutation. Using operators that mimic natural genetic variation and natural selection, the GA creates a generation of potential solutions in accordance with the problem. After the evaluation of each generation, this set of solutions called the population is stored and modified in parallel. Using the crossover operator, information is exchanged amongst the solutions and variety is introduced into the population using the mutation operator. In addition to the parallel calculation, a problem-unique crossover operator is developed to generate new members of each generation that retain the good gene from one parent and the ability to avoid the local optima. Thus, one parent is described as one of the best solutions in the last generation and the other parents can be random members in the solution space. The workflow of the genetic algorithm is present in Fig. 4.

Fig. 4
figure 4

Workflow of the genetic algorithm

The main objective of the assisted upscaling process is to find the values of the transport coefficients that result in a minimum RMSE. For this, a closed loop with an objective function was developed using the genetic algorithm (GA) in MATLAB (Mathworks Inc 2019). When there is limited knowledge of the distribution of the input variables such as is the case in this study, GA is frequently used in the global search for optimal solutions (Foroud et al. 2014). Table 1 lists the GA operators that were applied during the optimisation process. The optimisation method is ended when the defined value is reached. The tolerance function specifies the required difference between the new and existing optimal values. The algorithm was given a mutation probability of 5% per model so that it may sample a larger search space and avoid being stuck in the local minima. 50 generations of the input variables were selected for the GA optimisation and the population of each generation was set at 50. Thus, for each evaluation by the GA optimiser to determine the optimum transport coefficients, a total of 2500 function evaluations were required. According to Ogbeiwi et al. (2020), these choices are conventional for any optimisation using a GA.

Table 1 Optimisation algorithm operators

In the closed-loop technique, the trained ANN serves as the fitness function evaluator and a closed loop is formed between the optimiser engine, the GA and the trained ANN. The GA then tries to determine the ANN’s minimum RMSE. The optimisation search is repeated in each iteration of the GA since it uses a stochastic search technique. To guarantee that an overall optimal solution was found, the optimisation experiment was run three times using different initial conditions. However, because the proxy model can be evaluated extremely quickly, the rule of diminishing returns is also acknowledged during the optimisation. But rather than completing the task as quickly as possible, our major priority is to arrive at the global optimum. Recall that 2500 evaluations of the objective function were performed at each run, and therefore a total of 7500 evaluations were conducted in search of a global optimum solution. As a stochastic search method, the GA searches for the optimal variables in each iteration using a different initial population, and the values at the final iteration are taken as the optimal outcomes. This demonstrates the value of fast surrogate models to the optimisation routine since only 97 full-physics simulations were required to train and test the surrogate model.

The result from the optimisation routine was validated by applying it to the numerical simulator. If the RMSE obtained was unsatisfactory, the result was added to the training data set, and the ANN was retrained. This method was continued until a satisfactory RMSE with a relative percentage error of 1.5%—the termination criterion—was met. By doing this, the ANN's accuracy was enhanced, especially in the region of the optimal solutions, and the optimisation process was globally optimal. Figure 5 displays how this model performed using the training and testing data.

Fig. 5
figure 5

Parity plot of the simulation-predicted vs. the NN-predicted RMSE

In conclusion, the assisted-calibration upscaling technique accomplishes two goals: reducing human effort by relying on a sophisticated mathematical method (using the optimisation algorithm) to support the human (or engineer’s) judgement and reducing computational cost by utilising proxy modelling to reduce the number of numerical simulations of the reservoir models. In summary, the upscaling methodology applied can be presented as follows:

  • Performing fine-scale full-physics simulations of the CO2 miscible flood

  • Pseudoising the relative permeability function and the transport coefficients

  • Tuning the transport coefficients to eliminate the error between the fine- and coarse-scale results

  • GA-assisted automatic tuning of the transport coefficients for faster upscaling

Figure 6 presents a diagram of the workflow applied in this study.

Fig. 6
figure 6

Workflow applied for the manual and automatic upscaling procedures

3 Results and Discussion

3.1 Case Study Examples: Reservoir Model Descriptions

Two case-study reservoir models that are available in the literature were used to test the proposed approaches. They are a two-dimensional cross-sectional model, and quarter-five spot three-dimensional model extracted from a sector of Case 2, of the 10th SPE Comparative Solution Project on Upscaling (Christie & Blunt 2001). Both scenarios used vertical production and injection wells. Other assumptions made include that there were no chemical reactions and gravity. The assumption of negligible gravity effects is reasonable for reservoirs were heterogeneity dominates the flow patterns as is the case of both reservoir models (Chang et al. 1994; Garmeh and Johns 2010). The capillary functions are set to zero, thus the upscaling methods do not take their impacts into account. Negligible adsorption or dissolution of CO2 in the in situ water was also assumed and the effects of relative permeability hysteresis was neglected. The top and bottom boundaries of the reservoirs are no-flow boundaries. The injection wells are at a constant rate, while the producers are operated at constant pressures. In each scenario, the injection of CO2 in a secondary flood was carried out after a waterflood to bring the oil saturation to a residual value. In Scenario 1 and Scenario 2, the injection rates were 1.5 PV/year and 0.2 PV/year, respectively. Both instances use a fluid system that is a miscible displacement from by Ogbeiwi and Stephen (2021). In Scenario 1, a consistent and homogeneous porosity was presumed. Table 2 provides a summary of these case studies characteristics.

Table 2 Properties of the reservoir models

The x-direction was determined as the principal flow direction in Case 1, and the pseudo-relative permeability functions were calculated for this direction only. In Case 2, the x- and y-directions were identified as the principal flow directions, and the pseudo-functions were generated accordingly. Also, the coarse cells were categorised into different permeability groups/rock types based on the permeability of each coarse block. According to Christie and Clifford (1998) and Thibeau et al. (1995), individual pseudo-functions can be applied to each coarse-scale grid block depending on the permeability within each block. Thus, in both scenarios, we applied the same pseudo-functions to all coarse cells of the same rock-type.

3.1.1 Case 1: SPE Comparative Solution Project Model 1

The first model was a 2000-cell, two-dimensional, vertical cross-sectional model with three phases and no dips or faults. The dimensions were 500 feet long × 70 feet wide × 12 feet thick. The discretisation of the fine-scale grid is 100 × 1 × 20, with a uniform size for each grid block. The 10th SPE comparative solution project model 1 (Christie and Blunt 2001) served as the basis for the distributions of porosity and permeability throughout the reservoir. The continuous injection of CO2 was performed for 180 days with the injector well controlled at a target bottom hole pressure (BHP) of 3000 psi (and at 580 SCF/day). Due to these conditions, the reservoir pressure remains above the minimum miscibility pressure (MMP = 1160 psia), ensuring that CO2 and oil would remain miscible during the flood. The production well was operated at a target oil flow rate of 100 STB/day and a minimum BHP of 3000 psia. The directional permeabilities are equal, such that kx = kz.

The 100 × 20 fine model was coarsened to a 25 × 5 2D model (see Fig. 2). The pseudo-functions were calculated for representative cells (an REV), comprising a local region comprising of the grid blocks that lie at the centre of the model (i = 52 and i = 60), and for each vertical grid block in this region (i.e. k = 1 to k = 20). Based on the permeability of each coarse block, five groups of permeability/rock types were identified from the coarse-scale reservoir mode. Thus, in this scenario, we applied five groups of pseudo-functions to the upscaled model. The distributions of permeability for the fine and upscaled coarse models are shown in Fig. 7 and were obtained by arithmetically averaging the fine-scale model.

Fig. 7
figure 7

Permeability distributions of the a fine and b upscaled coarse model

Due to variations between the discrete and continuum equations, which depend on the discretisation method and the grid resolution (fineness or coarseness), the discretisation of the continuum equation results in intrinsic inaccuracies. We anticipate a mismatch between the solutions of the fine-scale and coarse-scale grids because discretisation errors advance with grid coarsening. Figure 8 displays the input and computed pseudo-relative permeability curves for one of the five permeability class, and Table 3 displays the calibrated transport coefficients for each component for each region.

Fig. 8
figure 8

Example of the a water–oil, and b gas–oil rock and pseudo-relative permeability curves

Table 3 The calibrated transport coefficients of each component for each permeability group computed for Scenario 1

The distribution of CO2 in the coarse and fine models at 0.65 PV of CO2 injection is shown in Fig. 9. As a result of substantial channelling driven by heterogeneity, particularly in the fine-scale model, the displacement front was unstable (Fig. 9a). Because of this, the injected gas avoids the reservoir's low permeability areas, especially at the top and bottom right, and instead navigates its high permeability streaks.

Fig. 9
figure 9

Concentration of CO2 at 0.65 PVI in the a fine-scale grid, and the coarse-scale grids where b the fine-scale composition were pore-averaged onto the coarse-scale grid, c iterated transport coefficients were used, d non-iterated transport coefficients were used, and e pseudoisation was not done

To enable a more direct comparison with the upscaled and coarse models, the distribution of CO2 concentration on the fine-scale was averaged onto the coarse-scale using pore-volume weighted averaging (as shown in Fig. 9b). The upscaled coarse-scale grids created using the iterated transport coefficients (and pseudo-relative permeabilities, shown in Fig. 9c) better captured the effects of gas channelling, according to the upscaling results. The CO2 distribution in the fine-scale grid (Fig. 9a, b) and that of the method using calibrated transport coefficients (Fig. 9c) showed a good degree of agreement, demonstrating the correctness of the upscaling method over the whole solution domain.

However, when the transport coefficients were not calibrated (Fig. 9d), the CO2 distribution was obviously overpredicted compared to the reference model (Fig. 9a, b) over a significant portion of the model. This was because while the pseudoisation of relative permeability alone ensured that volumetric phase fluxes were accurately matched, the use of the efficiently tuned transport coefficients made sure that small-scale sub-grid heterogeneities and fluid interactions, such as the molar diffusion of the components, were better captured on the upscaled coarse-scale grids.

When the grid blocks were coarsened without being upscaled, the effect of numerical dispersion was also seen, resulting in less dispersion of the CO2 distributed through the reservoir in the coarse-scale models. This results in the incorrect splitting of the phases and components within a coarse grid block. The numerical dispersion in the fine-scale and each coarse-scale model at xD = 1 was calculated using Eq. (12). These effects were clearly diminished by pseudoisation of the relative permeability and transport coefficient functions, as illustrated in Table 4.

Table 4 Reduction in numerical effects by the upscaling procedure

In conclusion, it was observed that when relative permeabilities and transport coefficients were pseudoised, the fluxes of the phases, those of the components in the oil and gaseous phases, as well as the pressure distribution, were better matched. By using pseudo-relative permeabilities and transport coefficients in the upscaling process, the impacts of small-scale sub-grid-level molecular diffusion, and macro-scale channelling caused by permeability heterogeneity were better characterised.

Figure 10 contrasts the oil and gas recoveries of the fine-grid simulation (black line), the conventional un-upscaled coarse model (green dotted line), and the upscaled models (blue and red dashed lines) by displaying the fine and coarse grid recovery curves. The Upscaled (No iter) legend represents the scenario where the derived transport coefficients were not tuned, while the Upscaled + iteration legend represents the case where they were tuned.

Fig. 10
figure 10

Fluid production profiles of the fine and the upscaled coarse grids showing a oil recovery efficiency, and b gas production rate

Figure 10 shows a good level of agreement between the oil and gas production rates of the fine-scale model and the upscaled model, where the transport coefficients were tuned. However, a significant deviation from the production profiles predicted by the fine-scale model was observed in the results of the standard coarse and non-iterated upscaled models. The calculation of the relative error, RE indicated considerable discrepancies in the oil and gas production rates that were caused by the coarsening of the fine grids without upscaling. The best results, however, were obtained using the tuning technique, with a RE of 2.28% for the oil rate and 9.6% for the gas rate.

We also considered the production rates of the individual components in the oil and gas phases rather than only the production rates of the phases. The fraction of CO2 in the produced gas phase and that of the 4th component (iC4–C6) in the produced oil phase are shown in Fig. 11. We noticed a significant increase in the proportion of CO2 in the produced gas after breakthrough, until practically all of the produced gas is CO2, as 100% of the injected gas is CO2. Additionally, the profiles of the iC4–C6 were similar to those of the oil production rate profile because the component was produced with oil. Table 5 shows the relative errors of the oil and gas production rates, as well as the CO2 and fourth component (iC4–C6) percentages in gas and oil, for scenario 1.

Fig. 11
figure 11

Composition of a CO2 in the produced gas, and b the 4th component (iC4–C6) in the produced oil phase, of the fine and the upscaled coarse grids

Table 5 Summary of the errors of the upscaling results of the model 1

The fine-scale simulation and the upscaled coarse-scale simulation using the tuned transport coefficients showed similar good agreement as the oil and gas production rates. For the conventional coarse and upscaled models, which do not use tuned alpha functions, this was not the case.

3.1.2 Case Study 2: SPE Comparative Solution Project 2

In this scenario, a simple geometry in three dimensions without any dipping or faults is used. The permeabilities and porosity distributions used in this reservoir model were derived from a Tarbert Formation quarter-spot pilot and are shown in the 10th SPE comparative solution project 2 (Christie and Blunt 2001). Figure 12 depicts the porosity distribution of this model. The model was 300 feet long, 1100 feet wide, and 35 feet thick. The fine-scale grid has a discretisation of 30 × 110 × 35 cells (115,500 cells). The production well was run at a constant oil flowrate of 200 STB/day (and a BHP of 1250 psia) while the injector well was controlled at a fixed BHP of 3000 psi (and at 1160 SCF/day) to ensure that the flood was miscible. This procedure was repeated continuously for 900 days.

Fig. 12
figure 12

The porosity distribution in Model 2

The fine-scale model was uniformly coarsened by a factor of 10 in the x and y dimensions and by a factor of 5 in the vertical direction to create the upscaled models. The coarse-scale model, therefore, has a grid size of 6 × 11 × 7 = 462 grid cells. The major direction of fluid flow in this example was horizontal, with gravitational effects-driven flow in the z-direction being ignored. As a result, several numerically correct but unphysical (i.e. negative) values were obtained when the pseudo-relative permeability functions and transport coefficients were calculated in the z-direction. Li and Durlofsky (2016) also noted this phenomenon, which is thought to be caused by the modest averaged potential and integrated fluxes (Barker and Thibeau 1997). The computations of pseudo-functions in the z-direction were therefore disregarded because of this phenomenon, and also because gravity was also assumed to be insignificant. The computation of the pseudo-functions for the z-direction interfaces may be required for studies where gravity is present or where there are large vertical effects, such as in the vicinity of horizontal wells.

Similar to Scenario 1, a local-upscaling procedure was applied here where the pseudo-functions were calculated for representative cells (REVs), and the results were used to upscale the global grid based on the rock type or permeability value. Figure 13 displays the calculated pseudo-relative permeability curves for seven different rock types identified in the coarse-scale model. Table 6 displays the x-directional transport coefficients obtained from the calibration process. The directional relative permeability curves and transport coefficients were specified in the coarse-scale simulation using relevant keywords of the ECLIPSE 300 compositional simulation software.

Fig. 13
figure 13

The pseudo-relative permeability curves of the seven rock types considered

Table 6 The calibrated x-directional transport coefficients of each component applied in the upscaling of Case 2

The field phase and component production rates are depicted in Fig. 14. Figure 14c, d shows the fraction of CO2 in the produced gas phase and that of the fourth component (iC4-C6) in the produced oil phase, respectively. Table 7 displays the REs of the coarse-scale models in relation to the fine-scale model for Case 2. The results obtained using the non-calibrated transport coefficients and the conventional coarse models showed considerable inaccuracies in the phase and component production rates, similar to the trends seen in Case 1. Additionally, it was found that calibration of the transport coefficients resulted in more effective upscaling procedure solutions and errors of less than 6% for all performance indicators examined.

Fig. 14
figure 14

Fluid production profiles of the fine and the upscaled coarse grid showing a oil, and b gas production rate. The composition of c CO2 in the produced gas, and d the 4th components iC4–C6 in the produced oil phase, of the fine and the upscaled coarse grids are also shown

Table 7 Summary of the errors of the upscaling results of Model 2

The distribution of CO2 in the reservoir models, as depicted in Fig. 15b–e, was then compared. Figure 15a depicts the CO2 field at the fine scale. The results of applying a pore-volume weighted average to the CO2 concentration of the fine-scale grid to the coarse-scale grid are shown in Fig. 15b. Figure 15c–e, respectively, displays the concentration fields for the tuned upscaling, non-calibrated upscaling, and un-upscaled coarse grids. In comparison to the fine-scale grids (Fig. 15a), the CO2 fields from the normal coarse grid without upscaling, and that of the non-iterated upscaling method (Fig. 15d, e) overpredicted the distribution of this amount over a substantial portion of the model. However, compared to the other coarse grids, the tuned-upscaling model, shown in Fig. 15c, was in a better level of agreement with the fine-scale solution, further demonstrating the capabilities of this upscaling technique to produce a more accurate global solution.

Fig. 15
figure 15

CO2 concentration distributions and well locations within the reservoir models at 350 days for a fine-scale grid, b the pore-averaged fine-scale onto the coarse-scale, c iterated transport coefficients, d non-iterated transport coefficients and e the standard coarse, models

The maps of oil saturation in the third layer of the upscaled model are shown in Fig. 16. The result of averaging the oil saturation of the fine-scale grid to the coarse-scale grid using a pore-volume weighted average is shown in Fig. 16a. The predictions made using the conventional coarse grid (Fig. 16d) and the non-calibrated upscaled grid (Fig. 16c) were not accurate, as usual. In addition, compared to the other two models, the calibrated-upscaling model (Fig. 16b) was more similar to the averaged coarse grid.

Fig. 16
figure 16

Oil saturation distributions within the reservoir models in layer 3 at 150 days for a the fine-grid averaged onto the coarse-scale grid, b calibrated transport coefficients, c non-calibrated transport coefficients, and d standard un-upscaled coarse, models

In conclusion, the results presented so far involve a constant BHP setting for the injection well and constant oil production rate for the producer. Therefore, it is essential to evaluate the procedure's dependability in different well settings. Thus, we examined the resilience and applicability of this upscaling strategy to additional well-control settings in a field-level optimisation study where we increased the coarse-model accuracy by manually iterating on the transport coefficients (Ogbeiwi 2023). In this investigation, the oil production rate and injector BHP were altered from the initial parameters employed in this work by factors of ± 30% and + 20%, respectively. The results obtained showed a high degree of resilience and were generally accurate across the spectrum of well controls.

3.2 Assisted Upscaling Using the ANN-Based GA Optimisation

The results of the manual upscaling procedure showed that the accuracy of the tuning is impacted by the computing cost of running each full physics simulation of the coarse-scale model. Hence, it was necessary to find a solution that improves the efficiency of the procedure at relatively lower computational costs given that each full physics simulation of the coarse-scale model takes 10 min to execute. We accomplished this via an ANN-based GA assisted upscaling technique, the results of which are presented in this section.

Table 8 displays the computing costs for the fine- and coarse-scale full-physics simulation, the evaluation of each surrogate model, and the optimisation procedures utilising the proxy model on a 3.60 GHz CPU.

Table 8 Computational costs of proxy model evaluation and full reservoir simulation

The optimal results are shown in Table 9 and the RMSE calculated using these values was 0.2799. These values are multipliers that were applied to the transport coefficients given in Table 3. The plots of the resulting field production rates by the phases and compositions are shown in Fig. 17. Based on the results obtained, the assisted-upscaling method produces more accurate predictions of the fine-scale model than the manual-upscaling technique. Overall, the results demonstrated that the proposed methodology may be used to upscale fine-scale simulations on coarse-scale models more quickly. Although more simulations were needed to build the appropriate ANN proxy model and evaluate its accuracy, using the proxy model reduced the time needed for upscaling to roughly 60 s.

Table 9 Optimum values of the transport coefficients
Fig. 17
figure 17

Fluid production profiles of the fine and the upscaled coarse grid showing a oil, and b gas production rate. The composition of c CO2 in the produced gas, and d the 4th components, iC4–C6 in the produced oil phase, of the fine and the upscaled coarse grids are also shown

A final confirmation test was carried out by applying the GA’s optimal variables to a full-physics simulation and then estimating the RMSE in order to validate the results obtained from the assisted upscaling approach. The simulation result was in good agreement with the proxy projected value, as evidenced by the RMSE of 0.276, or a relative percentage error of 1.5%. Overall, the findings of the GA-BPNN-assisted calibration of the transport coefficients demonstrated the applicability of the suggested methodology for the faster upscaling of fine-scale simulations on coarse-scale models.

4 Summary and Conclusions

Since miscible CO2 flooding is expensive to simulate using fine-scale compositional simulations, upscaling techniques can be employed to approximate the behaviour of these fine-scale grids on more accurate coarse-scale models. A mismatch between the phase fluxes of the integrated fine-scale and the coarse-scale is commonly encountered during upscaling. By adjusting some of the obtained upscaled coarse-scale values, as is done in reservoir history matching problems, this error can be decreased and even improved. However, this procedure is typically computationally expensive and prone to human errors.

In this paper, a framework for reducing computing costs and human efforts associated with compositional simulation is presented. By utilising a neural network-based genetic algorithm-assisted upscaling approach, we proposed a unique methodology for scaling up miscible floods in coarse-scale models. On the upscaled coarser grid reservoir models based on the pseudoisation of relative permeability and transport coefficients, we additionally reproduced the dynamics of small-scale molecular diffusion and macro-scale heterogeneity-induced channelling commonly associated with miscible CO2 displacements. This framework adequately represented these effects on coarser grids. According to the results obtained, the following conclusions were drawn:

  1. 1.

    The use of transport coefficients ensures the representation of small-scale interactions more accurately, such as the time-dependent flux of the components within the hydrocarbon phases (molecular diffusion), while the pseudoisation of relative permeabilities to ensure the matching of large-scale effects, such as the volumetric fluxes of the phases is essential for upscaling compositional floods.

  2. 2.

    In upscaled models, when the pseudoisation of transport coefficients is done effectively, the use of relative permeability pseudo-functions can be ignored, and the accuracy of the scaling technique is dependent on the correctness of the upscaled transport coefficients.

  3. 3.

    The assisted calibration of the transport coefficients offers an efficient approach to upscale compositional fluid flow. When combined with a data-driven approximation model, the computational expense and human errors associated with this process can be significantly reduced.

Although the methodology applied in this study resulted in the robust upscaling of the fine-scale models, we acknowledge the following limitations. Firstly, the effects of gravity were insignificant and neglected. However, in some 3D flows, this effect results in a gravity tongue which leads to an early breakthrough which lowers oil kr, and gravity effects are significant. In such scenario, the effect of gravity can easily be incorporated by calculating the z-direction pseudo-functions. Also, for the sake of simplicity, the effects of capillary forces, hysteresis following the waterflooding and the dissolution of CO2 were neglected. In reality, these effects should be accounted for during upscaling. Finally, the results obtained in this study were obtained when the injection stream was 100% CO2 and are unique to the models and fluid composition to which they were applied.