1 Introduction

The construction of inexact solution schemes involves deciding which errors are acceptable and which approximations can be made for the sake of computational efficiency. Herein, we consider the mixed formulation of Darcy flow systems and take the perspective that the physical law of mass conservation is significantly more important than the constitutive relationship known as Darcy’s law. In line with this perspective, our goal is to formulate an efficient solution technique that guarantees local mass conservation.

Efficient solvers are of paramount importance in applications where multiple model realizations are necessary. In the context of uncertainty quantification, inverse modeling, or system optimization, for example, it is vital to understand the dependency of the solution on model parameters. However, obtaining this relationship typically requires solving a high-fidelity model multiple times, which can be computationally expensive, if not prohibitive. This cost can be relieved by using Reduced Order Modeling (ROM) techniques in which the original problem is replaced by a model of lower numerical complexity.

The literature on ROM is vast and we refer the interested reader to [16, 25, 26] and references therein. In this work, we focus on the Reduced Basis Methods (RBM) constructed using Proper Orthogonal Decomposition (POD) [25, Sec. 6.3]. In particular, we use the well-established snapshot method, which originated from turbulent flow models [29].

A direct application of RBM to the mixed formulation of Darcy flow would introduce an error in both the mass balance and constitutive equations. Hence, mass conservation cannot be guaranteed by the reduced basis solution. An alternative approach is to construct separate reduced bases for the flux and pressure variables. However, special considerations are then necessary to ensure inf-sup stability, e.g. by enriching the flux space as in [28], unless reduced operators are properly precomputed. Finally, if we were to correct an RBM solution through the use of a projection, then the projection operator can be as computationally expensive as the original problem, e.g. by enriching the flux space as in [28], unless reduced operators are properly precomputed.

In this work, we propose a three-step solution procedure. In the first step, an initial flux field is obtained by using a locally conservative method, such as the Finite Volume Method with a Two-Point Flux Approximation (TPFA). Although the TPFA scheme is computationally efficient, it generally lacks consistency and therefore requires a suitable correction, which is constructed in the second step. Since the mass balance is already satisfied at this stage, the correction needs to be divergence-free. The Helmholtz decomposition then ensures us that this correction can be described as the curl of a potential field r. The second step therefore employs an \(H(\nabla \times )\)-conforming discretization to compute the potential and then updates the flux field with \(\nabla \times r\). Finally, the pressure field is constructed in the third step.

We restrict ourselves to discretization methods capable of conserving mass locally by which we mean that: (1) the mass is balanced in each element and (2) the normal flux is uniquely defined on each face of the mesh. Second, since our approach relies on fundamental properties such as the Helmholtz decomposition, we focus on structure-preserving methods, i.e. methods based on discrete spaces that form an exact discrete co-chain complex. Two discretization methods with these properties are used as leading examples, namely mixed finite element methods [1, 2] and mixed virtual element methods [12].

We then introduce the Reduced Basis Method in the second step to rapidly produce the potential field r for a given conductivity distribution. We do not apply a reduction to the other steps because first, these steps can generally be performed efficiently, and second, we rely on the local mass conservation of the flux field from the first step, which may be affected by order reduction techniques. On the other hand, the correction \(\nabla \times r\) is guaranteed to be solenoidal, so we ensure that it does not impact the mass conservation equation afterward.

The procedure is presented in the general context of exact complexes. This allows us to directly extend the method to similar systems of equations, including Darcy flow systems in fractured porous media. By rewriting the equations in terms of the mixed-dimensional divergence, the problem can be identified as a mixed-dimensional Darcy flow system [10]. In turn, the solution procedure directly applies. In this case, we employ the mixed-dimensional curl to ensure that the correction step does not impact the mass conservation equation in the bulk, fractures, and fracture intersections. The mixed-dimensional curl, defined in [9], has been used before in the analysis of mixed finite elements for elasticity [8] and in the construction of auxiliary space preconditioners [11].

There are several similarities with the framework of auxiliary space preconditioning [17]. In particular, we use an exact complex to decompose the solution into an irrotational and a solenoidal part. However, we do not form a decomposition of higher regularity than \(H(\nabla \times )\) and thus directly work with edge-based instead of nodal elements. Moreover, our focus is on ROM rather than preconditioning.

We note that it is common to use the curl for generating solenoidal fields in the construction of stable finite element pairs for Stokes flow [13, 23]. An important difference with our work is that we completely transfer the problem to the Sobolev space \(H(\nabla \times )\) and we do not enrich the finite element space nor the reduced basis space, as in e.g. [28], with additional basis functions.

In short, the main contributions of this work are:

  • A novel procedure is proposed that solves the mixed formulation of Darcy flow systems in three steps. In our example case of lowest-order, this procedure combines the efficiency of TPFA with the consistency of mixed finite element methods.

  • We augment the procedure to obtain a Reduced Basis Method. The quality of the reduced order approximation does not affect the local conservation of mass.

  • By presenting the method in an abstract setting, the extension to Darcy flow in fractured porous media follows immediately.

  • The validity of the approach is confirmed by numerical experiments for cases in two and three dimensions, with immersed fracture networks.

The article is organized as follows. First, the model problem and our notation conventions are introduced in Sects. 1.1 and 1.2, respectively. Afterward, Sect. 2 presents the three-step procedure as it applies to Darcy flow in 3D and its generalization to the abstract setting of exact complexes. This section moreover shows the applicability to structure-preserving discretization methods and Darcy flow in fractured porous media. Section 3 concerns the reduced basis method and its construction by proper orthogonal decomposition. The numerical implementation is discussed in Sect. 4 and we present experiments showing the performance of the method. Finally, Sect. 5 contains the concluding remarks.

1.1 The Model Problem

Let \(\varOmega \subset \mathbb {R}^n\) with \(n \in \{2, 3\}\) be a contractible, bounded Lipschitz domain. Let the hydraulic conductivity K be a symmetric, positive definite tensor field on \(\varOmega \) and let f be the mass source. We then consider the Darcy flow problem: find the pair (qp) such that

$$\begin{aligned} q + K \nabla p&= 0,&\text {in }&\varOmega , \end{aligned}$$
(1.1a)
$$\begin{aligned} \nabla \cdot q&= f,&\text {in }&\varOmega , \end{aligned}$$
(1.1b)

subject to the boundary conditions

$$\begin{aligned} \nu \cdot q&= 0,&\text {on }&\partial _q \varOmega , \end{aligned}$$
(1.1c)
$$\begin{aligned} p&= g,&\text {on }&\partial _p \varOmega , \end{aligned}$$
(1.1d)

with \(\partial \varOmega = \partial _q \varOmega \cup \partial _p \varOmega \) disjointly and \(\nu \) the outward oriented, unit vector that is normal to \(\partial \varOmega \). We refer to problem (1.1) as the Neumann problem if \(\partial \varOmega = \partial _q \varOmega \), the Dirichlet problem if \(\partial \varOmega = \partial _p \varOmega \), and mixed otherwise.

1.2 Preliminaries and Notation

The following notation is used throughout this work. First, let \(L^2\) be the space of square integrable functions on \(\varOmega \) and let \(\langle \cdot , \cdot \rangle \) denote the corresponding inner product. We reuse this notation for the inner product between vector-valued, square integrable functions. On the other hand, the notation with round brackets \((\cdot , \cdot )\) is reserved for tuples.

Let \((\nabla )\), \((\nabla \times )\), and \((\nabla \cdot )\) denote the gradient, curl, and divergence operators, respectively. These differential operators induce the following Sobolev spaces:

$$\begin{aligned} H(\nabla \cdot )&:= \{q \in (L^2)^n : \nabla \cdot q \in L^2 \},&n&\in \{2,3\}, \\ H(\nabla \times )&:= \{r \in (L^2)^n : \nabla \times r \in (L^2)^n \},&n&= 3, \\ H(\nabla )&:= \{s \in L^2 : \nabla s \in (L^2)^n \},&n&\in \{2,3\}. \end{aligned}$$

We remark that \(H(\nabla )\) is typically denoted by \(H^1(\varOmega )\) but we retain this notation for consistency. Additionally, for \(n = 2\), we define the rotated gradient \(\nabla ^\perp := [-\partial _y, \partial _x]^T\) and \(H(\nabla ^\perp ):= H(\nabla )\).

Let the subspaces containing homogeneous boundary conditions on \(\partial _q \varOmega \) be denoted by

$$\begin{aligned} H_{\partial _q \varOmega }(\nabla \cdot )&:= \{q \in H(\nabla \cdot ) : \nu \cdot q|_{\partial _q \varOmega } = 0 \}, \\ H_{\partial _q \varOmega }(\nabla \times )&:= \{r \in H(\nabla \times ) : \nu \times r|_{\partial _q \varOmega } = 0 \}, \\ H_{\partial _q \varOmega }(\nabla )&:= \{s \in H(\nabla ) : s|_{\partial _q \varOmega } = 0 \}. \end{aligned}$$

We use the short-hand notation \(H_0(\cdot )\) for \(H_{\partial \varOmega }(\cdot )\). For an operator \(\textrm{d}\), we let \({{\,\textrm{Ran}\,}}(\textrm{d})\) and \({{\,\textrm{Ker}\,}}(\textrm{d})\) denote its range and kernel, respectively.

Finally, we use the Gothic font to denote mixed-dimensional entities, e.g. \((\mathfrak {q, p})\) introduced in Sect. 2.4. The Sans Serif font is used to denote matrices and vectors, i.e. \(\mathsf {Ax = b}\).

2 A Solution Technique Based on Exact Complexes

We present a solution technique in which we first solve the mass balance equation (1.1b). We then exploit the exact de Rham complex to construct a solenoidal correction such that (1.1a) is satisfied as well. For ease of exposition, we first consider the three-dimensional Neumann problem in Sect. 2.1 and present the general setting in Sect. 2.2. The discrete case is discussed in Sect. 2.3 and we show that the procedure can be applied to flows in fractured porous media in Sect. 2.4.

2.1 The Neumann Problem in 3D

We start by considering the Neumann problem, characterized by Problem (1.1) with \(n = 3\) and \(\partial _q \varOmega = \partial \varOmega \). In this case, the co-chain complex of interest is known as the de Rham complex with boundary conditions, given by

(2.1)

with \(L^2 / \mathbb R\) the subspace of \(L^2\) composed of functions with zero mean.

We note two important properties of this complex. First, we have the elementary identities \((\nabla ) \circ (\nabla \times ) = 0\) and \((\nabla \times ) \circ (\nabla \cdot ) = 0\). Second, the Helmholtz decomposition ensures that if \(q \in H_0(\nabla \cdot )\) with \(\nabla \cdot q = 0\), then a \(r \in H_0(\nabla \times )\) exists such that \(q = \nabla \times r\). Moreover, if \(r \in H_0(\nabla \times )\) and \(\nabla \times r = 0\), then \(r = \nabla s\) for some \(s \in H_0(\nabla )\).

Our solution technique exploits these properties of the complex. Let us proceed according to the following three steps.

  1. 1.

    Given \(f \in L^2 / \mathbb {R}\), let \(q_f \in H_0(\nabla \cdot )\) be any function that satisfies

    $$\begin{aligned} \nabla \cdot q_f&= f. \end{aligned}$$
    (2.2)
  2. 2.

    Let \(q_0:= q - q_f\). Since \(\nabla \cdot q_0 = 0\), the Helmholtz decomposition ensures that a \(r \in H_0(\nabla \times )\) exists such that \(\nabla \times r = q_0\). This variable r then has the property

    $$\begin{aligned} K^{-1} \nabla \times r = K^{-1} (q - q_f) = -\nabla p - K^{-1} q_f. \end{aligned}$$

    Note that r cannot be found directly in this way since the equation is posed in \(H_0(\nabla \cdot )\) for an unknown in \(H_0(\nabla \times )\). With the aim of obtaining a well-posed problem, we test this equation with functions \(\nabla \times {\tilde{r}} \in H_0(\nabla \cdot )\). We derive:

    $$\begin{aligned} \langle K^{-1} \nabla \times r, \nabla \times {\tilde{r}} \rangle&= -\langle \nabla p, \nabla \times {\tilde{r}} \rangle - \langle K^{-1} q_f, \nabla \times {\tilde{r}} \rangle \\&= -\langle p, \nabla \cdot \nabla \times {\tilde{r}} \rangle - \langle K^{-1} q_f, \nabla \times {\tilde{r}} \rangle \\&= - \langle K^{-1} q_f, \nabla \times {\tilde{r}} \rangle . \end{aligned}$$

    Here, the second equality is due to integration by parts and the third follows from \(\nabla \cdot \nabla \times {\tilde{r}} = 0\). However, this equation still does not guarantee a unique solution r because the curl operator has a non-zero kernel, which is given by the range of the gradient. We ensure orthogonality to this kernel by imposing \(0 = \langle r, \nabla s \rangle = -\langle \nabla \cdot r, s \rangle \) for all \(s \in H(\nabla )\). Thus, we introduce a term that penalizes \(\nabla \cdot r\), giving us the problem: Find \(r \in H_0(\nabla \times ) \cap H(\nabla \cdot )\) such that

    $$\begin{aligned} \langle K^{-1} \nabla \times r, \nabla \times {\tilde{r}} \rangle + \langle \nabla \cdot r, \nabla \cdot {\tilde{r}} \rangle&= - \langle K^{-1} q_f, \nabla \times {\tilde{r}} \rangle , \end{aligned}$$
    (2.3)

    for all \({\tilde{r}} \in H_0(\nabla \times ) \cap H(\nabla \cdot )\).

  3. 3.

    We set \(q:= q_f + \nabla \times r\) and it remains to compute the pressure variable: find \(p \in L^2 / \mathbb {R}\) such that

    $$\begin{aligned} \langle p, \nabla \cdot {\tilde{q}} \rangle&= \langle K^{-1} q, {\tilde{q}} \rangle ,&\forall {\tilde{q}} \in H_0(\nabla \cdot ). \end{aligned}$$
    (2.4)

The solvability of the systems (2.2)–(2.4) is discussed in the more general setting of the next subsection.

Remark 2.1

Inhomogeneous boundary conditions can readily be incorporated in this procedure. In particular, the natural boundary condition \(p = g_p\) on \(\partial _p \varOmega \) amounts to subtracting the term \(\langle g_p, \nu \cdot (\nabla \times {\tilde{r}}) \rangle _{\partial _p \varOmega }\) from the right-hand side of (2.3) and adding \(\langle g_p, \nu \cdot {\tilde{q}} \rangle _{\partial _p \varOmega }\) to the right-hand side of (2.4).

On the other hand, the essential boundary condition \(\nu \cdot q = g_q\) on \(\partial _q \varOmega \) requires first choosing a function \(q_g \in H(\nabla \cdot )\) with \(\nu \cdot q_g = g_q\). Then, we subtract \(\nabla \cdot q_g\) from the right-hand side of (2.2), subtract \(\langle K^{-1} q_g, \nabla \times {\tilde{r}} \rangle \) from (2.3), and change the computation in Step 3 to \(q:= q_f + \nabla \times r + q_g\). To avoid unnecessary distraction, we limit our exposition herein to the case of homogeneous boundary conditions.

2.2 The General Case

In order to generalize the three-step procedure, we borrow notation from the setting of exterior calculus. In particular, each function space used in the previous section can be represented by \(H \varLambda ^k \subset L^2 \varLambda ^k\) with \(k \in [n - 3, n]\) and connected by differentials \(\textrm{d}_k: H\varLambda ^k \rightarrow H\varLambda ^{k + 1}\). We omit the subscript on \(\textrm{d}\) when no ambiguity arises and consider the co-chain complex \((H\varLambda ^\bullet , \textrm{d})\), given by

(2.5)

Let us recall the defining property of an exact complex, namely that

$$\begin{aligned} {{\,\textrm{Ker}\,}}(\textrm{d}_k) = {{\,\textrm{Ran}\,}}(\textrm{d}_{k - 1}). \end{aligned}$$
(2.6)

This has two important implications. First, \({{\,\textrm{Ker}\,}}(\textrm{d}_k) \supseteq {{\,\textrm{Ran}\,}}(\textrm{d}_{k - 1})\) means that \(\textrm{d}_k \textrm{d}_{k-1} = 0\). On the other hand, \({{\,\textrm{Ker}\,}}(\textrm{d}_k) \subseteq {{\,\textrm{Ran}\,}}(\textrm{d}_{k - 1})\) implies that if \(p \in H\varLambda ^k\) satisfies \(\textrm{d}p = 0\), then a \(q \in H\varLambda ^{k -1}\) exists with \(\textrm{d}_{k - 1} q = p\) and \(q \perp {{\,\textrm{Ker}\,}}(\textrm{d}_{k - 1})\). Moreover, we define both \(\textrm{d}_{n - 4}\) and \(\textrm{d}_n\) to be zero. In turn, we have \(H \varLambda ^{n - 3} \perp {{\,\textrm{Ker}\,}}(\textrm{d})\) and \(H \varLambda ^n = {{\,\textrm{Ran}\,}}(\textrm{d})\).

Let \(\textrm{d}^*\) be the adjoint of \(\textrm{d}\), i.e. \(\langle \textrm{d}^*p, q \rangle := \langle p, \textrm{d}q \rangle \) for all \(q \in H\varLambda ^{k - 1}\) and sufficiently regular \(p \in L^2 \varLambda ^k\). To make precise the required regularity, we define the Sobolev spaces

$$\begin{aligned} H \varLambda ^k&:= \{ p \in L^2 \varLambda ^k : \textrm{d}p \in L^2 \varLambda ^{k + 1} \}, \\ H^* \varLambda ^k&:= \{ p \in L^2 \varLambda ^k : \textrm{d}^*p \in L^2 \varLambda ^{k - 1} \}. \end{aligned}$$

Remark 2.2

Formally, the Sobolev space \(H \varLambda ^k\) defined here is a representation of the vector space containing alternating, multi-linear k-forms on \(\varOmega \) and \(\textrm{d}\) is a representation of the exterior derivative. Here, we do not make this distinction and will work directly with the canonical representations of both the forms and the differentials. We refer the interested reader to [1, 30].

The Darcy flow system (1.1) can now be identified as a problem of the form: find \((q,p) \in H\varLambda ^{n - 1} \times H^*\varLambda ^n\) that satisfies

$$\begin{aligned} K^{-1} q - \textrm{d}^*p&= 0, \end{aligned}$$
(2.7a)
$$\begin{aligned} \textrm{d}q&= f. \end{aligned}$$
(2.7b)

This formulation covers the three types of boundary conditions in 2D and 3D presented in Sect. 1.1. The corresponding spaces are presented in Table 1 and their precise definitions can be found in Sect. 1.2.

Table 1 Explicit definitions of the spaces \(H \varLambda ^k\) for the different boundary conditions

The three steps of the solution procedure from Sect. 2.1 can now be recast in terms of the spaces \(H \varLambda ^k\) and their associated differentials \(\textrm{d}\). For each step, we briefly show the solvability of the involved problem using standard arguments.

  1. 1.

    Find \(q_f \in H \varLambda ^{n - 1}\) that satisfies

    $$\begin{aligned} \textrm{d}q_f&= f. \end{aligned}$$
    (2.8)

Lemma 2.1

Problem (2.8) admits a solution.

Proof

Existence is guaranteed by the fact that \(f \in H \varLambda ^n = {{\,\textrm{Ran}\,}}(\textrm{d})\). We emphasize that \(q_f\) is generally not unique. \(\square \)

  1. 2.

    Solve for \(r \in H \varLambda ^{n-2} \cap H^* \varLambda ^{n-2}\):

    $$\begin{aligned} (\textrm{d}^*K^{-1}\textrm{d}+ \textrm{d}\textrm{d}^*)r = - \textrm{d}^* K^{-1} q_f. \end{aligned}$$
    (2.9)

Lemma 2.2

Problem (2.9) admits a unique solution

Proof

Let \(q_0:= q - q_f\), for which we have \(\textrm{d}q_0 = 0\). The exactness of the complex ensures that a \(r \in H \varLambda ^{n - 2}\) exists with \(\textrm{d}r = q_0\) and \(r \perp {{\,\textrm{Ker}\,}}(\textrm{d})\). This implies that \(\textrm{d}^* r = 0\) and so \(r \in H^*\varLambda ^{n - 2}\). Inserting r in (2.9), we see that

$$\begin{aligned} (\textrm{d}^*K^{-1}\textrm{d}+ \textrm{d}\textrm{d}^*)r = \textrm{d}^*K^{-1}\textrm{d}r&= \textrm{d}^*K^{-1}(q - q_f) \\&= \textrm{d}^*\textrm{d}^* p - \textrm{d}^* K^{-1} q_f = - \textrm{d}^* K^{-1} q_f. \end{aligned}$$

In turn, existence is verified and it remains to show uniqueness. Considering a zero right-hand side, we test the equation with \(r \in H \varLambda ^{n - 2} \cap H^* \varLambda ^{n-2}\) and derive

$$\begin{aligned} \langle K^{-1} \textrm{d}r, \textrm{d}r \rangle + \langle \textrm{d}^* r, \textrm{d}^* r \rangle&= 0. \end{aligned}$$

Since \(K^{-1}\) is positive definite, it follows that \(r \in {{\,\textrm{Ker}\,}}(\textrm{d}_{n - 2}) \cap {{\,\textrm{Ker}\,}}(\textrm{d}_{n - 3}^*)\). Now, since

$$\begin{aligned} {{\,\textrm{Ker}\,}}(\textrm{d}_{n - 3}^*) = {{\,\textrm{Ran}\,}}(\textrm{d}_{n - 3})^{\perp } = {{\,\textrm{Ker}\,}}(\textrm{d}_{n - 2})^{\perp }, \end{aligned}$$

we have \(r = 0\) and uniqueness is shown. \(\square \)

  1. 3.

    Construct \(q:= q_f + \textrm{d}r\). Solve for \(p \in H^* \varLambda ^n\):

    $$\begin{aligned} \textrm{d}^* p&= K^{-1} q. \end{aligned}$$
    (2.10)

Lemma 2.3

Problem (2.10) admits a unique solution.

Proof

In this case, existence is verified by the true solution p to the original problem (2.7). For uniqueness, we note that a zero right-hand side is equivalent to stating that \(p \perp {{\,\textrm{Ran}\,}}(\textrm{d})\). However, since \(H \varLambda ^n = {{\,\textrm{Ran}\,}}(\textrm{d})\), we conclude that \(p = 0\). \(\square \)

To conclude this section, we briefly show that our three-step procedure constructs the unique solution to the original problem.

Lemma 2.4

The pair (qp) obtained from the three-step procedure solves (2.7).

Proof

First, (2.7a) is satisfied due to (2.10). Second, (2.7b) is fulfilled by the calculation \(\textrm{d}q = \textrm{d}(q_f + \textrm{d}r) = \textrm{d}q_f = f\). \(\square \)

2.3 Discretization of Darcy Flow Using Structure-Preserving Methods

We continue with the discrete setting in which we let \(P\varLambda ^k \subset H\varLambda ^k\) be a finite-dimensional subspace for each k. The differential \(\textrm{d}_{h, k}: P\varLambda ^k \rightarrow P\varLambda ^{k + 1}\) is defined as the restriction of \(\textrm{d}_k\) to \(P\varLambda ^k\). We often omit the subscript k on the differential and we assume that \((P\varLambda ^{\bullet }, \textrm{d}_h)\) forms an exact complex. Such exact discrete complexes form an active area of research, see e.g. [1, 2, 18].

As our main example, we focus on the family of trimmed elements of polynomial order r, i.e. \(P\varLambda ^k:= P_r^- \varLambda ^k\) in the notation of Finite Element Exterior Calculus [2]. This family consists of the Lagrange elements \(\mathbb {L}_r\), the Nédélec [22] element of the first kind \(\mathbb {N}_{r - 1}\), the Raviart-Thomas [27] element \(\mathbb{R}\mathbb{T}_{r - 1}\), and the discontinuous, piecewise polynomials \(\mathbb {P}_{r - 1}\). The elements of lowest order, with \(r = 1\), are referred to as the Whitney forms, and form the exact complex \((P\varLambda ^{\bullet }, \textrm{d}_h)\):

(2.11)

In the case of homogeneous boundary conditions on the variable \(q \in P \varLambda ^{n - 1}\), i.e. \(\partial _q \varOmega \ne \emptyset \), we consider the subspaces \(P_{\partial _q \varOmega } \varLambda ^k\) in which the degrees of freedom on \(\partial _q \varOmega \) are set to zero.

The discrete complex \((P\varLambda ^\bullet , \textrm{d}_h)\) is exact (see e.g. [2]) and therefore the three-step technique proposed in Sect. 2.2 is directly applicable.

The first step (2.8) can be solved using any locally conservative scheme, e.g. with a finite volume method with a two-point flux approximation (TPFA). This leads to a small system consisting only of cell-center pressure unknowns and is therefore relatively inexpensive to compute. Since the TPFA method is not consistent in general, the remaining two steps can be seen as corrections.

The second step requires the operators \(\textrm{d}_h^*\textrm{d}_h\) and \(\textrm{d}_h\textrm{d}_h^*\). The former can directly be implemented as \(\langle \textrm{d}_h r, \textrm{d}_h {\tilde{r}} \rangle = \langle \textrm{d}r, \textrm{d}{\tilde{r}} \rangle \) since \(P\varLambda ^k \subset H \varLambda ^k\). For the latter operator \(\textrm{d}_h \textrm{d}_h^*\), we first solve for \(\textrm{d}_h^*r \in P\varLambda ^{k - 1}\):

$$\begin{aligned} \langle \textrm{d}_h^* r, {\tilde{s}} \rangle&= \langle r, \textrm{d}_h {\tilde{s}} \rangle ,&\forall {\tilde{s}} \in P\varLambda ^{k - 1}, \end{aligned}$$
(2.12)

and then compute \(\langle \textrm{d}_h^* r, \textrm{d}_h^* {\tilde{r}} \rangle \). This is computationally costly, so we propose a mass lumping technique on the mass matrix of \(P\varLambda ^{k - 1}\) in Sect. 4.1. This modification does not change the differential of the solution, i.e. \(\textrm{d}_h r\) is unaffected since the penalty term \(\textrm{d}_h\textrm{d}_h^*\) only controls the part of r that is in the kernel of \(\textrm{d}_h\).

Remark 2.3

We emphasize that (2.12) is solvable for all \(r \in P\varLambda ^k\) and so \(\textrm{d}_h^*: P\varLambda ^k \rightarrow P\varLambda ^{k - 1}\) is a well-defined operator. However, we generally have \(P\varLambda ^k \not \subseteq H^* \varLambda ^k\), so \(\textrm{d}_h^*\) is not a restriction of \(\textrm{d}^*\). For example, the piecewise constants \(\mathbb {P}_0 = P\varLambda ^n \subset H \varLambda ^n = L^2\) are not contained in \(H^* \varLambda ^n = H(\nabla )\) but (2.12) nevertheless defines \(\textrm{d}_{h, n - 1}^*\) as a discrete gradient on this space. Analogously, the \(\textrm{d}_{h, k}^*\) operators correspond to a discrete curl on \(\mathbb{R}\mathbb{T}_r\) and a discrete divergence on \(\mathbb {N}_r\).

Remark 2.4

The term \(\langle d_h^* r, d_h^* {\tilde{r}} \rangle \) can be scaled by any positive parameter without affecting \(\textrm{d}_h r\). Hence, it may be beneficial in practice to introduce a scaling by \(K^{-1}\) in order to balance the terms in (2.9). A scaling with the mesh size is not necessary since \(\langle d_h^* r, d_h^* {\tilde{r}} \rangle \) and \(\langle d_h r, d_h {\tilde{r}} \rangle \) scale similarly with h.

The solutions to systems (2.10) and (2.8) can be obtained by solving an elliptic problem posed on \(P\varLambda ^n\) and thus, in the lowest order case, concerns only cell-center variables. Similarly, the problem in step 2.2 concerns degrees of freedom on the mesh edges in 3D and nodes in 2D. We have thus partitioned the original saddle point formulation into three smaller, elliptic problems posed on either the nodes, edges, or cells of the mesh.

Finally, we note that the discretization can be generalized to polyhedral meshes using the virtual element method [12]. In the lowest order case, this amounts to defining a degree of freedom of \(P\varLambda ^k\) on each k-dimensional mesh entity, i.e. on the nodes, edges, faces, or cells.

2.4 Flow in Fractured Porous Media

Next, we consider a model of flow in fractured porous media in which the fractures are represented by lower-dimensional manifolds. We start by presenting the subdivision of the domain into subdomains of different dimensions, then define the finite element spaces and governing equations, and finally introduce the relevant exact discrete complex. Thus, we limit ourselves to the discrete setting and refer the interested reader to [9, 10] for the continuous case.

The first step is to partition the domain of computation into the n-dimensional bulk matrix, the \((n - 1)\)-dimensional fractures and the lower-dimensional intersection lines and points. Specifically, let \(\varOmega \) be partitioned into open subdomains \(\varOmega _i\) with \(i \in I\) the index and \(d_i\) its dimensionality. We assume that each \(\varOmega _i\) with \(d_i < n\) has at least one neighbor \(\varOmega _j\) such that \(d_j = d_i + 1\) and \(\varOmega _i\) coincides with a part of \(\partial \varOmega _j\), denoted by \(\partial _i \varOmega _j\). A precise definition of allowable geometries is given in [9] and Fig. 1 illustrates a two-dimensional example.

Fig. 1
figure 1

Example of a fracture network in which \(\varOmega _1\) and \(\varOmega _2\) form the two-dimensional bulk, \(\varOmega _3\), \(\varOmega _4\), and \(\varOmega _5\) the one-dimensional fractures, and \(\varOmega _6\) the intersection point. Interfaces between subdomains of codimension one are denoted by \(\partial _i \varOmega _j\) and the fracture tip is denoted by \(\partial _0 \varOmega _3\)

On each subdomain \(\varOmega _i\), we introduce a shape-regular, simplicial mesh \(\varOmega _{h, i}\). We impose that the meshes are matching in the sense that each \(d_i\)-dimensional cell of \(\varOmega _{h, i}\) coincides with a face on \(\partial _i \varOmega _{h, j}\) for all its neighbors with \(d_j = d_i + 1\). Since we only consider the discrete case in this work, we abuse notation and omit the subscript h on \(\varOmega _{h, i}\).

We group the finite element spaces from Sect. 2.3 as in [24] to define the mixed-dimensional spaces:

$$\begin{aligned} P\mathfrak {L}^k := \prod _{\begin{array}{c} i \in I \\ d_i \ge n - k \end{array}} P\varLambda ^{d_i - (n - k)}(\varOmega _i) \end{aligned}$$
(2.13)

For ease of reference, Table 2 presents the local finite element spaces depending on the dimensionality \(d_i\) of the subdomain.

Table 2 A mixed-dimensional family of finite elements of lowest order that form an exact discrete complex for \(n = 3\)

We are interested in a mixed formulation and therefore introduce the flux \(\mathfrak {q} \in P \mathfrak {L}^{n - 1}\) and pressure \(\mathfrak {p} \in P \mathfrak {L}^n\). Since these are variables defined on subdomains of different dimensionalities, we refer to them as mixed-dimensional and denote them using a Gothic font. We revert to standard font to indicate a restriction to a subdomain, i.e. \(p_i:= \mathfrak {p}|_{\varOmega _i}\).

With the function spaces defined, we continue with the governing equations of mixed-dimensional Darcy flow [5], which are a generalization of [21]. First, we assume Darcy’s law tangential to each \(\varOmega _i\) and normal to each \(\partial _i \varOmega _j\), with conductivities \(K_i\) and \(K_{ij}\), respectively. Second, the mass balance equation relates the tangential flux to the contribution from higher-dimensional neighboring subdomains. This leads us to the following equations:

$$\begin{aligned} q_i + K_{i} \nabla _i p_i&= 0&\text {in }&\varOmega _i,&1&\le d_i \le n, \end{aligned}$$
(2.14a)
$$\begin{aligned} \nu _j \cdot q_j + K_{ij} (p_i - p_j)&= 0&\text {on }&\partial _i \varOmega _j,&0&\le d_i \le n - 1, \end{aligned}$$
(2.14b)
$$\begin{aligned} \nabla _i \cdot q_i + \sum _{\begin{array}{c} j \in I \\ d_j = d_i + 1 \end{array}} (- \nu _j \cdot q_j)|_{\partial _i \varOmega _j}&= f_i&\text {in }&\varOmega _i,&0&\le d_i \le n. \end{aligned}$$
(2.14c)

Here, \(\nabla _i\) is the del-operator on \(\varOmega _i\) and \(\nu _j\) is the outward oriented, unit normal vector to \(\partial \varOmega _j\). In (2.14c), we assume that the first term is zero for \(d_i = 0\) and the second term is zero for \(d_i = n\).

The following boundary conditions are imposed:

$$\begin{aligned} p_i&= 0&\text {on }&\partial \varOmega _i \cap \partial \varOmega ,&\nu _i \cdot q_i&= 0&\text {on }&\partial _0 \varOmega _i. \end{aligned}$$
(2.14d)

with \(\partial _0 \varOmega _i \subseteq \partial \varOmega _i\) the fracture tips, i.e. portion of the boundary of \(\varOmega _i\) that does not border a lower-dimensional subdomain.

In order to show that (2.14) has the structure (2.7), we first introduce the following inner products:

$$\begin{aligned} \langle \mathfrak {p}, \mathfrak {{\tilde{p}}} \rangle _{L^2 \mathfrak {L}^n}&:= \sum _{i \in I} \langle p_i, {\tilde{p}}_i \rangle _{\varOmega _i}, \\ \langle \mathfrak {q}, \mathfrak {{\tilde{q}}} \rangle _{L^2 \mathfrak {L}^{n - 1}}&:= \sum _{\begin{array}{c} i \in I \\ d_i \ge 1 \end{array}} \bigg ( \langle q_i, {\tilde{q}}_i \rangle _{\varOmega _i} + \sum _{\begin{array}{c} j \in I \\ d_j = d_i - 1 \end{array}} \langle \nu _i \cdot q_i, \nu _i \cdot {\tilde{q}}_i \rangle _{\partial _j \varOmega _i} \bigg ). \end{aligned}$$

Second, we define mixed-dimensional divergence \((\mathfrak {D}\cdot ): P \mathfrak {L}^{n - 1} \rightarrow P \mathfrak {L}^n\) as

$$\begin{aligned} (\mathfrak {D} \cdot \mathfrak {q})|_{\varOmega _i}&:= \nabla _i \cdot q_i + \sum _{\begin{array}{c} j \in I \\ d_j = d_i + 1 \end{array}} (- \nu _j \cdot q_j)|_{\partial _i \varOmega _j}&\forall i&\in I. \end{aligned}$$

Finally, we collect the source terms to create \(\mathfrak {f} \in P\mathfrak {L}^n\) such that \(\mathfrak {f}|_{\varOmega _i} = f_i\) and similarly, we define \(\mathfrak {K}\) such that it equals \(K_i\) on \(\varOmega _i\) and \(K_{ij}\) on \(\partial _i \varOmega _j\). The weak formulation of the fracture flow problem (2.14) then becomes (cf. [10] for the derivation): find \((\mathfrak {q}, \mathfrak {p}) \in P \mathfrak {L}^{n - 1} \times P \mathfrak {L}^n\) such that

$$\begin{aligned} \langle \mathfrak {K}^{-1} \mathfrak {q}, \mathfrak {{\tilde{q}}} \rangle _{L^2 \mathfrak {L}^{n - 1}} - \langle \mathfrak {p}, \mathfrak {D} \cdot \mathfrak {{\tilde{q}}} \rangle _{L^2 \mathfrak {L}^n}&= 0,&\forall \mathfrak {{\tilde{q}}}&\in P \mathfrak {L}^{n - 1}, \end{aligned}$$
(2.15a)
$$\begin{aligned} \langle \mathfrak {D} \cdot \mathfrak {q}, \mathfrak {{\tilde{p}}} \rangle _{L^2 \mathfrak {L}^n}&= \langle \mathfrak {f}, \mathfrak {{\tilde{p}}} \rangle _{L^2 \mathfrak {L}^n},&\forall \mathfrak {{\tilde{p}}}&\in P \mathfrak {L}^n. \end{aligned}$$
(2.15b)

We observe that (2.15) has the structure (2.7). Hence, we next require a mixed-dimensional curl operator \((\mathfrak {D} \times )\) in order to generate a solenoidal field. It is important to note that here, solenoidal means that \(\mathfrak {D} \cdot \mathfrak {q} = 0\) and this is not the same as imposing \(\nabla _i \cdot q_i = 0\) on all \(i \in I\). In order to apply our proposed solution technique, we therefore require the mixed-dimensional analogues of the curl and gradient. These differential operators were introduced in [9] and form the following co-chain complex:

(2.16)

We recall that the spaces \(P\mathfrak {L}^k\) are given by the columns of Table 2. Moreover, the mixed-dimensional gradient \((\mathfrak {D})\) and curl \((\mathfrak {D} \times )\) are defined as follows:

$$\begin{aligned} (\mathfrak {D} \mathfrak {s})|_{\varOmega _i}&:= {\left\{ \begin{array}{ll} \nabla _i s_i, &{} d_i = 3, \\ \sum _{\begin{array}{c} j \in I \\ d_j = 3 \end{array}} (- (\nu _i \cdot \nu _j) s_j)|_{\partial _i \varOmega _j},&d_i = 2. \end{array}\right. } \end{aligned}$$
(2.17a)
$$\begin{aligned} (\mathfrak {D} \times \mathfrak {r})|_{\varOmega _i}&:= {\left\{ \begin{array}{ll} \nabla _i \times r_i, &{} d_i = 3, \\ \nabla _i^\perp r_i + \sum _{\begin{array}{c} j \in I \\ d_j = 3 \end{array}} (\nu _j \times r_j)|_{\partial _i \varOmega _j}, &{} d_i = 2, \\ \sum _{\begin{array}{c} j \in I \\ d_j = 2 \end{array}} ((\nu _j^\perp \cdot \tau _i) r_j)|_{\partial _i \varOmega _j},&d_i = 1. \end{array}\right. } \end{aligned}$$
(2.17b)

Here, \(\nu _i|_{\partial _i \varOmega _j}\) for \(d_i = 2\) is the unit vector normal to \(\varOmega _i\) that forms a positive orientation with the tangent bundle of \(\varOmega _i\), according to the right-hand rule. Moreover, \(\tau _i\) for \(d_i = 1\) is the unit vector tangent to \(\varOmega _i\).

The fact that (2.16) is exact was shown in [9, 20] and, in turn, the solution technique of Sect. 2.2 is directly applicable.

3 A Reduced Basis Method Ensuring Local Mass Conservation

The aim of this section is to augment the solution technique proposed in Sect. 2 by replacing step 2.2 with a reduced basis method. The mapping that we aim to approximate is \((K, q_f) \rightarrow r\). We utilize a splitting into a computationally costly off-line stage and an efficient on-line stage. In the off-line stage, we first compute the mapping \(f \rightarrow q_f\) given by (2.8), e.g. by saving an LU-decomposition. Then, we construct a reduced basis approximation to the mapping \((K, q_f) \rightarrow r\) given by system (2.9). The details of this construction are given in Sect. 3.1.

The on-line stage then amounts to the following steps:

  1. 1.

    Given f, construct \(q_f\) by solving (2.8).

  2. 2.

    Given K and \(q_f\), compute r using the reduced basis.

  3. 3.

    Compute \(q:= q_f + \textrm{d}r\) and construct p by solving (2.10).

We emphasize that the solution obtained from this method is guaranteed to conserve mass locally, hence achieving our main goal. In fact, the error arising from the reduced basis approximation is contained in the contribution \(\textrm{d}r\), which is divergence-free by construction.

3.1 Construction of the Reduced Basis by Proper Orthogonal Decomposition

Let us focus on the second step in this algorithm in the discrete setting. Then Problem (2.9) is of the form:

$$\begin{aligned} \textsf{A}^\textsf{K} \textsf{r} = \textsf{b}_\textsf{f} \end{aligned}$$
(3.1)

In which the matrix \(\textsf{A}^{\textsf{K}} \in \mathbb {R}^{n_{r} \times n_{r}}\) depends on the material parameter K and the vector \(\textsf{b}_\textsf{f} \in \mathbb {R}^{n_{r}}\) on the right-hand side is determined by the source term f. In the “offline” stage of the method, we now construct a reduced basis that captures the influence of these parameters on the solution. We use the conventional Proper Orthogonal Decomposition approach to achieve this.

In particular, we first choose \(n_S\) values for the parameter pair (Kf) and solve (3.1) for each value pair. Such a sampling is possible in our cases of interest, cf. Section 4, where both K and f are defined as constants on subdomains of \(\varOmega \). In the more general case of spatially varying parameters, the construction of a representative sample is significantly more involved. For \(1 \le i \le n_S\), the solution vectors \(\textsf{r}_i \in \mathbb {R}^{n_r}\) are known as snapshots, and we collect these to form the columns of the matrix \(\textsf{S} \in \mathbb {R}^{n_r \times n_S}\).

Next, we compute the singular value decomposition of \(\textsf{S}\) such that

$$\begin{aligned} \textsf{S} = \textsf{U} \varSigma \textsf{V}^\textsf{T} \end{aligned}$$
(3.2)

In which \(\textsf{U} \in \mathbb {R}^{n_r \times n_r}\) and \(\textsf{V} \in \mathbb {R}^{n_S \times n_S}\) are orthogonal matrices and \({\varSigma }\) is a diagonal matrix containing the singular values \(\sigma _i\), in decreasing order. For given threshold value \(\varepsilon \), we select \(n_m\) as the largest index that satisfies

$$\begin{aligned} \sigma _{n_m} \ge \varepsilon \end{aligned}$$
(3.3)

We then extract the \(n_m\) most important modes by restricting \(\textsf{U}\) to its first \(n_m\) columns, creating \(\textsf{U}_\textsf{m} \in \mathbb {R}^{n_r \times n_m}\). The reduced problem now becomes:

$$\begin{aligned} (\textsf{U}_\textsf{m}^\textsf{T} \textsf{A}^\textsf{K} \textsf{U}_\textsf{m}) r_m = \textsf{U}_\textsf{m}^\textsf{T} \textsf{b}_\textsf{f}. \end{aligned}$$

Note that this is a system with \(n_m\) unknowns and since we typically have \(n_m \ll n_r\), it is significantly less expensive to solve than the original system (3.1). Finally, we have \(\textsf{r} = \textsf{U}_\textsf{m} \textsf{r}_\textsf{m}\) as the reduced basis approximation to the full order system.

4 Numerical Results

This section concerns the implementation, set-up, and results of the numerical experiments. Section 4.1 provides guidance into the numerical implementation of the proposed procedure and Sect. 4.2 presents the results.

4.1 Implementation

Since the spaces are finite dimensional, we can represent each variable \(p \in P\varLambda ^k\) as a vector \(\textsf{p} \in \textsf{P}\varLambda ^k:= \mathbb {R}^{n_k}\) containing the values of its \(n_k\) degrees of freedom. Moreover, the linear operators can be represented by matrices, e.g. the mass matrix \(\textsf{M}_\textsf{k}\) is given by:

$$\begin{aligned} {\tilde{\textsf{p}}}^\textsf{T} \textsf{M}_\textsf{k} \textsf{p}&= \langle p , {\tilde{p}} \rangle . \end{aligned}$$

Similarly, let \(\textsf{B}_\textsf{k}\) be the matrix representation of the differential \(\textrm{d}_{h, k}\):

$$\begin{aligned} \textsf{p}^\textsf{T} {\hat{\textsf{B}}}_\textsf{k} \textsf{q}&:= \langle \textrm{d}_{h, k} q, p \rangle ,&\textsf{B}_\textsf{k}&:= \textsf{M}_{\textsf{k} + 1}^{-1} {\hat{\textsf{B}}}_\textsf{k}. \end{aligned}$$

Remark 4.1

Depending on the implementation, it may be easier to compute \(\textsf{B}_\textsf{k}\) directly and set \({\hat{\textsf{B}}}_\textsf{k} = \textsf{M}_{\textsf{k} + 1} \textsf{B}_\textsf{k}\). In fact, the degrees of freedom in \(P\varLambda ^k\) and \(P\varLambda ^{k + 1}\) can be chosen such that all non-zero entries of \(\textsf{B}_\textsf{k}\) are \(\pm 1\).

These matrices allow us to compute the operator \(\textrm{d}_{h, k}^* \textrm{d}_{h, k}\) as

$$\begin{aligned} \langle \textrm{d}_{h, k} q, \textrm{d}_{h, k} {\tilde{q}} \rangle = {\tilde{\textsf{q}}}^\textsf{T} ({\hat{\textsf{B}}}_\textsf{k}^\textsf{T} \textsf{M}_{\textsf{k} + 1}^{-1} {\hat{\textsf{B}}}_\textsf{k}) \textsf{q} = {\tilde{\textsf{q}}}^\textsf{T} (\textsf{B}_\textsf{k}^\textsf{T} \textsf{M}_{\textsf{k} + 1} \textsf{B}_\textsf{k}) \textsf{q}. \end{aligned}$$
(4.1)

On the other hand, the penalization term \(\textrm{d}_{h, k} \textrm{d}_{h, k}^*\) requires the more involved computation

$$\begin{aligned} \langle \textrm{d}_{h, k}^* q, \textrm{d}_{h, k}^*q \rangle = {\tilde{\textsf{q}}}^\textsf{T} ({\hat{\textsf{B}}}_\textsf{k} \textsf{M}_\textsf{k}^{-1} {\hat{\textsf{B}}}_\textsf{k}^\textsf{T}) \textsf{q}. \end{aligned}$$
(4.2)

The inversion of the mass matrix \(\textsf{M}_\textsf{k}\) is typically not feasible and, in our case, not necessary. We proceed by letting \(\textsf{L}_\textsf{k}\) be an easily invertible matrix obtained after mass lumping of \(\textsf{M}_\textsf{k}\). This leads us to the following approximation:

$$\begin{aligned} \langle \textrm{d}_{h, k}^* q, \textrm{d}_{h, k}^*q \rangle \approx {\tilde{\textsf{q}}}^\textsf{T} ({\hat{\textsf{B}}}_\textsf{k} \textsf{L}_\textsf{k}^{-1} {\hat{\textsf{B}}}_\textsf{k}^\textsf{T}) \textsf{q}. \end{aligned}$$
(4.3)

For \(k = n\), we note that \(\textrm{d}_{h, k} \textrm{d}_{h, k}^*\) corresponds to a discrete Laplace operator and we can choose \(\textsf{L}_{\textsf{n} - 1}\) such that the resulting scheme is a TPFA finite volume method [4, 6] for the Laplace equation. This is also possible in the mixed-dimensional case [7].

Finally, the conductivity induces a scaled inner product and we denote the corresponding matrix by \(\textsf{M}_{\textsf{n} - 1}^\textsf{K}\), i.e.

$$\begin{aligned} {\tilde{\textsf{q}}}^\textsf{T} \textsf{M}_{\textsf{n} - 1}^\textsf{K} \textsf{q}&= \langle K^{-1} q , {\tilde{q}} \rangle . \end{aligned}$$

With these matrices and vectors defined, we now repeat the three-step procedure to guide implementation:

  1. 1.

    Solve the following system for \(\textsf{p}_\textsf{f} \in \textsf{P}\varLambda ^n\):

    $$\begin{aligned} ({\hat{\textsf{B}}}_{\textsf{n} - 1} \textsf{L}_{\textsf{n} - 1}^{-1} {\hat{\textsf{B}}}_{\textsf{n} - 1}^\textsf{T}) \textsf{p}_\textsf{f} = \textsf{f}, \end{aligned}$$
    (4.4)

    and set \(\textsf{q}_\textsf{f} = \textsf{L}_{\textsf{n} - 1}^{-1} {\hat{\textsf{B}}}_{\textsf{n} - 1}^\textsf{T} \textsf{p}_\textsf{f}\).

  2. 2.

    Use the reduced basis method to approximate \(\textsf{r} \in \textsf{P}\varLambda ^{n - 2}\) that satisfies

    $$\begin{aligned} (\textsf{B}_{\textsf{n} - 2}^\textsf{T} \textsf{M}_{\textsf{n} - 1}^{\textsf{K}} \textsf{B}_{\textsf{n} - 2} + {\hat{\textsf{B}}}_{\textsf{n} - 3} \textsf{L}_{\textsf{n} - 3}^{-1} {\hat{\textsf{B}}}_{\textsf{n} - 3}^\textsf{T} ) \textsf{r} = (- \textsf{B}_{\textsf{n} - 2}^\textsf{T} \textsf{M}_{\textsf{n} - 1}^\textsf{K}) \textsf{q}_\textsf{f}. \end{aligned}$$
    (4.5)
  3. 3.

    Set \(\textsf{q} = \textsf{q}_\textsf{f} + \textsf{B}_{\textsf{n} - 2} \textsf{r}\). Solve the following system for \(\textsf{p} \in \textsf{P}\varLambda ^n\):

    $$\begin{aligned} ({\hat{\textsf{B}}}_{\textsf{n} - 1} \textsf{L}_{\textsf{n} - 1}^{-1} {\hat{\textsf{B}}}_{\textsf{n} - 1}^\textsf{T}) \textsf{p} = ({\hat{\textsf{B}}}_{\textsf{n} - 1} \textsf{L}_{\textsf{n} - 1}^{-1} \textsf{M}_{\textsf{n} - 1}^\textsf{K}) \textsf{q} . \end{aligned}$$
    (4.6)

It is important to note that the first and third step amount to solving the same system. Thus, for computational efficiency, we save the LU-decomposition of this matrix in the off-line stage.

Moreover, the replacement of \(\textsf{M}_{\textsf{n} - 3}^{-1}\) by \(\textsf{L}_{\textsf{n} - 3}^{-1}\) in the second step changes the solution \(\textsf{r}\) but not \(\textsf{B}_{\textsf{n} - 2} \textsf{r}\). Formally, the mass-lumping changes the orthogonality condition with respect to \({{\,\textrm{Ker}\,}}(\textsf{B}_{\textsf{n} - 2})\) by employing a different inner product. However, the augmentation lies in the kernel of the curl operator and therefore does not affect the final solution \(\textsf{q}\).

Remark 4.2

For simplicity of implementation, we may set \(\textsf{L}_\textsf{k} = \textsf{I}\) and substitute \(\textsf{B}_{\textsf{n} - 3}\) for \({{\hat{\textsf{B}}}_{\textsf{n} - 3}}\) in the second step. This lets the first and third step become purely geometrical in the sense that the matrices only depend on the connectivity of the mesh entities. We note that this simplification will not affect the solvability of the systems, or the final solution, but requires proper scaling with the mesh size h.

Remark 4.3

If we set \(\textsf{L}_{\textsf{n} - 1} = \textsf{M}_{\textsf{n} - 1}^\textsf{K}\), then the first step amounts to solving the Schur complement system and the true solution would be obtained directly. From an algebraic perspective, the proposed technique therefore corresponds to an approximation of the Schur complement system with suitable corrections.

Remark 4.4

If the parameters f and K are given by constants on subdomains of \(\varOmega \), then we can exploit the affine dependencies to pre-assemble the matrix \(\textsf{M}_{\textsf{n} - 1}^\textsf{K}\) and the vector \(\textsf{q}_\textsf{f}\).

Finally, we emphasize that this implementation is valid for both the mixed finite element method and the virtual element method [12]. The difference lies in the computation of the mass matrices.

For this work, the numerical experiments were implemented using PyGeoN [3], an open-source Python package. The mixed-dimensional structure was used from PorePy [19], with the grids created using the meshing software GMSH [15]. Finally, the mixed-dimensional curl operator was adapted from [11].

4.2 Numerical Experiments

We investigate the performance of our proposed technique using three test cases, of varying complexity. In order to exhibit the wide applicability, the first case simulates a three-dimensional layered porous medium problem for a wide range of permeabilities, the second concerns a two-dimensional problem with fractures on a polygonal mesh, and the third consists of a three-dimensional fractured porous medium problem. In each case, we vary the model parameters and follow Sect. 3.1 to generate a reduced basis. The resulting method is compared to a reference solution, obtained by solving the original, full-order model for a representative choice of parameters.

Table 3 The solution procedure solves three smaller, symmetric positive definite systems instead of the full-order model (FOM), which has a saddle-point structure. By approximating the second step with a reduced basis method (RBM) using a threshold value of \(\varepsilon = 10^{-7}\), a small error is introduced but the local mass balance is preserved

We summarize the main observations next, based on the results presented in Table 3. First, we note that the number of degrees of freedom is reduced by a factor three, approximately, when comparing the full-order model to the systems in the first and third step. Recall that these are cell-centered, symmetric positive definite problems and are therefore amenable to a range of efficient solvers.

Second, we observe in all cases that the solution to the original problem is recovered if the system (2.9) in the second step is solved exactly. This verifies the exactness of the discrete complexes.

Third, our procedure provides a solid basis for the use of inexact solvers, as we explore here with RBM, because the introduced error can be contained to the constitutive law. This is reflected in the final three columns of Table 3, which shows that the mass balance equation is satisfied up to machine precision. The reported values concerning the pressure and flux are relative errors with respect to the \(L^2\)-norm. For the flux, this is equivalent to the relative error in the \(H(\nabla \cdot )\) norm, due to the local mass conservation.

Fourth, the choice of a threshold value on the singular values is directly reflected in the accuracy of the solution. By lowering this threshold, more modes are used and a better approximation of the solution is obtained. This trade-off between accuracy and computational cost can be adjusted according to the problem at hand.

Fifth, we observe numerically that the number of significant modes does not dependent strongly on the mesh size. This can be explained by the fact that the response of the solution to the model parameter is the same on different meshes. In turn, a reduced basis formed on a coarse mesh can provide valuable insight for finer meshes, allowing for an efficient choice on the number of necessary snapshots.

We continue this section with separate descriptions of the three numerical test cases and present the corresponding, case-specific observations. In each case, we set the following, parametrized boundary condition:

$$\begin{aligned} p({\varvec{x}})|_{{\varvec{x}} \in \partial \varOmega }&= \bar{{\varvec{\alpha }}} \cdot {\varvec{x}},&\bar{{\varvec{\alpha }}}&\in [0, 1]^n, \end{aligned}$$
(4.7)

with n the dimension of \(\varOmega \).

4.2.1 A Three-Dimensional, Layered Porous Medium

As a first test case, we consider a set-up that emulates a layered porous medium. Let the domain \(\varOmega \) be the unit cube, subdivided into four equal, horizontal slabs. The bottom and third layer form the subdomain \(\varOmega _0\) whereas the remaining two layers form \(\varOmega _1\). We parametrize the conductivity, source term, and boundary conditions as follows:

$$\begin{aligned} K({\varvec{x}})&= {\left\{ \begin{array}{ll} 1, &{} {\varvec{x}} \in \varOmega _0, \\ \bar{K}, &{} {\varvec{x}} \in \varOmega _1, \end{array}\right. }{} & {} \begin{aligned} \\ \bar{K} \in \left[ 10^{-5}, 10^{5}\right] , \end{aligned} \\ f({\varvec{x}})&= \bar{f},{} & {} \bar{f} \in [-1, 1] . \end{aligned}$$

The problem is discretized using the Raviart-Thomas pair of lowest order \((\mathbb{R}\mathbb{T}_0, \mathbb {P}_0)\) on a regular, tetrahedral grid with typical mesh size \(h:= 2^{-3}\). The parameter values for the snapshots are generated using a Latin hypercube sampling in which \(\bar{f}\) and \(\bar{{\varvec{\alpha }}}\) are equi-distributed and \(\bar{K}\) is distributed log-uniformly. We generate 44 snapshots and compute the singular value decomposition (3.2). The singular values \(\sigma _i\) are illustrated in Fig. 2(left).

Fig. 2
figure 2

(left) The singular values decay rapidly so that only the first 19 singular values are larger than the threshold value \(\varepsilon \). The corresponding modes form the reduced basis. (right) The reference solution of the flux superimposed on the layered conductivity field, with approximately half of the domain shown for the sake of visibility. The yellow subdomain is more permeable in this reference case (Color figure online)

The threshold value is set to \(\varepsilon = 10^{-7}\) and we consider the parameter set \((\bar{K}, \bar{f}, \bar{{\varvec{\alpha }}}):= (10^3, 1, {\varvec{0}})\). The solution obtained from the three-step procedure with RBM is compared to the solution of the full-order model, illustrated in Fig. 2(right). As shown in Table 3, we obtain a relative error on the order of \(10^{-7}\) for both pressure and flux. Thus, the second step can be reduced to a system of merely 19 degrees of freedom and yield an accurate approximation of the solution.

We report in Fig. 3 the relative errors of the numerical solutions of the three step procedure against the full order model. We have considered 400 simulations generated using a Latin hypercube sampling in which \(\bar{f}\) and \(\bar{{\varvec{\alpha }}}\) are equi-distributed and \(\bar{K}\) is distributed log-uniformly. We see that the vast majority of obtained, relative errors are below \(10^{-6}\), confirming for this problem the effectiveness of the proposed approach.

Finally, the average solving time, for our implementation, of the full order model is 50 s compared to 0.15 s of the solving phase of the three step procedure, with an average speed-up of more than 330.

Fig. 3
figure 3

Box-plot of the relative errors, for the flux q and pressure p, between the numerical solutions obtained with the three step procedure against the full order model solution for 400 different values of the parameters

4.2.2 A Two-Dimensional Fracture Flow Problem on a Polygonal Mesh

Our second test case introduces two complexities, namely the incorporation of a fracture network and the use of a polygonal mesh, cf. Figure 4. The former is taken care of using the mixed-dimensional differential operators from Sect. 2.4. The latter is handled by discretizing with the mixed virtual element method of lowest order.

The geometry and material parameters are based on [14, Case 3]. A heterogeneity is introduced by letting two fractures, denoted \(\varOmega _f^{-}\), be blocking and letting the remaining eight fractures, \(\varOmega _f^{+}\), be conductive. The fracture network is illustrated in Fig. 4(left). We denote the surrounding bulk matrix by \(\varOmega _m\) and set the following conductivities:

$$\begin{aligned} K({\varvec{x}})&= {\left\{ \begin{array}{ll} 1, &{} {\varvec{x}} \in \varOmega _m, \\ K^{-}, &{} {\varvec{x}} \in \varOmega _f^{-}, \\ K^{+}, &{} {\varvec{x}} \in \varOmega _f^{+}, \end{array}\right. }{} & {} \begin{aligned} \\ K^{-}&\in \left[ 10^{-5}, 10^{-3}\right] , \\ K^{+}&\in \left[ 10^{3}, 10^{5}\right] . \end{aligned} \end{aligned}$$

The source term f is set to zero. Let the aperture of each fracture be \(\epsilon = 10^{-4}\). The effective conductivities, i.e. \(K_i\) and \(K_{ij}\) in (2.14), are set as follows. For each fracture, we set \(K_i:= \epsilon K\) internally and \(K_{ij}:= \frac{2}{\epsilon } K\) on the interface with the bulk matrix, with K the fracture conductivity. Finally, at each intersection point, we set the conductivity \(K_{ij}:= \frac{2}{\epsilon } K^\pm \) with \(K^{\pm }\) the harmonic average of the conductivities of the adjacent fractures.

Fig. 4
figure 4

(left) The fracture network in the second test case with the conductive and blocking fractures highlighted in red and green, respectively. (right) A depiction of the top left of the domain showing the conforming, polygonal mesh on which the mixed virtual element spaces are defined (Color figure online)

We emphasize that there is a no-flux condition at the fracture tips, cf. (2.14d). These are essential boundary conditions in the mixed formulation and, in turn, we discretize the fracture flux variable on the subspace of functions that have zero normal trace at tips.

Fig. 5
figure 5

(left) The added complexity caused by the fracture network leads to a higher number of modes in the reduced basis. (right) The reference solution with the flux field superimposed on the pressure distribution. Note that the flow aligns itself tangentially with the blocking features and normally with the conductive fractures, as expected

We compute 120 snapshots according to a Latin hypercube sampling of the parameters in which the conductivities are again log-uniformly distributed. The resulting singular values are presented in Fig. 5(left) and it requires 25 modes to reach the threshold value of \(\varepsilon = 10^{-7}\).

The parameters for the reference solution are \((K^-, K^+) = (10^{-4}, 10^4)\) as in [14] and we set the boundary conditions with \(\bar{{\varvec{\alpha }}} = (0, 1)\) to induce a downward flow.

We remark on the number of degrees of freedom in the second step. The space on which the curl acts, \(H \varLambda ^{n - 2}\), is defined on the nodes of the two-dimensional mesh. This means that the solenoidal correction \((\mathfrak {D} \times \mathfrak {r})\) is completely dictated by degrees of freedom in the bulk, not the fractures or their intersections. Similarly, in 3D the space is \(P \mathfrak {L}^1\) is only defined on manifolds of dimensions two and three, as is the case in the next numerical experiment.

Finally, the average solving time, for our implementation, of the full order model is 0.9 s compared to 0.08 s of the solving phase of the three step procedure, with an average speed-up of approximately 11. The smaller speed-up factor is likely due to the fact that the problem is two-dimensional.

4.2.3 A Three-Dimensional Fractured Porous Medium

Our final test case is based on the regular fracture network of [5, Case 4]. In order to incorporate fracture tips, we enlarge the domain from the unit cube to \([-0.1, 1.1]^3\). The network \(\varOmega _f\) is thereby fully immersed in the computational domain and we refer to the surrounding bulk as \(\varOmega _m\). Let us set the following parameters:

$$\begin{aligned} K({\varvec{x}})&= {\left\{ \begin{array}{ll} 1, &{} {\varvec{x}} \in \varOmega _m, \\ \bar{K}, &{} {\varvec{x}} \in \varOmega _f, \end{array}\right. }{} & {} \begin{aligned} \\ \bar{K}&\in \left[ 10^{3}, 10^{5}\right] , \end{aligned} \\ f({\varvec{x}})&= {\left\{ \begin{array}{ll} 0, &{} {\varvec{x}} \in \varOmega _m, \\ \bar{f}, &{} {\varvec{x}} \in \varOmega _f, \end{array}\right. }{} & {} \begin{aligned} \\ \bar{f}&\in \left[ -1, 1\right] . \end{aligned} \end{aligned}$$

Thus, we consider a permeable fracture network on which we introduce a mass source. Again, the effect conductivities are obtained by scaling with the aperture \(\epsilon = 10^{-4}\). In particular, we define \(K_i:= \epsilon ^{n - d_i} \bar{K}\) on each lower-dimensional manifold \(\varOmega _i\) of dimension \(d_i\) and \(K_{ij}:= \frac{2}{\epsilon } \bar{K}\) on each interface \(\varGamma _{ij}\). As a result of integration in the normal directions, the effective source term becomes \(f_i:= \epsilon ^{n - d_i} \bar{f}\) on each \(\varOmega _i\) with \(d_i < n\).

Fig. 6
figure 6

(left) The behavior of the solution to the four parameters of the third test case can be captured using 27 reduced basis functions. (right) The geometry consists of an immersed, regular fracture network in 3D. In the reference case, the flow is induced by a linear distribution on the boundaries and a source term in the network

The reference solution for this case corresponds to the parameters \((\bar{K}, \bar{f}) = (10^4, 1)\) and \(\bar{{\varvec{\alpha }}} = (1, 0, 0)\). As shown in Fig. 6(left), the reduced basis consists of 27 modes, with which we obtain an accurate description of the reference solution. More precisely Table 3 shows the accuracy to be on the order of \(10^{-8}\) and \(10^{-10}\) for the flux and pressure, respectively.

This test case is the most computationally demanding of the three, with over 120k degrees of freedom in the original formulation. Following Sect. 4.1, the LU-decomposition of the cell-centered TPFA problem is saved in the off-line stage and we emphasize that the RBM reduces the second step from 53,007 to 27 degrees of freedom. In this way, the computational cost for solving the reference problem decreases from approximately 6.6 min using a direct solver to 0.5 s in our implementation (speed-up factor \(\approx 800\)).

5 Concluding Remarks

We have proposed a three-step solution procedure for Darcy flow systems based on the exact de Rham complex. The mass conservation equation is first solved and we subsequently correct the flux field by adding a solenoidal vector field. We have shown how reduced basis methods can be used to relieve the computational cost in constructing the correction. Furthermore, the procedure was extended to the setting of Darcy flow in fractured porous media by employing mixed-dimensional differential operators.

The proposed procedure can be viewed from three perspectives. First, in the abstract setting (Sect. 2.2), it constructs the solution to the mixed formulation of a Laplace problem by solving three, related Hodge Laplace problems in primal form. Second, in the context of discretization methods (Sect. 2.3), the procedure utilizes the efficiency of the TPFA finite volume method and applies a suitable correction to obtain the mixed finite (or virtual) element solution to the original problem. Third, from the algebraic perspective (Sect. 4.1), we can view the proposed procedure as approximating the Schur-complement of the original problem and applying a suitable correction.

Topics for future research will further explore different ways to relieve the computational effort in the second step, exploiting the fact that this does not influence the mass balance. Thus, the performance of approximate solvers such as Krylov subspace methods, multi-grid solvers or techniques based on deep learning will be investigated to approximate the vector potential.