1 Introduction

The need to solve systems of coupled Navier-Stokes and Darcy flow arises is various fields, such as modelling the interaction of surface water and groundwater aquifers [1, 2], blood flow problems [3, 4], and fuel cell dynamics [5, 6]. Approximating the solution of coupled Stokes-Darcy systems in most methods requires solving Stokes or Darcy on adjacent sub-domains coupled with appropriate interface boundary conditions [7,8,9,10], and [11]. In melt migration modelling the partially molten rock cannot be handled using the approach above because we cannot identify the boundary between the solid and fluid phases. The model derived by Mc McKenzie [12] for melt migration assumes a dual continuum mixture of solid matrix and fluid melt. The mixing parameter is the porosity \(\varphi \), i.e. the volume fraction of fluid melt, which is assumed to be much smaller than 1 and may be zero in parts of the domain where there is no fluid melt. The motion of the solid is governed by Stokes flow, and the melt is transported according to Darcy’s law. In addition, he included a compacting relation that relates the solid and fluid pressures.

Most of the previous studies of geodynamics do not consider that melt migration can be modelled by coupling variable-viscosity Stokes flow and Darcy flow, where Stokes flow generally captures the long-term behaviour of the mantle and lithosphere, and Darcy flow models the two-phase regime. Their studies either do not consider melting or treat it in a simplified way [13,14,15,16]. Others have simplified the model by approximating the two-phase flow and the effects of compaction [17,18,19], and  [20]. The correct setting was later proposed by  [21]. However, the required computational effort was limited to 2D problems, and although these models take into account the compaction of the solid matrix to allow melt to be expelled or to flow in, they treat both individual phases as incompressible and often assume their densities to be constant.

The discretization of a similar (but not identical) complex melting problem is suitable described by Schimenz et al. [33] by using a mixed discontinuous Galerkin method in vertical direction and a Fourier method in vertical direction for the elliptic-hyperbolic system of equations.

In [23], the authors derive such a model for 2D and 3D simulations. However, the model they used require the so-called compaction pressure as an additional unknown in the system which not only increases the dimension of the system, but also makes the underlying operator non-coercive (see, [21,22,23]). Thus, approximating the solution using the finite element method requires the use of mixed inf-sup stable elements or additional stabilization terms. Here, we propose a formulation with a coercive non-symmetric linear operator which allow the use of simple equal-order elements.

2 Governing equations

Let \(\varOmega \subset {\mathbb {R}}^{d}\), \(d\in \,\{2,3\}\), be a Lipschitz-domain. The model we consider here is a two-phase flow consisting of melt and a deformable matrix. The melt fraction \(\varphi \) defines averaged quantities \( {{\bar{X}}}\) out of solid (matrix) \(X_{s}\) and fluid \(X_{f}\) quantities (the subscripts f and s stand for fluid and solid, respectively):

$$\begin{aligned} {\bar{X}}=(1-\varphi )X_{s}+\varphi X_{f}. \end{aligned}$$
(1)

The governing equations for a two-phase flow were given by McKenzie in [12]. They include the equations for conservation of mass, momentum, and energy. The mass conservation for fluid and solid are described by the two equations

$$\begin{aligned} \frac{\partial (\varrho _{f}\,\varphi )}{\partial t}+\nabla \cdot (\varrho _{f}\varphi {\mathbf {u}}_{f})= & {} \varGamma , \end{aligned}$$
(2)
$$\begin{aligned} \frac{\partial (\varrho _{s}\,(1-\varphi ))}{\partial t}+\nabla \cdot (\varrho _{s}\,(1-\varphi ){\mathbf {u}}_{s})= & {} -\varGamma . \end{aligned}$$
(3)

Where, \(\varrho _f \) and \(\varrho _s\) are the fluid- and solid densities, \({\mathbf {u}}_f\) and \({\mathbf {u}}_s\) the fluid- and solid velocities, respectively, t the time, and \(\varGamma \) the melt production rate following a volume element of matrix. The conservation of momentum of the melt is given by

$$\begin{aligned} \varphi ({\mathbf {u}}_{f}-{\mathbf {u}}_{s})=-K_{D}\,(\nabla p_{f} -\varrho _{f}{\mathbf {g}}), \end{aligned}$$
(4)

with the constant \(K_{D}=k_{\varphi }/\eta _{f}\), where \(k_{\varphi }\) is the permeability and \(\eta _{f}\) is the melt viscosity, \(p_f\) the pressure within the melt, \({\mathbf {g}}\) the gravity acceleration vector. For the case of vanishing solid velocity, \({\mathbf {u}}_s=0\), Eq. (4) reduces to the well known Darcy’s law. Further quantities and associated symbols used in this paper are given in Table 1.

Table 1 Physical quantities and associated symbols

The conservation of momentum of the matrix is given by

$$\begin{aligned} -\nabla \cdot T{\mathbf{u }}_s +\nabla p_{f}={\bar{\varrho }}{\mathbf {g}}, \end{aligned}$$
(5)

where T is the strain tensor given by

$$\begin{aligned} T{\mathbf{u }}:= \eta (\nabla {\mathbf{u }}+\nabla {\mathbf{u }}^T)+(\xi -\tfrac{2}{3}\eta )(\nabla \cdot {\mathbf{u }}) I, \end{aligned}$$
(6)

with the shear viscosity of the solid \(\eta \), the bulk viscosity of the solid \(\xi \), and the identity matrix I .

2.1 Simplified equations at steady densities

In the case that the densities do not vary with time i.e. \(\partial \varrho _{f,s}/\partial t=0\), Eqs. (2) and (3) reduce to:

$$\begin{aligned} \frac{\partial \varphi }{\partial t}+\nabla \cdot (\varphi {\mathbf {u}}_{f})= & {} \frac{\varGamma }{\varrho _{f}}-\frac{\varphi }{\varrho _{f}}{\mathbf {u}} _{f}\cdot \nabla \varrho _{f} \end{aligned}$$
(7)
$$\begin{aligned} -\frac{\partial \varphi }{\partial t}+\nabla \cdot ((1-\varphi ){\mathbf {u}} _{s})= & {} -\frac{\varGamma }{\varrho _{s}}-\frac{1-\varphi }{\varrho _{s}}{\mathbf {u}}_{s}\cdot \nabla \varrho _{s} . \end{aligned}$$
(8)

Adding Eqs. (7) and (8) we obtain

$$\begin{aligned} \nabla \cdot \left[ \varphi {\mathbf {u}}_{f}+(1-\varphi ){\mathbf {u}}_{s}\right] =\varGamma \left( \frac{1}{\varrho _{f}}-\frac{1}{\varrho _{s}}\right) -\frac{\varphi }{ \varrho _{f}}{\mathbf {u}}_{f}\cdot \nabla \varrho _{f}-\frac{1-\varphi }{ \varrho s}{\mathbf {u}}_{s}\cdot \nabla \varrho _{s}. \end{aligned}$$

Now, we can eliminate the fluid velocity \({\mathbf {u}}_{f}\), using Darcy’s law (4):

$$\begin{aligned}&\nabla \cdot {\mathbf {u}}_{s}-\nabla \cdot (K_{D}\,\nabla p_{f}) +K_{D}\mathbf {g\cdot }\nabla \varrho _{f}\nonumber \\&\quad = \varGamma \left( \frac{1}{\varrho _{f}}-\frac{1}{ \varrho _{s}}\right) +\left( -\frac{\varphi }{\varrho _{f}} {\mathbf {u}}_{s} +K_{D}\,\left( \frac{1}{\varrho _{f}}\nabla p_{f}-{\mathbf {g}}\right) \right) \cdot \nabla \varrho _{f}, \nonumber \\&\qquad - \frac{1-\varphi }{\varrho _s}{\mathbf {u}}_{s}\cdot \nabla \varrho _{s} -\varrho _f\nabla \cdot (K_D{\mathbf{g }}). \end{aligned}$$
(9)

Several terms in Eq. (9) contain gradients of the solid and fluid density, respectively. As proposed in [23], the logaritmic derivatives \(\nabla (\ln \varrho _{f,s})=\varrho _{f,s}^{-1}\nabla \varrho _{f,s}\) can be assumed to be closely related to the gravitational forces:

$$\begin{aligned} \frac{1}{\varrho _{s}}\nabla \varrho _{s} \ =\ \nabla (\ln \varrho _{s})\ \approx \ \frac{\partial \varrho _s}{\partial p_s} {\mathbf {g}}\quad \text{ and }\quad \frac{1}{\varrho _{f}}\nabla \varrho _{f} \ =\ \nabla (\ln \varrho _{f})\ \approx \ \frac{\partial \varrho _f}{\partial p_f} {\mathbf {g}}. \end{aligned}$$

Assuming that the isothermal compressibilities, \(\kappa _s:=\varrho _s^{-1} \frac{\partial \varrho _s}{\partial p_s}\) and \(\kappa _f:=\varrho _f^{-1} \frac{\partial \varrho _f}{\partial p_f}\), are constant and

rearranging terms leads to the following reformulation (approximation) of (9):

$$\begin{aligned} \nabla \cdot {\mathbf {u}}_{s}-\nabla \cdot (K_{D}\, \nabla p_{f})-K_{D}\kappa _f\varrho _f \mathbf{g} \cdot \nabla p_{f} +\left( \varphi \varrho _f\kappa _f+(1-\varphi )\varrho _s \kappa _s\right) ({\mathbf {u}}_{s}\cdot \mathbf {g})= & {} f, \end{aligned}$$

with given forcing

$$\begin{aligned} f:= & {} \varGamma \left( \frac{1}{\varrho _{f}}-\frac{1}{ \varrho _{s}}\right) -2K_{D}\kappa _f\varrho _f^2|{\mathbf {g}}|^2-\varrho _f\nabla \cdot (K_D{\mathbf{g }}). \end{aligned}$$

Thus, the two-phase PDE system reduces to the original two-phase PDE system given by McKenzie [12]:

$$\begin{aligned}&-\nabla \cdot T{\mathbf{u }}_s +\nabla p_{f}={\bar{\varrho }}{\mathbf {g}} \end{aligned}$$
(10)
$$\begin{aligned}&\nabla \cdot {\mathbf {u}}_{s}-\nabla \cdot (K_{D}\,\nabla p_{f})+\beta \mathbf{g}\cdot \nabla p_{f} +\alpha {\mathbf {u}}_{s}\cdot \mathbf {g}= f \end{aligned}$$
(11)

with \(\alpha \), the weighted average of the flux of compressibility of solid and fluid densities with respect to the corresponding pressures, and transport-scaling parameter \(\beta \) given by

$$\begin{aligned} \alpha:= & {} \overline{\varrho \kappa } \ =\ \varphi \varrho _f\kappa _f+(1-\varphi ) \varrho _s\kappa _s, \end{aligned}$$
(12)
$$\begin{aligned} \beta:= & {} -K_{D}\kappa _f\varrho _f . \end{aligned}$$
(13)

2.2 Time dependent melt fraction

Although we previously assumed that the flow field is in temporal equilibrium, this is not necessarily the case for the melt fraction \(\varphi \). The corresponding equation is given by

$$\begin{aligned} \varrho _s\frac{\partial \varphi }{\partial t}+\nabla \cdot \left( \varrho _s(\varphi -1){\mathbf{u }}_s\right)= & {} \varGamma . \end{aligned}$$
(14)

Assuming \(\varrho _s>0\) a.e. in \(\varOmega \), this equation can also be written in the form

$$\begin{aligned} \frac{\partial \varphi }{\partial t}+\nabla \cdot \left( (\varphi -1){\mathbf{u }}_s\right) + (\varphi -1)\kappa _s \varrho _s^2 {\mathbf{u }}_s \cdot {\mathbf{g }}= & {} \frac{\varGamma }{\varrho _s}. \end{aligned}$$
(15)

2.3 Boundary conditions

The system of Eqs. (10), (11) and (15) has to be supplemented with suitable boundary conditions. We impose Dirichlet conditions for \( {\mathbf {u}}_s\) and the lithostatic pressure gradient for \(p_f\):

$$\begin{aligned} {\mathbf {u}}_s= & {} {\mathbf {u}}_{0}\quad \quad \text {on}\quad \partial \varOmega , \end{aligned}$$
(16)
$$\begin{aligned} \nabla p_{f}\cdot {\mathbf {n}}= & {} \varrho _s{\mathbf{g }}\cdot {\mathbf{n }}\quad \text {on}\quad \partial \varOmega . \end{aligned}$$
(17)

The boundary condition for \(\varphi \) are of Dirichlet type

$$\begin{aligned} \varphi= & {} \varphi _0\qquad \text{ on } \partial \varOmega _-, \end{aligned}$$

on the inflow part of the boundary \(\partial \varOmega _-:= \{ x\in \partial \varOmega : {\mathbf{u }}_s\cdot {\mathbf{n }}<0\}\).

2.4 Compaction pressure

In order to solve the PDE system (10), (11) numerically several authors treat it as a system of three-field saddle point problems [21, 23], and [22] by introducing a secondary pressure \(p_{c}\), called compaction pressure, defined as

$$\begin{aligned} p_{c}=-\xi \nabla \cdot {\mathbf {u}}_{s}. \end{aligned}$$
(18)

Then, Eq. (10) reduces to the form

$$\begin{aligned} -\nabla \cdot ({\tilde{T}}{\mathbf {u}}_{s})+\nabla (p_{f}+p_{c})={\bar{\varrho }} {\mathbf {g}}. \end{aligned}$$
(19)

Where, the reduced strain tensor \({\tilde{T}}{\mathbf {u}}_{s}\) is given by

$$\begin{aligned} {\tilde{T}}{\mathbf {u}}_{s}:=\eta (\nabla {\mathbf {u}}_{s}+\nabla {\mathbf {u}} _{s}^{T}) -\frac{2}{3}\eta (\nabla \cdot {\mathbf {u}}_{s}){\mathbf {I}}. \end{aligned}$$
(20)

The resulting system (11), (18) and (19) now has three unknowns \({\mathbf {u}}_{s}\), \(p_{f}\), and \(p_{c}\). The corresponding system is of saddle point structure, so that its finite element discretization is not possible without considering inf-sup stable elements or special stabilization techniques, for instance the pressure stabilized Petrov-Galerkin method (PSPG) or the local projection pressure stabilization (LPS). We refer to [24, 26, 29], and [25] for details. In this work we will follow a simpler approach by dealing with the original equations. So, the compaction pressure \(p_c\) will not be a primary variable. In case this quantity is needed for special purposes, it can be recovered from \({\mathbf {u}}_{s}\) by solving the discrete system corresponding to (18), as we shall explain below.

3 Weak formulation and discretization for constant melt fraction

Let us first consider the case that the melt fraction \(\varphi \) is given and constant in time. Then the density \(\varrho \) becomes a given constant and we only have two unknown variables \(p_f\) and \({\mathbf{u }}_s\), determined by a linear stationary system of equations, i.e. without any time dependency. Moreover, let us assume for ease of presentation that we have homogeneous Dirichlet data for the velocities, \({\mathbf{u }}_0=0\). The extension to non-homogeneous Dirichlet data is straight forward.

3.1 Weak formulation

The associated function spaces are

$$\begin{aligned} {\mathbf{X }}:={\mathbf{V }}\times Q,\quad {\mathbf{V }}:=H_0^1(\varOmega )^d,\quad Q:=H^1(\varOmega )\cap L^2_0(\varOmega ). \end{aligned}$$

As bilinear form \(A:{\mathbf{X }}\times {\mathbf{X }}\rightarrow {{\mathbb {R}}}\) we introduce

$$\begin{aligned} A({\mathbf{u }},p; {\mathbf{v }},q):= & {} ( T{\mathbf{u }},\nabla {\mathbf{v }}) -(p,\nabla \cdot {\mathbf{v }})\\&+(\nabla \cdot {\mathbf{u }},q) +(K_D\nabla p,\nabla q) +(\beta {\mathbf{g }}\cdot \nabla p,q)+(\alpha {\mathbf{u }}\cdot {\mathbf{g }},q). \end{aligned}$$

The right hand side is given by

$$\begin{aligned} F[{{\bar{\varrho }}}]({\mathbf{v }},q):= & {} ({{\bar{\varrho }}}{\mathbf{g }},{\mathbf{v }})+(f,q)+\int _{\partial \varOmega } K_D \varrho _s{\mathbf{g }}\cdot {\mathbf{n }}q\,ds. \end{aligned}$$
(21)

In order to have this bilinear form A and the right hand side \(F[{{\bar{\varrho }}}]\) to be well-defined, it is sufficient to make certain regularity assumptions on the involved coefficients. This will be discussed below.

We seek \({\mathbf{u }}_s\in {\mathbf{V }}\) and \(p_f\in Q\) s.t.

$$\begin{aligned} A({\mathbf{u }}_s,p_f;{\mathbf{v }},q)= & {} F[{{\bar{\varrho }}}]({\mathbf{v }},q) \qquad \forall ({\mathbf{v }},q)\in {\mathbf{X }}. \end{aligned}$$
(22)

Assumption 1

We assume the following regularities for the coefficients

$$\begin{aligned} \varrho _s, K_D, {\mathbf{g }}\in & {} C({{\bar{\varOmega }}}),\\ \varrho _f\in & {} W^{1,3}(\varOmega )\cap L^\infty (\varOmega ),\\ \kappa _f,\kappa _s,\in & {} L^\infty (\varOmega ),\\ \varphi\in & {} L^{3/2}(\varOmega ),\\ \varGamma\in & {} H^{-1}(\varOmega ), \end{aligned}$$

and the partial densities are bounded from below as

$$\begin{aligned} \varrho _s,\varrho _f\ge & {} \epsilon \ >\ 0\quad \text{ a.e. } \text{ in } \varOmega . \end{aligned}$$

The regularity assumptions for \(\varrho _s,\varrho _f,\kappa _s\) and \(\kappa _f\) are sufficient to ensure that \(\alpha \) determined by (12) has the regularity \(\alpha \in L^{3/2}(\varOmega )\). This can be used to show the well-posedness of the term \((\alpha {\mathbf{u }}\cdot {\mathbf{g }},q)\) in the bilinear form A:

$$\begin{aligned} |(\alpha {\mathbf{u }}\cdot {\mathbf{g }},q)|= & {} |\!|{\mathbf{g }}|\!|_{L^\infty }|\!|\alpha {\mathbf{u }}q|\!|_{L^1(\varOmega )}\nonumber \\\le & {} |\!|{\mathbf{g }}|\!|_{L^\infty (\varOmega )}|\!|{\mathbf{u }}|\!|_{L^6(\varOmega )^d} |\!|\alpha |\!|_{L^{3/2}(\varOmega )^d}|\!|{\mathbf{g }}|\!|_{L^6(\varOmega )^d}\nonumber \\\le & {} |\!|{\mathbf{g }}|\!|_{L^\infty (\varOmega )}|\!|{\mathbf{u }}|\!|_{H^1(\varOmega )^d} |\!|\alpha |\!|_{L^{3/2}(\varOmega )^d} |\!|q|\!|_{H^1(\varOmega )}. \end{aligned}$$
(23)

Here we used the Sobolev embedding \( H^1(\varOmega )\hookrightarrow L^6(\varOmega )\), for \(d=2,3\).

Lemma 1

Under the regularity assumption (Assumption 1) the linear form \(F[{{\bar{\varrho }}}]\) is a dual form of \({\mathbf{X }}\), i.e. \(F[{{\bar{\varrho }}}]\in {\mathbf{X }}'\).

Proof

Let us now check the individual term of \(F[{{\bar{\varrho }}}]\) in view of appropriate definition. The boundary integral is well-defined due to the assumed continuity of \(K_D,{\mathbf{g }},\rho _s\) and the trace inequality:

$$\begin{aligned} \left| \int _{\partial \varOmega } K_D \varrho _s{\mathbf{g }}\cdot {\mathbf{n }}q\,ds \right|\le & {} C|\!|q|\!|_{H^1(\varOmega )}, \end{aligned}$$

with a constant \(C=C(\varOmega ,K_D,\varrho _s,{\mathbf{g }})\). The term \(({{\bar{\varrho }}}{\mathbf{g }},{\mathbf{v }})\) is bounded as

$$\begin{aligned} | ({{\bar{\varrho }}}{\mathbf{g }},{\mathbf{v }})|\le & {} |\!|{\mathbf{g }}|\!|_{L^\infty (\varOmega )} |\!|{{\bar{\varrho }}}|\!|_{H^{-1}(\varOmega )}|\!|{\mathbf{v }}|\!|_{H^1(\varOmega )}. \end{aligned}$$

The regularity \({{\bar{\varrho }}}\in H^{-1}(\varOmega )\) is obtained by Eq. (1) and \(\varphi \in L^{3/2}\subset H^{-1}(\varOmega )\) and \(\varrho _s,\varrho _f\in L^\infty (\varOmega )\). It remains to show an upper bound for the dual pairing of forcing \(f\in H^{-1}(\varOmega )\) and \(q\in H^1(\varOmega )\):

$$\begin{aligned} \langle f,q\rangle\le & {} \left( c_2|\!|\varGamma |\!|_{H^{-1} (\varOmega )} + c_3\right) |\!|q|\!|_{H^1(\varOmega )}+ c_4 |\varrho _f q|_{H^1(\varOmega )}+c_5|\!|q|\!|_{L^2(\partial \varOmega )}, \end{aligned}$$

with \(c_2=c_2(\epsilon )\), \(c_3=c_3(K_D,\kappa _f,{\mathbf{g }},\varrho _f)\), \(c_4=c_4(K_D,{\mathbf{g }})\) and \(c_5=c_5(K_D,{\mathbf{g }},\varrho _f)\). By the trace inequality we can bound \(|\!|q|\!|_{L^2(\partial \varOmega )}\) by the \(H^1\)-norm of q. The Hölder inequality and Sobolev embedding \( H^1(\varOmega )\hookrightarrow L^6(\varOmega )\) yields

$$\begin{aligned} |\varrho _f q|_{H^1(\varOmega )}\le & {} |\!|\nabla \varrho _f q|\!|_{L^2(\varOmega )}+ |\!|\varrho _f \nabla q|\!|_{L^2(\varOmega )}\\\le & {} |\!|\nabla \varrho _f|\!|_{L^3(\varOmega )}|\!|q|\!|_{L^6(\varOmega )}+ |\!|\varrho _f|\!|_{L^\infty (\varOmega )}|\!|\nabla q|\!|_{L^2(\varOmega )}\\\le & {} c_6 |\!|q|\!|_{H^1(\varOmega )} \end{aligned}$$

with \(c_6=c_6(\varrho _f)\) due to the assumption \(\varrho _f\in W^{1,3}(\varOmega )\). In summary we obtain \(|\!|f|\!|_{H^{-1}(\varOmega )}\le C\), and hence \(F[{{\bar{\varrho }}}]\in {\mathbf{X }}'\). \(\square \)

Remark 1

Even a stronger assumption \(\varphi \in L^{\infty }(\varOmega )\) is not a severe restriction, because, from the physical point of view, \(0\le \varphi \le 1\) is reasonable. The lower bound for \(\varrho _f\) and \(\varrho _s\) are necessary for ensuring that the right hand side f is properly defined.

3.2 Existence and uniqueness of solutions

Throughout this section we presuppose that Assumption 1 is valid. In order to prove the continuity and the coercivity of the bilinear form \(A( {\mathbf {u}},p;{\mathbf {v}},q)\), and the continuity of the right hand side linear form, we equip the product space \({\mathbf {X}}\) with the norm:

$$\begin{aligned} |\!|\!| ({\mathbf {u}},p) |\!|\!| :=\left( |\!|\eta ^{1/2}\nabla {\mathbf {u}}|\!|^{2}+|\!|(2(\xi +\tfrac{1}{3}\eta ))^{1/2}\nabla \cdot {\mathbf {u}}|\!|^{2}+|\!|K_{D}^{1/2}\nabla p|\!| ^{2}\right) ^{1/2}. \end{aligned}$$
(24)

Here and in what follows we use the notation \(|\!|\cdot |\!|\) for the \(L^2\)-norm over \(\varOmega \).

Lemma 2

The bilinear form \(A({\mathbf {u}},p;{\mathbf {v}},q)\) is continuous with respect to the triple norm \(|\!|\!| \cdot |\!|\!|\).

Proof

The assumed regularity of \(\varrho _s,\varrho _f\) and \(\varphi \) ensures \(\alpha \in L^{3/2}(\varOmega )\). Hence, we can use (23) to bound the reaction term. Further, we have \(\beta \in L^\infty (\varOmega )\) so that a term-by-term estimate, use of the Poincaré inequality leads to

$$\begin{aligned} A({\mathbf {u}},p;{\mathbf {v}},q)\le & {} C_1 |\!|\!| ({\mathbf {u}},p) |\!|\!| |\!|\!| ({\mathbf{v }},q) |\!|\!| \end{aligned}$$

with the constant \(C_1=C_1(\varOmega ,K_D,\beta ,\eta ,{\mathbf{g }},\varrho _s,\varrho _f,\varphi ,\kappa _f,\kappa _s)\). \(\square \)

In order to show the coercivity of this bilinear form, we first show the non-negativity of the strain tensor when it is tested diagonally:

Lemma 3

For constant \(\eta \) it holds

$$\begin{aligned} ( T{\mathbf{u }},\nabla {\mathbf{u }})= & {} |\!|\eta ^{1/2}\nabla {\mathbf{u }}|\!|^2+|\!|(\xi +\tfrac{1}{3}\eta )^{1/2}\nabla \cdot {\mathbf{u }}|\!|^2 \qquad \forall {\mathbf{u }}\in {\mathbf{V }}. \end{aligned}$$

Proof

Because of \(I:\nabla {\mathbf{u }}=\nabla \cdot {\mathbf{u }}\) we obtain

$$\begin{aligned} ( T{\mathbf{u }},\nabla {\mathbf{u }})= & {} |\!|\eta ^{1/2}\nabla {\mathbf{u }}|\!|^2 +(\eta \nabla {\mathbf{u }}^T,\nabla {\mathbf{u }})+((\xi -\tfrac{2}{3}\eta )(\nabla \cdot {\mathbf{u }}) I,\nabla {\mathbf{u }})\\= & {} |\!|\eta ^{1/2}\nabla {\mathbf{u }}|\!|^2+\sum _{i,j} (\eta \partial _j{\mathbf{u }}_i,\partial _i{\mathbf{u }}_j)+|\!|(\xi -\tfrac{2}{3}\eta )^{1/2}\nabla \cdot {\mathbf{u }}|\!|^2. \end{aligned}$$

where \(\partial _j {\mathbf {u}}_{i}\,=\,\dfrac{\partial {\mathbf {u}}_{i}}{\partial x_{j}}\) for \(i,j=1,\ldots ,d\).

  1. a.

    Let us first assume, that \({\mathbf{u }}\in (H^1_0(\varOmega )\cap C^2(\varOmega ))^d\). Due to this regularity of \({\mathbf{u }}\) the terms in the sum above can be integrated by parts:

    $$\begin{aligned} \sum _{i,j} (\partial _j{\mathbf{u }}_i,\partial _i{\mathbf{u }}_j)= & {} -\sum _{i,j} (\partial _i\partial _j{\mathbf{u }}_i,{\mathbf{u }}_j) \ =\ -\sum _{i,j} (\partial _j\partial _i{\mathbf{u }}_i,{\mathbf{u }}_j)\\= & {} \sum _{i,j} (\partial _i{\mathbf{u }}_i,\partial _j{\mathbf{u }}_j) \ =\ \left( \sum _{i}\partial _i{\mathbf{u }}_i,\sum _{j}\partial _j{\mathbf{u }}_j\right) \\= & {} |\!|\nabla \cdot {\mathbf{u }}|\!|^2. \end{aligned}$$

    Using this in the equation derived above, yields the assertion.

  2. b.

    For less regular \({\mathbf{u }}\), the same equation is obtained by a density argument: We take the limit of a smooth limiting sequence \(({\mathbf{u }}_n)_{n\in {\mathbb {N}}}\subset (H^1_0(\varOmega )\cap C^2(\varOmega ))^d\), \({\mathbf{u }}_n\rightarrow {\mathbf{u }}\) in \({\mathbf{V }}_0\):

    $$\begin{aligned} \sum _{i,j} (\partial _j{\mathbf{u }}_i,\partial _i{\mathbf{u }}_j)= & {} \lim _{n\rightarrow \infty }\sum _{i,j} (\partial _j({\mathbf{u }}_n)_i,\partial _i({\mathbf{u }}_n)_j) \\= & {} \lim _{n\rightarrow \infty }|\!|\nabla \cdot {\mathbf{u }}_n|\!|^2 \ =\ |\!|\nabla \cdot {\mathbf{u }}|\!|^2. \end{aligned}$$

\(\square \)

Lemma 4

(Coercivity) We assume that

$$\begin{aligned} |\!|{\mathbf{g }}|\!|_{L^\infty (\varOmega )^d} |\!|\overline{\varrho \kappa }|\!|_{L^{3/2}(\varOmega )}\le & {} c \end{aligned}$$
(25)

with a certain constant \(c=c(\eta ,K_D)\). Then the bilinear form A is continuous and \({\mathbf{X }}\)-coercive; in particular

$$\begin{aligned} A({\mathbf{u }},p; {\mathbf{u }},p)\ge & {} \frac{1}{2} |\!|\!| ({\mathbf{u }},p) |\!|\!| \quad \forall ({\mathbf{u }},p)\in {\mathbf{X }}. \end{aligned}$$

Proof

The assertion follows by diagonal testing, use of the previous Lemma, and the fact that the convective term vanishes when tested diagonally i.e.  \(({\mathbf {g}}\cdot \nabla p,p)=0\). The only critical (not necessarily positive) term is the zero order reaction term \((\alpha {\mathbf{u }}\cdot {\mathbf{g }},p)\). However, due to the assumption on \(\alpha \), this term can be bounded by (23) and Young’s inequality as follows

$$\begin{aligned} |(\alpha {\mathbf{u }}\cdot {\mathbf{g }},p) |\le & {} |\!|\alpha |\!|_{L^{3/2}(\varOmega )} |\!|{\mathbf{g }}|\!|_{L^\infty (\varOmega )}|\!|{\mathbf{u }}|\!|_{H^1(\varOmega )}|\!|p|\!|_{H^1(\varOmega )}\\\le & {} \frac{1}{2} C(\eta ,K_D) |\!|\alpha |\!|_{L^{3/2}(\varOmega )} |\!|{\mathbf{g }}|\!|_{L^\infty (\varOmega )} \left( |\!|\eta ^{1/2}{\mathbf{u }}|\!|_{H^1(\varOmega )^d} ^2 + |\!|K_D^{1/2}p|\!|_{H^1(\varOmega )}^2\right) \\\le & {} \frac{1}{2}(|\!|\eta ^{1/2}\nabla {\mathbf{u }}|\!|^2+|\!|K_D^{1/2}\nabla p|\!|^2). \end{aligned}$$

This leads to the desired lower bound for \(A({\mathbf{u }},p; {\mathbf{u }},p)\). \(\square \)

Remark 2

The constant c in (25) depends on \(\eta \) and \(K_D\). In the special case of constant \(\eta \) and \(K_D\) this constant is just \(c=\sqrt{\eta K_D}/c_\varOmega \), where \(c_\varOmega \) is the Poincaré constant.

Theorem 1

With the same assumptions as in the previous Lemma, Eq. (22) has an unique solution \(({\mathbf{u }}_s,p_f)\in {\mathbf{X }}\) and

$$\begin{aligned}&|\!|\eta ^{1/2}\nabla {\mathbf{u }}_s|\!|^2+|\!|(\xi +\tfrac{1}{3}\eta )^{1/2} \nabla \cdot {\mathbf{u }}_s|\!|+|\!|K_D^{1/2}\nabla p_f|\!|^2 \\&\quad \le |\!|{{\bar{\varrho }}}{\mathbf{g }}|\!|_{H^{-1}(\varOmega )^d}^2+|\!|f|\!|_{H^{-1}(\varOmega )}^2 + |\!|K_D \varrho _s{\mathbf{g }}\cdot {\mathbf{n }}|\!|_{L^2(\partial \varOmega )}^2. \end{aligned}$$

Proof

Taking into account that the quantities \({{\bar{\varrho }}}\) and f are functions of \(\varphi \) and \(\varGamma \), respectively, we see that the \(H^{-1}\)-norms of \({{\bar{\varrho }}}\) and f are well-defined. Now, the assertion is an immediate consequence of the previous Lemma and the theorem of Lax-Milgram. \(\square \)

3.3 Equal-order finite elements

The coercivity of the problem allows us to use several standard equal order elements for the discrete velocity \({\mathbf {u}}^{h}\) and the discrete pressure \(p^{h}\). Let \(T_{h}\) be a shape regular partition of \(\varOmega \) into d-dimensional simplices, quadrilaterals or hexahedra [30]. The diameter of a cell \(K\in T_{h}\) will be denoted by \(h_{K}\) and the mesh parameter \(h=\max \{h_{K}| K\in T_{h}\}\) represents the maximum diameter of all cells. Let \(S^{h}\) \(\subset H^{1}(\varOmega )\) be a finite element space of continuous, piecewise polynomial functions defined over \(T_{h}\), with degree of interpolation order \(r\ge 1\). We consider triangulations \(T_{h}\) of shape regular elements, so that an interpolation operator \(i_{h}\) \(:H^{1}(\varOmega )\rightarrow S^{h}\) exists (Scott-Zhang interpolation [31]) with the following properties for all \(1\le l\le r+1\), all \(K\in T_{h}\), and all \(u\in H^{l}(\omega _{K})\):

$$\begin{aligned} \left\| u-i_{h}u\right\| _{K}\lesssim & {} h_{K}^{l}\left| u\right| _{H^{l}(\omega _{K})}, \end{aligned}$$
(26)
$$\begin{aligned} \left\| \nabla (u-i_{h}u)\right\| _{K}\lesssim & {} h_{K}^{l-1} \left| u\right| _{H^{l}(\omega _{K})}. \end{aligned}$$
(27)

Here, \(\omega _{K}\) denotes a union of cells in the neighbourhood of K, and the expression \(a\lesssim b\) means \(a\le cb\) with the constant c independent of the mesh parameter h. Possible choices on shape regular meshes are \(P_{r}\) or \(Q_{r}\) elements, or finite element spaces containing these spaces, e.g. locally enriched spaces. Here, we consider equal-order finite element spaces for velocity and pressure:

$$\begin{aligned} {\mathbf {V}}^{h}:=(S^{h})^{d}\cap {\mathbf {V}},~\text { }Q^{h}:=S^{h}\cap Q, \text { and }\,{\mathbf {X}}^{h}:={\mathbf {V}}^{h}\times Q^{h}. \end{aligned}$$

Now, the linear system to be solved reads as follows: Find \(({\mathbf{u }}^h,p^{h)}\in {\mathbf{X }}^{h}\) such that

$$\begin{aligned} A({\mathbf {u}}^{h},p^{h};{\mathbf {v}},q)=F[{{\bar{\varrho }}}]({\mathbf {v}},q),\,\,\,\forall ({\mathbf {v}},q)\in {\mathbf {X}}^{h}. \end{aligned}$$
(28)

The main advantage of the equal-order discretization of the problem is that the degrees of freedom of all variables can be assigned to the same geometrical identities, e.g. to vertices. Therefore, the discrete systems can be designed in a block-wise manner, so that an efficient block preconditioner or block smoother for multigrid solvers can be utilized.

3.4 A priori error estimate

Theorem 2

We make the same assumptions as in Theorem 1. The discrete solution of Eq. (28) \(({\mathbf {u}}^{h},p^{h})\in {\mathbf {X}}^{h}\) is unique. If \(({\mathbf {u}}_s,p_f)\in H^{l}(\varOmega )^{d+1}\)with \(1\le l\le r+1\) we have the following discretization error estimate

$$\begin{aligned} |\!|\!| ({\mathbf{u }}_s-{\mathbf{u }}^h,p_f-p^{h}) |\!|\!| \le Ch^{l-1}\left( \left| {\mathbf {u}}_s \right| _{H^{l}(\varOmega )}+\left| p_f\right| _{H^{l}(\varOmega )}\right) . \end{aligned}$$

Proof

Due to coercivity (Lemma 4) we can apply Cea’s lemma, see e.g. [30]:

$$\begin{aligned} |\!|\!| ({\mathbf{u }}_s-{\mathbf{u }}^h,p_f-p^{h}) |\!|\!| \le C |\!|\!| ({\mathbf{u }}_s-{\textit{\textbf{i}}}_h{\mathbf{u }},p_f-i_hp_f) |\!|\!|, \end{aligned}$$

with arbitrary interpolation \({\textit{\textbf{i}}}_h:H^l(\varOmega )^d\rightarrow {\mathbf{V }}_h\) and \(i_h:H^l(\varOmega )\rightarrow Q_h\). For \(l=1\) we choose the Scott-Zhang interpolant, and for \(l\ge 2\) we take the nodal interpolant. This leads e.g. to

$$\begin{aligned} |\!|K_D^{1/2}\nabla (p-i_hp)|\!|\le & {} c h^{l-1}|\!|p|\!|_{H^{l}(\varOmega )} \end{aligned}$$

with a constant c depending only on \(K_D\) and \(\varOmega \). The other parts in the norm \(|\!|\!| \cdot |\!|\!|\) are obtained analogously. \(\square \)

3.5 Post-processing of the compaction pressure

Working with equal-order elements on simplices, i.e. with \(P_{r}\) elements, the divergence of the discrete velocity, \(\nabla \cdot {\mathbf {u}}_{h}\), is piece-wise polynomial of order \(r-1\) but discontinuous across element faces/edges. Hence, for constant (or cell-wise constant) bulk viscosity, the discrete compaction pressure \(p^{h}_{c}:=-\xi \nabla \cdot {\mathbf {u}}^{h}\) is of the same type. Therefore, the evaluation of this quantity inside the cells is straight forward. The situation is different for its evaluation on vertices or edges/faces due to the discontinuity. If the discrete compaction pressure is required on the vertices, denoted by \(p^{h}_{c}\), a common strategy is to define it by the \(L^2\)-projection onto \(Q_{h}\),

$$\begin{aligned} p^{h}_{c}\in Q^{h}:\quad (p^{h}_{c},q)=(-\xi \nabla \cdot {\mathbf{u }}^h,q)\quad \forall q\in Q^{h}. \end{aligned}$$
(29)

Lemma 5

Under the same assumptions as in Theorem 1, \(({\mathbf {u}}_s,p_f)\in H^{l}(\varOmega )^{d+1}\) and \(p_c\in H^{l-1}(\varOmega )\) with \(1\le l\le r+1\) we have

$$\begin{aligned} |\!|p_c-p_c^h|\!|\le & {} C h^{l-1}\left( |{\mathbf{u }}_s|_{H^{l}(\varOmega )}+|p_f|_{H^{l}(\varOmega )}+|p_c|_{H^{l-1}(\varOmega )}\right) . \end{aligned}$$

Proof

Let \({{\tilde{p}}}_c^h\in Q^h\) be the solution of the problem

$$\begin{aligned} ({{\tilde{p}}}_{c}^h,q)= & {} (-\xi \nabla \cdot {\mathbf{u }}_s,q)\quad \forall q\in Q^h. \end{aligned}$$

Then we have by Cea’s Lemma and standard interpolation results

$$\begin{aligned} |\!|p_c-{{\tilde{p}}}_c^h|\!|\le & {} C\inf _{q^h\in Q^h}|\!|p_c-q^h|\!|\ \le \ C h^{l-1} |p_c|_{H^{l-1}(\varOmega )}. \end{aligned}$$

By stability of the discrete equations and Theorem 2, we have

$$\begin{aligned} |\!|p_c^h-{{\tilde{p}}}_c^h|\!|\le & {} |\!|\xi \nabla \cdot ({\mathbf{u }}_s-{\mathbf{u }}^h)|\!|\ \le \ Ch^{l-1} (|{\mathbf{u }}_s|_{H^{l}(\varOmega )}+|p_f|_{H^{l}(\varOmega )}), \end{aligned}$$

with a constant C depending on \(\xi \) and \(\eta \). With the triangle inequality we arrive at the desired estimate. \(\square \)

For more regular compaction pressure, \(p_c\in H^{l}(\varOmega )\), we see that the obtained accuracy for the compaction pressure is of one order less (with respect to the mesh size h) than the optimal interpolation error. However, there are well known methods to increase the accuracy by special gradient recovery techniques as an alternative to solving Eq. (29). We refer to the classical work of Zienciewicz and Zhu [32].

4 Variational formulation and discretization for variable melt fraction rate

In this section we propose a second order explicit Runge-Kutta scheme to solve the hyperbolic PDE for the melt fraction \(\varphi \). However, we start with the first order forward Euler method, because it will be an intermediate step in the higher-order time stepping scheme.

4.1 First-order forward Euler method

We first discretize the hyperbolic Eq. (15) for \(\varphi \) in time by using a forward Euler with time step \(k:=t_n-t_{n-1}>0\). The semi-discrete equation for \(\varphi _n\approx \varphi (t_n)\) reads

$$\begin{aligned} \varphi _n= & {} \varphi _{n-1}+k\left( \varrho _s^{-1}\varGamma _{n-1}+ \nabla \cdot \left( (1-\varphi _{n-1}){\mathbf{u }}_{n-1}\right) \right) . \end{aligned}$$

Taking this equation in variational form and applying \(Q_r\) elements results in the discrete system for \(\varphi ^h_n\in Q^h\):

$$\begin{aligned} (\varphi ^h_n,\psi )= & {} ( \varphi ^h_{n-1},\psi ) +k R_{n-1}(\varphi _{n-1}^h,{\mathbf{u }}^h_{n-1};\psi )\quad \forall \psi \in Q^h, \end{aligned}$$
(30)

with

$$\begin{aligned} R_m(\varphi ,{\mathbf{u }};\psi ):= & {} (\varrho _s^{-1}\varGamma _m,\psi ) - ((1-\varphi ){\mathbf{u }},\nabla \psi ) +\int _{\partial \varOmega }(\varphi -1){\mathbf{u }}\cdot {\mathbf{n }}\psi \,ds. \end{aligned}$$

Solving Eq. (30) requires basically inversion of the mass matrix. Afterwards, the mean density can be updated:

$$\begin{aligned} {{\bar{\varrho }}}_n:= & {} {{\bar{\varrho }}}(\varphi _n^h)=(1-\varphi _n^h)\varrho _s+\varphi _n^h\varrho _f. \end{aligned}$$
(31)

Finally, the equation for \(({\mathbf{u }}_n^h,p^h_n)\in {\mathbf{X }}^h\) is solved:

$$\begin{aligned} A({\mathbf {u}}^{h}_n,p^{h}_n;{\mathbf {v}},q)=F[{{\bar{\varrho }}}_n]({\mathbf {v}},q),\,\,\,\forall ({\mathbf {v}},q)\in {\mathbf {X}}^{h}, \end{aligned}$$
(32)

with the right hand side \(F_n[{{\bar{\varrho }}}_n]\) as given in Eq. (21). The entire algorithm for variable melt fraction rate looks now as follows:

figure a

Note that we have a time step restriction (CFL condition) of the form \(k\le h\) for stability issues. An alternative without such a time step restriction would be the usage of an implicit time stepping scheme for \(\varphi ^h_n\). However, in this case, the corresponding equation includes \({\mathbf{u }}_n^h\). On the other hand, the quantities \(\alpha (t_n)\) in (12) and \({{\bar{\varrho }}}(t_n)\) include \(\varphi _n^h\), so that the equations for \(\varphi ^h_n\) and (28) become mutually coupled. Solving this system is much more numerically expensive than the semi-explicit algorithm presented above.

4.2 Second-order forward Heun method

In order to obtain a second order method, me apply a second-order explicit Runge-Kutta method for \(\varphi \), for instance the Heun method. This time stepping scheme consists of the forward Euler as a predictor step:

$$\begin{aligned} (\varphi ^{h}_{*,n},\psi )= & {} ( \varphi ^h_{n-1} ,\psi ) +kR_{n-1}(\varphi _{n-1}^h,{\mathbf{u }}^h_{n-1};\psi )\ \quad \forall \psi \in Q^h, \end{aligned}$$
(33)

leading to a predictor mean density \({{\bar{\varrho }}}_{*,n}={{\bar{\varrho }}}(\varphi _{*,n}^h)\), and a predictor velocity and pressure, \({\mathbf {u}}^{h}_{*,n}\) and \(p^{h}_{*,n}\) respectively, given as solution of

$$\begin{aligned} A({\mathbf {u}}^{h}_{*,n},p^{h}_{*,n};{\mathbf {v}},q)=F[{{\bar{\varrho }}}_{*,n}] ({\mathbf {v}},q),\,\,\,\forall ({\mathbf {v}},q)\in {\mathbf {X}}^{h}. \end{aligned}$$
(34)

Afterwards, the new melt fraction is obtained by solving

$$\begin{aligned} (\varphi ^h_n,\psi )= & {} \frac{1}{2}\left( \varphi ^h_{n-1}+ \varphi ^h_{*,n} ,\psi \right) + \frac{k}{2} R_n(\varphi _{*,n}^h,{\mathbf{u }}^h_{*,n};\psi ) , \end{aligned}$$
(35)

followed by the new mean density \({{\bar{\varrho }}}_{n}={{\bar{\varrho }}}(\varphi _{n}^h)\), and new velocity and pressure by solving (32).

The numerical cost of the Heun method is just a factor of two compared to the forward Euler, but leads to a substantial increase in accuracy. This will be demonstrated in the numerical examples below. The corresponding algorithm looks as follows:

figure b

5 Numerical example

In this section we test the methodology for two 2D examples, a stationary problem and a time-dependent problem. Both cases are designed in such a way that the exact solution is known.

5.1 Stationary example

To validate the analysis and the error estimates of the proposed scheme, we choose as an example the two-dimensional problem given in [23] with a known exact solution:

$$\begin{aligned} {\mathbf {u}}_{s}(z)=\left( \frac{1}{10}e^{z},-\frac{3}{40}e^{z}\right) ^{T}\,\,\,\text {and}\,\,\, p_f(z)=p_{0}-z-\frac{27}{200}e^{z}. \end{aligned}$$

The problem is solved on the unit square \(\varOmega :=(0,1)^{2}\) in the \(xz-\) plane. The Darcy coefficient \(K_{D}\) and the melt fraction \(\varphi \) depend only on the variable z : 

$$\begin{aligned} K_{D}(z)=\frac{149}{45}+\frac{1}{30}e^{z},~\varphi (z)=1-0.3e^{z}. \end{aligned}$$

The shear and bulk viscosities \(\eta \) and \(\xi \), respectively, are given by

$$\begin{aligned} \eta (x)= & {} \frac{1}{2}e^{2x}, \\ \xi (x,z)= & {} e^{-z}+\frac{2}{3}e^{2x}+1. \end{aligned}$$

The resulting compaction pressure according to (18) is

$$\begin{aligned} p_{c}(x,z)=\frac{3}{40}\left( 1+\frac{2}{3}e^{2x+z}+e^z\right) . \end{aligned}$$

We further set \( \varrho _{f}(z):=e^{-z},\,\varrho _{s}(z):=1.2\varrho _{f}(z)\), gravitation \( {\mathbf {g}}(z):=(0,-e^{z})^{T},\) and \(\varGamma (z):=\frac{27}{1000}e^{z}\). For the isothermal compressibilities we choose constant values \(\kappa _f=1\) and \(\kappa _s=5/6\).  Hence, \(\alpha (z)=e^{-z}\) and \(\beta (z)=-K_{D}\kappa _f\varrho _{f}=-\frac{149}{45} e^{-z}-\frac{1}{30}.\) The boundary data is given by the exact solutions, i.e. for the velocity \( {\mathbf {u}}_{0}={\mathbf {u}}_{s}\mid _{\partial \varOmega }\), and for the pressure \(f_{2}=-\partial _{n}e^{-z}\mid _{\partial \varOmega }\). Now we can obtain the forcing term by basic calculations

$$\begin{aligned} f= & {} \varGamma \left( \frac{1}{\varrho _{f}}-\frac{1}{ \varrho _{s}}\right) -2K_{D}\kappa _f\varrho _f^2|{\mathbf {g}}|^2-\varrho _f\nabla \cdot (K_D{\mathbf{g }})\ =\ \ \frac{9}{2000}e^{2z}-\frac{149}{45},\\ {{\bar{\varrho }}}{\mathbf{g }}= & {} \left( 0,-\frac{4}{5}-\frac{3}{50}e^z\right) ^T. \end{aligned}$$

In Fig. 1 we display the discretization errors obtained for \(Q_{1}\) (left figure) and \(Q_{2}\) (right figure) approximations. In the \(Q_{1}\) result the \(L^{2}\) errors of p and \( {\mathbf {u}}\) are of order \(O(h^{2})\). The error in the gradient (i.e. in the \( H^{1}\)-semi norm of p and \({\mathbf {u}}\) is of order O(h). For the \(Q_{2}\) approximation the convergence is enhanced, where the \(L^{2}\) errors in p and \( {\mathbf {u}}\) are \(O(h^{3})\). The errors \(\vert {\mathbf {u}}- {\mathbf {u}} _{h}\vert _{H^{1}(\varOmega )}\) and \(\vert p- p_{h}\vert _{H^{1}(\varOmega )}\) have order \(O(h^{2})\). This corresponds exactly to the a priori estimate in Theorem 2.

Fig. 1
figure 1

Discretization error obtained with \(Q_{1}\) (left) and \(Q_{2}\) approximation (right)

Moreover, we are interested in the error behavior of the post-processed compaction pressure \(p_c\). In Fig. 2 we plot the corresponding discretization errors for \(Q_1\) and \(Q_2\) elements. We obtain for \(Q_1\)-elements an error \(|\!|p_c-p_c^h|\!| = {\mathcal {O}}(h^{3/2})\), and for \(Q_2\)-elements an error \(|\!|p_c-p_c^h|\!| = {\mathcal {O}}(h^{2})\). In comparison with the theoretical expectation, these results corresponds exactly with the theory for \(Q_2\), and show a super-convergence behaviour for \(Q_1\).

Fig. 2
figure 2

Discretization error of the compaction pressure, \(|\!|p_c-p_c^h|\!|\) obtained with \(Q_1\) and \(Q_{2}\) approximation

In order to get an idea about the error distribution, in Fig. 3 we depict the discretization errors on a sequence of meshes for \(Q_1\)-elements. The errors are reduced uniformly under mesh refinement.

Fig. 3
figure 3

Discretization errors in example 5.1: \(|{\mathbf{u }}-{\mathbf{u }}_h|\) with \(Q_1\) approximation (top left), with \(Q_2\) approximation (top right), \(p-p_h\) (lower left) and \(p_c-p_c^h\) (lower right) with \(Q_1\) on a sequence of meshes. The colors and elevations are scaled individually for each picture

5.2 Time-dependent example

We extend the example in the previous section to the time-dependent case. The exact solution now reads:

$$\begin{aligned} {\mathbf {u}}_{s}(z,t)= & {} e^{z+t}\left( \frac{1}{10},-\frac{3}{40}\right) ^{T},\\ p_f(z,t)= & {} p_{0}-z-\frac{27}{200}e^{z}+(1-e^t)(-0.2z+0.135e^z),\\ \varphi (z,t)= & {} e^t(1-0.3e^{z}). \end{aligned}$$

The coefficients \(\eta \), \(\xi \) and \(K_D\) remain independent of time and, hence, identical to their values in the stationary case (previous subsection). The quantities \(\varGamma ,f\) and \(f_2\) are adapted in such a way that the solution given above solves the set of equations. Obviously, the solution is designed in such a way that we recover for \(t=0\) the same solution as in the stationary example: \({\mathbf{u }}_s(z,t)={\mathbf{u }}_s(z,0)e^t\), \(p_f(z,t)=p_f(z,0)+q(z,t)\) with \(q(z,t)=(1-e^t)(-0.2z+0.135e^z)\) and \(\varphi (z,t)=\varphi (z,0)e^t\). The averaged density becomes

$$\begin{aligned} {{\bar{\varrho }}}(z,t)= & {} \varphi (z,t)\varrho _f(z)+(1-\varphi (z,t))\varrho _s(z)\\= & {} e^t{{\bar{\varrho }}}(z,0)+(1-e^t)\varrho _s(z). \end{aligned}$$

It is straightforward to verify that (10) and (11) are satisfied. The compaction pressure then becomes

$$\begin{aligned} p_c(x,z,t)= & {} -\xi (x,z) \nabla \cdot {\mathbf{u }}(z,t) \ =\ \frac{3}{40} e^t \left( 1 + \frac{2}{3} e^{2x+z} +e^z \right) , \end{aligned}$$

and finally the pressure forcing term results to

$$\begin{aligned} f(z,t)= & {} e^t \left( \frac{149}{225} + \frac{9}{2000}e^{2z} \right) - \frac{298}{75}. \end{aligned}$$

The initial forcing at \(t=0\), i.e. f(z, 0), is identical to f(z) of the stationary example.

5.2.1 Forward Euler

In order to validate the temporal error we first have a look at the error in melt fraction in different norms, see Fig. 4. In the \(L^2\)- and the \(L^\infty \)-norm we observe first order convergence with respect to the time step, \(|\!|\varphi -\varphi ^h_{k}|\!|_{L^2(\varOmega )}\sim |\!|\varphi -\varphi ^h_{k}|\!|_{L^\infty (\varOmega )}\sim k\). The \(H^1\)-seminorm also begins to reduce with first order, but stagnates for smaller time steps. This is not unexpected, since Eq. (15) does not enforce \(H^1\)-regularity nor \(H^1\)-stability.

For the pressure and velocity variables the spatial error is much larger than the temporal error. The reason for this is probably that the time step does not enter directly into Eq. (22), but the temporal discretization enters only implicitly by the mean density \({{\bar{\varrho }}}\) which itself depends on the time dependent melt fraction \(\varphi \). However, in order to visualize the temporal impact we plot the temporal error only by considering the quantities \(p^h-p^h_n\) and \({\mathbf {u}}^h-{\mathbf {u}}^h_n\) at \(t=0.1\), where \(p^h\) and \({\mathbf {u}}^h\) are pressure and velocity, respectively, discretized in space but with the correct mean density \({{\bar{\varrho }}}(t_n)\), i.e.

$$\begin{aligned} A({\mathbf {u}}^h,p^h;{\mathbf {v}},q)=F[{{\bar{\varrho }}}(t_{n})]({\mathbf {v}},q)\quad \forall ({\mathbf {v}},q)\in {\mathbf {X}}^{h}. \end{aligned}$$

In Fig. 4 (right figure) we observe first oder convergence of the error in the \(L^2\)-norms, \(|\!|p^h-p^h_{n}|\!|\sim k\) and \(|\!|{\mathbf{u }}^h-{\mathbf{u }}^h_{n}|\!|\sim k\) for fixed spatial mesh size h. The compaction pressure, obtained by post-processing, also converges with first order: \(|\!|(p_c)^h-(p_c)^h_{n}|\!|\sim k\).

Fig. 4
figure 4

Discretization error of melt fraction (left) and pressure and velocity (right) obtained with forward Euler (Sect. 5.2.1)

5.2.2 Heun method

For the Heun method on a fixed spatial mesh we obtain second order convergence for the melt fraction \(|\!|\varphi _k^h-\varphi |\!|_{L^2(\varOmega )}\sim k^2\) in \(L^2\)-, \(H^1\)- and \(L^\infty \)-norm (Fig. 5 left) until the (fixed) spatial error dominates and leads to stagnation of the total error. The reason that this stagnation is not observed with the forward Euler method is that with Heun, the error is a factor 100 smaller than with Euler (with \(k=4\cdot 10^{-3}\)). This stagnation appears earlier on in the \(H^1\)-norm. For solid velocity, fluid pressure and compaction pressure we obtain second order convergence as well (Fig. 5 right). Here, no stagnation appears which is due to the fact that we (once more) only depict the temporal error, e.g. \(|\!|{\mathbf{u }}^h-{\mathbf{u }}^h_n|\!|_{L^2(\varOmega )}\), so that spatial effects are excluded.

Fig. 5
figure 5

Discretization error of melt fraction (left) and of the pressure and velocity (right) for the time-dependent case with the Heun method in the \(L^2\)-norm (Sect. 5.2.2)

5.3 Example in 3D

As third example we choose a configuration without known analytical solution in three spatial dimensions. The computational domain is \(\varOmega :=(-1,1)\times (-1,1)\times (0,1)\). The setting is stationary with the following choice of melt fraction and Darcy coefficient, respectively:

$$\begin{aligned} \gamma (x,y,z)= & {} e^{-20x^2y^2z},\\ \varphi (x,y,z)= & {} 1-x^2y^2z,\\ K_D(x,y,z)= & {} (1.01-x^2y^2z)^{-1}. \end{aligned}$$

Shear and bulk viscosities are simply \(\eta =\xi =1\). Gravitation has only a vertical component, \({\mathbf{g }}=-10e_3\). The remaining coefficients are chosen as \(\varrho _s=20\), \(\varrho _f=10\), \(\kappa _f=0.05\), \(\kappa _s=\kappa _f/6\). The velocity data for the boundary conditions is given by \({\mathbf{u }}_0=0\). The two pressures are shown in Fig. 6.

Fig. 6
figure 6

Pressure p (left) and compaction pressure \(p_c\) in the 3D-configuration (Sect. 5.3)

6 Summary

We propose a variational formulation for modeling mantle-melt transport with a coercive bilinear form for solid velocity \({\mathbf{u }}_s\) and fluid pressure \(p_f\). The compaction pressure \(p_c\) is determined by a post-processing step if needed. We obtain existence and uniqueness of solutions, and we derived an a priori error estimate for equal-order finite elements. For the time-dependent case, we propose a splitting method which consists of an hyperbolic equation for the melt fraction \(\varphi \) and an elliptic problem for solid velocity and fluid pressure. The time-discretization for the melt fraction is carried out by explicit schemes (forward Euler or Heun method), so that the equation for velocity and pressure decouples from the equation for the melt fraction, i.e. only information of previous time steps of \({\mathbf{u }}_s\) and \(p_f\) enters into the equation for \(\varphi \). In numerical examples with known exact solutions we demonstrate that the expected convergence rates with respect to the spatial mesh size h and with respect to the time step k are obtained.