1. Introduction
Notation |
QoI g
|
quantity of interest g
|
|
computational spatial domain |
|
hierarchy of spatial meshes |
|
hierarchy of temporal meshes |
L |
number of levels |
s |
complexity |
(or h),
|
spatial step size and number of spatial degrees of freedom on level ℓ
|
(or ),
|
time step size and number of time steps on level ℓ
|
|
number of samples (scenarios) on level ℓ
|
,
|
expectation and variance |
|
multidimensional domain of integration in parametric space |
,
|
random event and random vector |
|
porosity random field |
|
permeability random field |
|
density random field |
|
volumetric velocity |
|
tensor field : molecular diffusion and dispersion of salt |
|
expectation of
|
d |
physical (spatial) dimension |
|
mass fraction of salt (solution of the problem) |
Saltwater intrusion occurs when sea levels rise and saltwater moves onto the land. Usually, this occurs during storms, high tides, droughts, or when saltwater penetrates freshwater aquifers and raises the groundwater table. Since groundwater is an essential nutrition and irrigation resource, its salinization may lead to catastrophic consequences. Many acres of farmland may be lost because they can become too wet or salty to grow crops. Therefore, accurate modeling of different scenarios of saline flow is essential [
1,
2] to help farmers and researchers develop strategies to improve the soil quality and decrease saltwater intrusion effects.
Saline flow is density-driven and described by a system of time-dependent nonlinear partial differential equations (PDEs). It features convection dominance and can demonstrate very complicated behavior [
3].
As a specific model, we consider a Henry-like problem with uncertain permeability and porosity. These parameters may strongly affect the flow and transport of salt. The original Henry saltwater intrusion problem was introduced by H.R. Henry in the 1960s (cf. [
4]). The Henry problem became a benchmark for numerical solvers for groundwater flow (cf. [
3,
5,
6,
7]. In [
8], the authors use the generalized polynomial chaos expansion approximation to investigate how incomplete knowledge of the system properties influences the assessment of global quantities. Particularly, they estimated the propagation of input uncertainties into a few dimensionless scalar parameters.
The hydrogeological formations typically have complicated and heterogeneous structures. These formations may consist of a few layers of porous media with various porosity and permeability coefficients (cf. [
9,
10]). Measurements of the layer positions and their thicknesses are only possible up to some error, and for the materials inside the layers, the average parameters are typically assumed. Thus, these layers are excellent candidates to be modeled by random fields. Further, due to the nonlinearities in the problem, averaging the parameters does not necessarily lead to the correct mathematical expectation of the solution.
To model uncertainties, we use random fields. Uncertainties in the input data propagate through the model and make the solution (e.g., the mass fraction) uncertain. An accurate estimation of the output uncertainties can facilitate a better understanding of the problem, better decisions, and improved control and design of the experiment.
The following questions can be answered:
How long can a particular drinking water well be used (i.e., when will the mass fraction of the salt exceed a critical threshold)?
What regions have especially high uncertainty?
What is the probability that the salt concentration is higher than a threshold at a certain spatial location and time point?
What is the average scenario (and its variations)?
What are the extreme scenarios?
How do the uncertainties change over time?
Many techniques can quantify uncertainties. A classical method is Monte Carlo (MC) sampling. Although it is dimension-independent, it converges very slowly and requires many samples. This method may not be affordable for time-consuming simulations. Nevertheless, even up-to-date techniques, such as surrogate models and stochastic collocation, require a few hundred to a few thousand time-consuming simulations and assume a certain smoothness by the quantity of interest (QoI).
Another class of methods is the class of perturbation methods [
11]. The idea is to decompose the QoI with respect to (w.r.t.) random parameters in a Taylor series. The higher-order terms can be neglected for small perturbations, simplifying the analysis and numerics. These methods assume that random perturbations are small (e.g., up to 5% of the mean, depending on the problem). For larger perturbations, these methods usually do not work.
There are quite a few studies where authors model uncertainties in reservoirs (cf. [
12,
13]). Reconnecting stochastic methods with hydrogeological applications was accomplished in [
14], where the authors analyzed a collaboration between academics and water suppliers in Germany and made recommendations regarding optimization and risk assessment. The fundamentals of stochastic hydrogeology and an overview of stochastic tools and accounting for uncertainty are described in [
15].
The review [
16] deals with hydrogeologic applications of recent advances in uncertainty quantification, probabilistic risk assessment, and decision-making under uncertainty. The author reviewed probabilistic risk assessment methods in hydrogeology under parametric, geologic, and model uncertainties. Density-driven vertical transport of saltwater through the freshwater lens on the island of Baltrum (Germany) is modeled in [
17].
In [
18], the authors examined the implications of transgression for a range of seawater intrusion scenarios based on simplified coastal freshwater aquifer settings. They stated that vertical intrusion during transgressions could involve density-driven convective processes, causing substantially greater amounts of seawater to enter the aquifer and create more extensive intrusion than horizontal seawater intrusion in the absence of transgression.
The methods to compute the desired statistics of the QoI are direct integration methods, such as the MC, quasi-MC (QMC) and collocation methods and surrogate-based (generalized polynomial chaos approximation and stochastic Galerkin [
19,
20,
21,
22]) methods. Direct methods compute statistics directly by sampling uncertain input coefficients and solving the corresponding PDEs, whereas the surrogate-based method computes a cheap functional (polynomial, exponential, or trigonometrical) approximation of the QoI. Examples of the surrogate-based methods are radial basis functions [
23,
24,
25,
26], sparse polynomials [
27,
28,
29], and polynomial chaos expansion [
30,
31,
32]. Sparse grid methods to integrate high-dimensional integrals are considered in [
31,
33,
34,
35,
36,
37,
38,
39,
40]. An idea to generate goal-oriented adaptive spatial grids and use them in the multilevel MC (MLMC) framework was presented in [
41,
42].
The quantification of uncertainties in stochastic PDEs could be a significant challenge due to a) the large possible number of involved random variables and b) the high cost of each deterministic solution of the governed PDE. The MC quadrature and its variance-reduced variants have a dimension-independent error convergence rate
, and the QMC has the worst-case rate
, where
N is the number of samples, and
M indicates the dimension of the stochastic space [
43]. The MC method is not affected by the dimension of the integration domain, such as collocations on sparse or full grid methods [
44,
45]. A numerical comparison of other QMC sequences is presented in [
46].
Construction of a cheap generalized polynomial chaos expansion-based surrogate model [
47,
48,
49] is an alternative to the MC method. Some well-known functions, such as the multivariate Legendre, Hermite, Chebyshev, or Laguerre functions, have been taken as a basis [
47,
50]. Surrogate models have pros and cons. The pros are that the model can be easily sampled once constructed, and all samples are almost free (much cheaper than sampling the original stochastic PDE). For some problem settings, sampling is unnecessary because the solution can be computed analytically (e.g., computing an integral of a polynomial). The nontrivial part of surrogate models is to define how many coefficients are needed and how accurately they should be computed. Another difficulty is that not every function can be approximated well by a polynomial. The MLMC methods do not have such limitations.
This work is structured as follows.
Section 2 describes the Henry problem and numerical methods to solve it. The well-known MLMC method is reviewed in
Section 3. Next,
Section 4 details the numerical results, which include the numerical analysis of the Henry problem, computing different statistics, the performance of the MLMC method, and the practical performance of the parallel ug4 solver for the Henry problem [
4,
5] with uncertain coefficients. Finally, we conclude this work with a discussion in
Section 5.
Our contribution: We investigate the propagation of uncertainties in the Henry-like problem. Assuming the porosity, permeability, and recharge are uncertain, we estimate the uncertainties in the density-driven flow. To reduce the high computing complexity, we applied the existing MLMC technique. We use the multigrid ug4 software library as a black-box solver, allowing us to solve the Henry problem and others (see more in [
2]). We run all MLMC random simulations in parallel. To the best of our knowledge, we are unaware of any other studies where Henry’s problem [
4,
5] was solved using MLMC methods with uncertain porosity, permeability, and recharge parameters.
3. Multilevel Monte Carlo
Various numerical methods can quantify uncertainty, and every method has pros and cons. For example, the classical MC method converges slowly and requires numerous samples. To reduce the total computing cost, we apply the MLMC method, which is a natural idea because the deterministic solver uses a multigrid method (see
Section 2.3). The MLMC method efficiently combines samples from various levels. Further, we repeat the main idea of the MLMC method. A more in-depth description of these techniques is found in [
61,
62,
63,
64,
65,
66,
67].
We let and represent a vector of random variables and the QoI, respectively, where is a random event. The MLMC method aims to approximate the expected value with an optimal computational cost. In this work, g could be in the whole domain or at a point or an integral over a subdomain. The MLMC method constructs a telescoping sum, defined over a sequence of spatial and temporal meshes, , as described next, to achieve this goal. Moreover, g, numerically evaluated on level ℓ, is denoted by or, for simplicity, by just , where and are the discretization steps in space and time on level ℓ. Further, we assume that as and .
Furthermore, is the computing cost to evaluate one realization of (the most expensive one from all realizations). Similarly, denotes the computing cost of evaluating . For simplicity, we assume that for is almost the same as for . The number of iterations is variable; thus, the cost of computing a sample of may fluctuate for various realizations.
For a better understanding, we consider a two-level MLMC (cf. [
64]) and estimate the optimal number of needed samples on both levels. The two-level MLMC has only two meshes: a coarse one and a fine one. The QoI
can be approximated on the fine mesh by
and on the coarse mesh by
. Furthermore,
where
,
is a random vector, and
and
represent the numbers of quadrature points (numbers of samples/realizations) on the coarse and fine meshes, respectively. The total computational cost of evaluation (
13) is
. The variances of
and
are denoted by
and
, and the total variance is obtained by
, assuming that
and
use independent samples. By solving an auxiliary minimization problem, the variance is minimal if
. Thus, with the estimates of the variances and
, we can estimate
.
The idea presented above can be extended to a case with multiple levels. Thus, we can find (quasi-) optimal numbers of samples
. The MLMC method calculates
using the following telescopic sum:
In the above equation, level
ℓ in the superscript
indicates that independent samples are used at each correction level. As
ℓ increases, the variance of
decreases. Thus, the total computational cost can be reduced by taking fewer samples on finer meshes.
We recall that
and
. We assume that the average cost of generating one sample of
(the cost of one deterministic simulation for one random realization) is
where
is the spatial dimension, and
is determined by the computational complexity of the deterministic solver (ug4).
We let
be the variance of one sample of
. Then, the total cost and variance of the multilevel estimator in Eq. (
14) are
and
, respectively. For a fixed variance, the cost is minimized by choosing
to minimize the following functional for some value of the Lagrange multiplier
:
To determine
, we take the derivatives w.r.t.
and set them equal to zero:
After solving the obtained equations, we obtain
To achieve an overall variance of
, that is,
we substitute
with the computed
, and obtain
From the last equation, we obtain
The total computational cost is
(for further analysis of this sum, see [
64], p.4).
Definition 1.
We let
In addition, denotes a multilevel estimator of based on levels and independent samples on level ℓ, where . Moreover, , where .
The standard theory indicates that , , and .
The mean squared error (MSE) is used to measure the quality of the multilevel estimator:
To obtain an MSE smaller than
, we ensure that both
and
are smaller than
. Combining this idea with a geometric sequence of levels in which the cost increases exponentially with the level while the weak error
and multilevel correction variance
decrease exponentially leads to the following theorem (cf. Theorem 1, p. 6 in [
64]):
Theorem 2.
We let d denote the problem dimension. Suppose positive constants exist such that , and
Then, for any accuracy , a constant and a sequence of realizations exist, such that
and the computational cost is
This theorem (see also [
61,
63,
68,
69,
70]) indicates that, even in the worst-case scenario, the MLMC algorithm has a lower computational cost than that of the traditional (single-level) MC method, which scales as
. Furthermore, in the best-case scenario presented above, the computational cost of the MLMC algorithm scales as
.
Using preliminary tests, we can estimate the convergence rates
for the mean (the so-called weak convergence) and
for the variance (the so-called strong convergence). In addition,
is strongly connected to the order of the discretization error (see
Section 2.3), which equals 1, and precise estimates of parameters
and
are crucial to distribute the computational effort optimally.
4. Numerical Experiments
The goal is to reduce the total computational cost of stochastic simulations. We use the MLMC method to compute the mean value of various QoIs, such as
c in the whole domain,
c at a point, or an integral value (we call it the freshwater integral):
where
is the indicator function identifying a subdomain
, meaning the mass of the fresh water at a time
t. Each simulation may contain up to
spatial mesh points and a few thousand time steps (
on the finest mesh).
Software and parallelization: The computations presented in this work were performed using the ug4 simulation software toolbox (
https://github.com/ug4/ughub.wiki.git) [
71,
72]. This software has been applied for subsurface flow simulations of real-world aquifers (cf. [
2]). The toolbox was parallelized using MPI, and the presented results were obtained on the Shaheen II cluster provided by the King Abdullah University of Science and Technology. Every sample was computed on 32 cores of a separate cluster node. Each simulation (scenario) was localized to one node to reduce the communication time between nodes. All scenarios were concurrently computed on different nodes. A similar approach was used in [
48,
49]. Simulations were performed on different meshes; thus, the computation time of each simulation varied over a wide range (see
Table 2).
Porosity and recharge: We assume two horizontal layers:
(the upper layer) and
(the lower layer). The porosity inside each layer is uncertain and is modeled as in Eq. (
24):
Additionally, the recharge flux is also uncertain and is equal to
where
,
, and
are sampled independently and uniformly in
.
Figure 2 depicts a random realization of the porosity random field
(left) and the corresponding solution
at
(right). Additionally, four isolines
,
, are presented on the right. The isolines demonstrate the absolute value of the difference between the computed realization
and the expected value
. These computations were performed for
and
s.
The mean and variance of the mass fraction are provided in
Figure 3 on the left and right, respectively. The expectation takes values from
, and the variance range is
. The areas with high variance (dark red) indicate regions with high variability/uncertainty. Such regions may need additional attention from specialists (e.g., placement of additional sensors). Additionally, the right image displays five contour lines
,
,
.
We observed that the variability (uncertainty) of the mass fraction might vary from one grid point to another. At some points (dark blue regions), the solution does not change. At other points (white-yellow regions), the variability is very low or high (dark red regions). In regions with high uncertainty, refining the mesh and applying the MLMC method make sense.
Before we run the MLMC method, we first examine the solution
at 12 preselected points (see Eq. (
9)).
Figure 4 includes 12 subfigures. Each subfigure presents 600 QMC realizations of
and five quantiles depicted by dotted lines. The dotted line at the bottom indicates the quantile
. The following dotted line is the quantile
, and the dotted line on the top indicates the quantile
. All five quantiles from the bottom to the top are 0.025, 0.25, 0.50, 0.75, and 0.975, respectively. We observe that
c at the final point
varies considerably.
Example. In
Figure 5, we demonstrate the probability density function (pdf) of
(left), and the pdf of
(right). On average, after approximately 29 time steps (on the left) and six time steps (on the right), the volume of the fresh water becomes less than 1.2 and 1.7, respectively. The initial volume of the fresh water was 2.0.
All 600 realiations of
are depicted in
Figure 6 The time is along the
x-axis,
. Additionally, five quantiles are represented by dotted curves from the bottom to the top and are 0.025, 0.25, 0.50, 0.75, and 0.975, respectively.
Example. Figure 7 (left) displays the evolution of the pdf of
at a fixed point
in time
. From left to right, the farthest left (blue) pdf corresponds to
, the second curve from the left (red) corresponds to
, and so on. In the beginning,
, and the mass fraction
c is low, about 0.15 on average. Then, with time,
c increases and, at
, is approximately equal to 1.
Example. The next QoI is the earliest time moment when
, at fixed
, becomes smaller than the threshold value
(maximum is 1.0).
Figure 7 (right) presents its pdf. On average, after
time steps, the mass fraction becomes smaller than
, but 40 time steps are needed in some scenarios.
Next, we research how
depends on the time and level. All graphics in
Figure 8 display 100 realizations of the differences between solutions computed on two neighbor meshes for every time point
,
(along the
x-axis). The top left graphic indicates the differences between the mass fractions computed on Levels 1 and 0. The other graphics reveal the same, but for Levels 2 and 1, 3 and 2, 4 and 3, and 5 and 4, respectively. The largest value decreases from
(top left) to
. Considerable variability is observed for
and
. Starting with
, the variability between solutions decreases and stabilizes. From these five graphics, we can estimate that the maximal amplitude decreases by a factor
, at 0.015, 0.008, 0.004, 0.0015, and 0.0008. However, it is challenging to make a similar statement about each time point
t. This observation makes it difficult to estimate the weak and strong convergence rates and the optimal number of samples correctly on each mesh level. They are different for each time
t (and for each
). For some time points, the solution is smooth and requires only a few levels and a few samples on each level. For other points with substantial dynamics, the numbers of levels and samples are higher.
Because
is random, we visualize its mean and variance.
Figure 9 demonstrates the mean (left) and variance (right) of the differences in concentrations
,
. On the left, the amplitude decreases when
ℓ increases. A slight exception is the blue line for
(right). A possible explanation is that the solutions
or
are insufficiently accurate. The right image presents how the amplitude of the variances decays. This decay is necessary for the successful work of the MLMC method. We also observe a potential issue; the weak and strong convergence rates vary for various time points
t. Thus, determining the optimal number of samples
for each level is not possible (only suboptimal).
At the beginning , the variability is zero and starts to increase. We observe changes during a specific time interval, and then the process starts to stabilize after time steps. The variability is either unchanging from level to level or decreases.
Table 2 contains average computing times, which are necessary to estimate the number of samples
at each level
ℓ. The fourth column contains the average computing time, and the fifth and sixth columns contain the shortest and longest computing times. The computing time for each simulation varies depending on the number of iterations, which depends on the porosity and permeability. We observed that, after
s, the solution is almost unchanging; thus, we restrict this to only
, where
. For example, if the number of time steps is
(Level 0 in
Table 2), then the time step
s.
The time step
is adaptive and changing from
s (very coarse mesh) to
s (finest mesh). Starting with level
, the average time increases by a factor of eight. These numerical tests confirm the theory in Eq. (
12), stating that the numerical solver is linear w.r.t.
and
.
Table 2.
Number of degrees of freedom , number of time steps , step size in time , average, minimal, and maximal computing times on each level ℓ.
Table 2.
Number of degrees of freedom , number of time steps , step size in time , average, minimal, and maximal computing times on each level ℓ.
Level ℓ
|
|
|
|
Computing times () |
|
|
|
|
average |
min. |
max. |
0 |
1122 |
188 |
32 |
1.15 |
0.88 |
1.33 |
1 |
4290 |
376 |
16 |
4.1 |
3.4 |
4.87 |
2 |
16770 |
752 |
8 |
19.6 |
17.6 |
22 |
3 |
66306 |
1504 |
4 |
136.0 |
128 |
144 |
4 |
263682 |
3008 |
2 |
1004.0 |
891 |
1032 |
5 |
1051650 |
6016 |
1 |
8138.0 |
6430 |
8480 |
With estimates for each level, we can estimate the rates of
and
(Eqs. (
21a)-(21b)) in weak and strong convergences.
The slope in
Figure 10 can be used to estimate the rates of the weak (left) and strong (right) convergences. The differences are indicated on the horizontal axis.
We use computed variances
and computing times (work)
from
Table 2 to estimate the optimal number of samples
and compute the telescopic sum from Eq. (15) to approximate the expectation.
Table 3 lists
for a given total variance
:
After the telescopic sum is computed, we can compare the results with the QMC results.
Figure 11 depicts the decay of the absolute (left) and relative (right) errors vs. levels along the
x-axes. The ’true’ solution was computed using the QMC method on the finest mesh level
.
Figure 1.
(left) Computational domain . (Right) One realization of the mass fraction and the streamlines of the velocity field for the undisturbed Henry problem at .
Figure 1.
(left) Computational domain . (Right) One realization of the mass fraction and the streamlines of the velocity field for the undisturbed Henry problem at .
Figure 2.
(left) Realisation of porosity . (right) Corresponding mass fraction with isolines , .
Figure 2.
(left) Realisation of porosity . (right) Corresponding mass fraction with isolines , .
Figure 3.
(left) Mean value and (right) variance of the mass fraction, with contour lines , , .
Figure 3.
(left) Mean value and (right) variance of the mass fraction, with contour lines , , .
Figure 4.
Six hundred QMC realisations of
at 12
-points listed in Eq. (
9). First row points:
,
,
,
, second row points:
,
,
,
, and third row points:
,
,
,
. Dotted lines from the bottom to the top indicate the quantiles 0.025, 0.25, 0.50, 0.75, and 0.975, respectively.
Figure 4.
Six hundred QMC realisations of
at 12
-points listed in Eq. (
9). First row points:
,
,
,
, second row points:
,
,
,
, and third row points:
,
,
,
. Dotted lines from the bottom to the top indicate the quantiles 0.025, 0.25, 0.50, 0.75, and 0.975, respectively.
Figure 5.
The pdf of the earliest time point when the freshwater integral becomes smaller than 1.2 (left) and 1.7 (right). The x-axis represents time points.
Figure 5.
The pdf of the earliest time point when the freshwater integral becomes smaller than 1.2 (left) and 1.7 (right). The x-axis represents time points.
Figure 6.
Six hundred realizations of . The x-axis represents time ; dotted curves denote five quantiles: 0.025, 0.25, 0.50, 0.75, and 0.975 from the bottom to the top.
Figure 6.
Six hundred realizations of . The x-axis represents time ; dotted curves denote five quantiles: 0.025, 0.25, 0.50, 0.75, and 0.975 from the bottom to the top.
Figure 7.
(left) Evolution of the pdf of for . (right) The pdf of the earliest time point when ( is fixed).
Figure 7.
(left) Evolution of the pdf of for . (right) The pdf of the earliest time point when ( is fixed).
Figure 8.
Differences between mass fractions c computed at the point on levels a) 1 and 0, b) 2 and 1 (first row), c) 3 and 2, d) 4 and 3 (second row), and e) 5 and 4 (third row) for 100 realizations (x-axis represents time).
Figure 8.
Differences between mass fractions c computed at the point on levels a) 1 and 0, b) 2 and 1 (first row), c) 3 and 2, d) 4 and 3 (second row), and e) 5 and 4 (third row) for 100 realizations (x-axis represents time).
Figure 9.
(left) Mean and (right) variance of the differences vs. time, computed on various levels at the point .
Figure 9.
(left) Mean and (right) variance of the differences vs. time, computed on various levels at the point .
Figure 10.
Weak (left) and strong (right) convergences computed for Levels 1 and 0, 2 and 1, 3 and 2, 4 and 3, and 5 and 4 (horizontal axis) at the fixed point .
Figure 10.
Weak (left) and strong (right) convergences computed for Levels 1 and 0, 2 and 1, 3 and 2, 4 and 3, and 5 and 4 (horizontal axis) at the fixed point .
Figure 11.
Decay of the absolute (left) and relative (right) errors between the mean values computed on a fine mesh via QMC and on a hierarchy of meshes via MLMC at the fixed point . x-axis contains the mesh levels.
Figure 11.
Decay of the absolute (left) and relative (right) errors between the mean values computed on a fine mesh via QMC and on a hierarchy of meshes via MLMC at the fixed point . x-axis contains the mesh levels.
Table 1.
Parameters of the considered density-driven flow problem
Table 1.
Parameters of the considered density-driven flow problem
Parameter |
Values and Units |
Description |
|
0.35 [-] |
mean value of porosity |
D |
[] |
diffusion coefficient in the medium |
|
[] |
permeability of the medium |
g |
[] |
gravity |
|
1000 [] |
density of pure water |
|
[] |
density of brine |
|
[] |
viscosity |
Table 3.
Number of samples
computed using Eq. (
18) as a function of the total variance
.
Table 3.
Number of samples
computed using Eq. (
18) as a function of the total variance
.
level, ℓ
|
0 |
1 |
2 |
3 |
4 |
5 |
|
1.156 |
4.113 |
20.382 |
139.0 |
993.0 |
8053.0 |
|
1.4e-5 |
0.2e-5 |
0.5e-6 |
0.1e-6 |
0.5e-7 |
1e-7 |
=5e-6) |
35 |
7 |
2 |
1 |
1 |
1 |
=1e-6) |
172 |
35 |
8 |
2 |
1 |
1 |
=5e-7) |
343 |
69 |
16 |
3 |
1 |
1 |
=1e-7) |
1714 |
344 |
78 |
14 |
4 |
2 |