1 Introduction

Supporting global decarbonization by carbon geosequestration, the efficient utilization of the pore space in the storage formations is essential. Storage design relies on performance assessment conducted on digital twins of candidate sites and involves simulation of multiphase flow through highly heterogeneous rock masses (e.g. Ringrose 2020). Detailed field characterization of outcrop analogues of storage sites (e.g. Willis and White 2000) reveals a nested structure of geobodies with internal bedforms ranging from mm-scale lamina to hm-scale foresets (Ringrose and Bentley 2015). The sedimentary sequences of interest typically have geometrically complex facies architectures (cf., Ahmed et al. 2014; Sech et al. 2009) with large aspect ratio horizons, lateral facies variations, and pinchouts (Fabuel-Perez et al. 2010; Gross et al. 2023). High-resolution digital outcrop models reveal that, with increasing scale, more and more geologic features become important (e.g. Willis and White 2000). In sufficiently large outcrops, a nested arrangement of rock types is visible, each with its unique multiphase flow properties and often separated from one another by sharp interfaces. Such discontinuities act as capillary barriers, filtering non-wetting fluid that collects upstream, eventually blocking any cross flow (Matthai and Burney 2018; Revil et al. 1998; Shosa and Cathles 2001; Tran et al. 2020).

The spatial continuity of high permeability streaks within nested rock sequences gives rise to a wide variation of flow velocity. Due to the nesting, and common power-law size—frequency distributions, which imply that high permeability streaks exist on multiple length scales, these features cannot be neatly separated by scale. The ensuing spatial correlation structure of permeability also implies a poor correlation, if any, between permeability and flow velocity. This explains why fast, highly focused flow can occur kilometres away from injector wells (Flemings et al. 2002; Shao et al. 2022).

While it was known already at the beginning of the twentieth century that nested geo-heterogeneity gives rise to non-uniform macroscopic saturation distributions (e.g. Krampert 1934), their importance for multiphase fluid flow has only recently received more attention by studies like Perrin and Benson (2010), Zhang et al. (2013) and Jackson et al. (2020). Many open questions remain. Reasons for this lack of understanding include that relevant heterogeneities are too large and saturation patterns within these evolve too slowly to be amenable to laboratory studies. The relevant heterogeneities are also too geometrically complex for conventional reservoir simulation, and they cannot be separated into neat categories of scale due to their nested nature (cf., Oden et al. 2006).

Explicit representation of the nested heterogeneity of fluvio-deltaic sequences has been attempted in two-dimensional high-resolution digital outcrop models (Willis et al. 1999; Willis and White 2000). Advanced numeric simulation (Matthai and Burney 2018) reveals the strong impact of this heterogeneity on sweep efficiency corroborating field observations from Sleipner (Ringrose 2020). Simultaneously, coarse–fine intercalations in composite rock types (e.g. Mishra et al. 2020) control micro-displacement efficiency (Jackson et al. 2020; Pickup and Hern 2002; Trevisan et al. 2017). Boon and Benson (2021) and Boon et al. (2022) established that the laminated structure of composite quartz sandstones gives rise to rate- and directional dependence of relative permeability. In field-data based simulations, Shao et al. (2022) demonstrated that conditions triggering this flow-rate dependent behaviour can occur far from injector wells. They also showed that rate-dependent relative permeability has a marked effect on plume spreading and saturation distributions within plumes, confirming earlier predictions by Pickup and Sorbie (1994) and Durlofsky (1997). Yet, today, multiphase flow in heterogeneous media is still modelled without considering rate dependence, attempting to account for its effects via permeability anisotropy or other model adjustments (e.g. Li et al. 2023).

Among others, Virnovsky et al. (2004) and most recently Matthai and Tran (2023) demonstrated that this flow-rate dependence is not due to capillary end effects but arises from non-uniform saturation distributions caused by local variations in the balance of viscous-gravitational and capillary forces. Since this behaviour is complex, analysis is still in its infancy (Darman et al. 2001). However, indirectly acknowledging its practical importance, oil and gas companies carry out special core analysis (SCAL, e.g. Huang and Honarpour 1998) at flow velocities deemed representative for the reservoir of interest (e.g. Breston and Hughes 1949). Clearly, this is no satisfactory solution when flow velocity varies widely across a reservoir. What can be done about this?

Notably, three distinct approaches exist for estimating ensemble saturation functions of heterogeneous rocks: special core analysis (SCAL), mathematical analysis, and numerical simulation. SCAL is most widely used and porous plates serve to address capillary end effects (e.g. Osoba et al. 1951; Huang and Honarpour 1998). Despite recent advances in inverse modelling with regard to the handling of capillary end effects (An et al. 2023; Moreno et al. 2021), there still are boundaries artefacts (cf., Jackson et al. 2018) and sample dimensions are limited (e.g. Berg and Ott 2012). Mathematical analysis can be used to infer saturation patterns without boundary artefacts (e.g. Ekrann et al. 1996; Rabinovich et al. 2016) but is limited to capillary limit (CL) or viscous limit (VL) assumptions.

Numerical, flow-simulation-based analysis is becoming more and more attractive because image segmentation and model building techniques are making it easier to build digital twins of rock masses with a complex internal structure. Simultaneously, the physical realism of numeric methods is improving. The geologic context of the sample volume can also be accounted for by non-local boundary conditions (e.g. Durlofsky 2005).

Numerical approaches for generating non-uniform saturation distributions fall into two main categories: steady-state and unsteady-state methods. Steady-state ensemble parameters are evaluated once the saturation distribution has reached a time-invariant state. Similar to dynamic core flooding experiments, unsteady analysis quantifies parameters from evolving saturation patterns and fronts. These parameters often bear the prefix pseudo (Barker and Dupouy 1996; Barker and Thibeau 1997).

The aim of the present study is to establish a more physically realistic simulation framework and setup for the computation of non-uniform saturation distributions in nested heterogeneous porous media including material interfaces. Relative permeability and capillary pressure curves ought to be computed for realistic in situ conditions and force balances which arise locally from injection measures and fluid properties. For this purpose, the promising use of periodic boundary conditions for the saturation equation (Virnovsky et al. 2004; Matthai and Tran 2023) is extended to the pressure equation, choosing a solution approach that admits arbitrarily oriented far-field fluid pressure gradients. Rather than trying to replicate physical experiments, this approach builds on the versatility of numeric simulation methods and the possibilities they offer to control the simulation setup.

After a brief review of numerical relative permeability upscaling, this article proceeds with a rationale for the proposed periodic boundary conditions. Then, test cases are described, and simulation results presented focussing on cross-bedded sandstone. A final discussion focusses on less intuitive features of the results obtained. The simulation models and results are included as digital supplementary material.

2 Methodology

The numeric steady-state upscaling technology employed here builds on the embedded discontinuity method for multiphase flow modelling presented by Nick and Matthäi (2011a, 2011b), Tran et al., (2020) and Matthai and Tran (2023). Thus, we only detail the mathematical modelling and implementation of the periodic boundary conditions in this collocated finite element – finite volume discretisation with embedded discontinuities (Matthai and Tran 2023) here as it underpins this new upscaling approach. We start by a brief review of relevant aspects of numerical upscaling.

2.1 Background

Steady-state numeric upscaling methods can be distinguished by the applied boundary conditions (Odsæter et al. 2015). Constant inlet fractional flow methods go back to physical experimentation done at Penn-State University in the 50’s: Co-injection of fluid phases is performed at a constant fractional flow while outlet pressure is fixed, all remaining boundaries are sealed (Geffen et al. 1951; Osoba et al. 1951). While simplifying measurement, this method’s attractiveness is limited by a potential transition zone downstream of the inlet depending how inflow is implemented (Ekrann and Aasen 2000). The thickness of this zone affects the results and might even cause a rate dependency of ensemble parameters for finite size samples (cf., Benham et al. 2021; Boon and Benson 2021). Impervious sample jackets acting as no-flow boundaries will channel the flow, complicating the determination of anisotropy, or directional variation of the flow behaviour (e.g. Durlofsky 2005).

In their efforts to circumvent such boundary artefacts, Dale et al. (1997) proposed an upscaling method using periodic boundary conditions. This natural extension of the periodic flux boundary conditions from single-phase upscaling (Durlofsky 1991) to multiphase flow was demonstrated by Virnovsky et al. (2004). Matthai and Tran (2023) further explored the effects of material interfaces in such numeric experiments as modelled with the method of Van Duijn et al. (1995) and Van Duijn & De Neef (1998). The periodic boundaries are relevant to modelling flow in flow cells as reservoir representation of geological beds (Mikes et al. 2006). However, a remaining limitation of this method lies in the uniform boundary pressure it produces. In a realistic setting, fractional flow and fluid pressure in the region of interest vary with the broader heterogeneity structure (S. Jonoud and Jackson 2008a, b), i.e. interdigitating geological features that are cut short by the model boundaries. Furthermore, the angle-weighted averaging of flow functions obtained in orthogonal flow directions (e.g. Eq. 18, Boon et al. 2022) introduces inconsistencies by averaging upscaled relative permeability curves derived for flow parallel and perpendicular to layers although these do not necessarily emerge from the same fine-scale saturation distribution. Fully periodic pressure boundary conditions permit a more comprehensive representation of the flow behaviour while eliminating the aforementioned boundary artefacts.

Similar to the flux-periodic method of Matthai and Tran (2023), the new upscaling procedure with fully periodic boundary conditions presented here involves two steps: 1) determination of stationary non-uniform saturation distributions, and 2) computation of upscaled flow functions via homogenisation.

2.2 Determination of Saturation Distributions

Considering the heterogenous domain Ω (see Fig. 1), we determine the spatial steady-state saturation distribution, s(x \(\in\) Ω), herein referred as saturation state, by solving the incompressible, gravity-free two-phase flow problem,

$$- \nabla .{\mathbf{v}}_{\alpha } = \phi \frac{{\partial s_{\alpha } }}{\partial t}\,\,\,\,\,\,\,\,\,\,\,\,\,{\text{in}}\,\,(t > 0)\, \cap \,\Omega$$
(1)

where v is the Darcy velocity, \(\phi\) and t are porosity and time, respectively. The subscript α refers to the fluid phase either CO2 or brine. The domain boundaries are subjected to Dirichlet pressure conditions (Durlofsky 1991; Wen et al. 2003),

$$p = p_{{{\hat{\mathbf{x}}}_{{\mathbf{o}}} }} + {\mathbf{G}}.({\hat{\mathbf{x}}} - {\hat{\mathbf{x}}}_{{\mathbf{o}}} )$$
(2)

where \(p\) is pressure at point \(\widehat{\mathbf{x}}\in \partial\Omega\), while \({p}_{{\widehat{\mathbf{x}}}_{0}}\) is the pressure at a reference point \({\widehat{\mathbf{x}}}_{0}\in \partial\Omega\) and G is the pressure gradient vector. The boundary conditions are completed by assigning full flux periodicity,

$$\left. {({\mathbf{n}}.{\mathbf{v}}_{\alpha } )} \right|_{{\partial \Omega^{\eta ,1} }} = \left. { - ({\mathbf{n}}.{\mathbf{v}}_{\alpha } )} \right|_{{\partial \Omega^{\eta ,2} }}$$
(3)

where n is a unit normal vector perpendicular to \(\partial\Omega\) and pointing outward, and \(\partial {\Omega }^{\eta ,1}\) and \(\partial {\Omega }^{\eta ,2}\) are two opposite boundaries (Fig. 1). By contrast to single-phase flow, the selection of the boundary condition 2 controls s such that s = s(x,G). In other words, the saturation state relies on both, direction and the magnitude of the pressure field. Now, we define G for a two-dimensional flow as

$${\mathbf{G}} = g\left( {\cos (\theta ){\mathbf{i}}_{x} + \sin (\theta ){\mathbf{i}}_{y} } \right)\,\,\,\,\,\,\,\,\,\,\,\,\,\forall \,\theta \in [0,2\pi )$$
(4)

and for a three-dimensional flow,

$${\mathbf{G}} = g\left( {\sin (\varphi )\cos (\theta ){\mathbf{i}}_{x} + \sin (\varphi )\sin (\theta ){\mathbf{i}}_{y} + \cos (\varphi ){\mathbf{i}}_{z} } \right)\,\,\,\,\,\,\,\,\,\,\,\,\,\forall \,\theta \in [0,2\pi ),\,\varphi \in [0,\pi )$$
(5)

where g the pressure gradient magnitude, i is a unit vector, and θ and φ are polar and azimuthal angles, respectively, defined in spherical coordinates. Figure 1 illustrates how these boundary conditions provoke fluxes for different flow angles in 2D. Crucially, this definition enables the flux to vary freely across boundaries.

Fig. 1
figure 1

Continuous rotation of a pressure field (Eq. 4) around a symmetric unit cell of a heterogeneous domain (Ω) representing a cross-bedded sandstone as is discussed in more detail further below. Coloured arrows show periodicity of the variable flux across the domain boundaries \(\partial\) Ω (Eq. 3) which is not necessarily uniform across boundaries

Dale et al. (1997) discusses the non-uniqueness of the steady-state solution that arises when capillary jumps exist at the layer interfaces. Since their focus was on the boundary value problem, they did not elaborate on the initial saturation state of the system. Here we prescribe a unique initial saturation distribution as additional initial-value constraint for each calculation. For example, the capillary-limit saturation distribution as computed with the method of Ekrann et al. (1996). Importantly, it will be shown that this does not uniquely determine the final saturation distribution (Fig. 2).

Fig. 2
figure 2

Proposed ensemble upscaling workflow. Δg is the incremental increase of the pressure gradient magnitude while incremental changes in polar and azimuth angles are \(\Delta \theta =\frac{2\uppi }{\text{N}}\) and \(\Delta \varphi = \frac{\pi }{{\text{M}}}\), respectively

2.3 Estimation of Ensemble Properties

Integrating the saturation distribution over the flow domain, we recover the average saturation, \(\overline{s }\), verifying that it matches the prescribed value. This takes into account the pore volume

$$\overline{s} = \frac{{\int\limits_{\Omega } {s\,d(vol_{p} )} }}{{\int\limits_{\Omega } {d(vol_{p} )} }}$$
(6)

The saturation dependent ensemble capillary pressure, \(\overline{{p }_{c}}\), and relative permeability, \(\overline{{\mathbf{k} }_{r}}\), are no longer single-argument functions, but depend on flow direction and local force balances (Boon et al. 2022). Both \(\overline{{p }_{c}}\) and \(\overline{{\mathbf{k} }_{r}}\) are field variables, with \(\overline{{p }_{c}}\) being a scalar and \(\overline{{\mathbf{k} }_{r}}\) being a vector. In two dimensions, they are functions of g and θ. In three dimensions, they also depend on φ. These functions are defined over a continuous spectrum of saturation states between the CL and the VL. To map out this range, the workflow in Fig. 2 is followed.

For each saturation state, \(\overline{{\mathbf{k} }_{r}}\) is estimated from the tensor operation

$$\overline{{{\mathbf{k}}_{r\alpha } }} = \overline{{{\mathbf{k}}^{ - 1} }} \,\overline{{{\mathbf{k}}_{\alpha } }} \,$$
(7)

where both \(\overline{{\mathbf{k} }_{\alpha }}\) and \(\overline{\mathbf{k} }\) are estimated from the solution of a single-phase upscaling problem with periodic boundary conditions. This involves conducting at least two separate flow simulations in 2D and three in 3D. Typically, but not necessarily, these simulations are performed in orthogonal directions. For each run, the volumetrically averaged pressure gradient, \(\langle \partial p\rangle\), and the volumetrically averaged velocity, \(\langle \partial \mathbf{V}\rangle\) are determined on Ω. The tensors appearing in (7) are obtained by solving the overdetermined system (Durlofsky 1991; Lang et al. 2014),

$$\left[ {\begin{array}{*{20}c} {\left\langle {\partial {\mathbf{p}}} \right\rangle_{1}^{1} } & {\left\langle {\partial {\mathbf{p}}} \right\rangle_{2}^{1} } & {\left\langle {\partial {\mathbf{p}}} \right\rangle_{3}^{1} } \\ {\left\langle {\partial {\mathbf{p}}} \right\rangle_{1}^{2} } & {\left\langle {\partial {\mathbf{p}}} \right\rangle_{2}^{2} } & {\left\langle {\partial {\mathbf{p}}} \right\rangle_{3}^{2} } \\ {\left\langle {\partial {\mathbf{p}}} \right\rangle_{1}^{3} } & {\left\langle {\partial {\mathbf{p}}} \right\rangle_{2}^{3} } & {\left\langle {\partial {\mathbf{p}}} \right\rangle_{3}^{3} } \\ {{\mathbf{I}}_{1} } & {{\mathbf{I}}_{2} } & {{\mathbf{I}}_{2} } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {k_{xx} } \\ {k_{xy} } \\ {k_{xz} } \\ {k_{yx} } \\ {k_{yy} } \\ {k_{yz} } \\ {k_{zx} } \\ {k_{zy} } \\ {k_{zz} } \\ \end{array} } \right] = - \left[ {\begin{array}{*{20}c} {\left\langle {\mathbf{v}} \right\rangle^{1} } \\ {\left\langle {\mathbf{v}} \right\rangle^{2} } \\ {\left\langle {\mathbf{v}} \right\rangle^{3} } \\ {\mathbf{0}} \\ \end{array} } \right]$$
(8)

where \(\left\langle {\partial {\mathbf{p}}} \right\rangle_{1}^{i} = \left[ {\begin{array}{*{20}c} {\partial_{x} p^{i} } & {\partial_{y} p^{i} } & {\partial_{z} p^{i} } \\ 0 & 0 & 0 \\ 0 & 0 & 0 \\ \end{array} } \right],\,\left\langle {\partial {\mathbf{p}}} \right\rangle_{2}^{i} = \left[ {\begin{array}{*{20}c} 0 & 0 & 0 \\ {\partial_{x} p^{i} } & {\partial_{y} p^{i} } & {\partial_{z} p^{i} } \\ 0 & 0 & 0 \\ \end{array} } \right],\,\left\langle {\partial {\mathbf{p}}} \right\rangle_{3}^{i} = \left[ {\begin{array}{*{20}c} 0 & 0 & 0 \\ 0 & 0 & 0 \\ {\partial_{x} p^{i} } & {\partial_{y} p^{i} } & {\partial_{z} p^{i} } \\ \end{array} } \right],\,\left\langle {\mathbf{v}} \right\rangle^{i} = \left[ {\begin{array}{*{20}c} {\left\langle {v_{x} } \right\rangle^{i} } \\ {\left\langle {v_{y} } \right\rangle^{i} } \\ {\left\langle {v_{z} } \right\rangle^{i} } \\ \end{array} } \right]\), \({\mathbf{0}} = \left[ {\begin{array}{*{20}c} 0 & 0 & 0 \\ \end{array} } \right]^{T}\). The superscript reflects the simulation number, and the subscript is the index of the row containing non-zero elements in the pressure gradient matrices. This overdetermined system is solved using least square fitting. \(\overline{{p }_{c}}\) is evaluated as the pore volume weighted capillary pressure which is calculated from

$$\overline{{p_{c} }} = \frac{{\int\limits_{\Omega } {p_{c} \,d(vol_{p} )} }}{{\int\limits_{\Omega } {d(vol_{p} )} }}$$
(9)

We thus estimate \(\overline{{p }_{c}}\) as the pore-volume-weighted value rather than using the difference between the average of the non-wetting phase pressure and the average wetting phase pressure as proposed by Kueper and McWhorter (1992). This aligns with the microscopic view of the porous medium where \({p}_{c}\) represents pressure differences across phase interfaces (e.g. Adler and Brenner 1988).

2.4 Implementation of Periodic Pressure Boundary Conditions in Collocated Finite Element-finite Volume Framework

We implement the periodic pressure boundary conditions in the collocated finite element-finite volume scheme with embedded discontinuities (Nick & Matthai, 2011a, b; Tran et al. 2020) so that we can capture pressure and saturation discontinuities arising from capillary heterogeneity within the rock volume of interest. The space–time solution method considered here is operator splitting, solving the pressure and saturation equations sequentially using an IMPES (implicit for pressure and explicit for saturation) approach. The pressure equation that is treated as elliptic at the small sample scale, is solved with the finite element (FE), phase velocities are computed, and then the hyperbolic saturation transport equation is solved with the finite volume (FV) method, see Geiger et al. (2004) and Paluszny et al. (2007). Various iterative solution schemes are available to deal with the non-linearity of this system (Aziz and Settari 1979).

The resulting system of linear algebraic equations for pressure needs to be modified to incorporate the periodic boundary conditions. Since the pressure equation is solved with the FEM, no-flow boundary conditions are “natural”. In such case, the pressure system takes the form

$$\sum\limits_{j} {a_{i,j} p_{j} = R_{j} } \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\forall i \in \{ 1,2,...,N\}$$
(10)

and no modification is required. By contrast, the concept of periodicity implies domain repetition. Consequently, adjustments are required for the equations containing shared nodes located on \(\partial\Omega\). For instance, for \(i=1\), the nodal contributions of finite elements associated with the mirrored part of the domain must be reintroduced (Fig. 3). These coefficients appear in the equation of the corresponding periodic node \(i=10\). Specifically, \({a}_{\text{10,10}}\) is added to \({a}_{\text{1,1}}\), \({a}_{\text{10,12}}\) is added to \({a}_{\text{1,2}}\) and \({a}_{\text{10,15}}\) is added to \({a}_{\text{1,5}}\). A similar treatment is applied to the right-hand side of the algebraic system. However, this superposition forms only one part of the boundary treatment. Thus, Fig. 3 shows that the mirrored boundary part contains a node corresponding to node 16, which shares certain parent elements with node 1. To recover this element’s contribution, we need to add the term involving \({p}_{16}\) in \(i=10\) to \(i=1\), adjusting pressure as indicated by boundary condition (2). Finally, for \(i=1\), Eq. (10) transforms into

$$(a_{1,1} + a_{10,10} )p_{1} + (a_{1,2} + a_{10,12} )p_{2} + a_{1,3} p_{3} + a_{1,4} p_{4} + (a_{1,5} + a_{10,15} )p_{5} + a_{10,16} \left( {p_{16} + {\mathbf{G}}.({\hat{\mathbf{x}}}_{1} - {\hat{\mathbf{x}}}_{10} )} \right) = R_{1} + R_{10}$$
(11)
Fig. 3
figure 3

Triangular hybrid finite element (FE)-finite volume (FV) mesh with material properties that are piecewise constant on the finite elements. The triangular FE are delimited by solid black lines connecting their nodes (black filled circles). The polygonal FV are delimited by dashed lines. They span multiple FE’s dividing them into FV sectors. Their part missing from the left periodic inflow boundary is shown in faint colour. A unique numbering relates the node IDs on the inflow with those on the outflow boundary

This approach is readily generalized to three dimensions. It is crucial to emphasize that the coefficients for interior nodes 3 and 4 remain unchanged throughout this modification.

Now returning to the saturation equation discretized with the FVM and explicitly in time

$$s_{{\alpha_{i} }}^{m + 1} = s_{{\alpha_{i} }}^{m} + \frac{\Delta t}{{A_{i} \phi_{i} }}\sum\limits_{j} {({\mathbf{v}}_{\alpha } .{\mathbf{n}})_{j} } \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\forall i \in \{ 1,2,...,N\}$$
(12)

where the superscripts denote the time level, and the summation on the right-hand side accounts for the flux accumulation from all FV sectors (Fig. 3), to accommodate periodicity, pairs of corresponding node-centred finite volumes situated on opposite sides of the periodic boundary \(\partial\Omega\) are treated as one. The net flux through such recombined FVs is fully defined permitting the computation of saturation at the upstream node as if it were on the inside of the model domain. Corner-node finite volumes require special consideration as they are recombined from three or more incomplete finite volumes. Generally, the number of corresponding unified periodic boundary nodes, denoted as NF, shared between F boundaries is determined using the formula

$$N_{F} = F + \sum\limits_{i = 1}^{i = F - 1} {N_{i} }$$
(13)

The first term in this series is 1.

All computations presented in this paper were performed with OpenCSMP, an open-source C +  + 17 library that implements the hybrid finite element – finite volume framework discussed, including the use of split boundaries to model the dynamic pressure—saturation (embedded) discontinuities with the extra degrees of freedom required to model the potential jump discontinuities in pressure and saturation that will arise in the simulations for certain parameter combinations. The results presented here adhere the split boundaries criteria except at the model boundaries due to the difficulties brought by periodicity. We hope to solve this in the future versions.

3 Demonstration Models

We present two demonstration models that represent REVs of cross-bedded sandstone. The first is a three-dimensional sedimentological (bedform) model (Fig. 4). To demonstrate the effects of its layered heterogeneity on the saturation pattern, it is sliced parallel to-, and perpendicular to the sediment transport direction. The second model (Fig. 5) is a much-simplified layered idealization of a slice parallel to the sediment transport direction, amenable to analytical solution. Presenting simulations done with these models, we showcase our approach and workflow, also aiming to improve the general understanding of directional and rate-dependent multiphase flow in heterogeneous porous media.

Fig. 4
figure 4

Cross-bedded sandstone model. a 3D model; b Section model PERPENDICULAR to the sediment transport direction; c) Section model PARALLEL to the sediment transport direction. Reduced permeability beds are in black and permeable beds in grey

Fig. 5
figure 5

OBLIQUE layer model consisting of two layers inclined at 45°. The model is meshed with a double periodic triangular mesh. The mesh consists of 2721 nodes and 5224 elements

3.1 Cross-bedded Sandstone

Sandstones are coarse-grained clastic sediments deposited in high-energy environments such as the foreshore, estuaries, or river channels. These different environments of deposition manifest in characteristic types of cross stratification. Cross-bedding is often marked by rhythmic alternations in grain size inversely correlated with permeability and capillary entry pressure (e.g. Boggs 2012; Trevisan et al. 2017). Our model of cross-bedded sandstone (Fig. 5) was created using the algorithm of Rubin (1987), expressing sedimentary structures using the superposition of waves. Three bedforms are propagating in the z-direction (sediment transport direction), controlling the interference patterns created (cf., Rubin and Carter 2005). The bedforms are truncated in the y-direction (deposition direction). Here the bedform with the highest level, y, at each (x,z) point is selected. Perpendicular to the bedform propagation direction (x-direction), the shapes of the bedforms are due to the interference of two propagating waves. Wave characteristics and sedimentation rate are set such that a fully periodic REV with the dimensions of 30 × 6.4 × 80 cm results with reference to the x, y and z axes, respectively. The volumes between the surfaces are populated with two alternating rock types with distinct properties, see Table 1. For flow simulation, fluid properties are chosen to model viscosity and density contrasts representative of water and CO2 at a subsurface depth of 1.5 km for a normal geothermal gradient. It follows that the supercritical CO2 is 22 times less viscous than water.

Table 1 Properties of the constitutive rocktypes of the cross-bedded sandstone

Since the three-dimensional structure of these bedforms is complex (Youssef et al. 2022), we simulate and illustrate the flow along cross sections. Two perpendicular cross sections are considered (Fig. 4): one perpendicular to the sediment transport direction (Model PERPENDICULAR), and the other parallel to the sediment transport direction (Model PARALLEL). Both sections are meshed with an unstructured triangular mesh. Table 2 summarizes the mesh parameters of each section.

Table 2 Mesh parameters of cross-bedded sandstone sections

3.2 Oblique Layer Model

Square model OBLIQUE has a side length of 10 cm and consists of a repetitive sequence of regularized fine and coarse-grained sandstone layers (Fig. 5, Table 3). The layers are inclined by 45°; each is ~ 1.77 cm thick. The finite-element mesh is fully periodic, representing an REV with layers matching at opposing boundaries. The model has an analytical solution described in the Results section. Its purpose is to illustrate force balance variation with flow direction. The model idealizes the cross-beds in Model PARALLEL and is simulated with the same fluid properties.

Table 3 Rock properties of OBLIQUE layer model

4 Results

Model OBLIQUE is ideally suited to illustrate the benefits of the periodic pressure boundary conditions and the difference they make to the saturation distribution as compared with the constant fractional flow setup.

4.1 Effective Properties of Model OBLIQUE

Due to its symmetry, it is sufficient to investigate flow directions for a single quadrant with \(\theta \in [\frac{-\pi }{4},\frac{\pi }{4}]\). Remaining angles can be extrapolated from this range. The effective intrinsic permeability of the model is anisotropic with a principal axis aligned with its layers, and a value equivalent to their arithmetic average of 1450 mD. The minimum permeability axis is oriented perpendicular to the layers with a value equivalent to their harmonic mean of 639 mD. Instead of conducting multiple numerical simulations for different flow directions and pressure gradients, we can construct the ensemble saturation functions analytically, see Appendix. The effective \(\overline{{\mathbf{k} }_{r}}\) and \(\overline{{p }_{c}}\) (Fig. 6), illustrate the flow direction dependence. They are also rate dependent and this feature is most pronounced for flow perpendicular to the layers \((\theta =\frac{-\pi }{4})\). For the case of \(\theta =\frac{\pi }{4}\), capillary forces dominate over the viscous ones, and the CL persists across the entire range of pressure gradients applied. Importantly, this implies that the rate dependence estimated for the case of flow along the layers (e.g. Boon and Benson 2021) merely is an artifact of the boundary conditions (cf., Ekrann and Aasen 2000). On the other hand, for \(\frac{-\pi }{4}<\theta <\frac{\pi }{4}\), the balance between viscous and capillary forces varies, with a wider range observed when θ is close to \(\frac{-\pi }{4}\) and a narrower range when θ is close to \(\frac{\pi }{4}\).

Fig. 6
figure 6

Model OBLIQUE: rate dependence of \(\overline{{\mathbf{k} }_{\text{r}}}\) across layers (a), parallel to layers (b), and \(\overline{{\text{p} }_{\text{c}}}\) (c). Relative permeabilities of the constituent rocktypes are shown by dashed black lines. Curve colours in a,b,c correspond to one the force balance represented in graph (d indicating variation of viscous-capillary force balance between CL and VL as represented by flow velocity variation with flow direction.. Red curves reflect VL behaviour and blue ones the CL. The dashed line represents a fixed velocity of (3.5 × 10−6m/s, which is a typical front spreading velocity of 1 ft/day as observed during water flooding of oil fields

Another interesting feature is a variation of the viscous-capillary force balance with saturation. While the rate-dependent velocity (green curve, Fig. 6d) maintains the same ratio between the CL and VL limits, Fig. 6 reveals that \(\overline{{\mathbf{k} }_{r}}\) is close to the CL for average saturations near the residual water saturation before shifting towards VL at high water saturations. This phenomenon can be explained considering capillary spreading near the layer interfaces: at a low water saturation, viscous forces encounter a significant resistance trying to overcome capillary spreading upstream of the interface. This resistance increases with the capillary gradient \((\propto \left|\frac{d{p}_{c}}{d{s}_{w}}\right|)\) when saturation builds up ahead of the interface (Fig. 7). At high water saturations, the strength of the capillary gradient diminishes, and viscous forces dominate (Fig. 7). This behaviour matches with Boon and Benson's (2021) observations.

Fig. 7
figure 7

Model OBLIQUE: steady-state saturation distributions along the diagonal perpendicular to the layers at the viscous-capillary force balance represented by the green line in Fig. 6. The interface between the two layers is represented by a vertical black dashed line in the centre

In this scenario, multiple saturation states exhibit a similar \(\overline{{p }_{c}}\) as shown in Fig. 6c. This is due to the model characteristics: each layer has an equivalent pore volume, resulting in an equal contribution to the \(\overline{{p }_{c}}\) curve, see Eq. (9). In addition, the high viscosity contrast between CO2 and water promotes similar fractional flow curves. Thus, both layers have similar saturations at the VL, thereby narrowing the window of rate-dependent behaviour of the \(\overline{{p }_{c}}\) curve. Crucially, this behaviour is due to the unique fluid and material properties of this model and should therefore not be interpreted as rate-independent.

The ratio between viscous and capillary forces can be estimated in terms of capillary number \({N}_{c}=\frac{{v}_{1D}l{\mu }_{CO2}}{k{p}_{c}}\), where l is period length, µ is viscosity, k is the effective permeability and pc is the capillary pressure evaluated at certain average saturation. This definition considers the variation from CL to VL by only accounting for the velocity perpendicular to interfaces. Based on the model parameters, the rate-dependent window lies in the range of \({N}_{c}={10}^{-7}:{10}^{-3}\) where the lower limit represents CL, and the upper limit corresponds to VL. The application of this range shall be restricted to media possessing the same heterogeneity structure, permeability contrast, viscosity contrast, relative correlation length and aspect ratio.

4.2 Effective Properties of Three-dimensional Flow in Model OBLIQUE

Extruding Model OBLIQUE along the z-axis perpendicular to the xy-plane, the principal axes of the absolute permeability tensor remain the same, but there is the additional third component aligned with the z-axis. This implies a semi-isotropic absolute permeability tensor, where the permeability along the z-axis is equivalent to the arithmetic average of the layers. Similarly, \(\overline{{{\varvec{k}} }_{r}}\) is semi-anisotropic. However, \({|{{\varvec{v}}}_{T}|}_{3D}\) that would be required to achieve the same saturation state as in two dimensions is larger. For the same saturation distribution, \({|{{\varvec{v}}}_{T}|}_{3D}\) can be estimated by scaling \({|{{\varvec{v}}}_{T}|}_{2D}\) by a factor of csc(φ). When flow is exactly aligned with the z-axis (\(\varphi =0\)), the flux across the layers diminishes, and we arrive at the CL. By contrast, when \(\varphi =\frac{\pi }{2}\), the 3D case collapses to the 2D one and the results in Fig. 6. This conclusion matches the observations reported by Ringrose et al. (1993), that flow through domains extruded to 3D differs from flow through corresponding cross sections.

4.3 Influence of Boundary Conditions

To investigate the influence of boundary conditions, the saturation distribution in model OBLIQUE is re-evaluated with the boundary conditions of the Penn-State method. In this setup, co-injection occurs from a highly permeable region located adjacent to the left boundary, while the right boundary is maintained at a fixed pressure. The remaining boundaries are sealed. Figure 8 shows the saturation distribution observed after injecting more than 45 pore volumes (PV) and a water cut of 0.8 at the same injection velocity of \(2.13\times {10}^{-8}\) m/s. These numeric results reveal a completely different asymmetric saturation pattern as compared with the repetitive symmetric saturation cycles resulting from periodic boundaries. This comparison corroborates earlier studies emphasizing the strong influence of boundary conditions on saturation distributions (cf., Ekrann and Aasen 2000).

Fig. 8
figure 8

Steady-state water saturation obtained with the Penn-State method (left), water saturation profile along the diagonal perpendicular to the interfaces (white line), plotted from top-left to bottom-right corner using Penn-State method (centre), and periodic boundaries (right)

4.4 Upscaled Properties of Cross-Bedded Sandstone Models PERPENDICULAR and PARALLEL

Due to the geometric complexity of these models, there is no analytical solution for their ensemble saturation functions. Instead, methodology (Fig. 2) is applied to extract extended saturation functions from this model. For their analysis, it is practical also to define viscous-capillary force balance in terms of G rather than \({\mathbf{v}}_{T}\). The periodic boundary setup allows total flux to vary freely along boundaries as determined by the local rock properties, structure, and the applied fluid-pressure gradient. In the multiphase flow analysis, simulations for two fixed far-field pressure gradients were analysed, applying gradients of 500 and 14,000 Pa/m in three different flow directions: \(\theta =0, \theta =\frac{\pi }{4}\) and \(\theta =\frac{\pi }{2}\). The analytical CL saturation distributions were used to initialize the models. Then, the fluid mixture was cycled through these models until a pseudo steady-state saturation distribution was obtained for the given force-balance.

For both models PARALLEL and PERPENDICULAR, single-phase flow analysis indicates that the principal axes of their intrinsic permeability tensors are oriented oblique to the coordinate axes (Table 4). Figures 9 and 10 show stationary saturation distributions obtained for the resulting six scenarios computed at \(\overline{{s }_{w}}=0.7\). The obtained saturation distributions, highlight the importance of the macroscopic heterogeneity for residual trapping. The saturation distribution is highly non-uniform as CO2 collects upstream of the laminations and gets trapped where fine-grained layers converge on unconformity surfaces. Heterogeneity-related trapping is most pronounced at intermediate to high CO2 saturations, but leads to high local saturations already at small average saturations. As expected, trapping is inversely correlated with viscous forces breaking down capillary barriers. Trapping also is more pronounced when the far-field fluid pressure gradient is oriented perpendicular to the sediment transport direction by comparison with when it is aligned with the sediment transport direction. This observation will have to be re-evaluated once we will be able to mesh and run the REV-scale model in three dimensions.

Table 4 Eigen values and corresponding eigen vectors of intrinsic permeability measured for models PERPENDICULAR and PARALLEL
Fig. 9
figure 9

Model PERPENDICULAR: steady-state saturation distribution in cross-bedded sandstone computed for \(\overline{{\text{s} }_{\text{w}}}=0.7\). The white lines represent equally spaced pressure contours. Each row of images corresponds to the flow direction indicated by the black arrow on the left. The left column represents the elevated pressure gradient of 14 kPa/m and the right-column 0.5 kPa/m: Row (1) horizontal flow from left to right, row (2) oblique upward flow with \(\uptheta ={45}^{\text{o}}\), row (3) vertical upward flow from bottom to top

Fig. 10
figure 10

Model PARALLEL: steady-state saturation distribution computed for \(\overline{{\text{s} }_{\text{w}}}=0.7\) with equally spaced pressure contours in white. Flow direction is indicated by black arrow on the left; row (1) horizontal flow from left to right, row (2) oblique flow with \(\uptheta ={45}^{\text{o}}\), row (3) vertical flow from bottom to top. Top three plots represent steep pressure gradient (14 kPa/m), bottom ones weak gradient (0.5 kPa/m)

Changing G can be seen to have a significant influence on the saturation pattern obtained for model PERPENDICULAR (Fig. 9). Its effect is less pronounced on model PARALLEL (Fig. 10). By contrast with the Penn-State setup, the saturation distributions do not vary systematically between inlet and outlet, indicating that this variation results from the different boundary conditions. Note also, that the non-uniformity of saturation within each rock-type indicates that the typical CL and VL assumptions cannot be justified except for extreme values of \(\mathbf{G}\) not encountered in the real world.

Figure 11 shows sample of eigen value of \(\overline{{\mathbf{k} }_{r}}\). As indicated previously, the change in \(g\) has a marked influence on \(\overline{{\mathbf{k} }_{r}}\) of model PERPENDICULAR as compared with model PARALLEL. For the sake of an effective visualization of \(\overline{{\mathbf{k} }_{r}}\), and including the effect of the off-diagonal tensor components, we present the eigen vectors of \(\overline{{\mathbf{k} }_{\alpha }}\), scaled by the eigen values determined from \(\overline{\mathbf{k} }\) (Table 4). Figure 12 shows \(\overline{{\mathbf{k} }_{r}}\) evaluated for the horizontal flow case in both slices. Similar to model OBLIQUE, the orientation of \(\overline{{\mathbf{k} }_{\alpha }}\) of model PARALLEL hardly deviates from the orientation of \(\overline{\mathbf{k} }\). This indicates that the flow is controlled by geometry and the non-wetting phase is filtrated homogenously by the coarse–fine interfaces for both pressure gradients considered. In contrast, the orientation of \(\overline{{\mathbf{k} }_{r}}\) of model PERPENDICULAR varies with saturation and \(\mathbf{G}\). Moreover, the orientation of CO2 and water relative permeability tensors do not necessary align for the same saturation. This confirms that the capillary interfaces in these models exert a strong influence on two-phase flow. Figure 13 shows that these interfaces may be characterized by infinite capillary pressure gradients (\(\nabla {\text{p}}_{\text{CO}2}\to \infty\)) as pressure discontinuities arise when they act as membrane seals where CO2 collects until the entry pressure of the interface is exceeded, there are jump discontinuities in fluid pressure (the gradient becomes infinity) that are supported by the special discretisation of the interfaces with split boundaries.

Fig. 11
figure 11

Eigen value-based \(\overline{{\mathbf{k} }_{\text{r}}}\) curves of model PERPENDICULAR (left) and model PARALLEL (right) for the 2 horizontal pressure gradients

Fig. 12
figure 12

\(\overline{{\mathbf{k} }_{\text{r}}}\) of model PERPENDICULAR (left) and model PARALLEL (right) for the 2 horizontal pressure gradients. The radial extent corresponds to the scaled maximum and minimum of phase permeability tensors, while the angle records the orientation of the eigen vectors. The curves are parameterized by water saturation. direction

Fig. 13
figure 13

Model PERPENDICULAR: CO2 saturation distribution for \(\mathbf{G}=\left(14\text{ kPa}/\text{m}, \frac{\uppi }{4}\right)\). The grayscale saturation map is overlain by flow vectors scaled by pressure gradient magnitude

To gain a deeper understanding of the saturation patterns, we analyse the saturation pattern obtained from model PERPENDICULAR using \(\mathbf{G}=\left(500\frac{Pa}{m}, \frac{\pi }{2}\right)\) and the parameters in Table 3. Figure 14 shows CO2 saturation distribution and pressure gradient vectors. While the overall gradient is small, locally, pressure varies strongly (long vectors). Areas with flat pressure gradients are marked by ellipses. They coincide with high CO2 saturations and capillary sealing of the layer interfaces downstream. In these settings, CO2 accumulates in the high- permeability laminae until the flow stagnates.

Fig. 14
figure 14

Model PERPENDICULAR: CO2 saturation distribution for g = 500 Pa/m along y-direction from bottom to top. The saturation colour map is masked with flow field (vectors) scaled to pressure gradient magnitude. The dashed yellow ellipses show selected locations where the pressure gradient is weak

5 Discussion

Using two-dimensional models of cross-bedded sandstone, this study demonstrates a novel steady-state upscaling methodology including dynamic capillary sealing and pressure compartmentalisation as well as doubly periodic boundary conditions for fluid pressure and saturation, respectively. Full periodicity (Eq. 3) was already proposed as essential by Virnovsky et al. (2004), extending the one-dimensional analysis of Dale et al. (1997). Here we use a more elaborate simulation framework (e.g. Matthai and Tran 2023; Shao et al. 2022; Tran et al. 2020), and also consider continuously varying flow directions. Among other features, this model correctly represents discontinuities in both saturation and pressure, going beyond previous studies (e.g. Lohne et al. 2006; Pickup et al. 2000; Ringrose et al. 1993). Our motivation for considering continuously varying directions is that flow alignment with layers and coordinate axes (e.g. Boon et al. 2022; Jackson et al. 2018; Jonoud and Jackson 2008a, b) is only one end-member scenario within a spectrum because the local force balance depends on the complex interplay between the spatial arrangement of layers and their internal property variations. Although computationally more costly, our “full physics” approach allows for an analysis of flow-rate effects that is not possible with invasion percolation-based models that cannot analyse the time dependence of the process (cf., Cavanagh and Haszeldine 2014; Trevisan et al. 2017). While this analysis only considers capillary and viscous forces (Eq. 1) which may be justifiable at the sub-meter scale (e.g. Pickup and Sorbie 1994; Virnovsky et al. 2004), Matthai and Tran (2023) showed that the underpinning simulation approach also handles buoyancy-driven flow and gravitational phase segregation. In addition, the simple mathematical nature and robustness make the steady-state upscaling more attractive than unsteady state especially at the small length scale where numerical dispersion is insignificant (Pickup and Stephen 2000). However, at larger scales, a combination of both steady state and unsteady state seems advisable as it permits modeling of coarsening instabilities (Youssef et al. 2023).

In the numeric experiments shown, the global viscous-capillary force balance is defined in terms of the pressure gradient as illustrated in Fig. 2. However, we can use flux or the capillary number by iterating the pressure gradient to match required flow velocity. One concern related to capillary number is that it has many definitions (e.g. Berg and Ott 2012; Boon and Benson 2021; Dale et al. 1997; Lohne et al. 2006). It has an intrinsic length scale, and it is questionable whether it can be readily transferred to complex nested flow geometries (Jonoud and Jackson 2008a, b). Thus, how should one define the drainage-capillary pressure gradient in the case where there is a series of jump discontinuities defined by entry pressure in actuality?

The saturation patterns observed in Cross-bedded sandstone or OBLIQUE are largely due to capillary heterogeneity as opposed to permeability heterogeneity. Therefore, from a hydrodynamic point of view, building realistic models involving different rocktypes critically depends on the physical realism of the model representation of capillary interfaces. The input parameters for these building blocks can be estimated either from core flooding on homogenous samples or pore scale simulation (e.g. Øren et al. 2019).

Our analysis indicates that the final saturation state is unique and independent of the initial saturation distribution. Is this conclusion valid only when input imbibition and drainage saturation curves for the constituent rock types coincide?—This remains an open question that needs to be addressed when considering the hysteresis of rate- and direction-dependent saturation functions, to be investigated perhaps via physical experiments. In addition, the approach proposed states that a form of steady state is achieved between capillary and viscous forces. Achieving the steady state means that there are no further changes in both pressure and saturation. It is expected that phase pressure reaches the steady-state faster than saturation, hence, we propose a steady-state criterion as

$$\max (\frac{{V_{p} }}{{\sum {V_{p} } }}\frac{1}{s}\frac{\partial s}{{\partial t}}) \le \varepsilon$$
(14)

where \({V}_{p}\) is the pore volume associated with each control volume in the model and \(\varepsilon\) is a threshold value that can be determined by trial and error. This definition gives more weight to larger FVs compared to smaller ones.

The concept described here can be easily modified to more general flow scenarios via the border region approach (Wen et al. 2003). The border region yields equivalent parameters for models that are lacking separation of scales and the determined parameters collapse to effective if separation of scales exists. In th former case, the resultant equivalent tensor system 8 is not necessarily symmetric nor positive definite and tuning may be required (Durlofsky 2005). The border region approach simplifies the upscaling process as compared to the problematic alignment of grids with the flow field (cf., Wen et al. 2000).

6 Conclusions

We present a steady-state upscaling study of multiphase fluid flow through heterogeneous composite rock types, forming geometrically complex facies associations, such as cross-bedding or foresets as are typical for fluvial sandstones. To overcome the issue of unrealistically uniform boundary fractional flows and saturation conditions, complicating the analysis of such rocks in physical experiments, we employ doubly periodic boundary conditions for both, saturation and pressure. This setup allows us to obtain non-uniform saturation distributions free from boundary artefacts and suitable for the analysis of flow at arbitrary far-field pressure gradients and force balances, including cases where the flow is locally or globally blocked by dynamic capillary seals formed at coarse–fine interfaces due to saturation build-up upstream and choking of wetting phase flow as well resulting in pressure and saturation jump discontinuities. The demonstrated ability to model these blockages allows us to study macroscopic heterogeneity-induced capillary trapping as an additional contribution to the amount of immobilized CO2 inside of the injection plume. Our results further corroborate the finding that the directionality and rate dependence of relative permeability is not an artifact of the boundary conditions but a significant and reproducible feature of heterogeneous porous media. Thus, in the investigated cross-bedded sandstone model, capillary number varies significantly with flow direction, ranging over four orders of magnitude ranging from \({10}^{-7}\) to \({10}^{-3}\), dependent on whether the flow is aligned with  or perpendicular to the bedding planes, respectively. Our new simulation/analysis method forms part of an already partially automated albeit computationally expensive workflow for the analysis of scanned and segmented core samples (applicable also to outcrop analogues). By contrast with invasion percolation approaches, this full-physics method permits a rigorous analysis of rate- and pressure gradient-direction dependent relative permeability / capillary pressure functions for the modelling and simulation of plume spreading in CO2 storage sites.