Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

The steady, non-isotropic, heterogeneous diffusion problem for single phase flow through porous media is investigated. We are, in particular, interested in the Darcy flow problem for reservoir simulations. The governing equation is

$$\displaystyle{ -\boldsymbol{\nabla }\cdot \mathbb{K}\boldsymbol{\nabla }p = f\;, }$$
(1)

where \(\mathbb{K}\) is a symmetric positive definite tensor representing the permeability field of the domain, p is the pressure and f is a mass source term. In Darcy flow, \(\mathbb{K}\) represents the material’s preferred direction of flow when subject to a pressure gradient \(\boldsymbol{\nabla }p\). We rewrite (1) as two first order equations

$$\displaystyle{ \boldsymbol{\nabla }\cdot \boldsymbol{ q} = f\;, }$$
(2)

and

$$\displaystyle{ \boldsymbol{q} = -\mathbb{K}\boldsymbol{\nabla }p\;, }$$
(3)

where \(\boldsymbol{\nabla }\cdot \boldsymbol{ q} = f\) represents the mass conservation condition and \(\boldsymbol{q} = -\mathbb{K}\boldsymbol{\nabla }p\) is the constitutive relation between the pressure gradient and the velocity field, \(\boldsymbol{q}\). We seek the solution of (2) and (3) subjected to boundary conditions \(\boldsymbol{q} =\boldsymbol{ q_{0}}\) on Γ q and p = p 0 on Γ p , ∂Ω = Γ q + Γ p .

The non-isotropic heterogeneous Darcy flow problem was also analyzed in [6], where the algorithm used a support operator based on a 2nd order finite difference method. Even for very large variations of the permeability coefficient 2nd order accuracy was obtained. In [10] the hybrid discontinuous Galerkin method was used and it was shown that it is locally conservative. A mixed finite element method was used in [12], where a multiscale mortar method was used. In the present work we will use a mimetic discretization method, which ensures that the numerical solution of the discrete divergence-free velocity field, i.e. (2) is satisfied exactly, when f = 0, independent of the order of the expanding polynomial. It is ensured that the invariant (mass in the present system) is conserved both locally and globally. A similar method was used in [2] and [8]. The governing equations will be written in the notation of differential forms. By doing so we are associating the individual quantities in (2) and (3) with a geometrical basis, which the quantities are naturally integrated over. The conservation of mass in (2) is actually an algebraic relation between the fluxes over the surfaces of an arbitrary volume and the volumetric flux inside the volume and this relation is an inherent part of using differential forms. Instead of representing the dependent variables of (2) and (3) as normal differential equations we will make use of differential geometry to represent variables and differential equations.

2 Differential Geometry

Differential geometry deals with the geometric aspects of differential equations. Rewriting the differential equations using differential geometry we can introduce basic geometric objects as points, curves, surfaces, and volumes into the constitution of the equations and obtain exact discretization of the grad, curl, and div operators. Below we have defined a few of the concepts used in differential geometry and in the present work. However, you may consult other texts as [1, 4, 7, 11] for a much broader and deeper exposition.

2.1 Differential k-Forms

In contrast to vector calculus where we use vector and scalar fields, we use differential forms in differential geometry. In \(\mathbb{R}^{3}\) we resort to four different differential forms. A 0-form, α (0), is given by α (0) = f(x, y, z) and is a normal scalar function. A 1-form, β (1), is given by β (1) = f 1(x, y, z)dx + f 2(x, y, z)dy + f 3(x, y, z)dz. A 1-form can be integrated over smooth curves. A 2-form, γ (2), is given by γ (2) = g 1(x, y, z)dydz + g 2(x, y, z)dzdx + g 3(x, y, z)dxdy. A 2-form can be integrated over two dimensional manifolds or surfaces. And a 3-form δ (3), is given by δ (3) = h(x, y, z)dxdydz. A 3-form can be integrated over volumes.

2.2 Wedge (or Exterior) Product

The wedge product introduced in the expression of two and three forms is defined as

$$\displaystyle{ \alpha \wedge \beta =\alpha \otimes \beta -\beta \otimes \alpha \;, }$$

where α and β are two arbitrary forms. The wedge product between k-forms and l-forms produces a (k + l)-form. If the space of k-forms is denoted Λ k and the space of l-forms is given by Λ l then

$$\displaystyle{ \wedge:\varLambda ^{k} \times \varLambda ^{l}\longrightarrow \varLambda ^{k+l}\;. }$$

2.3 Orientation

In n-dimensional space there are (n + 1) submanifolds. For n = 3 these submanifolds are points, curves, surfaces and volumes. There are two types of orientations, an inner orientation, which is solely connected to the geometrical object and an outer orientation, which is related to both the geometrical object and the embedding space. In Fig. 1 both inner and outer oriented k-manifolds in \(\mathbb{R}^{3}\) are sketched.

Fig. 1
figure 1

Outer and inner oriented k-manifolds in \(\mathbb{R}^{3}\) for k = 0, 1, 2, 3

2.4 Exterior Derivative

The exterior derivative (or exterior differential), d, is a metric free operator that generalizes the vector operators grad, curl, and div and is defined as: The exterior derivative on an n-dimensional manifold \(\mathbb{M}\) is a mapping \(d:\varLambda ^{k}(\mathbb{M})\longrightarrow \varLambda ^{k+1}(\mathbb{M}),0 \leq k \leq n - 1\). In a local coordinate system (x 1, , x n) this map is given by

$$\displaystyle\begin{array}{rcl} d\alpha ^{(k)}& =& d\sum _{ I}f_{I}(x)dx^{i_{1} } \wedge \ldots \wedge dx^{i_{k} } {}\\ & =& \sum _{I}df_{I}(x) \wedge dx^{i_{1} } \wedge \ldots \wedge dx^{i_{k} } {}\\ & =& \sum _{I}\sum _{j=1}^{n}\frac{\partial f_{I}} {\partial x^{j}}dx^{j} \wedge dx^{i_{1} } \wedge \ldots \wedge dx^{i_{k} }\;, {}\\ \end{array}$$

where I = i 1, , i k with 1 ≤ i 1 < ⋯ < i k n, f I (x) is a continuous differentiable scalar function, \(f_{I}(x) \in C^{\infty }(\mathbb{M})\) and \(\frac{\partial } {\partial x^{j}}\) is the partial derivative with respect to x j.

2.5 Pullback Operator

We consider two n-dimensional manifolds \(\mathbb{M}\) and \(\mathbb{N}\) and the mapping between them \(\varPhi: \mathbb{M} \rightarrow \mathbb{N}\), such that local coordinates ξ i in \(\mathbb{M}\) are mapped to local coordinates x i = Φ i(ξ 1, ⋯ , ξ n) in \(\mathbb{N}\). Then the pullback of a k-form, \(\varPhi ^{{\ast}}:\varLambda ^{k}(\mathbb{N}) \rightarrow \varLambda ^{k}(\mathbb{M}),k \geq 1\), is given by

$$\displaystyle{ \varPhi ^{{\ast}}(\alpha ^{(k)}(\mathbf{v}_{ 1},\cdots \,,\mathbf{v}_{k}):=\alpha ^{(k)}(\varPhi _{ {\ast}}(\mathbf{v}_{1}),\cdots \,,\varPhi _{{\ast}}(\mathbf{v}_{k}))\;, }$$

where Φ (v) is the push forward operator of a vector field v.

2.6 Hodge Star Operator

The Hodge star operator in an n-dimensional manifold \(\mathbb{M}\) is an operator, \(\star:\varLambda ^{k}(\mathbb{M}) \rightarrow \varLambda ^{n-k}(\mathbb{M})\), induced by the inner product (metric) and wedge product (orientation),

$$\displaystyle{ \alpha ^{(k)} \wedge \star \beta ^{(k)}:= (\alpha ^{(k)},\beta ^{(k)})\sigma ^{(n)}\;, }$$

where σ (k) is the unit volume form defined in local coordinates as

$$\displaystyle{ \sigma ^{(n)}:= \sqrt{g}dx^{1} \wedge \cdots \wedge dx^{n}, }$$

where g is the determinant of the metric tensor. Application of the Hodge star operator to the unit 0-form yields ⋆ 1: = σ (n).

2.7 Using the Building Blocks

We are now in a position to rewrite (2) and (3) using differential forms. In (2) \(\boldsymbol{q}\) is the velocity tensor, which in this case represents a volume flux density over a surface, and in a 3 dimensional space it is an outer oriented differential 2-form, q (2), given by

$$\displaystyle{ q^{(2)} = q_{ 1}\,dx^{2} \wedge dx^{3} + q_{ 2}\,dx^{3} \wedge dx^{1} + q_{ 3}\,dx^{1} \wedge dx^{2}\;, }$$

where q i are the velocity components and ∧ is the wedge product. In (2), f is a volumetric volume flux density and is an outer oriented differential 3-form, f (3), and is written as

$$\displaystyle{ f^{(3)} = f\,dx^{1} \wedge dx^{2} \wedge dx^{3}\;. }$$

In the notation of differential forms (2) is written as

$$\displaystyle{ dq^{(2)} = f^{(3)}\;, }$$
(4)

where d is the exterior derivative. The pressure in (3) is a potential associated to points, and is therefore an inner-oriented differential 0-form, \(\tilde{p}^{(0)} = p\), and we may rewrite (3) as

$$\displaystyle{ \star _{\mathbb{K}^{-1}}q^{(2)} = -d\tilde{p}^{(0)}\;, }$$
(5)

where \(\star _{\mathbb{K}^{-1}} = \mathbb{K}^{-1}\star\) with ⋆ being the Hodge star operator.

Let Φ be a map from a reference cube of size 2 × 2 × 2 in the (ξ 1, ξ 2, ξ 3) coordinate frame to an arbitrary volume in the physical coordinate frame (x 1, x 2, x 3), then (4) is pulled back to the reference frame by use of the pullback operator, Φ ,

$$\displaystyle{ \begin{array}{rl} &dq^{(2)} = f^{(3)}\quad \Rightarrow \quad \varPhi ^{{\ast}}dq^{(2)} =\varPhi ^{{\ast}}f^{(3)} \\ & \quad \Rightarrow \quad d\varPhi ^{{\ast}}q^{(2)} = f^{(3)}\quad \Rightarrow \quad d\hat{q}^{(2)} =\hat{ f}^{(3)}\;,\end{array} }$$
(6)

where the third step is valid since the pullback operator commutes with the exterior derivative, see [7]. q (2) is the outer oriented 2-form, which is associated to the reference basis, i.e.

$$\displaystyle{ \hat{q}^{(2)} =\hat{ q}_{ 1}\,d\xi ^{2} \wedge d\xi ^{3} +\hat{ q}_{ 2}\,d\xi ^{3} \wedge d\xi ^{1} +\hat{ q}_{ 3}\,d\xi ^{1} \wedge d\xi ^{2}\;, }$$

and \(\hat{f}^{(3)}\) is the outer-oriented 3-form associated to the reference basis

$$\displaystyle{ \hat{f}^{(3)} =\hat{ f}\,d\xi ^{1} \wedge d\xi ^{2} \wedge d\xi ^{3}\;. }$$

The relation in (6) states that integral values are independent of the frame that they are represented in. The constitutive relation in (5) is pulled back to the reference frame by

$$\displaystyle{ \varPhi ^{{\ast}} \star _{ \mathbb{K}^{-1}}q^{(2)} = -\varPhi ^{{\ast}}d\tilde{p}^{(0)}\quad \Rightarrow \quad \varPhi ^{{\ast}} \star _{ \mathbb{K}^{-1}}\left (\varPhi ^{{\ast}}\right )^{-1}\hat{q}^{(2)} = -d\hat{\tilde{p}}^{(0)}\;, }$$
(7)

where the right hand side again is a consequence of the commuting property between the pullback operator and the exterior derivative, see also [2]. The pullback operator does, however, not commute with the Hodge star operator, and therefore, \(\hat{q}^{(2)}\) must be mapped to q (2) by \(\left (\varPhi ^{{\ast}}\right )^{-1}\), where \(\star _{\mathbb{K}^{-1}}\) is applied and this term is then pulled back to the reference frame. The discretizations are based on Eqs. (6) and (7).

3 Discretization of the Equations

As in the mixed SEM, we are pairing our equations with suitable arbitrary k-forms, such that the product is a 3-form, which is naturally integrated over a volume. The mass balance in (6) is an outer oriented 3-form, so this is paired with an arbitrary inner oriented 0-form, ϱ (0), and (7) is an inner-oriented 1-form on both sides, so this is paired with an arbitrary outer-oriented 2-form, ζ (2), i.e

$$\displaystyle{ \left \langle \hat{\tilde{\varrho }}^{(0)},d\hat{q}^{(2)}\right \rangle _{ \hat{\varOmega }} = \left \langle \hat{\tilde{\varrho }}^{(0)},\hat{f}^{(3)}\right \rangle _{ \hat{\varOmega }}\;,\quad \forall \hat{\tilde{\varrho }}^{(0)} \in \mathcal{ P} }$$
(8)
$$\displaystyle{ \left \langle \hat{\zeta }^{(2)},\varPhi ^{{\ast}} \star _{ \mathbb{K}^{-1}}\left (\varPhi ^{{\ast}}\right )^{-1}\hat{q}^{(2)}\right \rangle _{ \hat{\varOmega }} = -\left \langle \hat{\zeta }^{(2)},d\hat{\tilde{p}}^{(0)}\right \rangle _{ \hat{\varOmega }}\;,\quad \forall \hat{\zeta }^{(2)} \in \mathcal{ Q} }$$
(9)

where \(\hat{\varOmega }\) is an arbitrary volume in the reference frame. To acquire the adjoint of \(\left \langle \hat{\tilde{\varrho }}^{(0)},d\hat{q}^{(2)}\right \rangle _{\hat{\varOmega }}\) the term \(\left \langle \hat{\zeta }^{(2)},d\hat{\tilde{p}}^{(0)}\right \rangle _{\hat{\varOmega }}\) in the constitutive equation is integrated by parts

$$\displaystyle{ \left \langle \hat{\zeta }^{(2)},d\hat{\tilde{p}}^{(0)}\right \rangle _{ \hat{\varOmega }} = -\left \langle d\hat{\zeta }^{(2)},\hat{\tilde{p}}^{(0)}\right \rangle _{ \hat{\varOmega }} + \left \langle \hat{\zeta }^{(2)},\hat{\tilde{p}}^{(0)}\right \rangle _{ \partial \hat{\varOmega }}\;, }$$

where \(\partial \hat{\varOmega }\) is the boundary of \(\hat{\varOmega }\). Inserting this into (9) and rearrange we obtain

$$\displaystyle{ \left \langle d\hat{\zeta }^{(2)},\hat{\tilde{p}}^{(0)}\right \rangle _{ \hat{\varOmega }} -\left \langle \hat{\zeta }^{(2)},\varPhi ^{{\ast}} \star _{ \mathbb{K}^{-1}}\left (\varPhi ^{{\ast}}\right )^{-1}\hat{q}^{(2)}\right \rangle _{ \hat{\varOmega }} = \left \langle \hat{\zeta }^{(2)},\hat{\tilde{p}}^{(0)}\right \rangle _{ \partial \hat{\varOmega }}\;. }$$
(10)

The functionals that we want to solve are (8) and (10). Let \(\partial \hat{\varOmega } =\varGamma _{p} \cup \varGamma _{q}\) then we are assuming that p (0) is known on Γ p , while q (2) is prescribed on Γ q , and f (3) is given on Ω. These known values can be transformed to the reference domain by the pullback operator. Dividing \(\hat{\varOmega }\) into N E non-overlapping elements \(\hat{\varOmega }^{s}\), i.e. \(\hat{\varOmega }=\bigcup \limits _{s}\hat{\varOmega }^{s}\), and define \(\mathcal{P} \subset L^{2}\) and \(\mathcal{Q} \subset H_{0}^{1}(\mbox{ div})(\varOmega )\) as finite dimensional subspaces, where H 0 1(div)(Ω) denotes the Sobolev space of vector functions with square-integrable divergence with vanishing trace along Γ q . We are now formulating the variational statement as: Find \(\left (\hat{\tilde{p}}^{h},\hat{q}_{i}^{h}\right ) \in \mathcal{ P} \times \mathcal{ Q}\) for i = 1, 2, 3 such that

$$\displaystyle{ \sum \limits _{s=1}^{N_{E} }\left \langle \hat{\tilde{\varrho }}^{(0),h},d\hat{q}^{(2),h}\right \rangle _{ \hat{\varOmega }^{s}} =\sum \limits _{ s=1}^{N_{E} }\left \langle \hat{\tilde{\varrho }}^{(0),h},\hat{f}^{(3),h}\right \rangle _{ \hat{\varOmega }^{s}}\quad \forall \hat{\tilde{\varrho }}^{h} \in \mathcal{ P} }$$
(11)

and

$$\displaystyle\begin{array}{rcl} & & \sum \limits _{s=1}^{N_{E} }\left \langle d\hat{\zeta }^{(2),h},\hat{\tilde{p}}^{(0),h}\right \rangle _{ \hat{\varOmega }^{s}} -\sum \limits _{s=1}^{N_{E} }\left (\hat{\zeta }^{(2),h},\varPhi ^{{\ast}} \star _{ \mathbb{K}^{-1}}\left (\varPhi ^{{\ast}}\right )^{-1}\hat{q}^{(2),h}\right )_{\hat{\varOmega }^{s }} \\ & & \qquad \qquad \qquad \qquad \qquad\qquad\qquad\qquad\qquad = \left \langle \hat{\zeta }^{(2),h},\hat{\tilde{p}}^{(0),h}\right \rangle _{ (\partial \hat{\varOmega })_{p}}\quad \forall \hat{\zeta }_{i}^{h} \in \mathcal{ Q}\;. {}\end{array}$$
(12)

4 Expansion Polynomials

The differential forms are associated to the geometry, that they are naturally integrated over, and hence it will be natural to expand these based on integral values. This can be accomplished using a combination of Lagrange polynomials given by

$$\displaystyle{ h_{i}(\xi ) = \frac{\prod _{j=0,j\neq i}^{N}(\xi -\xi _{j})} {\prod _{j=0,j\neq i}^{N}(\xi _{i} -\xi _{j})}\;, }$$

and edge polynomials defined in [5] as

$$\displaystyle{ e_{i}(\xi ) = -\sum _{k=0}^{i-1}\frac{dh_{k}(\xi )} {d\xi } d\xi \;,\;\;\;i = 1,\ldots,N\;. }$$

Just like the Lagrange polynomials have the property

$$\displaystyle{ h_{i}(\xi _{k}) = \left \{\begin{array}{*{10}c} 1\quad \mbox{ if }i = k\\ 0\quad \mbox{ if } i\neq k \end{array} \right.\;, }$$

the edge polynomials have the property

$$\displaystyle{ \int _{\xi _{k-1}}^{\xi _{k} }e_{i}(\xi ) = \left \{\begin{array}{*{10}c} 1\quad \mbox{ if }i = k\\ 0\quad \mbox{ if } i\neq k \end{array} \right.\;, }$$

The Hodge star operator is represented discretely by expanding our outer and inner oriented differential forms on two different grids. Let ξ i , i = 0, , N be the Gauss-Lobatto-Legendre (GLL) points of polynomial degree N and \(\tilde{\xi }_{i}\), i = 0, , N − 1 the Gauss-Legendre (GL) points. Note that \(\xi _{i} <\tilde{\xi } _{i} <\xi _{i+1}\), for i = 0, , N − 1. The Lagrange polynomials associated with the GLL points will be denoted by h i (ξ) and the Lagrange polynomials associated with the GL points will be denoted by \(\tilde{h}_{i}(\xi )\). For more details see [3]. The edge polynomial e i (ξ) is a polynomial of degree N − 1 and \(\tilde{e}_{i}(\xi )\) is a polynomial of degree N − 2 The expansion of the differential forms in (11) and (12) are expanded by

$$\displaystyle{ \hat{\tilde{p}}^{(0),h}(\xi ^{1},\xi ^{2},\xi ^{3}) =\sum \limits _{ i=0}^{N-1}\sum \limits _{ j=0}^{N-1}\sum \limits _{ k=0}^{N-1}\tilde{p}_{ i,j,k}\tilde{h}_{i}(\xi ^{1})\tilde{h}_{ j}(\xi ^{2})\tilde{h}_{ j}(\xi ^{3})\;, }$$
(13)
$$\displaystyle{ \begin{array}{l} \hat{q}^{(2),h}(\xi ^{1},\xi ^{2},\xi ^{3}) =\sum \limits _{ i=0}^{N}\sum \limits _{j=1}^{N}\sum \limits _{k=1}^{N}Q_{i,j,k}^{1}h_{i}(\xi ^{1})e_{j}(\xi ^{2})e_{k}(\xi ^{3}) \\ +\sum \limits _{ i=1}^{N}\sum \limits _{j=0}^{N}\sum \limits _{k=1}^{N}Q_{i,j,k}^{2}e_{i}(\xi ^{1})h_{j}(\xi ^{2})e_{i}(\xi ^{3}) +\sum \limits _{ i=1}^{N}\sum \limits _{j=1}^{N}\sum \limits _{k=0}^{N}Q_{i,j,k}^{3}e_{i}(\xi ^{1})e_{j}(\xi ^{2})h_{i}(\xi ^{3})\;,\end{array} }$$
(14)

and

$$\displaystyle{ \hat{f}^{(3),h}(\xi ^{1},\xi ^{2},\xi ^{3}) =\sum \limits _{ i=1}^{N}\sum \limits _{ j=1}^{N}\sum \limits _{ k=1}^{N}F_{ i,j,k}e_{i}(\xi ^{1})e_{ j}(\xi ^{2})e_{ k}(\xi ^{3})\;. }$$
(15)

The expansion coefficients are respectively

$$\displaystyle{ \tilde{p}_{i,j,k} = p(\tilde{\xi }_{i},\tilde{\xi }_{j},\tilde{\xi }_{k})\;, }$$
$$\displaystyle\begin{array}{rcl} Q_{i,j,k}^{1}& =& \int \limits _{\xi _{ j-1}^{2}}^{\xi _{j}^{2} }\!\!\int \limits _{\xi _{k-1}^{3}}^{\xi _{k}^{3} }\hat{q}_{1}(\xi _{i}^{1},\xi ^{2},\xi ^{3})\,d\xi ^{2} \wedge d\xi ^{3}\;,\quad Q_{ i,j,k}^{2} =\int \limits _{ \xi _{ k-1}^{3}}^{\xi _{k}^{3} }\!\!\int \limits _{\xi _{i-1}^{1}}^{\xi _{i}^{1} }\hat{q}_{2}(\xi ^{1},\xi _{ j}^{2},\xi ^{3})\,d\xi ^{3} \wedge d\xi ^{1}\;, {}\\ Q_{i,j,k}^{3}& =& \int \limits _{\xi _{ i-1}^{1}}^{\xi _{i}^{1} }\!\!\int \limits _{\xi _{j-1}^{2}}^{\xi _{j}^{2} }\hat{q}_{3}(\xi ^{1},\xi ^{2},\xi _{ k}^{3})\,d\xi ^{1} \wedge d\xi ^{2}\,,\quad F_{ i,j,k} =\int \limits _{ \xi _{i-1}^{1}}^{\xi _{i}^{1} }\!\!\int \limits _{\xi _{j-1}^{2}}^{\xi _{j}^{2} }\!\!\int \limits _{\xi _{k-1}^{3}}^{\xi _{k}^{3} }\!\hat{f}(\xi ^{1},\xi ^{2},\xi ^{3})\,d\xi ^{1}\,\wedge \,d\xi ^{2}\,\wedge \,d\xi ^{3}\;.{}\\ \end{array}$$

Let \(\phi ^{h}(\xi ) =\sum \limits _{ i=0}^{N}\phi _{i}h_{i}(\xi )\) be a function in \(\mathbb{R}\) expanded by Lagrange polynomials then the derivative is calculated by

$$\displaystyle{ \frac{d\phi ^{h}} {d\xi } =\sum \limits _{ i=1}^{N}(\phi _{ i} -\phi _{i-1})e_{i}(\xi )\;. }$$

Using this, \(d\hat{q}^{(2),h}\) in (11) is calculated as

$$\displaystyle\begin{array}{rcl} & & d\hat{q}^{(2),h} =\sum \limits _{ i=1}^{N}\sum \limits _{ j=1}^{N}\sum \limits _{ k=1}^{N}\left (Q_{ i,j,k}^{1} - Q_{ i-1,j,k}^{1} + Q_{ i,j,k}^{2} - Q_{ i,j-1,k}^{2}\right. \\ & & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \qquad \left.+Q_{i,j,k}^{3} - Q_{ i,j,k-1}^{3}\right )e_{ i}(\xi ^{1})e_{ j}(\xi ^{2})e_{ k}(\xi ^{3})\;. {}\end{array}$$
(16)

The pullback operators in (12) are basically just mappings of geometrical bases of different order. First \(\left (\varPhi ^{{\ast}}\right )^{-1}\hat{q}^{(2),h}\) maps the surface basis of \(\hat{q}^{(2),h}\) from the reference frame to the physical domain. This is similar to a Piola transformation known from continuum mechanics, [9], but applied to a first order tensor instead of a second order tensor

$$\displaystyle{ q^{(2)} = \frac{1} {J}\boldsymbol{\mathcal{F}}\hat{q}^{(2)}\;, }$$
(17)

with

$$\displaystyle{ \boldsymbol{\mathcal{F}} = \left [\begin{array}{*{10}c} \frac{\partial x_{1}} {\partial \xi _{1}} & \frac{\partial x_{1}} {\partial \xi _{2}} & \frac{\partial x_{1}} {\partial \xi _{3}} \\ \frac{\partial x_{2}} {\partial \xi _{1}} & \frac{\partial x_{2}} {\partial \xi _{2}} & \frac{\partial x_{2}} {\partial \xi _{3}} \\ \frac{\partial x_{3}} {\partial \xi _{1}} & \frac{\partial x_{3}} {\partial \xi _{2}} & \frac{\partial x_{3}} {\partial \xi _{3}} \end{array} \right ]\;, }$$

\(J =\det (\boldsymbol{\mathcal{F}})\) and the differential forms arranged in column vectors. By applying \(\star _{\mathbb{K}^{-1}}\) in (12) the surface basis is changed to a line basis, and Φ maps this from the physical frame to the reference frame and it is done by

$$\displaystyle{ \varPhi ^{{\ast}} \star _{ \mathbb{K}^{-1}}q^{(2),h} =\boldsymbol{\mathcal{ F}}^{T}\mathbb{K}^{-1}q^{(2),h}\;, }$$

where T denotes the transpose operator. The whole term is thereby given by

$$\displaystyle{ \varPhi ^{{\ast}} \star _{ \mathbb{K}^{-1}}\left (\varPhi ^{{\ast}}\right )^{-1}\hat{q}^{(2),h} = \frac{1} {J}\boldsymbol{\mathcal{F}}^{T}\mathbb{K}^{-1}\boldsymbol{\mathcal{F}}\hat{q}^{(2),h}\;. }$$
(18)

Gathering all terms and applying appropriate Gaussian quadratures then (11) and (12) can be written in a system of equations as

$$\displaystyle{ \left [\begin{array}{*{10}c} \boldsymbol{0} &\boldsymbol{P}_{3}\boldsymbol{E}_{(3,2)} \\ \boldsymbol{E}_{(3,2)}^{T}\boldsymbol{P}_{3}^{T}& \boldsymbol{M}_{2} \end{array} \right ]\left \{\begin{array}{*{10}c} \boldsymbol{\varDelta }_{p} \\ \boldsymbol{\varDelta }_{Q} \end{array} \right \} = \left \{\begin{array}{*{10}c} \boldsymbol{P}_{3}\boldsymbol{\varDelta }_{F} \\ \boldsymbol{B}\boldsymbol{\varDelta }_{p}^{bc} \end{array} \right \}\;. }$$

Here \(\boldsymbol{\varDelta }_{p}\), \(\boldsymbol{\varDelta }_{Q}\) and \(\boldsymbol{\varDelta }_{F}\) contain all expansion coefficients of (13), (14) and (15), respectively, and \(\boldsymbol{\varDelta }_{p}^{bc}\) contains all known values of p (0) in the GL points on \(\left (\partial \varOmega \right )_{p}\). \(\boldsymbol{E}_{(3,2)}\) is a representation of the expression within the bracket in (16) for the entire system, and is called an incidence matrix, see [7]. This matrix only contains the values 0,-1 and 1 and is completely determined by the connectivity of the grid. The remaining block matrices contain the wedge of the expansion polynomials of the individual terms in (11) and (12) weighed with the Gaussian integration weights. Note that \(\boldsymbol{M}_{2}\) contains the mapping and the inverse permeability field in (18).

5 Numerical Results

5.1 Case 1: Homogeneous, Isotropic, and Cartesian Coordinate System

The method has been tested on a 2D model problem of which we have an analytic solution. For a given forcing function, f(x, y) = 8π 2 sin(2πx)cos(2πy), the analytic solution for the pressure and velocity fields are

$$\displaystyle{ p\,=\,sin(2\pi x)cos(2\pi y),\quad q_{x}\,=\, - 2\pi cos(2\pi x)cos(2\pi y),\quad q_{y}\,=\, - 2\pi sin(2\pi x)sin(2\pi y). }$$

The solution domain is, Ω = [−1, 1]2 and for \(\mathbb{K} = 1\), four elements, and a polynomial order of N = 12 the residual of mass conservation is shown to the left in Fig. 2 and on the right the associated conservation of mass as function of polynomial order is shown. It is observed that the mass conservation constraint is satisfied exactly independent of polynomial order.

Fig. 2
figure 2

Residual of mass conservation; left: N=12. Number of elements is 4

5.2 Case 2: Heterogeneous, Non-Isotropic, and Cartesian Coordinate System

A four element, non-isotropic case is now tested using the permeability coefficients

$$\displaystyle{ K_{11} = 4\quad K_{12} = 3\quad K_{21} = 3\quad K_{22} = 20 }$$

in each element and the pressure field P(x, y) = sin(2πx)sin(2πy). This leads to the following velocity and forcing terms

$$\displaystyle\begin{array}{rcl} u_{x}& =& -2\pi K_{11}cos(2\pi x)cos(2\pi y) + 2\pi K_{12}sin(2\pi x)sin(2\pi y), {}\\ u_{y}& =& -2\pi K_{21}cos(2\pi x)cos(2\pi y) + 2\pi K_{22}sin(2\pi x)sin(2\pi y), {}\\ f& =& \quad 4\pi ^{2}((K_{ 11} + K_{22})sin(2\pi x)cos(2\pi y) + (K_{12} + K_{21})cos(2\pi x)sin(2\pi y)). {}\\ \end{array}$$

The residual for mass conservation is shown in Fig. 3 and it is again observed that mass is conserved exactly.

Fig. 3
figure 3

Residual of mass conservation; left: N=15. Number of elements is 4

5.3 Case 3: Heterogeneous, Non-Isotropic, and Curvilinear Coordinate System

The results for a nine element case with a very distorted grid, (see Fig. 4 for an example of a 25 elements domain), are shown in Fig. 5. It is noticed that even on a very distorted grid mass is conserved exactly. In our discrete-mass-conservation plots we observe peaks at part of the boundary and inter-element boundaries. These peaks are of the size 10−13 in Fig. 5 and therefore close to machine accuracy. We don’t attribute them any major importance.

Fig. 4
figure 4

Distorted grid (for a 25 elements domain) and values for the permeability coefficients for a 9 element case, which is used in the calculations

Fig. 5
figure 5

Residual of mass conservation; left: N=15. Number of elements are 9

5.4 Case 4: The ‘Tenth SPE Comparative Solution Project’

In the last numerical example we have taken the permeability field from the ‘Tenth SPE Comparative Solution Project’ http://www.spe.org/web/csp/.

The original model is a 2-phase (oil and gas) model of which we only simulate the oil phase. The model has a simple 2D cross-sectional geometry with no dipping or faults. The dimensions of the model are 762 m long by 15.24 m thick. The fine scale grid is 100 × 20 with uniform size for each of the grid blocks. The top of the model is at 0.0 m with initial pressure at this point of 100 psia. The model is fully saturated with oil.

In Fig. 6 we again see that the mass is conserved to machine accuracy.

Fig. 6
figure 6

Residual of mass conservation. Left: N=2. Permability field taken from http://www.spe.org/web/csp/

5.5 Condition Number of the Coefficient Matrix

In Table 1 we analyse the condition number of the algebraic system as the permeability field changes. The condition number is shown for a 2D domain with 4 elements and a polynomial order of 12. As seen from Table 1, when the off-diagonal elements of the symmetric positive definite \(\mathbb{K}\) tensor are zero, the condition number is constant as the an-isotropy increases until the an-isotropy has reach a very high value, which give rise to an increased condition number. In contrast to this, it is seen that when the off-diagonal elements are non-zero, the condition number increases as the an-isotropy increases.

Table 1 Condition number of the algebraic system as function of the permeability field

The code is written in MatLab and all solutions have been obtained using the built-in direct solvers. Solution of the problem obtained from the ‘Tenth SPE Comparative Solution Project’ with the polynomial order N = 4 took 5 min on an PC using the Core processor i7-3615QM running 2.3 GHz.

6 Conclusion

A mimetic spectral element method for the Darcy’s problem has been developed. It is shown that mass conservation is satisfied exactly for both isotropic and non-isotropic permeability coefficients and for regular and very distorted grids.