1 Introduction

1.1 Deterministic Scalar Hyperbolic Conservation Laws

Many problems in physics and engineering are modeled by hyperbolic systems of conservation or balance laws. As examples for these equations, we mention only the Shallow Water Equations of hydrology, the Euler Equations for inviscid, compressible flow and the Magnetohydrodynamic (MHD) equations of plasma physics, see, e.g. [10, 15].

The simplest example for a system of hyperbolic conservation laws is the Cauchy problem for the scalar (single) conservation law:

$$\displaystyle \begin{aligned} \displaystyle\frac{\partial u}{\partial t} + \displaystyle\sum^d_{j=1} \; \displaystyle\frac{\partial}{\partial x_j} \;(f_j (u)) = 0, \quad x = (x_1,\dots,x_d) \in {\mathbb{R}}^d, \;t > 0\, \end{aligned} $$
(1)

augmented by the initial data

$$\displaystyle \begin{aligned} u(x,0) = u_0(x), \quad x \in {\mathbb{R}}^d. \end{aligned} $$
(2)

Here the unknown is \(u:{\mathbb {R}}^d \mapsto {\mathbb {R}}\) and f j is the flux function in the j-th dimension.

Solutions of (1)–(2) develop discontinuities in finite time even when the initial data u 0(x) is smooth and must be interpreted in the weak sense (e.g. [10, 15, 16, 32]).

1.2 Stochastic Conservation Laws

Many efficient numerical methods have been developed to approximate the entropy solutions of systems of conservation laws [15, 21], e.g. finite volume or discontinuous Galerkin methods. The classical assumption in designing efficient numerical methods is that the initial data U 0 is known exactly. However, in many situations of practical interest, these data are not known exactly due to inherent uncertainty in modelling and measurements of physical parameters. In the present work, we follow [25] and describe incomplete information in the uncertain data mathematically as random fields. Such data are described in terms of statistical quantities of interest like the mean, variance, higher statistical moments; in some cases the distribution law of the stochastic data is also assumed to be known.

A mathematical framework of random entropy solutions for scalar conservation laws with random initial data has been developed in [25]. There, existence and uniqueness of random entropy solutions has been shown for scalar hyperbolic conservation laws, also in multiple dimensions. Furthermore, the existence of the statistical quantities of the random entropy solution such as the statistical mean and k-point spatio-temporal correlation functions under suitable assumptions on the random initial data have been proven. The existence and uniqueness of the random entropy solutions for scalar conservation laws with random fluxes has been proven in [27].

Numerical methods for uncertainty quantification in hyperbolic conservation laws have been proposed and studied recently in e.g. [2, 8, 17, 22, 23, 25, 26, 29, 35, 36].

1.3 Random Fields and Probability Spaces

We introduce a probability space \((\varOmega ,\mathscr {F},\mathbb {P})\), with Ω being the set of all elementary events, or space of outcomes, and \(\mathscr {F}\) a σ-algebra of all possible events, equipped with a probability measure \(\mathbb {P}\). Random entropy solutions are random functions taking values in a function space; to this end, let \((E,\mathscr {G},\mathbb {G})\) denote any measurable space. Then an E-valued random variable is any mapping Y : Ω → E such that \(\forall A \in \mathscr {G}\) the preimage \(Y^{-1}(A) = \{\omega \in \varOmega : Y(\omega ) \in A\} \in \mathscr {F}\), i.e. such that Y is a \(\mathscr {G}\)-measurable mapping from Ω into E.

We confine ourselves to the case that E is a complete metric space; then \((E,\mathscr {B}(E))\) equipped with a Borel σ-algebra \(\mathscr {B}(E)\) is a measurable space. By definition, E-valued random variables Y : Ω → E are \(\big (E,\mathscr {B}(E)\big )\) measurable. Furthermore, if E is a separable Banach space with norm ∥∘∥ E and with topological dual E , then \(\mathscr {B}(E)\) is the smallest σ-algebra of subsets of E containing all sets

$$\displaystyle \begin{aligned} \{x \in E : \varphi(x) < \alpha\}, \varphi \in E^*, \alpha \in \mathbb{R}\;. \end{aligned}$$

Hence, if E is a separable Banach space, Y : Ω → E is an E-valued random variable if and only if for every φ ∈ E , \(\omega \mapsto \varphi \big (Y(\omega )\big ) \in \mathbb {R}\) is an \(\mathbb {R}\)-valued random variable. Moreover, there hold the following results on existence and uniqueness [25].

For a simple E-valued random variable Y and for any \(B \in \mathscr {F}\) we set

$$\displaystyle \begin{aligned} \int\limits_B Y(\omega)\,\mathbb{P}(d\omega) = \int\limits_B Y\,d\mathbb{P} = \sum_{i=1}^N x_i\mathbb{P}(A_i\cap B). \end{aligned} $$
(3)

For such Y (ω) and all \(B \in \mathscr {F}\) holds

$$\displaystyle \begin{aligned} \Big\|\int\limits_B Y(\omega)\,\mathbb{P}(d\omega)\Big\|{}_E \leqslant \int\limits_B \|\,Y(\omega)\|{}_E\,\mathbb{P}(d\omega). \end{aligned} $$
(4)

For any random variable Y : Ω → E which is Bochner integrable, there exists a sequence \(\{Y_m\}_{m\in {\mathbb {N}}}\) of simple random variables such that, for all ω ∈ Ω, ∥Y (ω) − Y m (ω)∥ E  → 0 as m →. Therefore (3) and (4) can be extended to any E-valued random variable. We denote the expectation of Y by

$$\displaystyle \begin{aligned} \mathbb{E}[\,Y] = \int\limits_{\varOmega} Y(\omega)\,\mathbb{P}(d\omega) = \lim\limits_{m\to\infty}\int\limits_{\varOmega}Y_m(\omega)\mathbb{P}(d\omega) \in E. \end{aligned}$$

Denote by \(L^p(\varOmega ,\mathscr {F},\mathbb {P};E)\) for \(1 \leqslant p \leqslant \infty \) the Bochner space of all p-summable, E-valued random variables Y and equip it with the norm

$$\displaystyle \begin{aligned} \|\,Y\|{}_{L^p(\varOmega;E)} = \big(\mathbb{E}[\|\,Y\|{}^p_E]\big)^{1/p} = \left(\int\limits_{\varOmega}\|\,Y(\omega)\|{}^p_E\,\mathbb{P}(d\omega)\right)^{1/p}. \end{aligned}$$

For p =  we can denote by \(L^{\infty }(\varOmega ,\mathscr {F},\mathbb {P};E)\) the set of all E-valued random variables which are essentially bounded and equip this space with the norm

$$\displaystyle \begin{aligned} \|\,Y\|{}_{L^{\infty}(\varOmega;E)} = \mathrm{ess}\sup\limits_{\omega\in\varOmega}\|\,Y(\omega)\|{}_E. \end{aligned}$$

2 General Framework

2.1 General Principles

Assume a deterministic problem is written as

$$\displaystyle \begin{aligned} \mathscr{L}(u)=0, \end{aligned} $$
(5)

defined in a domain \(K \subset \mathbb {R}^d\) with boundary conditions, and if needed initial conditions. Since the discussion of this section is formal, we include different initial and boundary conditions of the problem in the symbol \(\mathscr {L}\). Let the operator \(\mathscr {L}\) depend in some way on parameters (for example, considering fluids, in the equation of state, or the parameter of a turbulent model), that in many cases are not known exactly. Hence we assume that they are random variables defined on some random space Ω, and that these random variables are measurable with respect to a measure defined on Ω. Hence our problem can formally be seen as a “stochastic” PDE of the type

$$\displaystyle \begin{aligned} \mathscr{L}(u,X)=0, \end{aligned} $$
(6)

defined in a domain \(K \subset \mathbb {R}^{d}\), subject to initial and boundary conditions, and where X is a random variable defined on Ω. For simplicity, we use the same notation \(\mathscr {L}\) for the problem. The operator \(\mathscr {L}\) depends on u ≡ u(x, t, X) and X ≡ X(ω) where \(x \in \mathbb {R}^{s}\) for s ∈{1, 2, 3} and \(t \in \mathbb {R}^{+}\) are respectively the space coordinate and time, and the random event (or random parameter) ω belongs to Ω. In the case of steady problems, the time is omitted. The random variable may also depend on space and time, as well as the measure μ, and the technique in principle can be extended to this case but the discussion is beyond the scope of this chapter for simplicity of exposure.

We will identify Ω to some subset of \(\mathbb {R}^s\), s being the number of random parameters to define X. Thus we can also see (6) as a problem defined on a subset \(K \subset \mathbb {R}^d\) of dimension d = s + p.

For any realization of Ω, we are able to solve the following deterministic form of (6) in space and time, by some numerical method:

$$\displaystyle \begin{aligned} \mathscr{L}_h(u_h,X(\omega))=0. \end{aligned} $$
(7)

In order to approximate a solution of (6), the first step is to discretize the probability space Ω. We construct a partition of Ω, i.e. a set of Ω j , j = 1, …, N that are mutually independent

$$\displaystyle \begin{aligned} \mathbb{P} ( \varOmega_i\cap \varOmega_j)=0 \text{ for any } i\neq j \end{aligned} $$
(8)

and that cover Ω

$$\displaystyle \begin{aligned} \varOmega=\cup_{i=1}^N \varOmega_i. \end{aligned} $$
(9)

We assume \(\mu \left ( \varOmega _{i} \right )=\int _{\varOmega _{j}}d\mu >0\) for any i. We wish to approximate the solution of (6) by the average conditional expectancies E(u h |Ω j )

$$\displaystyle \begin{aligned} {\mathbb E}\left ( u_{h}\mid \varOmega _{j} \right )=\frac{\int_{\varOmega _{j}}u_{h}d\mathbb{P}}{\int_{\varOmega _{j}}d\mathbb{P}} \end{aligned} $$
(10)

from the knowledge of the operator \(\mathscr {L}_h\) and thanks to a reconstruction procedure inspired from the methods for high order finite volume methods: ENO, WENO, etc. This idea, initially developed in [2], will be detailed in Sects. 3 and 4 for the finite volume method on Cartesian and unstructured meshes, but can be used for ODEs as in [3] as we show now by an example.

Remark

Depending on the context, the described method will either be named as semi intrusive (SI) (since very few modifications of an existing code need to be done), or stochastic finite volume (SFV) method since in essence the conditional expectancies can also be seen as integrals over a stochastic finite volume.

2.2 A First Example: The Kraichnan-Orszag Three-Mode Problem

The Kraichnan-Orszag three-mode problem has been introduced by Kraichnan [19] and Orszag [28]. It has been intensively studied to demonstrate that gPC expansion could suffer from accuracy loss for problems involving long time integration. In [37], the exact solution is given, and different computations have been performed in [7, 11, 13, 24, 37, 38]. This problem is defined by the following system of nonlinear ordinary differential equations

$$\displaystyle \begin{aligned}\begin{aligned} \dfrac{\mathrm{d} y_{1}}{\mathrm{d} t}&=y_{1}y_{3},\\ \dfrac{\mathrm{d} y_{2}}{\mathrm{d} t}&=-y_{2}y_{3},\\ \dfrac{\mathrm{d} y_{3}}{\mathrm{d} t}&=-y_{1}^{2}+y_{2}^{2} {} \end{aligned}\end{aligned} $$
(11)

subject to stochastic initial conditions

$$\displaystyle \begin{aligned} y_{1}(0)=y_{1}(0;\omega ),\qquad y_{2}(0)=y_{2}(0;\omega ),\qquad y_{3}(0)=y_{3}(0;\omega ). \end{aligned} $$
(12)

In the literature, generally uniform distributions are considered, except in [38] where beta and Gaussian distributions are also taken into account. The computational cost of our SI/SFV method for the Kraichnan-Orszag problem is compared to that of other methods, a quasi-random Sobol (MC-SOBOL) sequence with 8 × 106 iterations, and a Polynomial Chaos Method (PC) with Clenshaw-Curtis sparse grid. The error in variance of y 1 is considered at a final time t f of 50. We define the error between two numerically integrated functions \(f_{1}\left (t_{j} \right )\) and \(f_{2}\left (t_{j} \right )\), j = 1, ⋯ , n t , as:

$$\displaystyle \begin{aligned} \varepsilon _{L^{2}}=\frac{\frac{1}{n_{t}}\sqrt{\sum _{j=1}^{n_{t}}\left (f_{1}\left ( t_{j} \right )-f_{2}\left ( t_{j} \right ) \right )^{2}}}{\frac{1}{n_{t}}\sqrt{\sum _{j=1}^{n_{t}}\left (f_{1}\left ( t_{j} \right ) \right )^{2}}}, \end{aligned} $$
(13)

where f 1 is considered the Monte Carlo converged solution. For different error levels, corresponding computational cost is computed.

2.2.1 One Random Variable

First, we will study the 1D problem corresponding to initial conditions of the form

$$\displaystyle \begin{aligned} y_{1}(0)=1.0, \qquad y_{2}(0)=0.1\omega , \qquad y_{3}(0)=0.0, \end{aligned} $$
(14)

where ω is a uniformly distributed random variable varying in [−1, 1]. We use SI, MC-SOBOL and PC method to compute the variance of y 1. In Table 1, we show the results in terms of number of samples required to reach a prescribed error \(\varepsilon _{L^{2}}\). Performances of SI methods are comparable and even better than PC methods.

Table 1 Number of samples required for the 1D K-O problem for time \(t\, \in \left [ 0,10 \right ]\)

Then, the same problem described previously but with a different probability distribution for y 2(0) has been considered. In particular, ω is discontinuous on [a, b] = [−1, 1] with probability density function (pdf) defined by:

$$\displaystyle \begin{aligned} f(\gamma)=\dfrac{1}{M}\times\left \{ \begin{array}{ll} \dfrac{1+\cos{}(\pi x)}{2}& \text{if } x\in [-1,0]\\ 10+\dfrac{1+\cos{}(\pi x)}{2}& \text{if } x\in [0,1]\\ 0& \text{else} \end{array}\right . {} \end{aligned} $$
(15)

and \(M=\tfrac {11}{2}\) to ensure normalization. Because of the discontinuous pdf, only MC-SOBOL and SI solutions can be compared, showing the great flexibility given by SI method with respect to the form of the pdf. In Fig. 1, variance of y 1(t) is reported for the converged solutions obtained with MC-SOBOL and SI. The SI method permits to reproduce exactly MC-SOBOL solution. In Fig. 2, a convergence study for SI method is reported by using an increasing number of points in the stochastic space. In Table 2, we reported number of samples required to reach a prescribed error \(\varepsilon _{L^{2}}\). SI method shows to be very competitive in terms of efficiency and computational cost with respect to MC-SOBOL method when whatever form of pdf is used (a discontinuous pdf in this case). We remark that a uniform grid is used in the stochastic plan without any type of adaptation. This displays the great potentiality of this method if coupled with an adaptive method.

Fig. 1
figure 1

Variance of y 1 computed by means of SI and MC-SOBOL methods (Reproduced with permission from [3])

Fig. 2
figure 2

Variance of y 1 computed by means of SI for different meshes in the stochastic space (Reproduced with permission from [3])

Table 2 Number of samples required for the 1D-discontinuous K-O problem for time \(t\, \in \left [ 0,50 \right ]\)

2.2.2 Two Random Variables

In this section, we use SI method to study the Kraichnan-Orszag problem with two-dimensional random inputs:

$$\displaystyle \begin{aligned} y_{1}(0)=1.0, \qquad y_{2}(0)=0.1\omega_{1}, \qquad y_{3}(0)=\omega_{2}, \end{aligned} $$
(16)

where ω 1 is discontinuous on [a, b] = [−1, 1] with a density defined by Eq. (15) and ω 2 is a uniform random variable in [−1, 1].

In Fig. 3, the SI capability to reproduce exactly MC-SOBOL solution is represented. SI and MC-SOBOL solutions are nearly coincident also for long time (t = 50). The mesh convergence study in the stochastic space for SI is reported in Fig. 4 showing that the solution obtained with a mesh of 320 × 320 is well converged. In Table 3 computational cost required to reach a prescribed error of \(\varepsilon _{L^{2}}\) is reported. Reductions from 50 to 66% are obtained using SI with respect to MC-SOBOL solutions.

Fig. 3
figure 3

Variance of y 1 computed by means of SI and MC-SOBOL methods (Reproduced with permission from [3])

Fig. 4
figure 4

Variance of y 1 computed by means of SI for different meshes in the stochastic space (Reproduced with permission from [3])

Table 3 Number of samples required for the 2D-discontinuous K-O problem for time \(t\, \in \left [ 0,50 \right ]\)

3 Stochastic Finite Volume Method on Cartesian Grids

In this chapter, we concentrate on the analysis of the stochastic hyperbolic conservation laws with random initial data and flux coefficients. Many efficient numerical methods have been developed to approximate the entropy solutions of systems of conservation laws [15, 21], however, in many practical applications it is not always possible to obtain exact data due to, for example, measurement or modeling errors. We describe incomplete information in the conservation law mathematically as random fields. Such data are described in terms of statistical quantities of interest like the mean, variance, higher statistical moments; in some cases the distribution law of the stochastic initial data is also assumed to be known. There exist several techniques to quantify the uncertainty (i.e. determine the mean flow and its statistical moments), such as the Monte-Carlo (MC), the Multi-Level Monte Carlo (MLMC) and Stochastic Galerkin method, see [17, 22, 23, 25, 26, 29, 35, 36]. Here we analyse a different approach to the uncertainty quantification in the conservation laws, the Stochastic Finite Volume Method (SFVM), which is based on the finite volume framework and was first introduced in [2, 8]. The SFVM is formulated to solve numerically the system of conservation laws with sources of randomness in both flux coefficients and initial data.

Consider the hyperbolic system of conservation laws with random flux coefficients

$$\displaystyle \begin{aligned} \dfrac{\partial{\mathbf{U}}}{\partial{t}} + \nabla_x\cdot\mathbf{F}(\mathbf{U},\omega) = \mathbf{0}, \ t > 0; \end{aligned} $$
(17)

\(\mathbf {x} = (x_1, x_2, x_3) \in D_x \subset {\mathbb {R}}^3\), U = [u 1, …, u p ], F = [F 1, F 2, F 3], F k  = [f 1, …, f p ], k = 1, 2, 3, and random initial data

$$\displaystyle \begin{aligned} \mathbf{U}(\mathbf{x},0,\omega) = \mathbf{U}_0(\mathbf{x},\omega), \ \omega \in \varOmega. \end{aligned} $$
(18)

A mathematical framework of random entropy solutions for scalar conservation laws has been developed in [25]. There, existence and uniqueness of random entropy solutions to (17)–(18) has been shown for scalar conservation laws, also in multiple dimensions. Furthermore, the existence of the statistical quantities of the random entropy solution such as the statistical mean and k-point spatio-temporal correlation functions under suitable assumptions on the random initial data have been proven.

3.1 Stochastic Finite Volume Method

We parametrize all the random inputs in Eqs. (17)–(18) using the random variable y = Y(ω) which takes values in \(D_y \subset {\mathbb {R}}^q\) and rewrite the stochastic conservation law in the parametric form:

$$\displaystyle \begin{aligned} \partial_{t} \mathbf{U} + \nabla_x\cdot\mathbf{F}(\mathbf{U},\mathbf{y}) = \mathbf{0}, \ \mathbf{x} \in D_x \ \subset {\mathbb{R}}^3, \ \mathbf{y} \in D_y\subset {\mathbb{R}}^q, \ t > 0; \end{aligned} $$
(19)
$$\displaystyle \begin{aligned} \mathbf{U}(\mathbf{x},0,\mathbf{y}) = \mathbf{U}_0(\mathbf{x},\mathbf{y}), \ \mathbf{x} \in D_x \ \subset {\mathbb{R}}^3, \ \mathbf{y} \in D_y\subset {\mathbb{R}}^q. \end{aligned} $$
(20)

Let \(\mathscr {T}_x = \cup _{i=1}^{N_x} K_x^i\) be the triangulation of the computational domain D x in the physical space and \(\mathscr {C}_y = \cup _{j=1}^{N_y}K_y^j\) be the Cartesian grid in the domain D y of the parametrized probability space.

We further assume the existence of the probability density function μ(y) and compute the expectation of the n-th solution component of the conservation law (19)–(20) as follows:

$$\displaystyle \begin{aligned} \mathbb{E}[u_n] = \int\limits_{D_y} u_n \mu(\mathbf{y})\, d\mathbf{y}, \ n = 1,\dots,p \end{aligned}$$

The scheme of the Stochastic Finite Volume method (SFVM), see e.g. [34], can be obtained from the integral form of Eqs. (19)–(20):

$$\displaystyle \begin{aligned} \iint\limits_{K_y^j\,K_x^i} \partial_{t} \mathbf{U} \,\mu(\mathbf{y})\, d\mathbf{x}d\mathbf{y} + \iint\limits_{K_y^j\,K_x^i} \nabla_x\cdot\mathbf{F}(\mathbf{ U},\mathbf{y}) \,\mu(\mathbf{y})\, d\mathbf{x}d\mathbf{y} = \mathbf{0}. \end{aligned}$$

Introducing the cell average

$$\displaystyle \begin{aligned} \bar{\mathbf{U}}_{ij}(t) = \dfrac{1}{|K_x^i||K_y^j|}\iint\limits_{K_y^j\,K_x^i} \mathbf{U}(\mathbf{x},t,\mathbf{y})\mu(\mathbf{y})\,d\mathbf{x}d\mathbf{y} \end{aligned}$$

with the cell volumes

$$\displaystyle \begin{aligned} |K_x^i| = \int\limits_{K_x^i} d\mathbf{x}, \quad |K_y^j| = \int\limits_{K_y^j} \mu(\mathbf{y})\,d\mathbf{y} \end{aligned}$$

and performing the partial integration over \(K_x^i\) we get

Next, we use any standard numerical flux approximation \(\hat {\mathbf {F}}\big (\tilde {\mathbf {U}}_L(\mathbf {x},t,\mathbf {y}),\tilde {\mathbf {U}}_R(\mathbf { x},t,\mathbf {y}),\mathbf {y}\big )\) to replace the discontinuous flux through the element interface F(U, y) ⋅n. Here \(\tilde {\mathbf {U}}_{L,R}\) denote the boundary extrapolated solution values at the edge of the cell \(K_x^i\), obtained by the high order reconstruction from the cell averages. The complete numerical flux is then approximated by a suitable quadrature rule as

(21)

where we have denoted the flux integral over the physical cell as \(\hat {\mathscr {F}}\), m = (m 1, …, m q ) is the multi-index, y m and w m are quadrature nodes and weights, respectively.

The SFV method then results in the solution of the following ODE system:

$$\displaystyle \begin{aligned} \dfrac{d{\bar{\mathbf{U}}_{ij}}}{d{t}} + \dfrac{1}{|K_x^i|} \bar{\mathbf{F}}_{ij}(t) = \mathbf{0},\end{aligned} $$
(22)

for all i = 1, …, N x , j = 1, …, N y . Therefore, to obtain the high-order scheme we first need to provide the high-order flux approximation based, for example, on the ENO/WENO reconstruction in the physical space. Second, we have to guarantee the high-order integration in (21) also by applying the ENO/WENO reconstruction in the stochastic space and choosing the suitable quadrature rule. Finally, we need the high-order time-stepping algorithm to solve the ODE system (22), such as Runge-Kutta method.

3.2 Numerical Convergence Analysis

We perform the convergence analysis of the SFVM for a simple linear advection equation with uncertain phase initial condition

$$\displaystyle \begin{aligned} & u_t + au_x = 0, \quad x \in (0,1), \\ & u(x,0) = \sin\left(2\pi\big(x+0.1Y(\omega)\big)\right).\end{aligned} $$

The random variable y = Y (ω) is assumed to be distributed uniformly on [0, 1].

The reference solution in this and other experiments of this chapter involving convergence analysis has been computed exactly using the method of characteristics.

In Figs. 5 and 6, we plot the L 1(0, 1) error for the expectation and the variance of u with respect to the mesh size and the computational time. We investigate the influence of different reconstruction orders in spatial and stochastic variables on the convergence rates and therefore present the convergence plots for the SFVM based on different combinations of ENO/WENO reconstruction in x and y. We compare the SFVM with 1st, 2nd and 3rd order of accuracy in physical space combined with 3rd and 5th order reconstruction in stochastic variable. The type of reconstruction is indicated in Figs. 5 and 6 as follows: for example, the line “SFV-x2y5” corresponds to the 2nd order piecewise-linear ENO reconstruction in x and 5th order piecewise-quadratic WENO reconstruction in y, the line “SFV-x3y5” stands for 3rd order piecewise-linear WENO reconstruction in x with 5th order WENO reconstruction in y, etc. The numerical flux used in all the numerical experiments of this paper is the Rusanov flux. The results show that, while the convergence rate is dominated by the order of accuracy in x, the algorithms with higher order reconstruction in y are more efficient computationally since the same error can be reached with less overall computational time as compared to the lower order reconstruction in y.

Fig. 5
figure 5

Mean: dependence of the error on the mesh resolution and computational time (Reproduced with permission from [34])

Fig. 6
figure 6

Variance: dependence of the error on the mesh resolution and computational time (Reproduced with permission from [34])

3.3 Numerical Results

3.3.1 Buckley-Leverett Equation

As a second example for a scalar conservation law, we consider the Buckley-Leverette equation with random flux:

$$\displaystyle \begin{aligned} & \dfrac{\partial{u}}{\partial{t}} + \dfrac{\partial{f(\omega;u)}}{\partial{x}} = 0, \ x \in (0,L), \ t > 0; {} \end{aligned} $$
(23)
$$\displaystyle \begin{aligned} & u(x,0) = u_0(x), {} \end{aligned} $$
(24)

where

$$\displaystyle \begin{aligned}f(\omega;u) = \frac{u^2}{u^2 + \alpha(\omega) (1-u)^2} \end{aligned}$$

and α = α(ω) is the random variable with known distribution. Assume further that u 0(x) is the Riemann initial data, that is

$$\displaystyle \begin{aligned} u_0(x) = \begin{cases} u_L, \quad \text{if } \ x < x_0, \\ u_R, \quad \text{if } \ x > x_0. \end{cases} \end{aligned}$$

Note that the Buckley-Leverette equation models water flooding in a one-dimensional petroleum reservoir and the above introduction of uncertainty reflects the inherent uncertainty in measuring the relative permeability. We apply the Stochastic Finite Volume method to solve (23)–(24) with L = 2.5, x 0 = 1.0, u L  = 0.8, u R  = 0.3 and uniformly distributed α(ω). The computational results for two different distributions of α(ω) are presented in Figs. 7 and 8. The solution mean is complicated on account of the formation of a compound shock. Furthermore, increasing the order of the spatio-temporal discretization does lead to a better approximation of the solution. Note that increasing the order does not imply an increase in the convergence rate as the solution is discontinuous.

Fig. 7
figure 7

Convergence w.r.t. resolution (upper left) and computational time (upper right) of the Stochastic Finite Volume method and solution mean (lower) for Buckley-Leverett equation with random flux, \(\alpha (\omega ) \sim \mathscr {U}[0.05,0.15]\)

Fig. 8
figure 8

Convergence w.r.t. resolution (upper left) and computational time (upper right) of the Stochastic Finite Volume method and solution mean (lower) for Buckley-Leverett equation with random flux, \(\alpha (\omega ) \sim \mathscr {U}[0.8,1.2]\)

3.3.2 Stochastic Sod’s Shock Tube Problem with Random Initial Data

Consider the Riemann problem for the Euler equations

$$\displaystyle \begin{aligned} & \dfrac{\partial{\mathbf{U}}}{\partial{t}} + \dfrac{\partial{\mathbf{F}(\mathbf{U})}}{\partial{x}} = \mathbf{0}, \quad x \in (0,2), {} \end{aligned} $$
(25)
$$\displaystyle \begin{aligned} & \mathbf{U}(x,0,y) = \mathbf{U}_0(x,y) = \begin{cases} \mathbf{U}_L, \ x < Y(\omega); \\ \mathbf{U}_R, \ x > Y(\omega), \end{cases} {} \end{aligned} $$
(26)

with y = Y (ω), ω ∈ Ω and

$$\displaystyle \begin{aligned} \mathbf{U} = [\rho, \rho u, E]^\top, \ \mathbf{F} = [\rho u, \rho u^2 + p, \rho u (E+p)]^\top.\end{aligned}$$

The initial data is set in primitive variables as

$$\displaystyle \begin{aligned} \mathbf{W}_0(x,\omega) = [ \rho_0(x,\omega), u_0(x,\omega), p_0(x,\omega) ]^\top = \begin{cases} [ 1.0, 0.0, 1.0 ] & \text{if} \quad x < Y(\omega), \\ {} [ 0.125, 0.0, 0.1 ] & \text{if} \quad x > Y(\omega). \end{cases} \end{aligned}$$

We apply the SFV method to solve the system (25)–(26) with Y (ω) uniformly distributed on [0.95, 1.05]. We have used the 3rd order WENO reconstruction in both x and y variables. The results are presented in Figs. 9 and 10, in which the solution mean (solid line) as well as mean plus/minus standard deviation (dashed lines) are shown. The typical deterministic solution of the Sod’s shock tube problem with the given initial conditions consists of the left-traveling rarefaction wave and the right-traveling shock wave separated by the contact discontinuity. However, a continuous transition between the intermediate states instead of the discontinuities is observed in the mean flow. This effect is unrelated to the diffusion of the numerical scheme and is due to the smoothing properties of the probabilistic shock profile [31].

Fig. 9
figure 9

Sod’s shock tube problem with random shock location: density (left) and velocity (right)

Fig. 10
figure 10

Sod’s shock tube problem with random shock location: pressure

3.3.3 Stochastic Sod’s Shock Tube Problem with Random Flux and Initial Data

Consider the Riemann problem for the one-dimensional Euler equations with randomness in both flux and initial data

$$\displaystyle \begin{aligned} & \dfrac{\partial{\mathbf{U}}}{\partial{t}} + \dfrac{\partial{\mathbf{F}(\mathbf{U},\omega)}}{\partial{x}} = \mathbf{0}, \quad x \in (0,2), {} \end{aligned} $$
(27)
$$\displaystyle \begin{aligned} & \mathbf{U}(x,0,\omega) = \mathbf{U}_0\big(x,Y_1(\omega),Y_2(\omega)\big) = \begin{cases} \mathbf{U}_L\big(Y_2(\omega)\big), \ x < Y_1(\omega); \\ \mathbf{U}_R, \ x > Y_1(\omega), \end{cases} {} \end{aligned} $$
(28)

with y j  = Y j (ω), j = 1, 2, 3, ω ∈ Ω and

$$\displaystyle \begin{aligned} \mathbf{U} = [\rho, \rho u, E]^\top, \ \mathbf{F} = [\rho u, \rho u^2 + p, \rho u (E+p)]^\top, \end{aligned}$$
$$\displaystyle \begin{aligned}p = (\gamma-1)\Big(E - \frac 12\rho u^2\Big).\end{aligned}$$

We also assume the randomness in the adiabatic constant, γ = γ(Y 3(ω)), and therefore

$$\displaystyle \begin{aligned}\mathbf{F}(\mathbf{U},\omega) = \mathbf{ F}\big(\mathbf{U},Y_3(\omega)\big).\end{aligned}$$

The initial data is set in primitive variables as

We apply the SFVM to solve the system (27)–(28) with \(Y_1(\omega ) \sim \mathscr {U}[0.95,1.05]\), \(Y_2(\omega ) \sim \mathscr {U}[-0.1,0.1]\), \(Y_3(\omega ) \sim \mathscr {U}[1.2,1.6]\) using the 3rd order WENO reconstruction in both physical and stochastic variables. The results are presented in Figs. 11 and 12, in which the solution mean (solid line) as well as mean plus/minus standard deviation (dashed lines) are plotted.

Fig. 11
figure 11

Sod’s shock tube problem with random flux and initial data: density (left) and velocity (right) (Reproduced with permission from [34])

Fig. 12
figure 12

Sod’s shock tube problem with random flux and initial data: pressure (Reproduced with permission from [34])

The convergence results (dependence of the error on the number of mesh points and on the computational time) for the solution mean are presented in Fig. 13. Due to the shock formation in the path-wise solution the maximum order of convergence for the mean is limited to 1.

Fig. 13
figure 13

Sod’s shock tube problem with random flux and initial data: convergence of the mean w.r.t. physical mesh resolution (left) and computational time (right)

3.4 Adaptive Parametrization of the Stochastic Space for SFVM

In this section we introduce the mesh adaptation technique for the Stochastic Collocation FVM and apply it to reduce the computational cost of the Stochastic Finite Volume method. To this end, we consider the following model problem:

$$\displaystyle \begin{aligned} \dfrac{\partial{u}}{\partial{t}} + \dfrac{\partial{f(u,\omega)}}{\partial{x}} = 0, \ x \in D = [0,L] \subset \mathbb{R}, \ t > 0; \end{aligned} $$
(29)
$$\displaystyle \begin{aligned} u(x,0,\omega) = u_0(x,\omega), \ x \in D, \ \omega \in \varOmega.\end{aligned} $$
(30)

Assume that the initial data is given as the Karhunen-Loève expansion:

$$\displaystyle \begin{aligned} u_0(x,\omega) = \bar{u}_0(x) + \sum_{j \geqslant 1} Y_j(\omega)\sqrt{\lambda_j}\varPhi_j(x), \end{aligned} $$
(31)

where Φ j (x) and λ j are the eigenfunctions and eigenvalues of the integral operator with covariance kernel:

$$\displaystyle \begin{aligned} \int\limits_{D} C_Y(x_1,x_2)\varPhi(x_1)\,dx_1 = \lambda\varPhi(x_2). \end{aligned}$$

We can therefore choose the random variable to parametrize the stochastic conservation law as y = (y 1, y 2, … ) = Y(ω) = (Y 1(ω), Y 2(ω), …), then

$$\displaystyle \begin{aligned} u_0(x,\omega) = u_0(x,\boldsymbol{y})\Big|{}_{\boldsymbol{y} = \mathbf{Y}(\omega)} = \bar{u}_0(x) + \sum_{j \geqslant 1} y_j\sqrt{\lambda_j}\varPhi_j(x), \end{aligned}$$

The adaptation technique remains absolutely the same in the case of SCL with random fluxes, e.g. when the flux has the form

$$\displaystyle \begin{aligned} f(u;\omega) = \bar{f}(u) + \sum_{j \geqslant 1} Y_j(\omega)\sqrt{\lambda_j}\varPhi_j(u), \end{aligned}$$

where Φ j (u) and λ j are the eigenfunctions and eigenvalues of the integral operator with covariance kernel:

$$\displaystyle \begin{aligned} \int\limits_{D} C_Y(u_1,u_2)\varPhi(u_1)\,du_1 = \lambda\varPhi(u_2). \end{aligned}$$

Let u 0(x, ω) be the Gaussian process with exponential covariance [14]

$$\displaystyle \begin{aligned} C_Y(x_1,x_2) = \sigma_Y^2 e^{-|x_1-x_2|/\eta}, \end{aligned}$$

then

$$\displaystyle \begin{aligned} \lambda_j = \frac{2\eta\sigma_Y^2}{\eta^2w_j^2+1}, \ \varPhi_j(x) = \frac{1}{\sqrt{(\eta^2w_j^2+1)L/2+\eta}}[\eta w_j\cos{}(w_jx)+\sin{}(w_jx)],\end{aligned} $$

where w j are the roots of

$$\displaystyle \begin{aligned} (\eta^2w^2-1)\sin{}(wL) = 2\eta w \cos{}(wL)\end{aligned} $$

and

$$\displaystyle \begin{aligned} Y_j \sim \mathscr{N}(0,1), \quad \mathbb{E}[\,Y_j\;Y_k] = \delta_{jk}\end{aligned} $$

We next consider the Burgers’ equation with following initial conditions:

$$\displaystyle \begin{aligned} u_0(x,\boldsymbol{y}) = \sin{}(\pi x) + 0.1 x(x-L)\Big(\sum_{j = 1}^{q} y_j\sqrt{\lambda_j}\varPhi_j(x) \Big) \end{aligned}$$

In order to reduce the computational cost of the SFV method, we propose the mesh adaptation in the stochastic space based on the choice of the number of nodes in each of the stochastic coordinates according to

$$\displaystyle \begin{aligned} N_y^j = C\;N_x \sqrt{\lambda_j}. \end{aligned} $$
(32)

Table 4 lists the convergence rates of the SFVM with adaptive meshing algorithm, for the s-th order in the physical variable and p j -th order in the stochastic variables.

Table 4 Convergence rates of the SFVM with anisotropic stochastic mesh

Figure 14 shows the convergence of the adaptive SFVM algorithm (“SFV adapt”) and the SFVM without stochastic mesh adaptation (“SFV noadapt”). The non-adaptive version of the SFVM simply uses equal number of cells in each stochastic coordinate, while the adaptive version chooses the number of cells in each y j according to (32). The computational time needed to perform both algorithms is shown in Fig. 15. Clearly, the proposed adaptation of the algorithm improves the convergence properties of the SFV method.

Fig. 14
figure 14

Convergence: error vs space resolution (left) and error vs runtime (right)

Fig. 15
figure 15

Runtime (seconds) (Reproduced with permission from [34])

3.5 Efficiency of the SFVM

We compare the efficiencies of the SFV and MLMC methods [25, 26] for the solution of the one-dimensional stochastic Sod’s problem for the Euler equations described in Sect. 3.3.3. Figure 16 illustrates the convergence of SFVM and MLMC based on 1st and 2nd order FV ENO/WENO solvers.

Fig. 16
figure 16

Convergence of the SFVM and MLMC (upper plots) and detail of the solution mean (lower plot) (Reproduced with permission from [34])

Figure 16 demonstrates that both approaches lead to the same orders of convergence in space while SFVM with properly chosen reconstruction orders appears to be more efficient in terms of error-to-work estimates. Moreover, the solution mean generated by the MLMC method contains spurious oscillations which do not disappear by physical mesh refinement, while the SFVM produces monotone statistical solution at the same level of stochastic resolution.

3.6 SFVM Error Estimates for the Statistical Solution

3.7 Estimates in L -Norm

Consider the stochastic scalar conservation law in the parametric form

$$\displaystyle \begin{aligned} & \dfrac{\partial{u}}{\partial{t}} + \dfrac{\partial{f(u; y)}}{\partial{x}} = 0, \quad x \in D, \ y \in Y, \ t > 0, {} \end{aligned} $$
(33)
$$\displaystyle \begin{aligned} & u(x,0;y) = u_0(x;y). {} \end{aligned} $$
(34)

Let \(Y = \bigcup \limits _{k=1}^{N_y} Y_k\), where Y k is the mesh cell in the stochastic variable y. Denote the probability density function by μ(y).

Assume u = u(x, t;y) is the exact solution to (33)–(34) and \(u_{ik}^n\) is its approximation at a fixed time moment t = t n, resulting from SFVM. Denote \(u_h = \{u_{ik}^n\}\). Assume further that the following error estimate holds:

$$\displaystyle \begin{aligned} \| u - u_h \|{}_{L^{\infty}(D\times Y)} \leqslant C_1\varDelta x^p + C_2 \varDelta y^r, \end{aligned} $$
(35)

where Δx and Δy are typical mesh sizes in the physical and stochastic coordinates, respectively. Note that the error analysis for the L -norm applies to the case of smooth solutions; in the presence of shocks one should consider L 1-norm instead.

3.7.1 Error Estimate for the Mean E h [u h ]

We have:

Lemma 1

The mean value of the exact solution at the point (x i , t n) is

$$\displaystyle \begin{aligned} {\mathbb{E}}[u](x_i,t^n) = \int\limits_Y u(x_i,t^n;y) \mu(y)\,dy, \end{aligned} $$
(36)

and the corresponding SFVM approximation is computed as follows:

$$\displaystyle \begin{aligned} E_h[u_h]_i^n = \sum_{k=1}^{N_y} u_{ik}^n \omega_k, \quad \omega_k = \int\limits_{Y_k} \mu(y)\,dy. \end{aligned} $$
(37)

Then

$$\displaystyle \begin{aligned} \big\|{\mathbb{E}}[u] - E_h[u_h]\big\|{}_{L^{\infty}(D)} \leqslant \| u - u_h \|{}_{L^{\infty}(D\times Y)}. \end{aligned} $$
(38)

Proof

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle &\displaystyle \big|{\mathbb{E}}[u](x_i,t^n) - E_h[u_h]_i^n\big| = \bigg| \int\limits_Y u(x_i,t^n;y) \mu(y)\,dy - \sum_k u_{ik}^n \omega_k \bigg| \\ {} &\displaystyle &\displaystyle =\bigg| \sum_k \int\limits_{Y_k} u(x_i,t^n;y) \mu(y)dy - \sum_k u_{ik}^n \int\limits_{Y_k} \mu(y)dy \bigg| {=} \bigg| \sum_k \int\limits_{Y_k} \big[u(x_i,t^n;y) {-} u_{ik}^n\big]\mu(y)dy \bigg|\\ {} &\displaystyle &\displaystyle \quad \leqslant \sum_k \int\limits_{Y_k} \big| u(x_i,t^n;y) - u_{ik}^n \big|\mu(y)dy \leqslant \sup_{Y_k} \big| u(x_i,t^n;y) - u_{ik}^n \big| \sum_k \int\limits_{Y_k} \mu(y)\,dy \\ &\displaystyle &\displaystyle \qquad \quad = \sup_{Y_k} \big| u(x_i,t^n;y) - u_{ik}^n \big| \int\limits_{Y} \mu(y)\,dy = \sup_{Y_k} \big| u(x_i,t^n;y) - u_{ik}^n \big|, \end{array} \end{aligned} $$
(39)

and

$$\displaystyle \begin{aligned} \big\|{\mathbb{E}}[u] - E_h[u_h]\big\|{}_{L^{\infty}(D)} \leqslant \| u - u_h \|{}_{L^{\infty}(D\times Y)}. \end{aligned}$$

3.7.2 Error Estimate for the Variance V h [u h ]

We have

Lemma 2

The variance of the exact solution at (x i , t n) is equal to

$$\displaystyle \begin{aligned} {\mathbb{V}}[u](x_i,t^n) = {\mathbb{E}}\big[\big(u(x_i,t^n)-{\mathbb{E}}[u](x_i,t^n)\big)^2\big] = {\mathbb{E}}\big[u^2(x_i,t^n)\big] - \big({\mathbb{E}}[u](x_i,t^n)\big)^2 \end{aligned} $$
(40)

and is approximated by

$$\displaystyle \begin{aligned} V_h[u_h]_i^n = E_h\big[u_h^2\big]_i^n - \big(E_h[u_h]_i^n\big)^2. \end{aligned} $$
(41)

Then

$$\displaystyle \begin{aligned} \big\|{\mathbb{V}}[u] - V_h[u_h]\big\|{}_{L^{\infty}(D)} \leqslant C \| u - u_h \|{}_{L^{\infty}(D\times Y)}. \end{aligned} $$
(42)

Proof

The approximation error for the variance can be computed as

(43)

We can estimate the first term as

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle \big| {\mathbb{E}}\big[u^2(x_i,t^n)\big] - E_h\big[u_h^2\big]_i^n \big| = \bigg| \int\limits_Y u^2(x_i,t^n;y) \mu(y)\,dy - \sum_k \big(u_{ik}^n\big)^2 \omega_k \bigg| &\displaystyle \\&\displaystyle = \bigg| \sum_k \int\limits_{Y_k} u^2(x_i,t^n;y) \mu(y)\,dy - \sum_k \big(u_{ik}^n\big)^2 \int\limits_{Y_k} \mu(y)\,dy \bigg| &\displaystyle \\&\displaystyle =\bigg| \sum_k \int\limits_{Y_k} \big[ u^2(x_i,t^n;y) - \big(u_{ik}^n\big)^2 \big]\,\mu(y)\,dy \bigg| &\displaystyle \\&\displaystyle = \bigg| \sum_k \int\limits_{Y_k} \big[ u(x_i,t^n;y) - u_{ik}^n \big] \sqrt{\mu(y)}\,\big[ u(x_i,t^n;y) + u_{ik}^n \big] \sqrt{\mu(y)}\,dy \bigg| &\displaystyle \\&\displaystyle \leqslant \bigg| \sum_k \bigg(\int\limits_{Y_k} \big[ u(x_i,t^n;y) - u_{ik}^n \big]^2\,\mu(y)\,dy \bigg)^{1/2} \cdot \bigg(\int\limits_{Y_k} \big[ u(x_i,t^n;y) + u_{ik}^n \big]^2\,\mu(y)\,dy \bigg)^{1/2} \bigg| &\displaystyle \\&\displaystyle \leqslant C \bigg| \sum_k \bigg(\int\limits_{Y_k} \big[ u(x_i,t^n;y) - u_{ik}^n \big]^2\,\mu(y)\,dy \bigg)^{1/2} \bigg| &\displaystyle \\&\displaystyle \leqslant C \sum_k \bigg( \int\limits_{Y_k} \big| u(x_i,t^n;y) - u_{ik}^n \big|{}^2\,\mu(y)\,dy \bigg)^{1/2} &\displaystyle \\&\displaystyle \leqslant C \sup_{Y_k} \big| u(x_i,t^n;y) - u_{ik}^n \big| \bigg( \int\limits_Y \mu(y)\,dy \bigg)^{1/2} = C \sup_{Y_k} \big| u(x_i,t^n;y) - u_{ik}^n \big|, \end{array} \end{aligned} $$
(44)

and hence

$$\displaystyle \begin{aligned} \big\|{\mathbb{E}}[u^2] - E_h[u_h^2]\big\|{}_{L^{\infty}(D)} \leqslant C \| u - u_h \|{}_{L^{\infty}(D\times Y)}. \end{aligned} $$
(45)

For the second term we have

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle &\displaystyle \big\|\big({\mathbb{E}}[u](x_i,t^n)\big)^2 - \big(E_h[u_h]_i^n\big)^2\big\|{}_{L^{\infty}(D)} \\&\displaystyle &\displaystyle \qquad \qquad = \big\|\big({\mathbb{E}}[u](x_i,t^n) - E_h[u_h]_i^n\big)\big({\mathbb{E}}[u](x_i,t^n) + E_h[u_h]_i^n\big)\big\|{}_{L^{\infty}(D)} \\ &\displaystyle &\displaystyle \qquad \quad \leqslant \big\|{\mathbb{E}}[u](x_i,t^n) - E_h[u_h]_i^n\big\|{}_{L^{\infty}(D)} \big\|{\mathbb{E}}[u](x_i,t^n) + E_h[u_h]_i^n\big\|{}_{L^{\infty}(D)} \\&\displaystyle &\displaystyle \qquad \quad \quad \quad \leqslant C \big\|{\mathbb{E}}[u](x_i,t^n) - E_h[u_h]_i^n \big\|{}_{L^{\infty}(D)} \leqslant C \| u - u_h \|{}_{L^{\infty}(D\times Y)}. \end{array} \end{aligned} $$
(46)

Finally,

$$\displaystyle \begin{aligned} \big\|{\mathbb{V}}[u] - V_h[u_h]\big\|{}_{L^{\infty}(D)} \leqslant C \| u - u_h \|{}_{L^{\infty}(D\times Y)}.\end{aligned} $$

Analogous estimates can be obtained for higher moments.

3.8 Estimates in L 1-Norm

Denote by u the exact solution of (33), by \(u_h^y\) the numerical solution which is exact in x variable and discretized in y and by \(u_h^{xy}\) the numerical discretized in both variables. Assume that the numerical solution converges with rate p in x variable and rate r in y variable, that is

$$\displaystyle \begin{aligned} \| u_h^y - u_h^{xy} \|{}_{L^1(D)} \leqslant C_1 \varDelta x^p \ \forall y \in Y. \end{aligned} $$
(47)
$$\displaystyle \begin{aligned} \| u - u_h^y \|{}_{L^1(Y)} \leqslant C_2 \varDelta y^r \ \forall x \in D, \end{aligned} $$
(48)

The next estimate follows immediately from this assumption:

$$\displaystyle \begin{aligned} \| u - u_h^{xy} \|{}_{L^1(D\times Y)} \leqslant C_1 \varDelta x^p + C_2 \varDelta y^r. \end{aligned} $$
(49)

3.8.1 Convergence of \(E_h[u_h^{xy}]\) in L 1-Norm

We have

Lemma 3

The expected value of the exact solution is a deterministic function

$$\displaystyle \begin{aligned} {\mathbb{E}}[u](x_i,t^n) = \int\limits_Y u(x_i,t^n;y) \mu(y)\,dy,\end{aligned} $$
(50)

and the approximation of the expectation of the numerical solution is, as before, equal to

(51)

Then

$$\displaystyle \begin{aligned} \big\| {\mathbb{E}}[u] - {\mathbb{E}}[u_h^{xy}]\big\|{}_{L^1(D)} \leqslant C_1 \varDelta x^p + C_2 \varDelta y^r. \end{aligned} $$
(52)

Proof

(53)

The first integral in (53) can be estimated as follows:

(54)

and for the second integral we have

(55)

Hence, the convergence rate of the expectation in L 1-norm can be estimated as

$$\displaystyle \begin{aligned} \big\| {\mathbb{E}}[u] - {\mathbb{E}}[u_h^{xy}]\big\|{}_{L^1(D)} \leqslant C_1 \varDelta x^p + C_2 \varDelta y^r. \end{aligned}$$

3.8.2 Convergence of \(V_h[u_h^{xy}]\) in L 1-Norm

We have:

Lemma 4

The variance of the exact solution at (x i , t n) is equal to

$$\displaystyle \begin{aligned} {\mathbb{V}}[u](x_i,t^n) = {\mathbb{E}}\big[\big(u(x_i,t^n)-{\mathbb{E}}[u](x_i,t^n)\big)^2\big] = {\mathbb{E}}\big[u^2(x_i,t^n)\big] - \big({\mathbb{E}}[u](x_i,t^n)\big)^2, \end{aligned} $$
(56)

and can be approximated as

$$\displaystyle \begin{aligned} V_h[u_h^{xy}]_i^n = E_h\big[(u_h^{xy})^2\big]_i^n - \big(E_h[u_h^{xy}]_i^n\big)^2 = {\mathbb{E}}\big[(u_h^{xy})^2\big]_i^n - \big({\mathbb{E}}[u_h^{xy}]_i^n\big)^2 = {\mathbb{V}}[u_h^{xy}]_i^n. \end{aligned} $$
(57)

Then

$$\displaystyle \begin{aligned} \big\|{\mathbb{V}}[u] - {\mathbb{V}}[u_h^{xy}] \big\|{}_{L^1(D)} \leqslant C_1\varDelta x^p + C_2 \varDelta y^r. \end{aligned} $$
(58)

Proof

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle &\displaystyle \big\|{\mathbb{V}}[u] - {\mathbb{V}}[u_h^{xy}] \big\|{}_{L^1(D)} = \big\| {\mathbb{E}}\big[u^2\big] - \big({\mathbb{E}}[u]\big)^2 - {\mathbb{E}}\big[(u_h^{xy})^2\big] + \big({\mathbb{E}}[u_h^{xy}]\big)^2 \big\|{}_{L^1(D)} \\&\displaystyle &\displaystyle \qquad \leqslant \big\| {\mathbb{E}}\big[u^2\big] - {\mathbb{E}}\big[(u_h^{xy})^2\big] \big\|{}_{L^1(D)} + \big\| \big({\mathbb{E}}[u]\big)^2 - \big({\mathbb{E}}[u_h^{xy}]\big)^2 \big\|{}_{L^1(D)}. \end{array} \end{aligned} $$
(59)

The following estimate holds for the first integral in (59):

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle &\displaystyle \big\| {\mathbb{E}}\big[u^2\big] - {\mathbb{E}}\big[(u_h^{xy})^2\big] \big\|{}_{L^1(D)} = \int\limits_D \big| {\mathbb{E}}\big[u^2\big] - {\mathbb{E}}\big[(u_h^{xy})^2\big] \big|\,dx = \\ &\displaystyle &\displaystyle \qquad = \int\limits_D \bigg| \int\limits_Y \big[ u^2 - (u_h^{xy})^2 \big]\,\mu(y)\,dy \bigg|\,dx \leqslant \int\limits_D \int\limits_Y \big| u^2 - (u_h^{xy})^2 \big|\,\mu(y)\,dydx = \\ &\displaystyle &\displaystyle \qquad \quad = \int\limits_D \int\limits_Y \big| u - u_h^{xy} \big| \big| u + u_h^{xy} \big|\,\mu(y)\,dydx \leqslant C \int\limits_D \int\limits_Y \big| u - u_h^{xy} \big|\,dydx = \\ &\displaystyle &\displaystyle \qquad \qquad \qquad \qquad = C \| u - u_h^{xy} \|{}_{L^1(D\times Y)} \leqslant C \varDelta x^p + C_7 \varDelta y^r. \end{array} \end{aligned} $$
(60)

For the second integral in (59) we get

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle &\displaystyle \big\| \big({\mathbb{E}}[u]\big)^2 - \big({\mathbb{E}}[u_h^{xy}]\big)^2 \big\|{}_{L^1(D)} = \int\limits_D \big| \big({\mathbb{E}}[u]\big)^2 - \big({\mathbb{E}}[u_h^{xy}]\big)^2 \big|\,dx = \\&\displaystyle &\displaystyle \qquad \quad \qquad = \int\limits_D \big| {\mathbb{E}}[u] - {\mathbb{E}}[u_h^{xy}] \big| \big| {\mathbb{E}}[u] + {\mathbb{E}}[u_h^{xy}] \big| \,dx \leqslant \\ &\displaystyle &\displaystyle \qquad \qquad \qquad \qquad \leqslant C \big\| {\mathbb{E}}[u] - {\mathbb{E}}[u_h^{xy}]\big\|{}_{L^1(D)} \leqslant C_1 \varDelta x^p + C_2 \varDelta y^r. \end{array} \end{aligned} $$
(61)

Finally, from (60)–(61) we get

$$\displaystyle \begin{aligned} \big\|{\mathbb{V}}[u] - {\mathbb{V}}[u_h^{xy}] \big\|{}_{L^1(D)} \leqslant C_1\varDelta x^p + C_2 \varDelta y^r. \end{aligned}$$

Similar estimates are also valid for higher moments of u.

3.9 Error vs Work Estimates for SFVM

In the previous section it has been shown that the error of the expectation approximation is given by

$$\displaystyle \begin{aligned} E = \big\| {\mathbb{E}}[u] - {\mathbb{E}}[u_h^{xy}]\big\|{}_{L^1(D)} \leqslant C_1 \varDelta x^p + C_2 \varDelta y^r, \end{aligned} $$
(62)

where p and r are the convergence rates of the SFVM solver in physical and stochastic variables, respectively. Based on this result, we derive the error vs work estimates for SFVM.

Let \(x \in {\mathbb {R}}^n\), \(y \in {\mathbb {R}}^m\). Assume that the CFL condition is satisfied, such that Δt = O(Δx). The total work W (or total time) required to compute the solution of the stochastic scalar conservation law using SFVM is proportional to the total numbers of grid points in x, y and t axes, denoted respectively by N x , N y and N t , i.e.

$$\displaystyle \begin{aligned} W = C N_x N_y N_t = C \dfrac{1}{\varDelta x^n}\dfrac{1}{\varDelta y^m}\dfrac{1}{\varDelta t} = \dfrac{C}{\varDelta x^{n+1}\varDelta y^m} = C \varDelta x^{-(n+1)}\varDelta y^{-m}. \end{aligned} $$
(63)

Further derivation of the estimate depends on the choice of the mesh sizes equilibration, that is, on the relation between Δx and Δy.

  1. 1.

    Assume that the mesh sizes are equilibrated according to the expected orders of convergence p and r: Δy = Δx p/r. Then E = CΔx p and Δx = CE 1/p. Substituting these relations into Eq. (63) we get

    $$\displaystyle \begin{aligned} W = C\varDelta x^{-(n+1)}\varDelta x^{-pm/r} = C\varDelta x^{-(n+1+pm/r)} = C E^{-\frac{n+1+pm/r}{p}} \end{aligned} $$
    (64)

    and hence

    $$\displaystyle \begin{aligned} E = C W^{-\frac{p}{n+1+pm/r}}, \end{aligned} $$
    (65)

    which is the desired error vs work estimated.

  2. 2.

    Assume now that the mesh size Δy is obtained by the following scaling: Δy = ηΔx, where η is the constant scaling factor, meaning that the stochastic mesh is isotropic (same Δy for all random variables). Define \(q = \min (p,r)\). Then E = CΔx q and Δx = CE 1/q, and the total work is defined as

    $$\displaystyle \begin{aligned} W = C \varDelta x^{-(n+1)}\varDelta y^{-m} = C \varDelta x^{-(n+m+1)} = C E^{-\frac{n+m+1}{q}}, \end{aligned} $$
    (66)

    which finally gives

    $$\displaystyle \begin{aligned} E = C W^{-\frac{q}{n+m+1}}.\end{aligned} $$
    (67)

    Note that the estimate (67) is equivalent to the complexity result for the deterministic finite-volume method in the (n + m)-dimensional space, which sets strict limitations on the number of random variables that can be handled by the SFVM if the scaling factor η is close to 1. However, computational practice shows that it is sufficient to use few computational cells to discretize the equations in the stochastic space to obtain a good quality approximation of the statistical quantities and therefore the SFVM is essentially much more efficient as deterministic FVM. Another significant simplification of the approach is the absence of the fluxes in the stochastic variables y, which also contributes to the efficiency of the SFVM.

  3. 3.

    Assume that the stochastic mesh is anisotropic, that is the mesh sizes Δy k are different for k = 1, …, m: Δy k  = η k Δx. Applying the same technique as above we obtain

    $$\displaystyle \begin{aligned} E = C_1\varDelta x + C_2\sum_{k=1}^m\varDelta y_k^r = C_1 \varDelta x + C_2 \varDelta x^r \sum_{k=1}^m\eta_k^r \leqslant C\varDelta x^q\big( 1 + \sum_{k=1}^m \eta_k^r \big), \end{aligned} $$
    (68)

    where \(q = \min (p,r)\) as before. We have also assumed that Δx << 1 such that Δx p < Δx q and Δx r < Δx q. Then the mesh size Δx can be represented as

    $$\displaystyle \begin{aligned} \varDelta x = \Bigg(\dfrac{E}{1+\sum_{k=1}^m\eta_k^r}\Bigg)^{1/q}. \end{aligned} $$
    (69)

    The total work is

    $$\displaystyle \begin{aligned} W = C \Big( \prod_{k=1}^m \eta_k^{-1} \Big) \varDelta x^{-(n+m+1)} = C \Big( \prod_{k=1}^m \eta_k^{-1} \Big) \Bigg(\dfrac{E}{1+\sum_{k=1}^m\eta_k^r}\Bigg)^{-(n+m+1)/q}, \end{aligned} $$
    (70)

    and the resulting error vs work estimate is

    $$\displaystyle \begin{aligned} E = C \big( 1 + \sum_{k=1}^m \eta_k^r \big) \Big(\prod_{k=1}^m \eta_k^{-\frac{q}{n+m+1}}\Big) W^{-\frac{q}{n+m+1}}. \end{aligned} $$
    (71)

    Note that in the isotropic case, when all η k  = η = const, formula (71) results in

    $$\displaystyle \begin{aligned} E = C(1+m\eta^r)\, \eta^{-\frac{qm}{n+m+1}}\,W^{-\frac{q}{n+m+1}}. \end{aligned} $$
    (72)

    Comparing (71) and (72) we notice that the proper choice of scaling factors η k in the anisotropic stochastic mesh construction, while not affecting the convergence rates, can reduce the convergence constant, which means increasing computational efficiency. The choice of η k should be based on the sensitivity analysis of the random entropy solution to each of the m random variables.

    Let us demonstrate the efficiency provided by the anisotropic mesh adaptation. We compare the convergence constants:

    $$\displaystyle \begin{aligned} C_i = (1+m\eta^r)\, \eta^{-\frac{qm}{n+m+1}}\end{aligned} $$
    (73)

    for the isotropic mesh with equal mesh sizes in all stochastic coordinates, Δy k  = ηΔx, k = 1, …, m, and

    $$\displaystyle \begin{aligned} C_a = \big( 1 + \sum_{k=1}^m \eta_k^r \big) \prod_{k=1}^m \eta_k^{-\frac{q}{n+m+1}}\end{aligned} $$
    (74)

    for the anisotropic stochastic mesh with mesh size scaling according to Δy k  = η k Δx, k = 1, …, m. Assume further that η 1 > η 2 > …η m and η k  > 1 for all k, such that Δy k  > Δx.

    Our goal is to show that the convergence constants ratio \(\delta _m = \dfrac {C_i}{C_a} > 1\) as m → if η 1 < η and r > q, that is, the anisotropic stochastic mesh increases the algorithm efficiency as the number of random variables grows if the convergence rate r in the stochastic space is higher than q, the minimum of the convergence rates in physical and stochastic coordinates.

    We start by noting that under the assumption η 1 < η the following inequality is valid:

    $$\displaystyle \begin{aligned} C_a = \big( 1 + \sum_{k=1}^m \eta_k^r \big) \prod_{k=1}^m \eta_k^{-\frac{q}{n+m+1}} < (1 + m\eta_1^r) \eta_1^{-\frac{qm}{n+m+1}} = C_a^1, \end{aligned} $$
    (75)

    and therefore

    $$\displaystyle \begin{aligned} \delta_m = \dfrac{C_i}{C_a} > \dfrac{C_i}{C_a^1} = \dfrac{(1+m\eta^r)\, \eta^{-\frac{qm}{n+m+1}}}{(1 + m\eta_1^r) \eta_1^{-\frac{qm}{n+m+1}}} = \bigg(\dfrac{1 + m\eta^r}{1 + m\eta_1^r}\bigg)\bigg(\dfrac{\eta}{\eta_1}\bigg)^{-\frac{qm}{n+m+1}}. \end{aligned} $$
    (76)

    Hence, the limit of the constants ratio is

    $$\displaystyle \begin{aligned} \delta = \lim\limits_{m \to \infty} \delta_m = \bigg(\dfrac{\eta}{\eta_1}\bigg)^{r-q}, \end{aligned} $$
    (77)

    and clearly δ > 1 if r > q.

Let’s analyse in more detail the possible values of δ in dependence on the convergence rates p and r in x and y variables, respectively.

Smooth Solution

If the solution is smooth in x and y, then the convergence rate of the SFVM is the expected one, therefore by applying high-order finite-volume approximations in both variables one can obtain the full convergence rates p and r.

  • If p < r, then \(q = \min (p,r) = p\) and r − q = r − p > 0, δ > 1 and hence the SFVM will converge faster on anisotropic stochastic mesh.

  • If p > r, then \(q = \min (p,r) = p\) and r − q = r − p < 0, δ < 1, therefore the anisotropic mesh doesn’t improve the convergence.

Shock Solution

Recall that if the shock wave appears in the physical space, then it also propagates into the stochastic space, so that the solution becomes discontinuous in both x and y. In this case one typically has p = 1/2 according to the Kuznetsov’s result [20] and r = 1 as shown in [27], therefore \(q = \min (p,r) = 1/2\) and \(\delta = \sqrt {\frac {\eta }{\eta _1}} > 1\). This means that the SFVM on anisotropic mesh in the stochastic space is more efficient than SFVM on the uniform mesh even if the solution has a shock.

3.10 Anisotropic Mesh Adaptation for Euler Equations

We reconsider the stochastic Sod’s shock tube problem and apply the anisotropic stochastic mesh adaptation which is similar to the one proposed for the scalar conservation laws with Karhunen-Loève flux (or initial data) expansion. Clearly, such an expansion is not available for the realistic systems of conservation laws like the Euler equations since the flux function and the random variables are pre-defined. However, it is possible to scale the random variables according to their influence on the random solution based on empirical considerations.

For the stochastic version of Sod’s shock tube problem studied above, one can see that the uncertainty in the γ flux coefficient is practically unimportant (but not negligible) for the statistical solution, while the uncertain initial discontinuity location as well as random density amplitude being most important. Therefore we propose the following scaling for the number of cells in the stochastic coordinates: \(N_y^i = C N_x \lambda _i\), where we take C = 1/32 and λ 1 = 3 (random shock location), λ 2 = 2 (random density amplitude) and λ 3 = 1 (random γ).

Figures 17, 18 and 19 demonstrate the convergence for the density for the 1st, 3rd and 5th order WENO reconstruction in stochastic coordinates y k , k = 1, 2, 3, respectively. Each of the plots contains the results for 1st, 3rd and 5th order WENO reconstruction in the physical coordinate x. The results are presented for both adaptive and non-adaptive meshes in the stochastic space and clearly show the superior efficiency of the adaptive SFVM algorithm.

Fig. 17
figure 17

Adaptive vs non-adaptive mesh, 1st order WENO in y k , k = 1, 2, 3

Fig. 18
figure 18

Adaptive vs non-adaptive mesh, 3rd order WENO in y k , k = 1, 2, 3

Fig. 19
figure 19

Adaptive vs non-adaptive mesh, 5th order WENO in y k , k = 1, 2, 3

3.11 Numerical Approximation of the Probability Density Function for the Random Solution of Euler Equations

The advantage of the SFV method is the possibility to construct the empirical probability density functions (statistical histograms) after only one run since the complete information about the random solution is generated (that is, its approximation as a function of x and y k is provided).

We demonstrate the performance of SFVM for the approximation of the probability density functions for the solution of the stochastic Sod’s shock tube problem. To this end, we solve the problem using the SFVM with 5th order WENO reconstruction in x and y k , k = 1, 2, 3 for two cases: (1) with one uniformly distributed random variable for shock location, \(x_0 \sim \mathscr {U}[0.75,1.25]\); (2) with three random variables on the anisotropic mesh (see previous section), and plot the distribution histograms at x = 0.5 (rarefaction wave) and at x = 2 (shock wave). The number of bins to plot the diagrams is chosen according to

  • square-root choice: \(k = [\sqrt {n}\,]\), if the total number of grid points is small (practically, less than 30, like in case (1)),

  • Sturges’ formula [33]: k = [log2 n + 1], otherwise.

The corresponding histograms are presented in Figs. 20, 21, and 22 for one random variable and in Figs. 23, 24, and 25 for three random variables. For comparison, each of the plots contains the histograms for the exact solution of the problem with fine resolution in the stochastic space. The computed probability density functions indicate the bimodal character of gas parameter distributions in the stochastic Sod’s problem.

Fig. 20
figure 20

Density distribution at x = 0.5 (left) and x = 2 (right). Random initial discontinuity location

Fig. 21
figure 21

Velocity distribution at x = 0.5 (left) and x = 2 (right). Random initial discontinuity location

Fig. 22
figure 22

Pressure distribution at x = 0.5 (left) and x = 2 (right). Random initial discontinuity location

Fig. 23
figure 23

Density distribution at x = 0.5 (left) and x = 2 (right). Random initial discontinuity location, density amplitude and γ

Fig. 24
figure 24

Velocity distribution at x = 0.5 (left) and x = 2 (right). Random initial discontinuity location, density amplitude and γ

Fig. 25
figure 25

Pressure distribution at x = 0.5 (left) and x = 2 (right). Random initial discontinuity location, density amplitude and γ

4 Stochastic Finite Volume Method on Unstructured Grids

4.1 Mixed DG/FV Formulation for the Stochastic Conservation Law in Multiple Dimensions

In this section we generalize the approach to uncertainty quantification described previously in order to efficiently apply high-order approximation techniques on unstructured grid in physical domains with complicated geometry. To this end, we use the Discontinuous Galerkin (DG) method to discretize the equations in the physical space and combine it with the finite-volume discretization in the stochastic variables as described in Sect. 3. Note that we can still use Cartesian grids in the stochastic space since the computational domain in this space is a q-dimensional rectangle.

As before, we start with the parametric form of the stochastic conservation law:

$$\displaystyle \begin{aligned} \dfrac{\partial{\mathbf{U}}}{\partial{t}} + \nabla_x\cdot\mathbf{F}(\mathbf{U},\mathbf{y}) = \mathbf{0}, \ \mathbf{x} \in D_x \ \subset {\mathbb{R}}^3, \ \mathbf{y} \in D_y\subset {\mathbb{R}}^q, \ t > 0; \end{aligned} $$
(78)
$$\displaystyle \begin{aligned} \mathbf{U}(\mathbf{x},0,\mathbf{y}) = \mathbf{U}_0(\mathbf{x},\mathbf{y}), \ \mathbf{x} \in D_x \ \subset {\mathbb{R}}^3, \ \mathbf{y} \in D_y\subset {\mathbb{R}}^q. \end{aligned} $$
(79)

Let \(\mathscr {T}_x = \cup _{i=1}^{N_x} K_x^i\) be the triangulation of the computational domain D x in the physical space and \(\mathscr {C}_y = \cup _{j=1}^{N_y}K_y^j\) be the Cartesian grid in the domain D y of the parametrized probability space. On each element \(K_x^i\) of the physical domain triangulation we apply the DG discretization of solution in the physical variable x, that is, on each element of the triangulation we choose a system of basis functions {φ l (x)}, l = 1, …, p, and represent the numerical solution as the decomposition over the chosen basis

$$\displaystyle \begin{aligned} \mathbf{U}_h(\mathbf{x},t,\mathbf{y}) = \sum_{l=1}^p \mathbf{U}_l^i(t,\mathbf{y})\varphi_l(\mathbf{x}), \ x \in K_x^i, \end{aligned} $$
(80)

with the coefficients U l (t, y) to be determined. Next, according to the DG discretization procedure, we multiply the governing Eqs. (78)–(79) to each of the basis functions φ k , k = 1, …, p and integrate the result over the element \(K_x^i\). Application of the Gauss’ theorem to the volume integral yields the following semi-discrete DG formulation ∀k = 1, …, p:

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} \sum_{l=1}^p \partial_{t} \mathbf{U}_l^i(t,\mathbf{y}) \int\limits_{K_x^i} \varphi_l(\mathbf{x}) \varphi_k(\mathbf{x})\,d\mathbf{x} &\displaystyle +&\displaystyle \int\limits_{\partial K_x^i} \mathbf{F}(\mathbf{U}_h,\mathbf{y}) \cdot\mathbf{n}\,\varphi_k(\mathbf{x})\,d\mathbf{x} - \\&\displaystyle &\displaystyle - \int\limits_{K_x^i} \mathbf{F}(\mathbf{U}_h,\mathbf{y}) \nabla\varphi_k(\mathbf{x})\,d\mathbf{x} = \mathbf{0}. \end{array} \end{aligned} $$
(81)
$$\displaystyle \begin{aligned} \sum_{l=1}^p \mathbf{U}_l^i(0,\mathbf{y}) \int\limits_{K_x^i} \varphi_l(\mathbf{x}) \varphi_k(\mathbf{x})\,d\mathbf{x} = \int\limits_{K_x^i} \mathbf{ U}_0(\mathbf{x},\mathbf{y}) \varphi_k(\mathbf{x})\,d\mathbf{x}. \end{aligned} $$
(82)

The physical flux F(U h , y) ⋅n is in general discontinuous across the cell boundary and therefore needs to be replaced by any standard numerical flux approximation \(\hat {\mathbf {F}}(\mathbf {U}^{int}_{h},\mathbf {U}^{ext}_{h},\mathbf {y})\) depending on two boundary extrapolated solution values \(\mathbf {U}^{int}_{h}\) and \(\mathbf {U}^{ext}_{h}\) (inside and outside of the cell, respectively) Note that at this stage the DG coefficients \(\mathbf {U}_l^i(t,\mathbf {y})\) are still functions of the random variable y and time t and thus to get rid of this dependence we introduce the DG coefficients averaged over an element of the stochastic grid

$$\displaystyle \begin{aligned} \mathbf{U}_{l}^{ij}(t) = \dfrac{1}{|K_y^j|} \int\limits_{K_y^j} \mathbf{U}_l^i(t,\mathbf{y})\,\mu(\mathbf{y})\,d\mathbf{y} \end{aligned}$$

and apply the finite-volume discretization over each cell \(K_y^j\) in the random variable, which leads to

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle &\displaystyle \sum_{l=1}^p \int\limits_{K_y^j} \bigg[\partial_{t} \mathbf{U}_l^i(t,\mathbf{y}) \int\limits_{K_x^i} \varphi_l(\mathbf{x}) \varphi_k(\mathbf{x})\,d\mathbf{x} \bigg]\,\mu(\mathbf{y})\,d\mathbf{y} + \\&\displaystyle &\displaystyle \qquad \qquad + \int\limits_{K_y^j} \bigg[ \int\limits_{\partial K_x^i} \hat{\mathbf{F}}(\mathbf{ U}^{int}_{h},\mathbf{U}^{ext}_{h},\mathbf{y})\,\varphi_k(\mathbf{x})\,d\mathbf{x} \bigg] \,\mu(\mathbf{y})\,d\mathbf{y} - \\&\displaystyle &\displaystyle \qquad \quad - \int\limits_{K_y^j} \bigg[ \int\limits_{K_x^i} \mathbf{F}(\mathbf{U}_h,\mathbf{y}) \nabla\varphi_k(\mathbf{x})\,d\mathbf{x} \bigg] \,\mu(\mathbf{y})\,d\mathbf{ y} = \mathbf{0}, \quad k = 1,\dots,p. \end{array} \end{aligned} $$
(83)

Finally, the resulting scheme becomes

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} &\displaystyle &\displaystyle \sum_{l=1}^p \dfrac{d{\mathbf{U}_{l}^{ij}(t)}}{d{t}} \int\limits_{K_x^i} \varphi_l(\mathbf{x}) \varphi_k(\mathbf{x})\,d\mathbf{x} + \dfrac{1}{|K_y^j|}\iint\limits_{K_y^j \partial K_x^i} \hat{\mathbf{F}}(\mathbf{U}^{int}_{h},\mathbf{U}^{ext}_{h},\mathbf{y})\,\varphi_k(\mathbf{x})\,\mu(\mathbf{ y})d\mathbf{x}d\mathbf{y} - \\&\displaystyle &\displaystyle \qquad \qquad - \dfrac{1}{|K_y^j|}\iint\limits_{K_y^j K_x^i} \mathbf{F}(\mathbf{U}_h,\mathbf{y}) \nabla\varphi_k(\mathbf{x})\,\mu(\mathbf{y})d\mathbf{x}d\mathbf{y} = \mathbf{ 0}, \quad k = 1,\dots,p. \end{array} \end{aligned} $$
(84)

The initial data for \(\mathbf {U}_{l}^{ij}(t)\) is obtained similarly: for k = 1, …, p

$$\displaystyle \begin{aligned} \sum_{l=1}^p \mathbf{U}_{l}^{ij}(0) \int\limits_{K_x^i} \varphi_l(\mathbf{x}) \varphi_k(\mathbf{x})\,d\mathbf{x} = \dfrac{1}{|K_y^j|} \iint\limits_{K_y^j K_x^i} \mathbf{U}_0(\mathbf{x},\mathbf{y}) \varphi_k(\mathbf{x})\,\mu(\mathbf{y})d\mathbf{x}d\mathbf{y}. \end{aligned} $$
(85)

Equations (84)–(85) form an ODE system with respect to the coefficients \(\mathbf {U}_{l}^{ij}(t)\) which can be solved using the Runge-Kutta method of the appropriate order. The slope limiting procedure has to be applied at each intermediate stage of the Runge-Kutta method in order to ensure the stability of the resulting DG scheme. This is done using the algorithm proposed in [9].

4.2 Numerical Results

4.2.1 Stochastic Cloud-Shock Interaction Problem (Random Flux)

Consider the two-dimensional Euler equations with deterministic initial data

$$\displaystyle \begin{aligned}{}[\rho_0, u_0, v_0, p_0] = \begin{cases} [3.86859, 11.2536, 0, 167.345], \text{ if } x_1 < 0.05, \\ {} [1, 0, 0, 1], \text{ if } x_1 > 0.05, \end{cases} \end{aligned}$$

and a high-density cloud lying to the right of the shock:

$$\displaystyle \begin{aligned} \rho_0 = 10, \text{ if } \sqrt{(x_1-0.25)^2 + (x_2-0.5)^2} \leqslant 0.15. \end{aligned}$$

Assume the random γ = γ(ω) in the equation of state (EOS)

$$\displaystyle \begin{aligned}p = (\gamma(\omega)-1)\Big(E-\frac 12\rho(u^2+v^2)\Big), \end{aligned}$$
$$\displaystyle \begin{aligned} \gamma(\omega) \sim \mathscr{U}\big(5/3- \epsilon,5/3+\epsilon\big), \ \epsilon = 0.1 \end{aligned}$$

The results of the simulation are presented in Fig. 26. In our computations we have used the 2nd order DG method in x variable and 3rd order WENO method in y variable, triangular mesh in x consisting of about 170,000 cells and Cartesian mesh in y consisting of 16 cells. Note that no symmetry conditions have been imposed on the mesh. The results are plotted at T = 0.06.

Fig. 26
figure 26

Stochastic cloud-shock interaction problem (Reproduced with permission from [34])

4.2.2 Forward-Facing Step Channel

Consider the stochastic flow in the channel with the forward facing step with random Mach number of the inflowing gas: \( \operatorname {\mathrm {M}} \sim \mathscr {U}(2.9,3.1)\). We have used the mesh of about 13,000 triangular cells in the physical space and 15 equally-sized cells in the stochastic space, the methods used are 2nd order DG and 3rd order WENO in physical and random variables, respectively. The results of the simulation are given in Fig. 27, indicating that the uncertainty in the Mach number influences the position and intensity of shock in front of the step, while having little effect on the shocks reflected from the channel walls.

Fig. 27
figure 27

Stochastic flow in a forward-facing step channel (Reproduced with permission from [34])

4.2.3 Stochastic Cloud-Shock Interaction Problem (Random IC)

We use the mesh adaptation approach similar to the one described in Sect. 3.4 to solve the stochastic cloud-shock interaction problem with initial data depending on four random variables. Note that the usage of non-adaptive algorithm for such simulation would lead to excessive computational cost of SFVM.

Consider the two-dimensional Euler equations with deterministic initial data

$$\displaystyle \begin{aligned} \mathbf{W}_0 = \begin{cases} [3.86859 + 0.1 Y_2(\omega), 11.2536, 0, 167.345], \text{ if } x_1 < 0.04 + 0.01 Y_1(\omega), \\ {} [1, 0, 0, 1], \text{ if } x_1 > 0.04 + 0.01 Y_1(\omega), \end{cases} \end{aligned}$$

with a high-density cloud to the right of the shock:

$$\displaystyle \begin{aligned} \rho_0 = 10 + 0.5 Y_3(\omega), \text{ if } \sqrt{(x_1-0.25)^2 + (x_2-0.5)^2} \leqslant 0.15 + 0.02 Y_4(\omega). \end{aligned}$$

The equations are closed by the following deterministic EOS: \(p = (\gamma -1)\Big (E-\frac 12\rho (u^2+v^2)\Big )\), γ = 5/3. The random variables in the initial condition are uniformly distributed on [0, 1]: \(Y_k \sim \mathscr {U}[0,1], \ k = 1,\dots ,4.\)

We use the 2nd order DG in x variable and 3rd order WENO in y variable, triangular mesh in x (170,000 cells) and adaptive Cartesian mesh in y (3 ⋅ 2 ⋅ 7 ⋅ 11 = 462 cells), the output time is T = 0.06. The results of this simulation are illustrated in Fig. 28.

Fig. 28
figure 28

Stochastic cloud-shock interaction problem (Reproduced with permission from [34])

4.2.4 Flow Past a Cylinder

We have applied the SDGFV method for the simulation of the stochastic flow around a cylinder which is modeled by the Navier-Stokes equations. For this study we have chosen one random variable random variables: \(Y_0 \sim \mathscr {U}[-1,1]\) describing the uncertainty in the Reynolds number. The free-stream flow parameters are following:

  • Angle of attack (degrees): α = 0

  • Mach number: M = 0.1

  • Reynolds number: Re = 2000.0 + 500.0 Y 0(ω)

Note that the difference of 500 in Reynolds numbers corresponds to the difference in speeds of about 5 m/s which in turn leads to the fluctuation of Mach numbers of only 5% which is negligible compared to 25% fluctuation of the Reynolds number. Therefore the reduction of the number of random variables to one in this simulation appears to be reasonable.

The results of the computations (mean, variance and deterministic distribution of Mach numbers) are presented in Fig. 29. For this simulation we again use the 2nd order DG in x variable and 3rd order WENO method in y variable, the computations are performed on a physical mesh consisting of 6434 triangular cells and a Cartesian mesh in stochastic space consisting of 16 elements, the output time is T = 18.0.

Fig. 29
figure 29

Flow around a cylinder. Mach number contour lines

4.2.5 Flow Around NACA0012 Airfoil

We next study the stochastic transonic flow around the NACA0012 wing profile. The flow is modeled by the system of Euler equations with uncertainty in the free-stream parameters:

  • Angle of attack (degrees): α = 1.25 + 0.05 Y 0(ω)

  • Mach number: M = 0.8 + 0.05 Y 1(ω)

The random variables Y 0 and Y 1 are uniformly distributed: \(Y_0, Y_1 \sim \mathscr {U}[-1,1]\). The results of this simulation are presented in Figs. 30, 31, and 32. We use the 2nd order DG in x variable and 3rd order WENO method in y variable, triangular mesh in x consisting of 92,023 elements and two-dimensional Cartesian mesh in y consisting of 64 elements, the output time is T = 10.0. In Fig. 30, the contour lines illustrate the mean value and variance of the Mach number as well as its deterministic values around the wing profile. Clearly, two shock waves are present in the deterministic run: one on the lower and one on the upper surface of the profile (see Fig. 31 for the distribution of the pressure coefficients). These shock waves however are smoothed in the mean flow, which is in accordance with the results of [31]. Finally, the approximations of the probability density functions for the distribution of the drag and lift coefficients are given in Fig. 32.

Fig. 30
figure 30

Inviscid transonic flow around NACA0012 airfoil. Mach number contour lines

Fig. 31
figure 31

Inviscid transonic flow around NACA0012 airfoil. Pressure coefficients

Fig. 32
figure 32

Inviscid transonic flow around NACA0012 airfoil. Distribution of drag (left) and lift (right) coefficients

4.2.6 Flow Around NACA23012 Airfoil with Flap

We run the NACA23012 airfoil simulation with the following parameters:

Random variables: \(Y_0, Y_1 \sim \mathscr {U}[-1,1]\).

Free-stream flow parameters:

  • Angle of attack (degrees): α = 8.0 + 0.5 Y 0(ω)

  • Flap deflection angle (degrees): α f  = 30

  • Mach number: M = 0.1 + 0.015 Y 1(ω)

  • Reynolds number: Re = 2100000.0 + 300000.0 Y 1(ω)

  • Prandtl number: Pr = 0.72

In order to run this simulation we adapt the stochastic mesh as follows: we take \(N_y^0 = 3\) cells in the stochastic coordinate Y 0 and \(N_y^1 = 6\) cells in the coordinate Y 1. The adaptation is based on a simple argument that the range of random angles of attack makes about 6% of its mean value (0.5/8 = 0.0625) and the range of both random Mach and Reynolds numbers makes 15% of the mean value, which results in double number of cells. This simulation has been performed on a triangular physical mesh of 17,418 cells, the numerical methods used are 2nd order DG in physical variables and 1st order FV in stochastic variables. The results of the simulation at time is T = 1.0 are presented in Fig. 33.

Fig. 33
figure 33

Flow around NACA23012 airfoil with flap. Mach number contour lines

4.2.7 Flow Around RAE2822 Airfoil

Finally, we perform the stochastic simulation of the flow around the RAE2822 airfoil. The setup of the deterministic problem is the following.

  • Angle of attack (degrees): α  = 2.31

  • Mach number: M  = 0.729

  • Reynolds number: Re  = 6.5 × 106

The random parameters are modeled by means of the Beta distribution on [ y L , y R ]:

$$\displaystyle \begin{aligned} B(y,a,b) = \dfrac{1}{B(a,b)} (y-y_L)^{a-1}(y_R-y)^{b-1} (y_R-y_L)^{-(a+b-1)}\end{aligned}$$

In this simulation, we assume that the angle of attach and the Mach numbers are random variables defined by

  • α (ω) ∼ B(y, a, b) with a = b = 4, y L  = 0.98α , y R  = 1.02α

  • M (ω) ∼ B(y, a, b) with a = b = 4, y L  = 0.95M , y R  = 1.05M

We use the 2nd order DG method in x and 3rd order WENO reconstruction in y, triangular mesh in x (258,476 elements) and 2D Cartesian mesh in y (64 elements). The results of the simulation are presented in Fig. 34.

Fig. 34
figure 34

Flow around RAE2822 airfoil

4.3 Parallel Algorithm and Parallel Efficiency of the SFVM

In the previous section we have presented a number of simulations of stochastic flows performed with the SFV method. Clearly, simulations with high-order methods involving complicated geometries and flow phenomena are computationally intensive even in the deterministic case and become much more costly in the presence of uncertainly. Therefore all of the described algorithms have been implemented in parallel using the Message Passing Interface (MPI) library. The basic parallelization principle used is the domain decomposition method which is applied in both physical space (on unstructured grid) and stochastic space (on Cartesian grid). The DG method used to approximate the random solution in the physical space allows to keep the approximation stencil compact. On the unstructured triangular mesh the compact consists of four triangles regardless of the order of the method. Therefore, the number of the mesh elements which need to exchange information between the processors is relatively small compared to the total number of elements in one subdomain.

In order to obtain partition of complicated computational domains we use the METIS library. A typical partition generated by METIS is presented in Fig. 35. Here, different colours indicate different subdomains.

Fig. 35
figure 35

Partition generated by METIS

Table 5 lists the computational time per two timesteps, the speedup of the algorithm and efficiency with respect to the number of cores, for the simulation of the transonic flow around NACA0012 airfoil described in the previous section. The physical mesh consists of approximately 90,000 triangles and the stochastic mesh has 8 × 8 elements. The corresponding plot of the algorithm speedup is presented in Fig. 36.

Fig. 36
figure 36

Algorithm speedup

Table 5 Parallel efficiency of SFVM

Therefore, the SFV method can be efficiently parallelized and used for uncertainty quantification in multidimensional systems of conservation laws on complicated physical domains with unstructured meshes.

5 Other Applications

Thanks to its flexibility, this method has several other applications.

5.1 Nozzle Flow with Shock

The steady shocked flow in a convergent-divergent nozzle is taken into account with a fixed (deterministic) geometry:

$$\displaystyle \begin{aligned} A(x)=\left\{ \begin{array}{lll} 1 + 6 (x-\frac{1}{2})^2 & \mbox{for} & 0 < x \leqslant \frac{1}{2} \\ 1 + 2 (x-\frac{1}{2})^2 & \mbox{for} & \frac{1}{2} < x \leqslant 1 \end{array} \right. \end{aligned} $$
(86)

The outlet pressure (subsonic outlet flow with p e  = 1.6529 bar) is chosen in order to have a compression shock in the divergent part of the nozzle, exactly located at x = 0.75. For the other boundary conditions a subsonic inlet flow with a stagnation pressure p 0 = 2 bar and a stagnation temperature T 0 = 300 K are considered. The mean of γ is 1.4. Two test cases are considered. First, an uncertain heat coefficient ratio γ is assumed. The random parameter ω = γ varies within the range [1.33, 1.47], following various choices of pdf (uniform and discontinuous) described below. In the second test-case, two-uncertainties stochastic problem is solved where γ follows a discontinuous pdf and the subsonic outlet flow varies uniformly within the range [1.6529 ± 0.98, 1.6529 ± 1.02].

The random parameter ω (defining either the heat ratio or the subsonic outlet flow) ranges between ω min and ω max ; the interval [ω min , ω max ] is mapped onto [a, b] by a linear transformation and the pdf on [a, b] is either:

  • uniform with ω ∈ [a, b] = [0, 1],

  • discontinuous on [a, b] = [0, 1] with a density defined by:

    $$\displaystyle \begin{aligned} f(\gamma)=\dfrac{1}{M}\times\left \{ \begin{array}{ll} \dfrac{1+\cos{}(\pi x)}{2}& \text{if } x\in [0.5,1]\\ 10+\dfrac{1+\cos{}(\pi x)}{2}& \text{if } x\in [0,0.5]\\ 0& \text{else} \end{array}\right . {} \end{aligned} $$
    (87)

    and \(M=\tfrac {11}{2}\) to ensure normalization.

Different stochastic methods are used to compute statistic solutions of the supersonic nozzle. Different pdf are used for γ, i.e. uniform in order to compare MC-SOBOL, PC and SI, and the discontinuous pdf (87) in order to compare MC-SOBOL and SI and to demonstrate the flexibility offered by the SI method. After a study on the grid convergence, the 1D physical space is divided in 201 points (with the normalized geometric domain that varies from 0 to 1). A preliminary convergence study with respect to the stochastic estimation has been realized, by using an increasing refinement of the probabilistic space discretization in the case of the SI method, and an increasing polynomial order in the case of PC method. The probabilistic space discretization varies from 5 to 160 points (5, 10, 20, 40, 80, 160), while the polynomial order varies from 2 to 100. Next, the stochastic solutions are compared by computing the mean and the variance of the Mach number and pressure distributions along the nozzle using various choices of pdf for γ. Finally, a comparison in terms of computational cost is performed by computing error \(\epsilon _{L^{2}}\) with respect to x.

In Fig. 37, the mean solutions of Mach number and the pressure along the 1D nozzle are reported, where the mean stochastic solutions are computed with the SI method using 10 points in the probabilistic space and the PC method using a 10th order polynomial, with γ described by a uniform pdf (γ varying between 1.33 and 1.47). As it can be observed in Fig. 37, the mean flow is characterized by an isentropic region of increasing speed or Mach number between x = 0 and the mean shock location in the divergent (the flow becoming supersonic at the nozzle throat located at x = 0.5), followed by a subsonic flow behind the shock with decreasing speed. The mean solutions computed by the two UQ methods are coincident. Next, the standard deviation of the Mach number is computed along the nozzle by using different refinement levels for the probabilistic space in the case of the SI method and different polynomial orders in the case of the PC method, always keeping a uniform pdf for γ. In Table 6, the number of samples required to reach a prescribed error \(\varepsilon _{L^{2}}\) is reported for each strategy. We observe that SI method demands fewer points in the stochastic space for a given level of error.

Fig. 37
figure 37

Nozzle flow with uncertain γ (uniform pdf). Computed mean distribution for the Mach number (left) and the static pressure (right) using the semi-intrusive method with 10 points in the probabilistic space and the PC method with a 10th order polynomial

Table 6 Number of samples required for the 1-uncertainty nozzle problem, uniform pdf

Next, a discontinuous pdf is considered for the stochastic γ. It is interesting to note the innovative contribution the SI method can bring with respect to the PC method (in its classical version). To this end, in Fig. 38 the standard deviation of Mach number is reported along the nozzle when the discontinuous pdf (87) is considered. Note that choosing (87) to describe the random variable γ introduces no change whatsoever in the application of the SI method (while the PC method can no longer be used). The standard deviation of the Mach number distribution computed for this discontinuous pdf is plotted in Fig. 38 for several levels of discretization refinement in the probabilistic space: here again the result can be considered as almost converged with no more than a 40-point discretization and fully converged with a 80-point discretization. In Fig. 39, the standard deviation of the Mach number is reported along the nozzle for the discontinuous pdf by using SI and MC-SOBOL methods. The standard deviation distributions computed by means of SI and MC-SOBOL are coincident, even for the maximal standard deviation. The stochastic estimation remains globally very similar for the newly proposed SI approach and the well-established MC-SOBOL method, which allows to validate the SI method results for the case of a discontinuous pdf on γ. Let us estimate the respective computational cost of SI, MC-SOBOL for this case. In Table 7, the number of samples required to reach a prescribed error for \(\epsilon _{L^{2}}\) is reported for SI and MC-SOBOL methods. A drastic reduction of the computational cost is obtained by using SI methods with respect to MC-SOBOL solutions.

Fig. 38
figure 38

Nozzle flow with uncertain γ (discontinuous pdf). Convergence study for the standard deviation on the Mach number distribution computed using the SI method

Fig. 39
figure 39

Nozzle flow with uncertain γ (discontinuous pdf). Standard deviation for the Mach number distribution for MC-SOBOL and SI methods. Left: global view; right: close-up on the shock region

Table 7 Number of samples required for the 1-uncertainty nozzle problem, discontinuous pdf

Next, a two-uncertainties stochastic problem is considered by assuming a discontinuous pdf for γ and a uniform pdf for p e . In Fig. 40, the standard deviation of the Mach is reported along the nozzle for SI and MC-SOBOL. The standard deviation distributions computed by means of SI and MC-SOBOL are coincident. As shown in Table 8, SI method allows strongly reducing the computational cost until six times with respect to MC-SOBOL method.

Fig. 40
figure 40

Nozzle flow with uncertain γ (discontinuous pdf) and p e (uniform pdf). Standard deviation for the Mach number distribution for MC-SOBOL and SI methods. Left: global view; right: close-up on the shock region

Table 8 Number of samples required for the 2-uncertainties nozzle problem, discontinuous pdf

5.2 Application with Other Schemes

The use of the SI/SFV method is not restricted to finite volume or discontinuous Galerkin schemes, but it is indeed very general. To show this we give the example of the residual distribution schemes of [1, 4] which can be seen as continuous finite element methods with non linear stabilisation. Starting from a deterministic method, one can again write the scheme for any random event and take a conditional average on any of the stochastic finite volume, in exactly the same spirit as it is sketched in Sect. 2. Consider for example the flow around RAE 2886 airfoil, with free-stream Mach number M  = 0.8 and velocity U which is given with 2% of fluctuation with uniform or centered Gaussian law. The results are presented in Fig. 41. Again, we see that using approximately five cells in the stochastic direction is enough.

Fig. 41
figure 41

RAE 2822 airfoil computed with a stochastic residual distribution method

5.3 Overcoming the Curse of Dimensionality

In Sect. 3, the cost of the method has been analysed, and we see exponential growth with respect to the number of random variables. In order to (partially) tackle this problem, a technique issued from the Multi Resolution Analysis of A. Harten [18] has been proposed. The idea is to use multi-resolution analysis in the stochastic dimensions. This technique allows to store only the needed information to reconstruct the random variables, leading potentially to important saving in memory, to the price of added complexity. One can consult [6, 12] for more details.

5.4 Applications for Multiphase Flows

Because of the flexibility of the method, the same technique has been used in multiphase simulation. In [30], a discrete equation method [5] for the simulation of compressible multiphase flows including real-gas effects is coupled to the SI algorithm, using a complex equation of state for both phases. This method is applied to the computational study on the occurrence of rarefaction shock waves (RSW) in a two-phase shock tube with dense vapors of complex organic fluids. Previous studies have shown that a RSW is relatively weak in a single-phase (vapor) configuration, its occurrence and intensity are investigated considering the influence of the initial volume fraction, initial conditions and the thermodynamic model.

6 Conclusions

We have presented the scheme of the Stochastic Finite Volume method (SFVM) and demonstrated the efficiency of the Karhunen–Loève-based adaptation algorithm to construct the anisotropic mesh in the stochastic space. Several application of this generic method has been proposed, from simple ODEs to the fluid mechanics equations. The error estimates for SFVM have been derived. The extension of the SFVM for the DG approximation in the physical space has been proposed. Various numerical examples demonstrating the efficiency and robustness of the implemented algorithms have been presented.

The SFV method studied in this paper appears to be a flexible and effective approach to the solution of stochastic conservation laws. We have shown that the SFV method it is applicable for the uncertainty quantification in a variety of complex problems including systems of conservation laws with random flux coefficients and initial data. The proper adaptation of the stochastic grid significantly reduces the computational cost of the method and improves its convergence.