1 Introduction

Permanent storage of \(\hbox {CO}_2\) in subsurface saline aquifers is a potentially effective means to reduce anthropogenic \(\hbox {CO}_2\) emission to the atmosphere (Benson and Cook 2005). The estimated quantities of carbon that must be stored to mitigate global warming are around 3.5 billion tons per year during the next decades (Pacala and Socolow 2004). Captured \(\hbox {CO}_2\) is transported to the storage site and injected at the bottom of brine-filled aquifers. Long after the injection period has ended, \(\hbox {CO}_2\) will propagate upwards and laterally through the permeable formation due to buoyancy and groundwater flow and is prevented from leaking out to the atmosphere through various trapping mechanisms. Dissolution of the \(\hbox {CO}_2\) in brine leads to solubility trapping, and geochemical reactions with the rock result in mineral trapping. The temporal scales of these trapping mechanisms are relatively large and can be neglected for time frames up to a few decades after the end of the injection period (Juanes et al. 2010). More important on the shorter time scale are structural trapping due to the existence of a caprock acting as a seal over the aquifer and capillary trapping of portions of the \(\hbox {CO}_2\) plume left behind as the plume recedes.

Simulation of large-scale and long-term subsurface storage of \(\hbox {CO}_2\) is complex due to the large spatial and temporal scales involved. Typical storage reservoirs are up to hundreds of kilometers in spatial extent, and the slow migration of the \(\hbox {CO}_2\) plume may require up to thousands of years before immobilization occurs (Hesse et al. 2008). In addition to the vast temporal and spatial scales, heterogeneity in the storage aquifers implies uncertainty that should be taken into account in the mathematical models. A feasible mathematical model can only include the most relevant physics and the most prominent sources of uncertainty. Model uncertainty inherent to simulation of long-term \(\hbox {CO}_2\) migration was demonstrated in Nordbotten et al. (2012), where a large-scale benchmark problem was solved independently with different methods, yielding significantly different results for the plume migration.

To reduce complexity of solving large systems, it is useful to simplify the fluid flow model. A common assumption is the vertical-equilibrium (VE) assumption that implies instantaneous gravity segregation of brine and \(\hbox {CO}_2\). The phase equilibrium results in hydrostatic pressure distribution, and the governing equations may be integrated over the vertical direction to reduce the dimensionality and computational effort of the problem. The VE assumption is justified when the lateral extent of the formation is much larger than the vertical extent, which is typically the case for storage formations of interest (Yortsos 1995). Due to the reduced complexity of the problem, VE models often yield more accurate results compared to poorly resolved three-dimensional models (Nilsen et al. 2011). Despite the reduced complexity compared to full 3D models, VE models exhibit largely different fluid migration patterns depending on the representation of subgrid processes, e.g., dissolution, residual trapping and capillary fringe effects (Gasda et al. 2012).

Early developments in semi-analytical solutions to sharp interface models for gravity currents in tilted aquifers storage were presented in Bear (1972). More recent work in horizontal domains for axisymmetric flow specifically applied to \(\hbox {CO}_2\) storage includes (Lyle et al. 2005; Nordbotten and Celia 2011). Hesse et al. (2008) included capillary trapping and investigated the limiting parabolic and hyperbolic cases of horizontal and sloping aquifers, respectively. MacMinn et al. (2010) presented an analytical solution for a sloping aquifer with groundwater flow and capillary trapping in one spatial dimension and evaluated the model for storage efficiency at the basin scale (Juanes et al. 2010).

Stochastic modeling for flow in porous media is an active area of research and includes a range of different methods. In the stochastic hydrology community, statistical moment equation methods have been popular in order to quantify uncertainty in aquifers with analytical, or semi-analytical, methods (Gelhar 1986; Zhang 2002). The variables and material parameters are decomposed into mean and fluctuation, or as an infinite series, and partial differential equations (PDEs) are derived for the moments of quantities of interest. Obtaining closure of the PDEs may be hard, and the resulting expressions are limited to small perturbations, i.e., small variance of input parameters (Caroni and Fiorotto 2005). Moment equation methods resemble the stochastic Galerkin methods that will be employed in this paper in the sense that they rely on the solution of a coupled system of PDEs and thus potentially cost-efficient in comparison with Monte Carlo sampling. Using surrogate models, e.g., streamline solvers, Monte Carlo sampling can be a viable method to estimate uncertainties in \(\hbox {CO}_2\) storage (Kovscek and Wang 2005).

The polynomial chaos framework (Ghanem and Spanos 1991; Xiu and Karniadakis 2002) for solution of PDEs subject to uncertainty has been applied in the context of subsurface flow and \(\hbox {CO}_2\) storage, and may be an efficient alternative to Monte Carlo methods. Data-driven polynomial chaos expansion to determine empirical stochastic model parameterizations was successfully compared to Monte Carlo methods in Oladyshkin et al. (2011) and used for identification of the most important sources of uncertainty through Sobol sensitivity indices in a shallow marine deposit (Ashraf et al. 2013). Polynomial chaos-based surogate models were built to minimize the risk of leakage by maximizing the probability of residual trapping of \(\hbox {CO}_2\) in a saline aquifer (Zhang and Sahinidis 2013).

Previous work on stochastic Galerkin methods for hyperbolic systems of equations includes nonlinear projection based on variable transformation to limit the oscillations around discontinuities in stochastic space (Poëtte et al. 2009) and robust solvers for problems with strong discontinuities (Tryoen et al. 2010). In the context of two-phase flow, a stochastic Galerkin method with adaptivity in physical and stochastic space, well suited for parallel computation, was introduced in Kröker et al. (2015).

In this paper, we present a stochastic Galerkin formulation and a numerical solver for a simplified physics model of subsurface \(\hbox {CO}_2\) storage. The stochastic Galerkin projection is based on the polynomial chaos framework but results in a single extended coupled system of equations that are solved only once to obtain all statistical information. We present a formulation that relies on precomputed stochastic quantities to the extent possible and prove that it is hyperbolic.

Assuming a stochastic model for uncertain parameter values, we may have solution regions where both imbibition and drainage occur with certain probabilities. In order to handle these situations, we generalize the deterministic model in MacMinn et al. (2010). The extended deterministic model is verified numerically and subsequently used to obtain a stochastic reference solution via Monte Carlo sampling. With the aim of extending the framework to problems where analytical solutions are not available, we present a shock-capturing numerical method to solve the stochastic problem projected onto the stochastic basis functions and evaluate its performance through comparison with statistics obtained from the reference solution. The stochastic model and the possibility of both drainage and imbibition along the same interfaces lead to a stochastic discontinuous accumulation coefficient that may take different values at a given point in space. To determine the accumulation coefficient efficiently everywhere in discrete space and time, we adjust the adaptive quadrature method for discontinuous interfaces presented in Müller et al. (2012).

2 Simplified Physical Model

We consider a one-dimensional model and assume incompressible flow in a homogeneous tilted aquifer initially filled with brine, invoke the VE assumption and assume a sharp interface between the \(\hbox {CO}_2\) and brine phases. Following the work in Hesse et al. (2008), we consider an aquifer of infinite lateral extent with constant thickness H, tilt angle \(\theta ,\, \hbox {CO}_2\) plume thickness \(h_{\text {c}}\), porosity \(\phi \), and residual saturation \(S_{\alpha {\text {r}}}\) (\(\alpha = \text {b, c}\)). Supercritical \(\hbox {CO}_2\) is injected through wells along a line at the bottom of the sloping aquifer. As the \(\hbox {CO}_2\) plume is transported upward through the aquifer by buoyancy and background flow, brine is displaced by \(\hbox {CO}_2\) at the leading edge of the plume through drainage, assuming that \(\hbox {CO}_2\) is the non-wetting phase. Due to capillary pressure, not all brine is replaced but leaves a residual saturation \(S_{\text {br}}\) of brine in the advancing \(\hbox {CO}_2\) phase. As the \(\hbox {CO}_2\) recedes through imbibition when brine is replacing \(\hbox {CO}_2\) at the wake of the plume, residual \(\hbox {CO}_2\) is trapped in the brine phase.

The transport of the \(\hbox {CO}_2\) phase is governed by the one-dimensional PDE

$$\begin{aligned} \mathcal {R} \phi \frac{\partial h_{\text {c}}}{\partial t} + \frac{\partial Q_{\text {c}}}{\partial x} = 0, \quad x\in (-\infty , \infty ), \quad t\in [0, \infty ), \end{aligned}$$
(1)

where the discontinuous accumulation coefficient \(\mathcal {R}\) takes different values during drainage (\(\hbox {CO}_2\) replaces brine) and imbibition (brine replaces \(\hbox {CO}_2\)).

$$\begin{aligned} \mathcal {R} = \left\{ \begin{array}{ll} 1- S_{\text {br}}-S_{\text {cr}} &{}\quad \text{ if } \frac{\partial h_{\text {c}}}{\partial t} < 0 \\ 1- S_{\text {br}} &{}\quad \text{ if } \frac{\partial h_{\text {c}}}{\partial t} > 0 \end{array} \right. . \end{aligned}$$

The flux of the \(\hbox {CO}_2\) phase is given by

$$\begin{aligned} Q_{\text {c}}=h_{\text {c}} q_{\text {c}} = k g {\Delta } \rho \frac{ \lambda _{\text {c}} \lambda _{\text {b}} h_{\text {c}}(H-h_{\text {c}}) }{h_{\text {c}} \lambda _{\text {c}} + (H-h_{\text {c}}) \lambda _{\text {b}}} \left( \sin (\theta )-\cos (\theta )\frac{\partial h_{\text {c}}}{\partial x} \right) , \end{aligned}$$

where k [L\(^{2}\)] is the permeability, g [LT\(^{-1}\)] is the gravity acceleration, and \({\Delta } \rho \) [\(\hbox {ML}^{-3}\)] is the density difference between the two phases, assumed to be constant. The phase mobilities are defined by

$$\begin{aligned} \lambda _{\alpha } = \frac{k_{\text {r}, \alpha }}{\mu _{\alpha }}, \quad \alpha = \text {b, c}, \end{aligned}$$

where \(k_{\text {r},\alpha }\) [1] is the relative permeability and \(\mu _{\alpha } \, [\hbox {ML}^{-1}\hbox {T}^{-1}]\) is the viscosity of phase \(\alpha \). An additional net volume rate of fluid flow \(Q_{\text {vol}} \,[\hbox {L}^{2}\hbox {T}^{-1}]\) (due to the VE assumption) is introduced as an extra advective term to (1), and the permeability k is assumed constant in space as in MacMinn et al. (2010). In order to include spatially varying k in future work, the subsequent analysis and design of a numerical method will treat the PDE in conservative form. We obtain

$$\begin{aligned}&\mathcal {R} \phi \frac{\partial h_{\text {c}}}{\partial t} + Q_{\text {vol}} \frac{\partial }{\partial x} \left[ \frac{\lambda _{\text {c}} h_{\text {c}}}{\lambda _{\text {c}} h_{\text {c}} + \lambda _{\text {b}}(H-h_{\text {c}})}\right] + {\Delta } \rho g k \sin (\theta ) \frac{\partial }{\partial x} \left[ \frac{\lambda _{\text {c}} \lambda _{\text {b}} h_{\text {c}}(H-h_{\text {c}}) }{\lambda _{\text {c}}h_{\text {c}} + \lambda _{\text {b}}(H-h_{\text {c}})} \right] \nonumber \\&\quad - {\Delta } \rho g k \cos (\theta ) \frac{\partial }{\partial x} \left[ \frac{\lambda _{\text {c}} \lambda _{\text {b}} h_{\text {c}}(H-h_{\text {c}})}{\lambda _{\text {c}} h_{\text {c}} + \lambda _{\text {b}}(H-h_{\text {c}})} \frac{\partial h_{\text {c}}}{\partial x} \right] = 0. \end{aligned}$$
(2)

The last (diffusive) term of (2) is assumed to be negligible compared to the advective forces and capillary trapping mechanisms (Hesse et al. 2008; MacMinn et al. 2010). Setting

$$\begin{aligned} h\equiv & {} h_{\text {c}}/H, \\ Q\equiv & {} Q_{\text {vol}}/H, \\ K\equiv & {} {\Delta } \rho g k \lambda _{\text {b}} \sin (\theta ),\\ M\equiv & {} \lambda _{\text {c}} / \lambda _{\text {b}}, \end{aligned}$$

we get

$$\begin{aligned} \mathcal {R} \phi \frac{\partial h}{\partial t} + Q \frac{\partial }{\partial x} \left[ \frac{M h}{1+(M-1)h}\right] + K \frac{\partial }{\partial x} \left[ \frac{M h(1-h) }{1+(M-1)h} \right] = 0. \end{aligned}$$
(3)

The PDE (3) can be expressed as a conservation law

$$\begin{aligned} \mathcal {R} \phi \frac{\partial h}{\partial t} + \frac{\partial F}{\partial x} = 0, \end{aligned}$$
(4)

with the flux function F, defined by

$$\begin{aligned} F(h) = Q\frac{M h}{1+(M-1)h} + K \frac{M h(1-h)}{1+(M-1)h}, \end{aligned}$$
(5)

and the Jacobian

$$\begin{aligned} F'(h) = \frac{QM + KM(1-2h-(M-1)h^2)}{(1+ (M-1)h)^2}. \end{aligned}$$

Furthermore, for all \(h\in [0, 1]\), we have

$$\begin{aligned} F''(h) = -2M\frac{(M-1)Q+MK}{(1+ (M-1)h)^3} < 0, \end{aligned}$$

so there are no inflection points.

The problem setup is depicted schematically in Fig. 1. In reality, the lateral extent of the aquifer is much larger than the depth. In the derivation of an analytical solution, as in MacMinn et al. (2010) it will be useful to keep track of the end points of the plume, denoted \(x_{\scriptscriptstyle {\text {LL}}}\), \(x_{\scriptscriptstyle {\text {LR}}}\), \(x_{\scriptscriptstyle {\text {RL}}}\) and \(x_{\scriptscriptstyle {\text {RR}}}\).

Fig. 1
figure 1

One-dimensional model of sloping aquifer of normalized height 1 and infinite length

3 Deterministic Analytical Solutions

The PDE (4) is a conservation law with discontinuous flux function \(\tilde{F}=F/(\phi \mathcal {R})\) due to the discontinuity in \(\mathcal {R}\). We seek a weak solution in the sense of distributions that satisfy the Kružkov entropy inequalities (Kružkov 1970) away from the discontinuity in \(\mathcal {R}\). Results on existence and entropy conditions for uniqueness of solutions to this class of problems have been extensively investigated by several authors (Andreianov et al. 2011), and a comprehensive summary is included in Andreianov and Mitrović (2014).

To derive analytical solutions, we will use techniques similar to those employed in previous work on exact solutions of \(\hbox {CO}_2\) transport PDEs (Hesse et al. 2008; Juanes et al. 2010; MacMinn et al. 2010). To extend the analysis to cases of both drainage and imbibition along the same interfaces and for completeness of the exposition, the derivations are included below.

We assume that the aquifer slope can be ignored during the injection phase and \(\hbox {CO}_2\) is injected with rate \(Q_{\text {inj}}\) and spreading symmetrically from an injector well at a point \(x_0\). Two interfaces separating the phases, denoted left (L) and right (R), are propagating as \(\hbox {CO}_2\) is replacing brine through drainage. The injection plume shape is determined by the flux function \(F_{\text {inj}}\) and its derivative,

$$\begin{aligned} F_{\text {inj}} = \frac{Q_{\text {inj}} Mh}{1+(M-1)h}, \quad F'_{\text {inj}} = \frac{Q_{\text {inj}}M}{(1+(M-1)h)^2}. \end{aligned}$$

The spatial location of the right (left) interface during injection is governed by the ordinary differential equation (ODE)

which can be integrated to time \(\tau \) and solved for h to determine the plume shape after injection. The result is the initial function \(h_{\text {init}}\) for the post-injection simulation, given by

$$\begin{aligned} h_{\text {init}} = \left\{ \begin{array}{ll} 0 &{}\quad x \le x_{0}-\frac{Q_{\text {inj}}M\tau }{\phi (1-S_{\text {br}})} \\ \frac{ \sqrt{\frac{Q_{\text {inj}} \tau M}{(x_{0}-x) \phi (1-S_{\text {br}})}}-1}{M-1} &{}\quad x_{0}-\frac{Q_{\text {inj}}M\tau }{\phi (1-S_{\text {br}})} < x < x_{0}-\frac{Q_{\text {inj}}\tau }{M \phi (1-S_{\text {br}})} \\ 1 &{}\quad x_{0}-\frac{Q_{\text {inj}}\tau }{M \phi (1-S_{\text {br}})} \le x \le x_{0}+\frac{Q_{\text {inj}}\tau }{M \phi (1-S_{\text {br}})}\\ \frac{\sqrt{ \frac{Q_{\text {inj}}\tau M}{(x-x_{0})\phi (1-S_{\text {br}})}}-1}{M-1} &{}\quad x_{0}+\frac{Q_{\text {inj}}\tau }{M \phi (1-S_{\text {br}})} < x<x_{0}+\frac{Q_{\text {inj}} M\tau }{\phi (1-S_{\text {br}})} \\ 0 &{}\quad x \ge x_{0}+\frac{Q_{\text {inj}} M\tau }{\phi (1-S_{\text {br}})} \end{array} \right. . \end{aligned}$$
(6)

After the injection period, the plume as a whole will move upslope, but depending on the parameter values, parts of the phase interfaces will move in different directions. Along both interfaces, both imbibition and drainage may occur. The solution to be presented here is a generalization of the pure imbibition/drainage interfaces presented by MacMinn et al. They show numerical results also for the case to be presented here, but we need analytical expressions for comparison with the stochastic solution in subsequent sections and therefore derive the corresponding expressions below. The solution for the case where only imbibition occurs at the left interface and only drainage at the right interface can be found in MacMinn et al. (2010).

To find a practical expression for the discontinuous accumulation coefficient \(\mathcal {R}\) locally, note that \(\partial h / \partial t = -F'(h)\partial h / \partial x\), and \(\partial h / \partial x>0\) everywhere on the left interface and \(\partial h / \partial x < 0\) everywhere on the right interface. We define the left and right interface accumulation coefficients \(\mathcal {R}_{\text {L}}\) and \(\mathcal {R}_{\text {R}}\),

$$\begin{aligned} \mathcal {R}_{\text {L}} = \left\{ \begin{array}{ll} 1-S_{\text {br}}-S_{\text {cr}} &{} \text{ if } F'(h)>0 \\ 1-S_{\text {br}} &{} \text{ if } F'(h)<0 \end{array} \right. , \quad \mathcal {R}_{\text {R}} = \left\{ \begin{array}{ll} 1-S_{\text {br}}-S_{\text {cr}} &{} \text{ if } F'(h)<0 \\ 1-S_{\text {br}} &{} \text{ if } F'(h)>0 \end{array} \right. . \end{aligned}$$

Note that these expressions only make sense as long as the solution remains locally smooth. It holds that \(F'(0)>0\) for all ranges of parameter values of interest, but \(F'(1)\) may have different signs depending on the parameter values MKQ. The accumulation coefficient \(\mathcal {R}\) changes value at \(h=h^{*}\) defined by \(F'(h^{*})=0\).

For \(t>\tau \), the evolution of the right (left) interface is determined by

Integrating this expression with x corresponding to \(h_{\scriptscriptstyle {\text {init}}}\) as initial condition and evaluating the resulting expressions at \(h=0\) and \(h=1\), we obtain the locations of the end points of the two interfaces

$$\begin{aligned} x_{\scriptscriptstyle {\text {LL}}}&= x_0-\frac{Q_{\text {inj}}M\tau }{\phi (1-S_{\text {br}})} + \frac{M(K+Q)}{ (1-S_{\text {br}}-S_{\text {cr}})\phi }(t-\tau ) \end{aligned}$$
(7)
$$\begin{aligned} x_{\scriptscriptstyle {\text {LR}}}&= x_0-\frac{Q_{\text {inj}}\tau }{M \phi (1-S_{\text {br}})} + \frac{Q-MK}{M \mathcal {R}_{\scriptscriptstyle {\text {L}}}(1) \phi }(t-\tau ) \end{aligned}$$
(8)
$$\begin{aligned} x_{\scriptscriptstyle {\text {RL}}}&= x_0+\frac{Q_{\text {inj}}\tau }{M \phi (1-S_{\text {br}})} + \frac{Q-MK}{M \mathcal {R}_{\scriptscriptstyle {\text {R}}}(1) \phi }(t-\tau ) \end{aligned}$$
(9)
$$\begin{aligned} x_{\scriptscriptstyle {\text {RR}}}&= x_0+\frac{Q_{\text {inj}} M\tau }{\phi (1-S_{\text {br}})} + \frac{M(K+Q)}{(1-S_{\text {br}})\phi }(t-\tau ) \end{aligned}$$
(10)

The left interface steepens, and the right interface is stretched over time. As long as the plume height remains smooth, the solution is given by

$$\begin{aligned} h = \left\{ \begin{array}{ll} 0 &{}\quad x < x_{\scriptscriptstyle {\text {LL}}} \\ \frac{1}{1-M}+\sqrt{ \frac{ (M(M-1)Q+M^2K)(t-\tau ) - \frac{ Q_{\text {inj}} M(M-1) \tau \mathcal {R}_{\text {L}}}{1-S_{\text {br}} }}{(M-1)^2[(M-1)(x-x_0)\phi \mathcal {R}_{\scriptscriptstyle {\text {L}}} +K M (t-\tau )]}} &{}\quad x_{\scriptscriptstyle {\text {LL}}} \le x < x_{\scriptscriptstyle {\text {LR}}}\\ 1 &{}\quad x_{\scriptscriptstyle {\text {LR}}} \le x < x_{\scriptscriptstyle {\text {RL}}} \\ \frac{1}{1-M}+\sqrt{ \frac{ (M(M-1)Q+M^2K)(t-\tau ) + \frac{ Q_{\text {inj}} M(M-1) \tau \mathcal {R}_{\text {R}}}{1-S_{\text {br}}}}{(M-1)^2[(M-1)(x-x_0)\phi \mathcal {R}_{\scriptscriptstyle {\text {R}}} +K M (t-\tau )]}} &{}\quad x_{\scriptscriptstyle {\text {RL}}} \le x < x_{\scriptscriptstyle {\text {RR}}}\\ 0 &{}\quad x \ge x_{\scriptscriptstyle {\text {RR}}} \end{array} \right. . \end{aligned}$$

Note that the solution is defined implicitly since \(\mathcal {R}_{\scriptscriptstyle {\text {L}}}, \mathcal {R}_{\scriptscriptstyle {\text {R}}}\) are dependent on h. If \(F'(1)>0\), the situation is the same as in MacMinn et al. (2010). For completeness and since we will investigate a stochastic model that includes that case as well, that solution is included in “Appendix”. In the rest of this section, we will instead consider the case of both imbibition and drainage along the same interface. Figure 2a depicts the early development of the plume, and the regions of imbibition and drainage are given by the receding and advancing edges of the plume, where the direction of propagation is indicated by arrows.

The points \(x_{\scriptscriptstyle {\text {LR}}}\) and \(x_{\scriptscriptstyle {\text {RL}}}\) move with different speeds and merge at time \(t_{\scriptscriptstyle {\text {LR} \rightarrow \text {RL}}}\), obtained by equating (8) and (9) and solving for time, i.e.,

$$\begin{aligned} t_{\scriptscriptstyle {\text {LR} \rightarrow \text {RL}}} = \tau \left( 1+\frac{2Q_{\text {inj}}}{\left( \frac{1-S_{\text {br}}}{\mathcal {R}_{\text {L}}}-\frac{1-S_{\text {br}}}{{\mathcal {R}_{\text {R}}}}\right) (Q-KM)} \right) , \end{aligned}$$

if the interfaces remain smooth. However, this will not be the case in the numerical experiments to be considered here. Instead, the left edge of the plume will become steeper and develop a shock. Unlike the case of a pure imbibition interface, this will not occur when \(x_{\scriptscriptstyle {\text {LL}}}=x_{\scriptscriptstyle {\text {LR}}}\), but instead when \(x_{\scriptscriptstyle {\text {LL}}}\) reaches the left stationary point \(x^{*}\) where \(F'(h^{*})=0\). The shock is shown in Fig. 2b, and it arises at time

$$\begin{aligned} t_{\scriptscriptstyle {\text {LL} \rightarrow \text {S}}} = \tau +\frac{1-S_{\text {br}}-S_{\text {cr}}}{1-S_{\text {br}}} \frac{Q_{\text {inj}}(M-1)\tau h^{*}t [2+(M-1) h^{*} ]}{(K+Q)(1+(M-1)h^{*})^2}. \end{aligned}$$

The shock, originally with strength (height) \(h_{\scriptscriptstyle {\text {S}}} = h^{*}\) and located at \(x_{\scriptscriptstyle {\text {S}}}=x^{*}\), is continuously getting stronger and propagates to the right with speed determined by the Rankine–Hugoniot condition, i.e.,

$$\begin{aligned} \sigma _{\scriptscriptstyle {\text {S}}}=\frac{F(h_{\scriptscriptstyle {\text {L}}})-F(h_{\scriptscriptstyle {\text {R}}})}{\phi \mathcal {R} (h_{\scriptscriptstyle {\text {L}}}-h_{\scriptscriptstyle {\text {R}}})}, \end{aligned}$$

where the states immediately to the left and right of the shock are \(h_{\scriptscriptstyle {\text {L}}}=0\) and \(h_{\scriptscriptstyle {\text {R}}}=h_{\scriptscriptstyle {\text {S}}}\). This is an imbibition process so \(\mathcal {R}=1-S_{\text {br}}-S_{\text {cr}}\) for all shock locations along the left interface. With the flux (5), we obtain

$$\begin{aligned} \sigma _{\scriptscriptstyle {\text {S}}}(h_{\scriptscriptstyle {\text {S}}}) = \frac{QM+KM(1-h_{\scriptscriptstyle {\text {S}}})}{\phi (1-S_{\text {br}}-S_{\text {cr}})(1+(M-1)h_{\scriptscriptstyle {\text {S}}})}, \end{aligned}$$
(11)

for \(h_{\scriptscriptstyle {\text {S}}} \in (h^{*}, 1)\). To find an expression for \(h_{\scriptscriptstyle {\text {S}}}\), note that the height of the shock is implicitly determined by equating the spatial location determined by the shock with the left interface spatial location as a function of h, evaluated at the shock height \(h_{\scriptscriptstyle {\text {S}}}\), i.e.,

$$\begin{aligned} x^{*}+\int _{t_{\scriptscriptstyle {\text {LL} \rightarrow \text {S}}}}^{t}\sigma _{\scriptscriptstyle {\text {S}}}(h_{\scriptscriptstyle {\text {S}}}(t'))\text {d} t' = x_{\scriptscriptstyle {\text {L}}}(h_{\scriptscriptstyle {\text {S}}}(t),t), \end{aligned}$$

which is differentiated with respect to t, resulting in the ODE

$$\begin{aligned} \frac{dh_{\scriptscriptstyle {\text {S}}}}{dt} = \frac{\phi (1-S_{\text {br}}) \sigma _{\scriptscriptstyle {\text {S}}} - F'(h_{\scriptscriptstyle {\text {S}}})}{-F_{\text {inj}}''(h_{\scriptscriptstyle {\text {S}}})\tau + F''(h_{\scriptscriptstyle {\text {S}}})(t-\tau )}, \quad h_{\scriptscriptstyle {\text {S}}}(0) = h^{*}. \end{aligned}$$
(12)

In order to solve (12), set

$$\begin{aligned} G= & {} \frac{1-S_{\text {br}}}{1-S_{\text {br}}-S_{\text {cr}}}, \nonumber \\ a= & {} \frac{KM(1-G)}{M-1}, \nonumber \\ b= & {} GM\left( Q+\frac{KM}{M-1} \right) , \nonumber \\ c= & {} -M\left( Q+\frac{M}{M-1} \right) , \end{aligned}$$
(13)

Introducing the variable substitution \(h' = 1+(M-1)h_{\scriptscriptstyle {\text {S}}}\), the ODE (12) can be separated and solved through integration. Provided that \(b^2-4ac>0\), the shock height \(h_{\scriptscriptstyle {\text {S}}}\) is defined by

$$\begin{aligned}&\int _{1+(M-1)h^{*}}^{1+(M-1)h_{\scriptscriptstyle {\text {S}}} } \frac{\text {d} h'}{h'(a(h')^{2} + bh' + c)} \nonumber \\&\quad = \frac{1}{2c} \left[ \ln \left| \frac{(h')^2}{a (h')^2 + bh' + c}\right| + \frac{2 b}{\sqrt{b^2-4ac}} \text {atanh}^{\scriptscriptstyle {-1}}\left( \frac{2a h'+b}{\sqrt{b^2-4ac}}\right) \right] _{1+(M-1)h^{*}}^{1+(M-1)h_{\scriptscriptstyle {\text {S}}}} \nonumber \\&\quad = \text {RHS}(t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}, t) \nonumber \\&\quad \equiv (M-1) \int _{t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}}^{t} \frac{\text {d} t'}{2M\left( (M-1)Q_{\text {inj}} \tau - ((M-1)Q+MK)(t'-\tau ) \right) } \nonumber \\&\quad = \left[ -\frac{ (M-1) \ln (2M |(M-1) Q_{\text {inj}} \tau - ((M-1)Q+MK)(t'-\tau ) )| }{2M((M-1)Q+MK)} \right] _{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}^{t}, \end{aligned}$$
(14)

for \(t\in (t_{\scriptscriptstyle {\text {LL} \rightarrow \text {S}}}, t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}} )\) where \(t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}}\) will be defined below and \(h_{\scriptscriptstyle {\text {S}}} \in [h^{*}, 1]\). As time evolves, \(h_{\scriptscriptstyle {\text {S}}}\) increases and the shock speed decreases continuously. This is depicted in Fig. 2c where the shock height increases from \(h^{*}\) to 1 over time. The solution during the time interval \((t_{\scriptscriptstyle {\text {LL} \rightarrow \text {S}}}, t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}} )\) can be written

$$\begin{aligned} h = \left\{ \begin{array}{ll} 0 &{}\quad x < x_{\scriptscriptstyle {\text {S}}} \\ \frac{1}{1-M}+\sqrt{ \frac{ (M(M-1)Q+M^2K)(t-\tau ) - \frac{ Q_{\text {inj}} M(M-1) \tau \mathcal {R}_{L}}{1-S_{\text {br}}}}{(M-1)^2[(M-1)(x-x_0)\phi (1-S_{\text {br}}) +K M (t-\tau )]}} &{}\quad x_{\scriptscriptstyle {\text {S}}} \le x < x_{\scriptscriptstyle {\text {LR}}} \\ 1 &{}\quad x_{\scriptscriptstyle {\text {LR}}} \le x < x_{\scriptscriptstyle {\text {RL}}} \\ \frac{1}{1-M}+\sqrt{ \frac{ (M(M-1)Q+M^2K)(t-\tau ) + \frac{ Q_{\text {inj}} M(M-1) \tau \mathcal {R}_{R}}{1-S_{\text {br}}}}{(M-1)^2[(M-1)(x-x_0)\phi \mathcal {R}_{R} +K M (t-\tau )]}} &{}\quad x_{\scriptscriptstyle {\text {RL}}} \le x < x_{\scriptscriptstyle {\text {RR}}} \\ 0 &{}\quad x \ge x_{\scriptscriptstyle {\text {RR}}} \end{array} \right. . \end{aligned}$$
Fig. 2
figure 2

Temporal development of the deterministic (exact) solution. Arrows indicate progression in time. a Initial plume height (red) and plume height after \(T=3\) (black). b Formation of shock of height \(h^{*}\) (red) and, subsequently, shock of height 1 (black). c Close view of the strengthening of the shock, from height \(h^{*}\) to 1. d Plume after \(T=5\) (red) and \(T=10\) (black)

The remaining smooth part of the left interface between \(x_{\scriptscriptstyle {\text {S}}}\) and \(x_{\scriptscriptstyle {\text {LR}}}\) (as long as \(h_{\scriptscriptstyle {\text {S}}} < 1\)) will continue to get steeper and propagate to the left, until \(x_{\scriptscriptstyle {\text {S}}}\) and \(x_{\scriptscriptstyle {\text {LR}}}\) coincide at time \(t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}}\), a time which can be found analogously to \(h_{\scriptscriptstyle {\text {S}}}\) above, by solving

$$\begin{aligned}&\int _{t_{\scriptscriptstyle {\text {LL} \rightarrow \text {S}}}}^{t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}}} \frac{\text {d} t'}{2M\left( (M-1)Q_{\text {inj}}\tau - ((M-1)Q+MK)(t'-\tau ) \right) } \nonumber \\&\quad = \frac{1}{2c} \left[ \ln \left| \frac{(h')^2}{a (h')^2 + bh' + c}\right| + \frac{2 b}{\sqrt{b^2-4ac}} \text {atanh}^{\scriptscriptstyle {-1}}\left( \frac{2a h'+b}{\sqrt{b^2-4ac}}\right) \right] _{1+(M-1)h^{*}}^{M},\qquad \quad \end{aligned}$$
(15)

for \(t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}}\). The spatial location where the shock reaches \(x_{\scriptscriptstyle {\text {LR}}}\) can be written

$$\begin{aligned} x_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}} = x_{0}+\frac{(Q-MK)(t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}}-\tau )-Q_{\text {inj}}\tau }{M \phi (1-S_{\text {br}})}. \end{aligned}$$

After that, the shock propagates to the right with constant strength \(h_{\scriptscriptstyle {\text {S}}}=1\) and speed given by (11) until it meets the left end point of the right interface, i.e., \(x_{\scriptscriptstyle {\text {RL}}}\). The solution between time \(t_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}}\) and \(t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}\) is given by

$$\begin{aligned} h = \left\{ \begin{array}{ll} 0 &{}\quad x < x_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}} \\ 1 &{}\quad x_{\scriptscriptstyle {\text {S} \rightarrow \text {LR}}} \le x < x_{\scriptscriptstyle {\text {RL}}} \\ \frac{1}{1-M}+\sqrt{ \frac{ (M(M-1)Q+M^2K)(t-\tau ) + \frac{ Q_{\text {inj}} M(M-1) \tau \mathcal {R}_{R}}{1-S_{\text {br}}}}{(M-1)^2[(M-1)(x-x_0)\phi \mathcal {R}_{R} +{ KM} (t-\tau )]}} &{}\quad x_{\scriptscriptstyle {\text {RL}}} \le x < x_{\scriptscriptstyle {\text {RR}}} \\ 0 &{}\quad x \ge x_{\scriptscriptstyle {\text {RR}}} \end{array} \right. . \end{aligned}$$

The shock then decreases in height as it continuously collides with the right interface of the plume. At time t, the normalized plume height is implicitly defined by the equality between the spatial location of the shock determined by the Rankine–Hugoniot condition and the spatial location at the left interface where \(h=h_{\scriptscriptstyle {\text {S}}}\), i.e.,

$$\begin{aligned} x_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}} + \int _{t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}}^{t}\sigma _{\scriptscriptstyle {\text {S}}} (h_{\scriptscriptstyle {\text {S}}}(t')) \text {d} t' = x(h_{\scriptscriptstyle {\text {S}}}, \tau )+\frac{F'(h_{\scriptscriptstyle {\text {S}}})(t-\tau )}{\phi \mathcal {R}_{\scriptscriptstyle {R}}}, \end{aligned}$$
(16)

where the shock speed is again time dependent and given by (11). The expression in (16) is discontinuous at time \(t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}\) where \(h_{\scriptscriptstyle {\text {S}}} = h^{*}\) (where \(\mathcal {R}_{\scriptscriptstyle {R}}\) changes value) but continuous for \(t\in (t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}, t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}})\). Differentiating (16) with respect to t (\(t\ne t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}\)), we obtain the ODE

$$\begin{aligned} \frac{d h }{d t}=\frac{\sigma _{\scriptscriptstyle {\text {S}}} - \frac{F'(h)}{\phi \mathcal {R}_{R}(h)} }{ \frac{F_{\text {inj}}''(h) \tau }{\phi (1-S_{\text {br}})} +\frac{F''(h)(t-\tau )}{ \phi \mathcal {R}_{R}(h) } }, \end{aligned}$$
(17)

for \(t\in (t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}, t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}})\) and \(t\in (t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}, \infty )\). With \(G=1\) and \(a,\, b,\, c\) defined in (13) (note that \(a=0\)) and the above variable substitution \(h'=1+(M-1)h_{\scriptscriptstyle {\text {S}}}\), we integrate the above expression, for \(t\in (t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}, t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}})\) and \(h_{\scriptscriptstyle {\text {S}}} \in [h^{*}, 1]\),

$$\begin{aligned}&\int _{M}^{1+(M-1)h_{\scriptscriptstyle {\text {S}}} } \frac{ \text {d} h'}{h'(bh'+c)} = \left[ \frac{\ln |c x|}{c} - \frac{ \ln |c (b x+c )|}{c} \right] _{M}^{1+(M-1)h_{\scriptscriptstyle {\text {S}}}} = \text {RHS}(t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}, t) \nonumber \\&\quad \equiv (M-1) \int _{t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}}^{t} \frac{ \text {d} t}{-2M\left( \frac{\mathcal {R}_{R}}{1-S_{\text {br}}}(M-1)Q_{\text {inj}}\tau + ((M-1)Q+MK)(t-\tau ) \right) },\qquad \quad \end{aligned}$$
(18)

from which we can solve for \(h_{\scriptscriptstyle {\text {S}}}\). For \(t\in (t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}, \infty )\) and \(h_{\scriptscriptstyle {\text {S}}} \in [0, h^{*}]\), we obtain an expression analogous to (14) but with a different right-hand side,

$$\begin{aligned}&\int _{1+(M-1)h^{*}}^{1+(M-1)h_{\scriptscriptstyle {\text {S}}}} \frac{ \text {d}h'}{h'(a(h')^{2} + bh' + c)} = \text {RHS}(t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}, t) \nonumber \\&\quad \equiv (M-1) \int _{t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}}^{t} \frac{ \text {d} t'}{2M\left( (M-1)Q_{\text {inj}}\tau + ((M-1)Q+MK)(t'-\tau ) \right) } \nonumber \\&\quad = \left[ -\frac{ (M-1) \ln (2M |(M-1) Q_{\text {inj}}\tau + ((M-1)Q+MK)(t'-\tau ) )| }{2M((M-1)Q+MK)} \right] _{t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}}^{t}.\qquad \quad \end{aligned}$$
(19)

The spatial shock location \(x_{\scriptscriptstyle {\text {S}}}\) is identical to the spatial point on the continuous right interface where \(h=h_{\scriptscriptstyle {\text {S}}}\). The solution after \(t_{\scriptscriptstyle {\text {S} \rightarrow \text {RL}}}\) can be written

$$\begin{aligned} h = \left\{ \begin{array}{ll} 0 &{} x < x_{\scriptscriptstyle {\text {S}}} \\ \frac{1}{1-M}+\sqrt{ \frac{ (M(M-1)Q+M^2K)(t-\tau ) + \frac{ Q_{\text {inj}} M(M-1) \tau \mathcal {R}_{\scriptscriptstyle {R}}}{1-S_{\text {br}}}}{(M-1)^2[(M-1)(x-x_0)\phi \mathcal {R}_{\scriptscriptstyle {R}} +K M (t-\tau )]}} &{} x_{\scriptscriptstyle {\text {S}}} \le x < x_{\scriptscriptstyle {\text {RR}}}\\ 0 &{} x \ge x_{\scriptscriptstyle {\text {RR}}} \end{array} \right. , \end{aligned}$$

where \(\mathcal {R}_{\scriptscriptstyle {R}}=1-S_{\text {br}}-S_{\text {cr}}\) if \(t < t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}\) and \(\mathcal {R}_{\scriptscriptstyle {R}}=1-S_{\text {br}}\) if \(t > t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}\). Figure 2d shows the shock before (red) and after (black) \(t_{\scriptscriptstyle {\text {I} \rightarrow \text {D}}}\). Qualitatively, this is the last stage of the development of the plume profile. The shock continues to the right, either until the shock height shrinks to zero or until the plume reaches the sealing caprock.

4 Representation of Uncertainty

Stochastic functions can be represented using the generalized polynomial chaos (gPC) framework, developed in Ghanem and Spanos (1991) and Xiu and Karniadakis (2002). To achieve this, we introduce a probability space \(({\varOmega },\mathcal {F},\mathcal {P})\) with the set of elementary events \({\varOmega }\) and probability measure \(\mathcal {P}\) defined on the \(\sigma \)-algebra \(\mathcal {F}\). Let \(\varvec{\xi } = (\xi _1,\ldots , \xi _{d})^\mathrm{T}\) be a d-dimensional independent random vector defined on this space. Each vector component will typically represent a source of uncertainty in the \(\hbox {CO}_2\) migration problem. The inner product between two stochastic functions \(f(\varvec{\xi })\) and \(g(\varvec{\xi })\) is defined by

$$\begin{aligned} \langle f, g\rangle = \int _{{\varOmega }} f(\varvec{\xi }) g(\varvec{\xi }) \text {d} \mathcal {P}(\varvec{\xi }) = \langle f g\rangle , \end{aligned}$$

where \(\langle \cdot \rangle \) denotes the expected value operator. Consider a complete basis \(\{\psi _i (\varvec{\xi }) \}_{i=1}^{\infty }\) for the space of second-order (i.e., finite variance) random processes on this probability space. Typically, the basis functions are orthogonal polynomials from the Askey scheme (Askey and Wilson 1985) or, for functions with non-smooth behavior, stochastic multiwavelets (Alpert 1993). The basis functions are assumed to be orthonormal with respect to the inner product with the measure \(\mathcal {P}\), i.e., they satisfy

$$\begin{aligned} \langle \psi _i \psi _j \rangle = \delta _{ij}, \quad i,j \in \mathbb {N}, \end{aligned}$$

where \(\delta _{ij}\) is the Kronecker delta. Multidimensional basis functions are generated by tensor products of one-dimensional basis functions and retain orthogonality since the random vector components \(\xi _1,\ldots , \xi _d\) are statistically independent by assumption. To handle discontinuities that are expected to develop in the solution of a nonlinear hyperbolic system, we will use multiwavelets (Alpert 1993) that are localized in stochastic space and were introduced for non-smooth problems in uncertainty quantification in Le Maître et al. (2004).

Any second-order random field \(u(x,t,\varvec{\xi })\) (e.g., material parameter or the solution of a PDE) can be expressed as a gPC expansion of the form

$$\begin{aligned} u(x,t,\varvec{\xi })=\sum _{i=1}^{\infty }u_{i}(x,t)\psi _{i}(\varvec{\xi }), \end{aligned}$$
(20)

where the coefficients \(u_{i}(x,t)\) can be obtained from the projections

$$\begin{aligned} u_{i}(x,t)=\langle u(x,t,\varvec{\xi }) \psi _i(\varvec{\xi }) \rangle , \quad i=1, 2, \ldots \end{aligned}$$
(21)

The solution statistics are functions of the gPC coefficients and can easily be obtained by post-processing of the solution. For instance, the expected value and variance are given by, respectively,

$$\begin{aligned} \mathbb {E}(u) \equiv \langle u \rangle = u_1, \quad Var(u) = \sum _{i=2}^{\infty } u_i^2, \end{aligned}$$
(22)

where the first relation relies on the identity \(\psi _1 = 1\). In practice, the expansion in (20) is truncated to a finite number of terms P such that, for instance, the total polynomial order of each \(\psi _i(\varvec{\xi })\) is at most p. The total number of gPC terms is then prescribed apriori, unless an adaptive method is used where the basis functions are allowed to change over time (Wan and Karniadakis 2005). For long-term integration, this is a viable option to remedy the linear error growth in time of truncated gPC (Gottlieb and Xiu 2008).

4.1 Stochastic Models for Uncertain Parameters

Finding optimal stochastic models for uncertain parameter values is a non-trivial task. Clearly, a more generic model requires wider parameter ranges than does a model tailored to a specific geological formation. To give a feeling for the possible ranges, we will provide a brief review of parameter values reported in previous studies. Bachu and Bennion report ranges in the residual brine saturation \(S_{\text {br}}\) from 0.2 to 0.68, and relative permeabilities for \(\hbox {CO}_2\) in the range from 0.015 to 0.54 in saline aquifers (Bachu and Bennion 2008). Vilarrasa et al. (Vilarrasa et al. 2010) investigated the impact of \(\hbox {CO}_2\) compressibility and reported \(\hbox {CO}_2\) densities between 450 and 800 kg/m\(^3\) during the injection phase. In the numerical experiments, we will use the representative values \(S_{\text {br}}=S_{\text {cr}}=0.3\) and \({\Delta } \rho = 300\) kg/m\(^3\), but a future study could include stochastic models for these parameters to reflect the variability reported in the literature.

Several parameters may have a deep impact on the spreading of the \(\hbox {CO}_2\) plume. The mobility ratio and the aquifer tilt angle relative to the background flow have been reported crucial for the migration pattern (MacMinn et al. 2010). In this paper, we will assume a uniform probability distribution (for lack of data indicating another distribution) for the mobility ratio M, which is the maximum entropy probability distribution when upper and lower bounds for the random variable are known. We assume a lognormal model for the permeability. In addition to the permeability, the parameter K encompasses the tilt angle and the density difference between the phases, both of which are also uncertain. From a mathematical point of view, all of these sources of uncertainty will be included in the single random field K. Sobol sensitivity indices obtained by simple post-processing of the gPC coefficients of the normalized plume height indicate that the uncertain permeability and the uncertain mobility ratio contribute relatively equally to the total solution variance.

In general, a strategy for identification of the most important sources of uncertainty could be to run a coarse-scale or other surrogate model including several candidate sources of uncertainty. Sensitivity analysis based on Sobol indices can be used to find the random variables that contribute significantly to the total variance of the surrogate model. These random variables can then be included in the refined model (Formaggia et al. 2013).

5 Stochastic Galerkin Formulation of the Transport Problem

To obtain statistics of interest for the transport problem, one may efficiently sample the exact solutions presented in Sect. 3, but for more complex problems one must rely on numerical solution of the governing PDEs for uncertainty quantification. To anticipate the solution of more complex problems with unknown exact solutions, we will apply the stochastic Galerkin method to (4). The analysis and design of a numerical method for this problem is non-trivial due to the nonlinear accumulation coefficient and the nonlinear fractional flux function. Validation against a known solution is therefore essential before the numerical method is extended to more complex problems.

To appreciate the difference in the problem formulation depending on what sources of uncertainty are included in the model, in the analysis in this section we will consider both the case of uncertainty in the permeability only, and the case of uncertain permeability and mobility ratio. First assume that the mobility ratio M is a deterministic quantity. Insert the truncated gPC expansion (20) for \(h,\, \mathcal {R}\), and F into (4), multiply with \(\psi _{m}\) for \(m=1,\ldots , P\), and integrate w.r.t. the probability density of \(\varvec{\xi }\),

$$\begin{aligned} \phi \sum _{i=1}^{P} \sum _{j=1}^{P} \mathcal {R}_{i} \frac{\partial h_j}{\partial t} \left\langle \psi _i \psi _j \psi _m \right\rangle + \sum _{i=1}^{P} \frac{\partial F_i}{\partial x} \left\langle \psi _i \psi _m \right\rangle =0, \quad m=1,\ldots , P. \end{aligned}$$
(23)

The gPC coefficients of the flux, in vector notation \(\varvec{F}=(F_1,\ldots , F_{P})^\mathrm{T}\), are evaluated as functions of the gPC expansions of \(h,\, Q\), and K and can be approximated in different ways. Here, we aim at precomputing all integrals in the stochastic space to avoid expensive numerical quadrature evaluation of the flux function during simulation. Direct projection of the fractional flux (5) would require approximation of stochastic integrals at every point in space and time. This is avoided by multiplying (5) by the denominator of F (i.e., the gPC expansion of \(1+(M-1)h\)) and then performing stochastic Galerkin projection on the resulting expression, i.e.,

$$\begin{aligned}&\left\langle \left( (M-1)\sum _{i=1}^{P}h_i \psi _i + 1 \right) \left( \sum _{j=1}^{P} F_j \psi _j \right) \psi _m \right\rangle \nonumber \\&\quad = \left\langle M \left( \sum _{i=1}^{P}Q_i \psi _i + \left( \sum _{i=1}^{P} K_i \psi _i \right) \left( 1-\sum _{j=1}^{P} h_j \psi _j \right) \right) \left( \sum _{k=1}^{P} h_k \psi _k \right) \psi _m \right\rangle . \end{aligned}$$
(24)

We have assumed gPC representations for the parameters \(Q,\, K\), and quantities dependent on them, i.e., \(h,\, F\), and \(\mathcal {R}\). The background flow Q is in general determined by an uncertain pressure field and modeled as a stochastic field in the analysis. However, in the numerical results section, Q will be treated as a deterministic constant.

To facilitate the notation, for any \(\varvec{u},\varvec{v},\varvec{w} \in {\mathbbm {R}}^{P}\), let the matrices \(\varvec{A},\, \varvec{B}\), and \(\varvec{C}\) be defined by

$$\begin{aligned}&[\varvec{A}(\varvec{u})]_{ij}=\sum _{k=1}^{P} u_{k} \left\langle \psi _{i} \psi _{j} \psi _{k} \right\rangle , \quad i,j=1,\ldots , P, \nonumber \\&[\varvec{B}(\varvec{u}, \varvec{v})]_{ij}=\sum _{k=1}^{P} \sum _{l=1}^{P} u_{k} v_{l} \left\langle \psi _{i} \psi _{j} \psi _{k} \psi _{l} \right\rangle , \quad i,j=1,\ldots , P, \nonumber \\&[\varvec{C}(\varvec{u}, \varvec{v}, \varvec{w})]_{ij}=\sum _{k=1}^{P} \sum _{l=1}^{P} \sum _{m=1}^{P} u_{k} v_{l} w_{m} \left\langle \psi _{i} \psi _{j} \psi _{k} \psi _{l} \psi _{m} \right\rangle , \quad i,j=1,\ldots , P. \end{aligned}$$
(25)

The stochastic integrals above can be precomputed and stored, but the cost of evaluating the matrices for given vector arguments increases with the number of basis functions. Therefore, we aim for PDE representations where no higher-order tensors are needed.

Let \(\varvec{I}\) denote the identity matrix and \(\varvec{e}_1 = (1,0\ldots , 0)^\mathrm{T}\). Then, (24) can be written in matrix-vector form, and the stochastic Galerkin flux \(\varvec{F}\) is obtained by the solution of the linear system

$$\begin{aligned} \left( \varvec{I} + (M-1) \varvec{A}( \varvec{h}) \right) \varvec{F} = M \left[ \varvec{A}(\varvec{Q}) + \varvec{B}(\varvec{K}, \varvec{e}_{1}-\varvec{h}) \right] \varvec{h}, \end{aligned}$$
(26)

assuming that \(\varvec{I} + (M-1) \varvec{A}( \varvec{h})\) is positive definite (invertible is sufficient).

Remark 1

The requirement that \(\varvec{I} + (M-1) \varvec{A}( \varvec{h})\) is positive definite is not particularly restrictive. We expect the minimum eigenvalue of \(\varvec{A}(\varvec{h})\) to be nonnegative and \(M>1\) due to the higher mobility of \(\hbox {CO}_2\) compared to brine.

With the vector and matrix notation introduced above, the stochastic Galerkin system (23) for the evolution of the normalized plume height can be expressed

$$\begin{aligned} \varvec{\phi } \varvec{A}( \mathcal {\varvec{R}}) \frac{\partial \varvec{h}}{\partial t} + \frac{\partial \varvec{F}}{\partial x} = \varvec{0}, \end{aligned}$$
(27)

where \(\varvec{R}= (\mathcal {R}_ {1},\dots , \mathcal {R}_{P})^{T}\).

Proposition 1

Let \(\varvec{I} + (M-1) \varvec{A}( \varvec{h})\) be positive definite and let P be any order of gPC approximation. Then, the stochastic Galerkin formulation (27) is hyperbolic, i.e., the Jacobian of the flux (26) is diagonalizable with real eigenvalues.

Proof

The Jacobian is defined through its \(k\mathrm{th}\) column vector,

$$\begin{aligned} \frac{\partial \varvec{F}}{\partial \varvec{h}_{k}}= & {} - M [\varvec{I} + (M-1) \varvec{A}( \varvec{h}) ]^{-1} \varvec{A}( (M-1)\varvec{e}_{k}) \nonumber \\&\quad \times \underbrace{ \left[ [ \varvec{I} + (M-1) \varvec{A}( \varvec{h}) ]^{-1} (\varvec{A}(\varvec{Q})+\varvec{B}(\varvec{K},\varvec{e}_1-\varvec{h} ) \right] \varvec{h} }_{\varvec{v}} \nonumber \\&\quad +\,M [ \varvec{I} + (M-1) \varvec{A}( \varvec{h}) ]^{-1} \left[ \varvec{A}(\varvec{Q}) + \varvec{B}(\varvec{K},\varvec{e}_1-\varvec{h}) - \varvec{B}(\varvec{K}, \varvec{h}) \right] \varvec{e}_{k}. \end{aligned}$$
(28)

Using the identity \(\varvec{A}(\varvec{u})\varvec{w}=\varvec{A}(\varvec{w})\varvec{u}\), that holds for all \(\varvec{u}, \varvec{w}\) by the definition (25), we have

$$\begin{aligned} \frac{\partial \varvec{F}}{\partial \varvec{h}} = M [\varvec{I} + (M-1) \varvec{A}( \varvec{h}) ]^{-1} \left[ (1-M)\varvec{A}(\varvec{v})+\varvec{A}(\varvec{Q}) + \varvec{B}(\varvec{K},\varvec{e}_1-2\varvec{h}) \right] . \end{aligned}$$
(29)

The flux Jacobian in (29), \(\partial \varvec{F}/\partial \varvec{h}\), is a product of two symmetric matrices. By assumption, \([\varvec{I} + (M-1) \varvec{A}( \varvec{h})]^{-1}\) is positive definite (since its inverse is positive definite), and there exists an invertible and symmetric square root matrix, denoted \(\varvec{R}_{\varvec{g}}^{1/2}\), that satisfies \(\varvec{R}_{\varvec{g}}^{1/2} \varvec{R}_{\varvec{g}}^{1/2} = M[\varvec{I} + (M-1) \varvec{A}( \varvec{h})]^{-1}\). With \(\tilde{\varvec{M}}= \left[ (1-M)\varvec{A}(\varvec{v})+\varvec{A}(\varvec{Q}) + \varvec{B}(\varvec{K},\varvec{e}_1-2\varvec{h}) \right] \), \(\partial \varvec{F}/\partial \varvec{h} = \varvec{R}_{\varvec{g}}^{1/2} \varvec{R}_{\varvec{g}}^{1/2} \tilde{\varvec{M}}\) is similar to the symmetric matrix

$$\begin{aligned} \varvec{R}_{\varvec{g}}^{-1/2} \varvec{R}_{\varvec{g}}^{1/2} \varvec{R}_{\varvec{g}}^{1/2} \tilde{\varvec{M}} \varvec{R}_{\varvec{g}}^{1/2}= \varvec{R}_{\varvec{g}}^{1/2} \tilde{\varvec{M}} \varvec{R}_{g}^{1/2}. \end{aligned}$$

Since \(\partial \varvec{F}/\partial \varvec{h}\) is similar to a diagonalizable matrix with real eigenvalues, \(\partial \varvec{F} / \partial \varvec{h}\) is also diagonalizable with real eigenvalues; hence, the stochastic Galerkin formulation (27) is hyperbolic. \(\square \)

5.1 Stochastic Mobility Ratio M

Next, let M be stochastic, for example as a result of uncertain end point relative permeabilities, resulting in uncertain phase mobilities. Performing stochastic Galerkin projection of (3) with stochastic \(M(\varvec{\xi })\), the flux is given by

$$\begin{aligned} \left( \varvec{I} + \varvec{B}( \varvec{M}-\varvec{e}_{1}, \varvec{h}) \right) \varvec{F} = \left[ \varvec{B}(\varvec{Q},\varvec{M}) + \varvec{C}(\varvec{K}, \varvec{M},\varvec{e}_{1}-\varvec{h}) \right] \varvec{h}. \end{aligned}$$
(30)

Proposition 2

Let \(\varvec{I} + \varvec{B}( \varvec{M}-\varvec{e}_{1}, \varvec{h})\) be positive definite and let P be any order of gPC approximation. Then, the stochastic Galerkin formulation (27) with the flux (30) is hyperbolic.

We follow the proof of Proposition 1 to prove Proposition 2.

Proof

Set

$$\begin{aligned} \varvec{v} = [ \varvec{I} + \varvec{B}(\varvec{M}-\varvec{e}_{1}, \varvec{h}) ]^{-1} \left[ (\varvec{B}(\varvec{Q},\varvec{M})+\varvec{C}(\varvec{K},\varvec{M},\varvec{e}_1-\varvec{h} ) \right] \varvec{h}. \end{aligned}$$

Then, differentiating (30), we obtain the Jacobian

$$\begin{aligned} \frac{\partial \varvec{F}}{\partial \varvec{h}} = [ \varvec{I} + \varvec{B}(\varvec{M}-\varvec{e}_{1}, \varvec{h}) ]^{-1} \left[ \varvec{B}(\varvec{Q},\varvec{M})+\varvec{C}(\varvec{K},\varvec{M}, \varvec{e}_{1}-2\varvec{h}) + \varvec{B}(\varvec{M}-\varvec{e}_1,\varvec{v}) \right] , \end{aligned}$$

which is again a product of two symmetric matrices, one of which is positive definite. The rest of the proof is identical to that of Proposition 1. \(\square \)

Remark 2

The proof of Proposition 2 relies on the formulation with the fifth-order tensor expressed as the matrix \(\varvec{C}\). Pseudo-spectral formulations that replace \(\varvec{B}\) and \(\varvec{C}\) by repeated application of \(\varvec{A}\) lead to significantly reduced computational cost and may lead to breakdown of hyperbolicity, see Pettersson and Tchelepi (2014).

Remark 3

Proposition 1 is a special case of Proposition 2, obtained by setting \(\varvec{M}=M\varvec{e}_{1}\) and using the definitions of the stochastic tensors \(\varvec{B}\) and \(\varvec{C}\) to reduce the complexity of the system. It illustrates the difference in complexity as a function of the number of stochastic dimensions. The orders of the precomputed stochastic tensors increase with the stochastic dimensionality.

6 Numerical Method

We have shown in Sect. 5 that the stochastic Galerkin formulation of the tilted aquifer model is a nonlinear hyperbolic system; hence, we expect the solution to develop discontinuities. The system will therefore be discretized using a robust numerical method that can handle discontinuities.

6.1 Spatial Discretization of the Flux

Consider a non-uniform spatial discretization of cells \(x_{j},\, j=1,\ldots , m\). The grid is generated by a smooth transformation of a uniform grid through the \(\sinh \) function centered around the injection point \(x_0\). The grid is finer close to the injection well, where the solution changes the most after the first years after the end of injection. Each spatial cell j is separated by the edges \(x_{j-\frac{1}{2}}\) and \(x_{j+\frac{1}{2}}\). Let \(\varvec{H}_{j}=(h_{1}(x_{j}), \ldots , h_{P}(x_{j}))^\mathrm{T}\) be the discretized vector of gPC coefficients of h and let \(\varvec{G}_{j+\frac{1}{2}}\) be the numerical flux function at edge \(j+\frac{1}{2}\). The problem (27) is semi-discretized,

$$\begin{aligned} \phi \varvec{A}(\varvec{R}) \frac{d \varvec{H}_{j} }{d t} = - \frac{\varvec{G}_{j+\frac{1}{2}} - \varvec{G}_{j-\frac{1}{2}}}{{\Delta } x_{j}}. \end{aligned}$$

The numerical flux function \(\varvec{G}_{j+\frac{1}{2}}\) is taken to be the Godunov-type central-upwind flux defined in Kurganov et al. (2001),

$$\begin{aligned} \varvec{G}_{j+\frac{1}{2}}= \frac{\sigma _R \varvec{F} \left( \varvec{H}^L_{j+\frac{1}{2}} \right) -\sigma _L \varvec{F} \left( \varvec{H}^R_{j+\frac{1}{2}} \right) +\sigma _L \sigma _R \left( \varvec{H}^R_{j+\frac{1}{2}}-\varvec{H}^L_{j+\frac{1}{2}}\right) }{\sigma _R-\sigma _L}, \end{aligned}$$

where \(\varvec{F}\) is given by (26) or (30) depending on the sources of uncertainty and \(\varvec{H}^L_{j+\frac{1}{2}}\) and \(\varvec{H}^R_{j+\frac{1}{2}}\) denote flux-limited left and right states, respectively. The scalars \(\sigma _{L}\) and \(\sigma _{R}\) are estimates of the smallest and largest Jacobian eigenvalues. For the moderate system sizes considered here, we calculate the eigenvalues using MATLAB’s eig() function. For large P, the eigenvalue estimator for stochastic Galerkin Jacobian matrices via polynomial approximation presented in Tryoen et al. (2010) might be a more efficient option. We use the second-order minmod limiter to limit the spatial derivative and capture discontinuities (Roe 1986).

6.2 Updating the Plume Height and the Discontinuous Accumulation Coefficient

Explicit Euler is used for the time integration with a time step small enough to yield a negligible error contribution compared to the other sources of numerical error. (A fourth-order Runge–Kutta method was also tested, but did not significantly affect the results.) For every time increment, the normalized plume height needs to be updated for every spatial grid point based on whether the process is imbibition or drainage, determined by the local sign of the time derivative of the plume height. The discontinuous accumulation coefficient \(\mathcal {R}\) is uncertain as a result of the uncertainty in the temporal derivative of the plume height and may be expressed as a sum of two indicator random variables,

$$\begin{aligned} \mathcal {R} = (1-S_{\text {br}}-S_{\text {cr}}) \mathbbm {1}_{\left\{ \frac{\partial h}{\partial t} < 0 \right\} } + (1-S_{\text {br}}) \mathbbm {1}_{\left\{ \frac{\partial h}{\partial t} > 0 \right\} }, \end{aligned}$$

where the indicator random variable is defined by

$$\begin{aligned} \mathbbm {1}_{\left\{ \frac{\partial h}{\partial t} < 0 \right\} } = \left\{ \begin{array}{ll} 1 &{} \text{ if } \frac{\partial h}{\partial t} < 0\\ 0 &{} \text{ if } \frac{\partial h}{\partial t} \ge 0 \end{array} \right. . \end{aligned}$$

At a solution discontinuity, where \(\partial h/ \partial t\) does not exist, \(\mathcal {R}\) is determined by the sign of the shock speed. In order to compute the gPC coefficients of \(\mathcal {R}\), we perform numerical quadrature in stochastic space over a discontinuous integrand involving \(\mathcal {R}\). Standard Gauss quadrature is not suitable here due to the discontinuity in \(\varvec{\xi }\)-space. Instead, we use an adaptive tree-based numerical integration method for level set functions (Müller et al. 2012). The location of the interface separating the two continuous regions evolves over time and is known implicitly through the zero isocontour of a level set function based on the gPC expansion of \(\partial h/ \partial t\). The stochastic domain is a polytope in d dimensions, initially partitioned into a relatively small number of subpolytopes. Here, \(d=2\) and the polytopes are squares.

If a subpolytope is cut by the discontinuity, it is further partitioned into subpolytopes and the process continues until the finest level of partition is reached. Subpolytopes that are not cut by the interface constitute regions of smooth integrands and can be integrated by standard quadrature rules without further partition.

Fig. 3
figure 3

Adaptive partition of the stochastic domain at two spatial locations near the stationary height location on the left and right interface at time \(T=2\). The red curve is the expected discontinuity in \(\mathcal {R}\). Each blue square is approximated by a local quadrature rule during integration. a Partition of \(\varvec{\xi }\) at \(x=E(x_{\scriptscriptstyle {\text {L}}}^{*})\). b Partition of \(\varvec{\xi }\) at \(x=E(x_{\scriptscriptstyle {\text {R}}}^{*})\)

The location of the discontinuity is not known explicitly but is implicitly defined by \(\mathbbm {1}_{\left\{ \frac{\partial h}{\partial t} < 0 \right\} }\) as a function of \(\varvec{\xi }\). In order to decide whether a given (sub)polytope is cut by the discontinuity (and needs further refinement), we evaluate the quadrature nodes defined by the coordinates of the polytope corners. If \(\mathbbm {1}_{\left\{ \frac{\partial h}{\partial t} < 0 \right\} }\) attains different values at the corners, the subpolytope is necessarily cut by the discontinuity. If \(\mathbbm {1}_{\left\{ \frac{\partial h}{\partial t} < 0 \right\} }\) takes the same value at all corners, the polytope may still be cut by the discontinuity along its edges. Although there are remedies for this issue by means of estimating the curvature of the discontinuity, we will assume that a polytope with the same value of \(\mathbbm {1}_{\left\{ \frac{\partial h}{\partial t} < 0 \right\} }\) at all corners is not cut by the discontinuity. As a motivation for this decision, note that we expect non-smooth solutions for the normalized plume height and will therefore typically use localized basis functions of low polynomial order. These basis functions will result in relatively low curvature locally, and hence, a polytope where the corner nodes take the same value should be well approximated by a polytope where all nodes within the polytope attain the same value. This is illustrated in Fig. 3 where the domain \(\varvec{\xi }\) is adaptively partitioned to approximate \(\mathcal {R}\) at the two spatial locations where the expected plume height is equal to the expected stationary plume height. These locations are chosen since this is where \(\mathcal {R}\) is expected to depend most strongly on \(\varvec{\xi }\). For each of the blue squares, we apply a local quadrature rule to compute the gPC coefficients of \(\mathcal {R}\) by projection (integration) onto the basis functions. Since the integrand is smooth on each square (unless it is cut by the discontinuity), a standard local quadrature rule is employed. In the numerical calculations, we use Simpson’s rule locally, but other methods, e.g., Gauss quadrature, are also possible to use for the smooth subpolytope integrands.

7 Numerical Results

For the numerical simulations, we set \(Q = 1 \cdot 10^{-8} \hbox { m}^2/\hbox {s }, \theta = 0.03,\, \phi = 0.16,\, S_{\text {br}} =S_{\text {cr}} = 0.3,\, Q_{\text {inj}}\tau =10 \hbox { m}^2\) and \({\Delta } \rho = 300 \hbox { kg}/\hbox {m}^3\). The permeability k is lognormal with mean 200 mD and standard deviation 20 mD. With \(\mu _{ \text {b}} /\mu _{ \text {c}}=8,\, k_{ \text {r,b}}=1,\, k_{ \text {r,c}} \sim U(0.4, 0.8)\), we have \(M\sim U(2.3, 6.5)\).

An approximation of the normalized plume height h is obtained from the numerical solution of (27) for the vector of gPC coefficients \(\varvec{h}\). This serves as a stochastic surrogate model from which we can sample efficiently to obtain statistics for scenarios of interest. The accuracy of these surrogate models depends on how well the numerical method approximates the true gPC coefficients and how many gPC coefficients are included. To refine the multiwavelet representation, one may increase the piecewise polynomial order, increase the number of resolution levels (localization of the basis functions), or both. High polynomial order leads to increased oscillations over the discontinuities in stochastic space and does not lead to convergence of the problems investigated. If increased resolution is required, the gPC basis should instead be enriched by increasing the number of wavelet levels. For the numerical experiments, two one-dimensional cases where we use two or three resolution levels and piecewise linear or quadratic polynomials will be investigated (resulting in 6 and 8 basis functions, respectively). A two-dimensional case will also be studied with piecewise linear basis on two levels and a total order basis, resulting in a total of 12 basis functions.

To investigate the accuracy, we compare the computed expected value and standard deviation with the exact expected value and standard deviation obtained by sampling the analytical solution. The reference solution statistics have been obtained from 20,000 Monte Carlo samples of the exact solution. It was found that further increasing the sample size had an insignificant effect on the error in comparison with the error of the gPC solution. The expected value and standard deviation are representative of the full gPC solution since they depend on all the gPC coefficients. For a realistic problem with multiple sources of uncertainty (high stochastic dimensionality), each stochastic dimension can only be represented with low-order stochastic basis functions due to the computational cost. Therefore, we are primarily interested in investigating low-order approximations of the effects of each stochastic variable.

For the test cases investigated below, each realization of the stochastic model corresponds to a solution of the form presented in Sect. 3 or “Appendix.” Depending on the parameter values attained for each realization, the solution is either smooth or discontinuous at a given time. Since the time evolution of the realizations are different, for the given time the stochastic solution may be smooth or non-smooth with some nonzero probability. The exact statistics are in general smooth due to the effect of averaging even if all possible realizations are discontinuous. When we refer to emergence of discontinuities in the exact solution statistics below, it refers to discontinuities in the realizations corresponding to the exact stochastic solution. Some features of the exact statistics of the test problems are sharp, but they are not discontinuous. On the other hand, the numerical solution is an approximation to a finite-dimensional gPC representation of the original problem. This problem is nonlinear hyperbolic and will exhibit discontinuities that tend to emerge around the same time as the discontinuities of the realizations would emerge, were we to use a sampling-based method instead. For more details on the regularity of the statistics and gPC approximations, we refer to Pettersson et al. (2015).

7.1 Stochastic K, Deterministic M

Assume that \(M=3.6\) is deterministic and K is lognormally distributed as described above. Note that \(K\sim \ln \mathcal {N}(2.65,0.7)\) corresponds to mean 200 mD and standard deviation of 20 mD. The expected value and standard deviation of the normalized plume height are shown in Fig. 4 from time \(T=1\) after the end of the injection period and up to time \(T=7\) after injection. During the time until \(T=2\), the formation of shocks is unlikely and the expected value and standard deviation are well represented by the multiwavelet gPC approximation of piecewise quadratic basis functions on two levels, resulting in a total of 6 basis functions.

After \(T=3\), the solution exhibits a sharp peak in the standard deviation that is well captured by the numerical solution given the difficulty to accurately capture this kind of solution features. Initially, the variance peak is overpredicted, but as the solution evolves and the peak widens, the solution is accurately captured.

The truncated stochastic Galerkin system displays different dynamics compared to the original stochastic problem. This is illustrated in the sharp region of the expected value of the plume, represented by two sharp regions (discontinuities) separated by a smooth region in the numerical solution around \(x_{0}=0\) for times larger than \(T=6\).

Fig. 4
figure 4

Expected values and standard deviations for the normalized plume height at various times after the end of injection. Spatial grid with 200 points, uncertain \(K\sim \ln \mathcal {N}(2.65,0.7)\), \(P=6\) order of multiwavelet gPC. a Expected value after \(T=2\). b Standard deviation after \(T=2\). c Expected value after \(T=4\). d Standard deviation after \(T=4\). e Expected value after \(T=5\). f Standard deviation after \(T=5\). g Expected value after \(T=7\). h Standard deviation after \(T=7\)

7.2 Stochastic M, Deterministic K

Assume now that M is uniformly distributed and \(k=20\) mD, resulting in a deterministic K. The expected value and standard deviations of the normalized plume height are depicted in Figs. 5 and 6 up to 7 years after injection for multiwavelet gPC approximation of piecewise linear basis functions on three levels, resulting in a total of 8 basis functions.

The solutions are qualitatively similar to the ones of the previous case. Initially, the standard deviation for this case is larger compared to the case of stochastic K, but for larger times the maximum standard deviations are similar. The peak in standard deviation is resolved but increased accuracy would likely require a combination of higher-order gPC representation and a finer spatial mesh. In order to answer questions about leakage scenarios and migration probabilities through post-processing of the gPC solution—which is the ultimate goal of the quantification of the uncertainty—it is essential that peaks of variance are captured in order not to underestimate risk.

Fig. 5
figure 5

Expected values and standard deviations for the normalized plume height at various times after the end of injection. Spatial grid with 200 points, uncertain \(M \sim U(2.3, 6.5)\), \(P=8\) order of multiwavelet gPC. a Expected value after \(T=1\). b Standard deviation after \(T=1\). c Expected value after \(T=3\). d Standard deviation after \(T=3\)

Fig. 6
figure 6

Expected values and standard deviations for the normalized plume height at various times after the end of injection. Spatial grid with 200 points, uncertain \(M \sim U(2.3, 6.5)\), \(P=8\) order of multiwavelet gPC. a Expected value after \(T=4\). b Standard deviation after \(T=4\). c Expected value after \(T=5\). d Standard deviation after \(T=5\). e Expected value after \(T=6\). f Standard deviation after \(T=6\). g Expected value after \(T=7\). h Standard deviation after \(T=7\)

7.3 Stochastic M and K

Now assume that both K and M are stochastic and consider two-dimensional piecewise linear functions on two levels of localization, resulting in a total of 12 basis functions. For early times, the numerical solution is accurate as in the cases of a single source of uncertainty. For later times, the accuracy deteriorates, as can be seen for the standard deviation after 6 and 7 years in Fig. 7. Joint effects from the two sources of uncertainty may result in stronger need for more accurate stochastic representation or a more robust stochastic basis.

Fig. 7
figure 7

Expected values and standard deviations for the normalized plume height at various times after the end of injection. \(M \sim U(2.3, 6.5),\, K\sim \ln \mathcal {N}(2.65,0.7),\, P=12\) order of multiwavelet gPC. a Expected value after \(T=5\). b Standard deviation after \(T=5\). c Expected value after \(T=6\). d Standard deviation after \(T=6\). e Expected value after \(T=7\). f Standard deviation after \(T=7\)

8 Summary and Conclusions

In stochastic models, the combination of different parameter ranges leads to nonzero probability of different types of solutions. We have derived analytical solutions for cases of one-dimensional tilted aquifers where we may encounter both imbibition and drainage along the same \(\hbox {CO}_2\) interfaces.

A stochastic Galerkin formulation of the one-dimensional tilted aquifer model has been presented, with uncertain permeability and uncertain end point relative permeability (mobility ratio). The formulation is proven to be hyperbolic, a fact that is subsequently used in the choice of numerical method.

A central-upwind flux with flux limiters has been used for the spatial discretization to capture solution discontinuities. For increased resolution near the injection well, a stretched grid was used with the highest density of cells around the injection point \(x_0\). Explicit Euler in combination with adaptive tree-based numerical integration for the reconstruction of the discontinuous accumulation coefficient was employed to update the plume height in time.

The numerical solution accurately represents the exact statistics at times before discontinuities start to form. After the emergence of discontinuities, the effect of the truncation of the gPC series to a low-order expansion is clearly visible. The additional discontinuities of the truncated problem are results of the nonlinear hyperbolic system of order P approximation. Still, despite this relatively crude approximation of the infinite-dimensional original problem, the modified problem reproduces sharp solution features (variance peaks) that are well captured by the numerical solver. The low-order numerical gPC approximation is therefore of interest for construction of stochastic surrogate models for more complex problems where analytical solutions are not known. This is the subject of a future study.