1 Introduction

Many natural and engineering applications involve multiphase flows in karstic geometry, i.e., geometry with both conduit (or vug) and porous media [25]. Such kind of problems are intrinsically difficulty due to the multi-scale multi-physics nature. In [25], the authors utilized Onsager’s extremum principle to derive a diffuse interface model, the so-called Cahn–Hilliard–Stokes–Darcy system (CHSD), for two-phase incompressible flows with matched densities in the karstic geometry. Existence and weak-strong uniqueness of weak solutions for the CHSD system have been proved recently in [28]. For complex systems like the CHSD model, efficient and accurate numerical schemes are highly desirable. There are several challenges associated with the system. First, due to the relative slow motion of fluid in porous media, long time simulations are needed in order to capture physically important phenomena. In particular, we would like to have numerical schemes that inherit, with modification if needed, the energy law of the continuous model. Second, the CHSD model, similar to all phase field model with a sharp interface limit, is stiff due to the existence of relatively steep transition regions. This stiffness leads to a severe time-step restriction if one adopts classical explicit time stepping. Third, the CHSD system involves at least three coupled physical processes: the dynamics of the phase field variable (governed by the Cahn–Hilliard equation), the fluid flow in the conduit (governed by the Stokes equation), and the fluid flow in the porous media (governed by the Darcy system). Efficient and accurate numerical schemes for each of the sub-models do exist. Therefore, it would be highly desirable to have numerical schemes that decouple these subsystems while maintaining the long time stability. Such decoupled schemes would reduce the complexity of the computation and allow the possibility of the utilization of legacy codes. In this paper, we introduce and analyze two novel decoupled schemes for the CHSD system. In particular, we show that both schemes are uniquely solvable and enjoy appropriate discrete energy law which ensure the long time stability. So far as we know, these are the first set of uniquely solvable and energy stable decoupled schemes for computing two-phase flows in karstic geometry.

To fix the notation, let us assume that the two-phase flows are confined in a bounded connected domain \(\varOmega \subset {\mathbb {R}}^d\) (\(d=2,3\)) with sufficiently smooth boundary. The unit outer normal at \(\partial \varOmega \) is denoted by \(\mathbf {n}\). The domain \(\varOmega \) is partitioned into two non-overlapping regions such that \({\overline{\varOmega }}={\overline{\varOmega }}_c\cup {\overline{\varOmega }}_m\) and \(\varOmega _c \cap \varOmega _m= \emptyset \), where \(\varOmega _c\) and \(\varOmega _m\) represent the underground conduit (or vug) and the porous matrix region, respectively. We denote \(\partial \varOmega _c\) and \(\partial \varOmega _m\) the boundaries of the conduit and the matrix part, respectively. Both \(\partial \varOmega _c\) and \(\partial \varOmega _m\) are assumed to be Lipschitz continuous. The interface between the two parts (i.e., \(\partial \varOmega _c\cap \partial \varOmega _m\)) is denoted by \(\varGamma _{cm}\), on which \(\mathbf {n}_{cm}\) denotes the unit normal to \(\varGamma _{cm}\) pointing from the conduit part to the matrix part. Then we denote \(\varGamma _c=\partial \varOmega _c\backslash \varGamma _{cm}\) and \(\varGamma _m=\partial \varOmega _m\backslash \varGamma _{cm}\) with \(\mathbf {n}_c, \mathbf {n}_m\) being the unit outer normals to \(\varGamma _{c}\) and \(\varGamma _{m}\). On the conduit/matrix interface \(\varGamma _{cm}\), we denote by \(\{\varvec{\tau }_i\}\) \((i=1,\ldots ,d-1)\) a local orthonormal basis for the tangent plane to \(\varGamma _{cm}\). A two dimensional geometry is illustrated in Fig. 1.

Fig. 1
figure 1

Schematic illustration of the domain in 2D

In the sequel, the subscript m (or c) emphasizes that the variables are for the matrix part (or the conduit part). We denote by \(\mathbf {u}\) the mean velocity of the fluid mixture and \(\varphi \) the phase function related to the concentration of the fluid (volume fraction). The following convention will be assumed throughout the paper

$$\begin{aligned} \mathbf {u}|_{\varOmega _m}=\mathbf {u}_m, \ \ \mathbf {u}|_{\varOmega _c}=\mathbf {u}_c,\ \ \varphi |_{\varOmega _m}=\varphi _m, \ \ \varphi |_{\varOmega _c}=\varphi _c. \end{aligned}$$

Governing PDE system. We shall consider the following generalized Cahn–Hilliard–Stokes–Darcy system with time derivatives retained in the Stokes–Darcy system for generality:

$$\begin{aligned}&\rho _0\partial _t \mathbf {u}_c=\nabla \cdot {\mathbb {T}}(\mathbf {u}_c,P_c)-\varphi _c \nabla \mu _c,\ \ \text{ in }\ \varOmega _c, \end{aligned}$$
(1.1)
$$\begin{aligned}&\nabla \cdot \mathbf {u}_c=0,\ \ \text{ in }\ \varOmega _c,\end{aligned}$$
(1.2)
$$\begin{aligned}&\partial _t\varphi _c+\nabla \cdot (\mathbf {u}_c \varphi _c)=\mathrm{div}(\mathrm{M}(\varphi _c)\nabla \mu _c),\ \ \text{ in }\ \varOmega _c,\end{aligned}$$
(1.3)
$$\begin{aligned}&\frac{\rho _0}{\chi }\partial _t \mathbf {u}_m+\nu (\varphi _m)\varPi ^{-1}\mathbf {u}_m=-\left( \nabla P_m+ \varphi _m \nabla \mu _m\right) ,\ \ \text{ in }\ \varOmega _m,\end{aligned}$$
(1.4)
$$\begin{aligned}&\nabla \cdot \mathbf {u}_m=0,\ \ \text{ in }\ \varOmega _m, \end{aligned}$$
(1.5)
$$\begin{aligned}&\partial _t\varphi _m+\nabla \cdot (\mathbf {u}_m\varphi _m)=\mathrm{div}(\mathrm{M}(\varphi _m)\nabla \mu _m),\ \ \text{ in }\ \varOmega _m, \end{aligned}$$
(1.6)

where the chemical potentials \(\mu _c, \mu _m\) are given by

$$\begin{aligned} \mu _j=\gamma \left[ \frac{1}{\epsilon }\left( \varphi _j^3-\varphi _j\right) -\epsilon \varDelta \varphi _j\right] , \quad \quad j\in \{c, m\} . \end{aligned}$$
(1.7)

The Cauchy stress tensor \({\mathbb {T}}\) is given by

$$\begin{aligned} {\mathbb {T}}(\mathbf {u}_c,p_c) = 2\nu (\varphi _c){\mathbb {D}}(\mathbf {u}_c)-P_c{\mathbb {I}} \end{aligned}$$

where \({\mathbb {D}}(\mathbf {u}_c)=\frac{1}{2}(\nabla \mathbf {u}_c + \nabla ^T \mathbf {u}_c)\) is the rate of strain tensor and \({\mathbb {I}}\) is the \(d\times d\) identity matrix. Here \(\rho _0\) represents the fluid density, \(\chi \) is the porosity, \(\nu \) is the viscosity, \(\varPi \) is the permeability matrix, the parameter \(\gamma >0\) is related to the surface tension. The mobility of the CHSD model is denoted by \(\mathrm {M}\). Throughout, we assume that the viscosity \(\nu \) and mobility M are suitable functions of the phase function \(\varphi \) such that \(0<c\le \nu , M\le C\) for positive constants c and C. We remark that the mobility function M should scale like \(\epsilon ^2\) to recover the sharp interface model in the limit \(\epsilon \rightarrow 0\), cf. [37]. In Eq. (1.4), \(\varPi \) is a \(d\times d\) matrix standing for permeability of the porous media. It is related to the hydraulic conductivity tensor of the porous medium \({\mathbb {K}}\) through the relation \(\varPi =\frac{\nu {\mathbb {K}}}{\rho _0 g}\). In this manuscript, \({\mathbb {K}}\) is assumed to be a bounded, symmetric and uniformly positive definite matrix. We also adopt the convention that \(\varPi \) in the denominator would be the same as multiplying the numerator by the inverse of \(\varPi \) on the left.

The CHSD System is subject to the following boundary and interface boundary conditions.

Boundary conditions on \(\varGamma _c\) and \(\varGamma _m\) :

$$\begin{aligned}&\mathbf {u}_c=\mathbf {0},\quad \frac{\partial \varphi _c}{\partial \mathbf {n}_c}=\frac{\partial \mu _c}{\partial \mathbf {n}_c}=0, \qquad \text {on}\ \varGamma _c, \end{aligned}$$
(1.8)
$$\begin{aligned}&\mathbf {u}_m\cdot \mathbf {n}_m=0,\quad \frac{\partial \varphi _m}{\partial \mathbf {n}_m}=\frac{\partial \mu _m}{\partial \mathbf {n}_m}=0,\qquad \text {on}\ \varGamma _m, \end{aligned}$$
(1.9)

Interface conditions on \(\varGamma _{cm}\) :

$$\begin{aligned}&\varphi _m =\varphi _c, \quad \frac{\partial \varphi _m}{\partial \mathbf {n}_{cm}}=\frac{\partial \varphi _c}{\partial \mathbf {n}_{cm}}, \text{ on }\ \varGamma _{cm}, \end{aligned}$$
(1.10)
$$\begin{aligned}&\mu _m=\mu _c,\quad M(\varphi _m)\frac{\partial \mu _m}{\partial \mathbf {n}_{cm}}=M(\varphi _c)\frac{\partial \mu _c}{\partial \mathbf {n}_{cm}},\ \ \text{ on }\ \varGamma _{cm}, \end{aligned}$$
(1.11)
$$\begin{aligned}&\mathbf {u}_m\cdot \mathbf {n}_{cm}=\mathbf {u}_c\cdot \mathbf {n}_{cm},\quad \text{ on }\ \varGamma _{cm}, \end{aligned}$$
(1.12)
$$\begin{aligned}&-\mathbf {n}_{cm}\cdot ({\mathbb {T}}(\mathbf {u}_c,P_c){\mathbf {n}_{cm}})=P_m,\ \ \text{ on }\ \varGamma _{cm}, \end{aligned}$$
(1.13)
$$\begin{aligned}&-\varvec{\tau }_i\cdot ({\mathbb {T}}(\mathbf {u}_c,P_c){\mathbf {n}_{cm}})=\alpha _{BJSJ}\frac{\nu (\varphi _m)}{\sqrt{\text {trace}(\varPi )}}\varvec{\tau }_i\cdot \mathbf {u}_c, \nonumber \\&\quad i=1,..,d-1, \text{ on }\ \varGamma _{cm}. \end{aligned}$$
(1.14)

We refer to [25] for the detailed derivation of the CHSD model (1.1)–(1.6) together with the interface boundary conditions (1.10)–(1.14). The last interface condition (1.14) is the so-called Beavers–Joseph–Saffman–Jones (BJSJ) condition (cf. [32, 41]), where \(\alpha _{BJSJ}\ge 0\) is an empirical parameter assumed to be a constant here for simplicity. The BJSJ condition is a simplified variant of the well-known Beavers-Joseph (BJ) condition (cf. [1]) that addresses the important issue of how the porous media affects the conduit flow at the interface:

$$\begin{aligned} -\varvec{\tau }_i\cdot (2\nu {\mathbb {D}}(\mathbf {u}_c))\mathbf {n}_{cm}=\alpha _{BJ}\frac{\nu }{\sqrt{\text {trace}(\varPi )}}\varvec{\tau }_i\cdot (\mathbf {u}_c-\mathbf {u}_m), \ \ \text{ on }\ \varGamma _{cm}, \ i=1,\ldots ,d-1. \end{aligned}$$

Mathematically rigorous justification of this simplification under appropriate assumptions can be found in [31].

An important feature of the CHSD system (1.1)–(1.14) is that it obeys a dissipative energy law. We define the total energy of the coupled system as follows:

$$\begin{aligned} {\mathcal {E}}(t)= \int _{\varOmega _c}\frac{\rho _0}{2}|\mathbf {u}_c|^2 dx+ \int _{\varOmega _m}\frac{\rho _0}{2\chi }|\mathbf {u}_m|^2 dx +\gamma \int _{\varOmega }\left[ \frac{\epsilon }{2}|\nabla \varphi |^2+\frac{1}{\epsilon }F(\varphi )\right] dx, \end{aligned}$$
(1.15)

with \(F(\varphi )=\frac{1}{4}(\varphi ^2-1)^2.\) Let \((\mathbf {u}_m, \mathbf {u}_c, \varphi )\) be a smooth solution to the initial boundary value problem (1.1)–(1.14). Then \((\mathbf {u}_m, \mathbf {u}_c, \varphi )\) satisfies the following basic energy law:

$$\begin{aligned} \frac{d}{dt} {\mathcal {E}}(t)=-{\mathcal {D}}(t) \le 0,\quad \forall \, t\ge 0, \end{aligned}$$
(1.16)

where the rate of energy dissipation \({\mathcal {D}}\) is given by

$$\begin{aligned} {\mathcal {D}}(t)= & {} \int _{\varOmega _m} \nu (\varphi _m)\varPi ^{-1}|\mathbf {u}_m|^2dx +\int _{\varOmega _c}2\nu (\varphi _c)|{\mathbb {D}}(\mathbf {u}_c)|^2dx \nonumber \\&+\int _{\varOmega }\mathrm{M}(\varphi )|\nabla \mu (\varphi )|^2dx +\alpha _{BJSJ}\int _{\varGamma _{cm}}\frac{ \nu (\varphi )}{\sqrt{\mathrm{trace}(\varPi )}}\sum _{i=1}^{d-1}|\mathbf {u}_c\cdot \varvec{\tau }_i|^2 dS\nonumber \\ \end{aligned}$$
(1.17)

where we have assumed that the Beavers-Joseph-Saffman-Jones interface parameter \(\alpha _{BJSJ}\) is a constant for simplicity. The case with variable BJSJ interface parameter, a necessity for curved interface boundary, can be treated similarly.

The CHSD system is a complicated system that couples different dynamics in different domains (Cahn–Hilliard equation, Stokes equation, Darcy equation). Hence it is of great interest to develop decoupled numerical schemes (for instance, domain decomposition schemes) so as to employ legacy solvers for each individual equation and reduce computational cost. On the other hand, the CHSD system is a diffuse interface model that describes physical phenomena with large gradient in a small transition layer. For such systems, unconditionally stable numerical schemes are desirable so that the stiffness can be handled with ease. It is thus crucial to design efficient decoupled stable numerical algorithms for solving this system, which is the main focus of this article. Another challenge associated with the CHSD is the necessity for long time simulation due to the slow flow motion in the porous media vs the fast motion in the conduit for situations such as pressure gradient driven flow. Unconditional long-time stability of the schemes becomes handy although it is not equivalent to long time accuracy. (Long-time stability of the schemes is a key ingredient in ensuring the convergence of long time statistical properties for dissipative systems [52]).

Efficient solvers for each individual equation/system are building blocks for constructing an efficient numerical algorithm of the CHSD system. Among the abundant literature, we only survey those closely related to our schemes. For the Cahn–Hilliard type equation that describes physical phenomena with large gradient in a small transition layer, a popular strategy in the temporal discretization is based on a convex-splitting of the associated energy functional, see [19] for a first order scheme and [30, 44] for second order schemes. The convex-splitting schemes are desirable because they are unconditionally energy-stable and uniquely solvable. Thus numerical stiffness can be handled with ease. There are also unconditionally stable linear schemes in the literature [23, 45] where additional stabilization terms are introduced to ensure stability. These ideas (convex-splitting and stabilization) have been successfully utilized in the computation of Cahn–Hilliard fluid models, cf. [15, 21, 24, 26, 33, 34, 46, 47] for Cahn–Hilliard–Navier–Stokes models and [14, 53] for Cahn–Hilliard–Hele–Shaw/Brinkman models. For the single-phase Stokes–Darcy system, there are many efficient numerical solvers, see for instance [2,3,4,5,6, 8,9,10, 12, 16,17,18, 36].

On one hand, decoupled scheme is highly desirable for solving such a large system on a moderate computer. In addition to the apparent efficiency advantage, decoupling the computation of the system would allow the application of numerous legacy algorithms/codes surveyed above which are not directly applicable otherwise. Furthermore, the rich scales encompassed in the CHSD system naturally call for different meshes and even different time step-size for the computation of different dynamics. For instance, it is advantageous to employ adaptive mesh refinement for the computation of Cahn–Hilliard equation so as to resolve the diffuse interface of small width, especially when low order finite element is used. In contrast, the computation of fluid equation can be done on fixed coarser grids as groundwater flow is typically slow. A decoupled scheme is much easier to implement these ideas compared to coupled ones. Finally, the scheme needs to be stable for long time simulations which are typically the objective in the context of groundwater study.

We note that a fully decoupled numerical schemes can be constructed easily, for instance, by treating the coupling terms in the equations and in the interface boundary conditions explicitly. However, such a method is not known to have the highly desirable unconditional stability for solving the CHSD system. The design of an unconditionally stable, decoupled numerical scheme requires delicate consideration and application of the classical operator-splitting/fractional-step methodology [13, 38, 48,49,50, 54]. The work of Temam [49, 50] is particularly relevant where the unconditional stability of the fractional-step schemes applied to the Navier–Stokes system was first discussed. See also [22, 35, 42, 51] for other work related to the Chorin-Temam fractional-step method for solving fluid equations.

Another phase field model for two-phase flow in karstic geometry was proposed in [7]. In their model, the Cahn–Hilliard–Navier–Stokes equation with moving contact line type boundary conditions (generalized Navier slip boundary condition for velocity and dynamic boundary condition for order parameter) is adopted for two-phase flow in conduit. In porous medium, however, a two-phase Darcy’s law is utilized. The authors propose a Robin-Robin domain decomposition method to solve the coupled system. However, the stability of the proposed scheme was not discussed. An energy stable but fully coupled scheme for the Cahn–Hilliard–Stokes–Darcy system can be found in [25].

Finally, we comment on the stability of our proposed numerical scheme. The explicit treatment of the velocity in Cahn–Hilliard equation is analyzed in [33] for the Cahn–Hilliard–Navier–Stokes system. It is shown that the scheme is conditionally stable with a mild CFL condition. Extrapolation in time of the interface boundary conditions have also been used in the computation of the non-stationary Stokes–Darcy system where long-time stability and error estimates were established under a time step-size constraint dependent on the problem parameters, see for instance [10, 11, 40]. Both decoupled schemes that we propose here are unconditionally energy stable. Our numerical experiments verify our theoretical results on the long-time stability of the novel schemes.

The paper is structured in the following way. We introduce the function spaces and the concept of weak formulation in Sect. 2. Two novel decoupled numerical schemes for solving the CHSD system are proposed and analyzed in Sect. 3. In Sect. 4, we first verify numerically that our schemes are first-order accurate in time and long-time stable. Then we present two numerical experiments, boundary driven and buoyancy driven flows, to illustrate the effectiveness of our schemes. Both numerical simulations are of physical interest for transport processes of two-phase flow in karst geometry.

2 The weak formulation

For our CHSD problem with domain decomposition, we introduce the following spaces

$$\begin{aligned} \mathbf {H}(\mathrm{div}; \varOmega _j):= & {} \{\mathbf {w}\in \mathbf {L}^2(\varOmega _j)~|~\nabla \cdot \mathbf {w}\in \mathbf {L}^2(\varOmega _j)\}, \quad \quad j\in \{c,m\},\\ \mathbf {H}_{c,0}:= & {} \{\mathbf {w}\in \mathbf {H}^1(\varOmega _c)~|~\mathbf {w}=\mathbf {0}\text { on }\varGamma _{c}\}, \\ \mathbf {H}_{c,\text {div}}:= & {} \{ \mathbf {w}\in \mathbf {H}_{c,0}~|~\nabla \cdot \mathbf {w}=0\}, \\ \mathbf {H}_{m,0}:= & {} \{\mathbf {w}\in \mathbf {H}(\mathrm{div}; \varOmega _m)~|~\mathbf {w}\cdot \mathbf {n}_m=0 \ \text {on}\ \varGamma _{m}\}, \\ \mathbf {H}_{m,\mathrm {div}}:= & {} \{\mathbf {w}\in \mathbf {H}_{m,0}~|~\nabla \cdot \mathbf {w}=0\},\\ X_m:= & {} H^1(\varOmega _m) \cap L^2_0(\varOmega _m). \end{aligned}$$

Here \(L^2_0(\varOmega _m)\) is a subspace of \(L^2\) whose elements are of mean zero. We denote \((\cdot , \cdot )_c\), \((\cdot , \cdot )_m\) the inner products on the spaces \(L^2(\varOmega _c)\), \(L^2(\varOmega _m)\), respectively (also for the corresponding vector spaces). The inner product on \(L^2(\varOmega )\) is simply denoted by \((\cdot , \cdot )\). Then it is clear that

$$\begin{aligned} (u,v)=(u_m,v_m)_m+(u_c,v_c)_c, \quad \Vert u\Vert _{L^2(\varOmega )}^2=\Vert u_m\Vert _{L^2(\varOmega _m)}^2+\Vert u_c\Vert _{L^2(\varOmega _c)}^2, \end{aligned}$$

where \(u_m:=u|_{\varOmega _m}\) and \(u_c:=u|_{\varOmega _c}\). We will suppress the dependence on the domain in the \(L^2\) norm if there is no ambiguity. We also denote \(H'\) the dual space of H with the duality induced by the \(L^2\) inner product.

Below we give the definition of the weak formulation of the CHSD system in 2D. The weak formulation in 3D can be defined similarly with slight changes in time integrability of the functions.

Definition 1

Suppose that \(d=2\) and \(T>0\) is arbitrary. We consider the initial data \(\varphi _{0}\in H^1(\varOmega ), \mathbf {u}_c(0) \in \mathbf {H}_{c,div}, \mathbf {u}_m(0) \in \mathbf {H}_{m,div}\). The functions \((\mathbf {u}_c, P_c, \mathbf {u}_m, P_m, \varphi , \mu )\) with the following properties

$$\begin{aligned}&\mathbf {u}_c\in L^\infty \left( 0, T; \mathbf {L^2}(\varOmega _c)\right) \cap L^2(0, T; \mathbf {H}_{c,0}), \frac{\partial \mathbf {u}_c}{\partial t} \in L^{\frac{4}{3}}\left( 0,T; (\mathbf {H}_{c,0})^\prime \right) , \end{aligned}$$
(2.1)
$$\begin{aligned}&\mathbf {u}_m\in L^\infty \left( 0, T; \mathbf {L^2}(\varOmega _m)\right) \cap L^2(0, T; \mathbf {H}_{m,0}),\frac{\partial \mathbf {u}_m}{\partial t} \in L^{\frac{4}{3}}\left( 0,T; (\mathbf {H}_{m,0})^\prime \right) , \end{aligned}$$
(2.2)
$$\begin{aligned}&P_c \in L^\frac{4}{3} \left( 0,T; L^2(\varOmega _c)\right) , \quad P_m \in L^\frac{4}{3}(0,T; X_m), \end{aligned}$$
(2.3)
$$\begin{aligned} {}&\varphi \in L^\infty \left( 0,T; H^1(\varOmega )\right) \cap L^2\left( 0,T; H^3(\varOmega )\right) , \varphi _t \in L^2\left( 0;T; (H^1(\varOmega ))'\right) , \end{aligned}$$
(2.4)
$$\begin{aligned}&\mu \in L^2\left( 0, T; H^1(\varOmega )\right) , \end{aligned}$$
(2.5)

is called a finite energy weak solution of the CHSD system (1.1)–(1.14), if the following conditions are satisfied:

  1. (1)

    For any \(\mathbf {v}_c\in \mathbf {H}_{c,0}\) and \(q_c\in L^2(\varOmega _c)\),

    $$\begin{aligned}&\langle \partial _t \mathbf {u}_c,\mathbf {v}_c \rangle _c + 2(\nu (\varphi _c){\mathbb {D}}(\mathbf {u}_c),{\mathbb {D}}(\mathbf {v}_c))_c - (P_c, \nabla \cdot \mathbf {v}_c)_c \nonumber \\&\quad +\sum _{i=1}^{d-1}\alpha _{BJSJ}\int _{\varGamma _{cm}}\frac{\nu (\varphi _m)}{\sqrt{\mathrm{trace} (\varPi )}}(\mathbf {u}_c\cdot \varvec{\tau }_i)(\mathbf {v}_c\cdot \varvec{\tau }_i)dS + \int _{\varGamma _{cm}} P_m (\mathbf {v}_c\cdot \mathbf {n}_{cm}) dS\nonumber \\&\quad + (\nabla \cdot \mathbf {u}_c, q_c)_c +(\varphi _c \nabla \mu (\varphi _c), \mathbf {v}_c )_c =0. \end{aligned}$$
    (2.6)
  2. (2)

    For any \(\mathbf {v}_m\in \mathbf {H}_{m,0}\) and \(q_m\in H^1(\varOmega _m)\),

    $$\begin{aligned}&\frac{\rho _0}{\chi } \langle \partial _t \mathbf {u}_m,\mathbf {v}_m \rangle _m+\left( \nu (\varphi _m)\varPi ^{-1}\mathbf {u}_m, \mathbf {v}_m\right) _m + (\nabla P_m, \mathbf {v}_m)_m - ( \mathbf {u}_m, \nabla q_m)_m\nonumber \\&\quad +(\varphi _m \nabla \mu (\varphi _m), \mathbf {v}_m )_m -\int _{\varGamma _{cm}} \mathbf {u}_c \cdot \mathbf {n}_{cm} q_m\, ds=0. \end{aligned}$$
    (2.7)
  3. (3)

    For any \(v, \phi \in H^1(\varOmega )\),

    $$\begin{aligned}&\langle \partial _t\varphi ,v)+(\mathrm{M}(\varphi ) \nabla \mu (\varphi ),\nabla v)-(\mathbf {u}\varphi ,\nabla v)=0, \end{aligned}$$
    (2.8)
    $$\begin{aligned}&\gamma \left[ \frac{1}{\epsilon }(f(\varphi ),v)+\epsilon (\nabla \varphi ,\nabla v) \right] -(\mu (\varphi ),\phi )=0. \end{aligned}$$
    (2.9)
  4. (3)

    \(\varphi |_{t=0}=\varphi _{0}(x), \mathbf {u}_c|_{t=0}=\mathbf {u}_c(0), \mathbf {u}_m|_{t=0}=\mathbf {u}_m(0).\)

  5. (4)

    The finite energy solution satisfies the energy inequality

    $$\begin{aligned} {\mathcal {E}}(t) +\int _s^t{\mathcal {D}}(\tau ) d\tau \le {\mathcal {E}}(s), \end{aligned}$$
    (2.10)

    for all \(t\in [s,T)\) and almost all \(s\in [0,T)\) (including \(s=0\)), where the total energy \({\mathcal {E}}\) is given by (1.15).

We note that the Darcy pressure \(P_m\) and the Stokes pressure \(P_c\) are uniquely determined only up to a common constant in the CHSD system (1.1)–(1.14). In the Definition 1, we require \(P_m \in X_m\) so that it is of mean zero and uniquely determined. Then the Stokes pressure is uniquely determined in view of the interface boundary condition (1.13). Hence in the weak formulation we only impose \(P_c \in L^2(\varOmega _c)\). We refer to [28] for the study of the existence of such a weak solution for a similar problem.

3 The numerical schemes

Let \(\tau >0\) be a time step size and set \(t^k=k\tau \) for \(0\le k \le K=[T/\tau ]\). Let \({\mathcal {T}}^h_c\) (\({\mathcal {T}}^h_m\)) be a quasi-uniform triangulation of the domain \(\varOmega _c\) (\(\varOmega _m\) resp.) of mesh size h. In addition, we assume that the triangulations \({\mathcal {T}}^h_c\) and \({\mathcal {T}}^h_m\) coincide on the interface \(\varGamma _{cm}\) in the sense that triangles in \(\varOmega _m\) and \(\varOmega _c\) share the same edges along \(\varGamma _{cm}\). Then \({\mathcal {T}}^h:= {\mathcal {T}}^h_c \cup {\mathcal {T}}^h_m\) forms a triangulation of the domain \(\varOmega \). Let \(Y_h\) denote a finite element approximation of \(H^1(\varOmega )\) based on the triangulation \({\mathcal {T}}_h\). Typical examples of \(Y_h\) include

$$\begin{aligned} Y_h=\{v_h \in C({\bar{\varOmega }})\big | v_h |_K \in P_r(K), \forall K \in {\mathcal {T}}_h\}, \end{aligned}$$

where \(P_r(K)\) is the space of polynomials of degree less than or equal to r on the triangle K. Denote by \(\mathbf {X}_c^h\) the finite element approximation of \(\mathbf {H}_{c,0}\), and by \(M_c^h\) the finite element approximation of \(L^2(\varOmega _c)\). Note that we did not impose the condition of mean zero on the space \(M_c^h\). This is consistent with the Definition 1. We assume that \(\mathbf {X}_c^h\) and \(M_c^h\) are stable approximation spaces for Stokes velocity and pressure in the sense that

$$\begin{aligned} \sup _{\mathbf {v}_h \in \mathbf {X}_c^h} \frac{(\nabla \cdot \mathbf {v}_h, q_h)_c}{||\mathbf {v}_h||_{H^1}} \ge c||q_h||_{L^2}, \quad \forall q_h \in M_c^h. \end{aligned}$$
(3.1)

The validity of such an inf-sup condition for some standard finite element spaces can be found in [36]. The classical P2-P0, Taylor–Hood finite element spaces and the Mini finite element spaces are commonly adopted in practice for \(\mathbf {X}_c^h\) and \(M_c^h\), cf. [20, 36]. Similarly, one can define the finite element spaces \(\mathbf {X}_m^h\) (finite element subspace of \(\mathbf {H}_{m,0}\)) and \(M_m^h\) (finite element subsapce of \(X_m\)) for the Darcy velocity and pressure. We also assume \(\mathbf {X}_m^h\) and \(M_m^h\) are stable satisfying

$$\begin{aligned} \sup _{\mathbf {v}_h \in \mathbf {X}_m^h} \frac{( \mathbf {v}_h, \nabla q_h)_m}{||\mathbf {v}_h||_{L^2}} \ge c||q_h||_{L^2}, \quad \forall q_h \in M_m^h. \end{aligned}$$
(3.2)

We remark that the Taylor–Hood finite element spaces satisfy the above condition.

Remark 1

The inf-sup condition (3.2) for Darcy equation is not the standard one. We remark that it holds for some common finite element spaces. For example, if \(\nabla (M_m^h)\subset \mathbf {V}_m^h\), then we can can take \(\mathbf {v}_h=\nabla q_h\). Therefore,

$$\begin{aligned} \frac{( \mathbf {v}_h, \nabla q_h)_m}{||\mathbf {v}_h||_{L^2}}=\Vert \nabla q_h\Vert _{L^2}\ge c\Vert q_h\Vert _{L^2}, \end{aligned}$$

here we have used Poincaré inequality in the last inequality since we require \(q_h\in L^2_0(\varOmega _m)\). Another case is to use mixed finite element for the Stokes equation with continuous pressure approximation, such as Taylor-Hood element, and we can choose \( \mathbf {v}_h\cdot \mathbf {n}=0\) with \(\mathbf {n}\) the unit outer normal of \(\partial \varOmega _m\), then \(( \mathbf {v}_h, \nabla q_h)_m=-(\nabla \cdot \mathbf {v}_h, q_h)_m\), and the inf-sup condition (3.2) can be obtained by using the standard inf-sup condition for the Stokes equation.

Before we describe our unconditionally stable and decoupled numerical schemes, we point out that a fully decoupled numerical scheme for solving the CHSD model can be constructed easily, for instance, by treating the velocity in the Cahn–Hilliard equation (2.8) and the interface boundary conditions in Eqs. (2.6) and (2.7) explicitly. The explicit treatment of velocity in the phase field fluid models have been analyzed carefully, in [33] for the case of Cahn–Hilliard–Navier–Stokes equations, and in [27] for the case of Cahn–Hilliard–Darcy model. And decoupled schemes using extrapolation in time for interface boundary conditions have been proposed and analyzed for single phase Stokes–Darcy system, see [10, 11] and references therein. However, in the setting of CHSD model, it seems that this type of decoupling strategy does not lead to unconditional stability. It is our aim here to design unconditionally stable, energy stable in particular, and decoupled numerical schemes for solving the CHSD model.

3.1 An energy stable scheme (PD) decoupling the order parameter and the velocity

Here we present an unconditionally stable numerical scheme that decouples the computation of the Cahn–Hilliard equation from that of the fluid equations (Stokes–Darcy system). We employ a fractional-step method for realizing the decoupling. An intermediate velocity driven solely by the capillary force is used in the time-discretization of the Cahn–Hilliard equation, see Eqs. (3.6) and (3.7) below. Hence, upon substitution, the velocity equations are completely decoupled from the equations for the order parameter. In the context of phase field models, this idea of fractional step method is first applied in solving the Cahn–Hilliard–Navier–Stokes equations, cf. [39, 47]. We point out that the Stokes equations are still coupled with the Darcy equations in the scheme (PD).

We present the scheme (PD) for solving the CHSD model (1.1)–(1.14) as follows:

Step 1: Cahn–Hilliard equation: find \(\varphi _h^{k+1} \in Y_h\) and \(\mu _h^{k+1} \in Y_h\) such that for any \(v_h, \phi _h \in Y_h\),

$$\begin{aligned}&\left( \delta _t\varphi ^{k+1}_h,v_h\right) +\left( \mathrm{M}(\varphi ^k_h) \nabla \mu ^{k+1}_h,\nabla v_h\right) -\left( \overline{\mathbf {u}}^{k+1}_h \varphi ^k_h ,\nabla v_h\right) =0, \end{aligned}$$
(3.3)
$$\begin{aligned}&\gamma \left[ \frac{1}{\epsilon }\left( f\left( \varphi ^{k+1}_h, \varphi ^k_h\right) ,\phi _h\right) +\epsilon \left( \nabla \varphi ^{k+1}_h,\nabla \phi _h\right) \right] -\left( \mu ^{k+1}_h,\phi _h\right) =0, \end{aligned}$$
(3.4)

with \(f(\varphi ^{k+1}_h, \varphi ^k_h)=(\varphi ^{k+1}_h)^3-\varphi ^k_h\), and \(\delta _t\) denoting the backward difference quotient operator \(\delta _t\varphi ^{k+1}_h:= \frac{\varphi ^{k+1}_h-\varphi ^{k}_h}{\tau }\). Here the intermediate velocity \(\overline{\mathbf {u}}^{k+1}_h\) in Eq. (3.3) is defined as

$$\begin{aligned} \overline{\mathbf {u}}^{k+1}=\left\{ \begin{aligned}&\overline{\mathbf {u}}_{m,h}^{k+1}, \quad x \in \varOmega _m, \\&\overline{\mathbf {u}}_{c,h}^{k+1}, \quad x \in \varOmega _c, \end{aligned} \right. \end{aligned}$$
(3.5)

where \(\overline{\mathbf {u}}_{m,h}^{k+1}\) and \(\overline{\mathbf {u}}_{c,h}^{k+1}\) are defined through the following equations

$$\begin{aligned}&\frac{\rho _0}{\chi }\frac{\overline{\mathbf {u}}_{m,h}^{k+1}-\mathbf {u}_{m,h}^k}{\tau }+\varphi _{m,h}^{k}\nabla \mu _{m,h}^{k+1}=0, \end{aligned}$$
(3.6)
$$\begin{aligned}&\rho _0 \frac{\overline{\mathbf {u}}_{c,h}^{k+1}-\mathbf {u}_{c,h}^k}{\tau }+\varphi _{c,h}^{k}\nabla \mu _{c,h}^{k+1}=0. \end{aligned}$$
(3.7)

Step 2: Stokes equation: find \(\mathbf {u}_{c, h}^{k+1} \in \mathbf {X}_{c}^h\) and \(P_{c,h}^{k+1} \in M_c^h\) such that for any \(\mathbf {v}_{c,h}\in \mathbf {X}_{c}^h\) and \(q_{c,h}\in M_c^h\),

$$\begin{aligned}&\rho _0\left( \delta _t\mathbf {u}_{c,h}^{k+1},\mathbf {v}_{c,h} \right) _c +a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {v}_{c,h}\right) + b_c\left( \mathbf {v}_{c,h}, P_{c,h}^{k+1}\right) + \int _{\varGamma _{cm}} P_{m,h}^{k+1} (\mathbf {v}_{c,h}\cdot \mathbf {n}_{cm}) dS\nonumber \\&\quad -\, b_c\left( \mathbf {u}^{k+1}_{c,h}, q_{c,h}\right) +\left( \varphi _{c,h}^k \nabla \mu _{c,h}^{k+1}, \mathbf {v}_{c,h}\right) _c =0, \end{aligned}$$
(3.8)

where

$$\begin{aligned}&a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {v}_{c,h}\right) = 2\left( \nu \left( \varphi _{c,h}^k\right) {\mathbb {D}}\left( \mathbf {u}_{c,h}^{k+1}\right) ,{\mathbb {D}}(\mathbf {v}_{c,h})\right) _c \nonumber \\&\quad +\sum _{i=1}^{d-1}\alpha _{BJSJ}\int _{\varGamma _{cm}}\frac{\nu \left( \varphi _{c,h}^k\right) }{\sqrt{\mathrm{trace} (\varPi )}}\left( \mathbf {u}_{c,h}^{k+1}\cdot \varvec{\tau }_i\right) (\mathbf {v}_{c,h}\cdot \varvec{\tau }_i)dS, \end{aligned}$$
(3.9)
$$\begin{aligned}&b_c(\mathbf {v}_{c,h}, q_{c,h})=-(\nabla \cdot \mathbf {v}_{c,h}, q_{c,h})_c. \end{aligned}$$
(3.10)

And Darcy equation: find \(\mathbf {u}_{m, h}^{k+1} \in \mathbf {X}_{m}^h\) and \(P_{m,h}^{k+1} \in M_m^h\) such that for any \(\mathbf {v}_{m,h}\in \mathbf {X}_{m}^h\) and \(q_{m,h}\in M_m^h\),

$$\begin{aligned}&\frac{\rho _0}{\chi } \left( \delta _t\mathbf {u}_{m,h}^{k+1},\mathbf {v}_{m,h}\right) _m {+}a_m\left( \mathbf {u}_{m,h}^{k+1},\mathbf {v}_{m,h}\right) {+}b_m\left( \mathbf {v}_{m,h}, P_{m,h}^{k+1}\right) {+}\left( \varphi _{m,h}^k \nabla \mu _{m,h}^{k+1}, \mathbf {v}_{m,h} \right) _m \nonumber \\&\quad -\int _{\varGamma _{cm}} \mathbf {u}_{c,h}^{k+1} \cdot \mathbf {n}_{cm} q_{m,h}\, ds- b_m\left( \mathbf {u}_{m,h}^{k+1}, q_{m,h}\right) =0, \end{aligned}$$
(3.11)

where

$$\begin{aligned}&a_m(\mathbf {u}_{m,h}^{k+1},\mathbf {v}_{m,h})=\big (\nu (\varphi _{m,h}^{k})\varPi ^{-1}\mathbf {u}_{m,h}^{k+1}, \mathbf {v}_{m,h}\big )_m, \end{aligned}$$
(3.12)
$$\begin{aligned}&b_m(\mathbf {v}_{m,h}, q_{m,h})=( \mathbf {v}_{m,h}, \nabla q_{m,h})_m. \end{aligned}$$
(3.13)

The decoupling of the Cahn–Hilliard equation and Stokes–Darcy system is realized through a fractional step method. For instance, Eqs. (3.6) and (3.11) amount to solving the Darcy system (1.4)–(1.5) via the following temporal splitting algorithm, suppressing the spatial discretization,

$$\begin{aligned}&\frac{\rho _0}{\chi }\frac{\overline{\mathbf {u}}_{m}^{k+1}-\mathbf {u}_{m}^k}{\tau }+\varphi _{m}^{k}\nabla \mu _{m}^{k+1}=0, \end{aligned}$$
(3.14)
$$\begin{aligned}&\frac{\rho _0}{\chi }\frac{\mathbf {u}_{m}^{k+1}-\overline{\mathbf {u}}_{m}^{k+1}}{\tau } + \nu (\varphi _{m}^{k}){\varPi }^{-1}\mathbf {u}_{m}^{k+1} +\nabla P_{m}^{k+1}=0, \end{aligned}$$
(3.15)
$$\begin{aligned}&\nabla \cdot \mathbf {u}_{m}^{k+1}=0. \end{aligned}$$
(3.16)

It is clear that the scheme is consistent as \(\overline{\mathbf {u}}_{m}^{k+1}\) is a first order in-time approximation of \(\mathbf {u}_{m}^k\). Furthermore, the intermediate velocity never appears in the practical computation as one can substitute the definition of \(\overline{\mathbf {u}}_{m}^{k+1}\) back into the Cahn–Hilliard equation and solve for \(\mathbf {u}_{m}^{k+1}\) via Eq. (3.11).

To state the energy stability of the scheme (PD), we define a discrete free energy functional

$$\begin{aligned} E(\varphi _h^k)=\gamma \int _\varOmega \left( \frac{1}{\epsilon } F(\varphi _h^k)+ \frac{\epsilon }{2}|\nabla \varphi _h^k|^2 \right) dx, \end{aligned}$$

and also a discrete total energy functional

$$\begin{aligned} {\mathcal {E}}^{k}= \int _{\varOmega _c}\frac{\rho _0}{2}|\mathbf {u}_{c,h}^{k}|^2 dx+ \int _{\varOmega _m}\frac{\rho _0}{2\chi }|\mathbf {u}_{m,h}^k|^2 dx+ \gamma \int _\varOmega \left( \frac{1}{\epsilon } F(\varphi _h^k)+ \frac{\epsilon }{2}|\nabla \varphi _h^k|^2 \right) dx. \end{aligned}$$
(3.17)

One can show that the scheme (3.3)–(3.11) is unconditionally uniquely solvable and energy-stable, in the sense of the following theorem.

Theorem 1

The scheme (PD) (Eqs. 3.33.11) is unconditionally uniquely solvable and mass conservative at each time step. Moreover, the scheme (PD) satisfies a modified energy law

$$\begin{aligned}&{\mathcal {E}}^{k+1}-{\mathcal {E}}^k + \tau a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {u}_{c,h}^{k+1}\right) + \tau \left| \left| \sqrt{\nu /\varPi }\mathbf {u}_{m,h}^{k+1}\right| \right| _{L^2}^2 \nonumber \\&\quad \le -\frac{\gamma \epsilon }{2}\left| \left| \nabla \left( \varphi _h^{k+1}-\varphi _h^{k}\right) \right| \right| _{L^2}^2 -\frac{\rho _0}{4}\left| \left| \mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^k\right| \right| _{L^2}^2-\frac{\rho _0}{ 4\chi }\left| \left| \mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^k\right| \right| _{L^2}^2, \end{aligned}$$
(3.18)

Thus it is unconditionally energy-stable.

Proof

Note that upon substitution of the intermediate velocities (3.6) and (3.7) into the Cahn–Hilliard equation (3.3), the nonlinear Cahn–Hilliard equations (3.3)–(3.4) are completely decoupled from the linear Stokes–Darcy equations (3.8)–(3.11). Given \(\varphi ^k_h, \mathbf {u}^k_h\), Eqs. (3.3)–(3.4) can be viewed as a first-order convex-splitting discretization of the Cahn–Hilliard equation with known source terms. Thus the unique solvability of the Cahn–Hilliard part can be established by following a gradient flow argument, cf. [33, 43, 53]. See also [26, 28] for an alternative proof exploiting the property of monotonicity in convex-splitting schemes. Once \(\mu _h^{k+1}\) is known, Eqs. (3.8)–(3.11) become linear equations for velocity and pressure. Its unique solvability can be established the same way as in the classical mixed formulation for Stokes equation, cf. [20] using the inf-sup conditions. For completeness, we give the details of an alternative argument that does not rely on the inf-sup condition for the coupled Stokes–Darcy system explicitly here. As Eqs. (3.8)–(3.11) define a finite linear system for \(\mathbf {u}^{k+1}_{c,h}, P_{c,h}^{k+1}, \mathbf {u}^{k+1}_{m,h}, P_{m,h}^{k+1}\), we only need to show that solutions are unique.Footnote 1 Suppose there are two solutions, and define their differences by \(\mathbf {E}_c^{u}, E_c^p, \mathbf {E}_m^u, E_m^p\) respectively. Then the differences satsify \(\forall \mathbf {v}_{c,h}\in \mathbf {X}_{c}^h, q_{c,h}\in M_c^h\) and \(\mathbf {v}_{m,h}\in \mathbf {X}_{m}^h, q_{m,h}\in M_m^h\),

$$\begin{aligned}&\frac{\rho _0}{\tau }\left( \mathbf {E}_c^u,\mathbf {v}_{c,h} \right) _c +a_c \left( \mathbf {E}_c^u,\mathbf {v}_{c,h}\right) +b_c\left( \mathbf {v}_{c,h}, E_c^p\right) -b_c\left( \mathbf {E}_c^u, q_{c,h}\right) \nonumber \\&\quad + \int _{\varGamma _{cm}} E_m^p (\mathbf {v}_{c,h}\cdot \mathbf {n}_{cm}) dS =0, \end{aligned}$$
(3.19)
$$\begin{aligned}&\frac{\rho _0}{\chi \tau }\left( \mathbf {E}_m^u,\mathbf {v}_{m,h}\right) _m +a_m \left( \mathbf {E}_m^u, \mathbf {v}_{m,h}\right) +b_m\left( \mathbf {v}_{m,h}, E_m^p \right) - b_m \left( \mathbf {E}_m^u, q_{m,h}\right) \nonumber \\&\quad -\int _{\varGamma _{cm}} \mathbf {E}_c^u \cdot \mathbf {n}_{cm} q_{m,h}\, ds=0. \end{aligned}$$
(3.20)

Taking \(\mathbf {v}_{c,h}=\mathbf {E}_c^u, q_{c,h}=E_c^p\) in Eq. (3.19) and \(\mathbf {v}_{m,h}=\mathbf {E}_m^u, q_{m,h}=E_m^p\) in Eq. (3.20), and adding the equations together, one obtains

$$\begin{aligned}&\frac{\rho _0}{\tau }\left( \mathbf {E}_c^u,\mathbf {E}_c^u \right) _c +a_c \left( \mathbf {E}_c^u,\mathbf {E}_c^u \right) +\frac{\rho _0}{\chi \tau }\left( \mathbf {E}_m^u,\mathbf {E}_m^u \right) _m +a_m \left( \mathbf {E}_m^u, \mathbf {E}_m^u \right) =0. \end{aligned}$$

Hence \(\mathbf {E}_c^u=\mathbf {E}_m^u=0\) and Eqs. (3.19), (3.20) reduce to

$$\begin{aligned}&b_c(\mathbf {v}_{c,h}, E_c^p)+ \int _{\varGamma _{cm}} E_m^p (\mathbf {v}_{c,h}\cdot \mathbf {n}_{cm}) dS =0, \end{aligned}$$
(3.21)
$$\begin{aligned}&b_m(\mathbf {v}_{m,h}, E_m^p )=0. \end{aligned}$$
(3.22)

It then follows from the inf-sup conditions (3.2) that \(E_m^p=0\). Eq. (3.21) can be written as

$$\begin{aligned} b_c(\mathbf {v}_{c,h}, E_c^p-C)+ C\int _{\varGamma _{cm}} \mathbf {v}_{c,h} \cdot \mathbf {n}_{cm} dS=0, \end{aligned}$$
(3.23)

with the constant \(C=\frac{1}{|\varOmega _c|} \int _{\varOmega _c} E_c^p dx.\) Now if \(\mathbf {v}_{c,h}=0\) on \(\varGamma _{cm}\), then the classical inf-sup condition for Stokes equations (satisfied, for instance, by Taylor–Hood finite element spaces) implies that \(E_c^p=C\). Combining this with Eq. (3.23) further yields \(E_c^p=C=0\). Therefore the two solutions must be the same. Thus the scheme (PD) is unconditionally uniquely solvable at each time step.

Now we show that the modified energy law (3.18) holds. Owing to the convexity, one can establish the elementary inequality

$$\begin{aligned} F\left( \varphi ^{k+1}_h\right) - F\left( \varphi ^{k}_h\right) \le f\left( \varphi ^{k+1}_h, \varphi ^k_h\right) \left( \varphi ^{k+1}_h-\varphi ^k_h\right) , \end{aligned}$$
(3.24)

where one may recall \(F(\varphi )=\frac{1}{4}(\varphi ^2-1)^2\) and \(f(\phi , \varphi )=\phi ^3-\varphi \). Taking the test function \(v_h=\tau \mu _h^{k+1}\) in Eq. (3.3) and \(\phi _h=\varphi ^{k+1}_h-\varphi ^{k}_h\) in Eq. (3.4), and adding the results together, one obtains by virtue of the inequality (3.24)

$$\begin{aligned}&E\left( \varphi _h^{k+1}\right) -E(\varphi _h^{k})+\tau \left| \left| \sqrt{M}\nabla \mu _h^{k+1}\right| \right| _{L^2}^2 - \tau \left( \overline{\mathbf {u}}^{k+1}_h \varphi ^k_h ,\nabla \mu _h^{k+1}\right) \nonumber \\&\quad \le -\frac{\gamma \epsilon }{2}\left| \left| \nabla \left( \varphi _h^{k+1}-\varphi _h^{k}\right) \right| \right| _{L^2}^2. \end{aligned}$$
(3.25)

Next, it follows from Eqs. (3.6) and (3.7) that

$$\begin{aligned}&\frac{\rho _0}{2\chi }\left\{ ||\overline{\mathbf {u}}_{m,h}^{k+1}||^2_{L^2}-||\mathbf {u}_{m,h}^k||^2_{L^2}+||\overline{\mathbf {u}}_{m,h}^{k+1}-\mathbf {u}_{m,h}^k||^2_{L^2} \right\} \nonumber \\&\quad +\frac{\rho _0}{2}\left\{ ||\overline{\mathbf {u}}_{c,h}^{k+1}||^2_{L^2}-||\mathbf {u}_{c,h}^k||^2_{L^2}+||\overline{\mathbf {u}}_{c,h}^{k+1}-\mathbf {u}_{c,h}^k||^2_{L^2} \right\} \nonumber \\&\quad + \tau \big (\overline{\mathbf {u}}^{k+1}_h \varphi ^k_h ,\nabla \mu _h^{k+1}\big )=0. \end{aligned}$$
(3.26)

Take the test function \(\mathbf {v}_{c,h}= \tau \mathbf {u}_{c,h}^{k+1}\) and \(q_{c,h}= P_{c, h}^{k+1}\) in Eq. (3.8), and use Eq. (3.7)

$$\begin{aligned}&\frac{\rho _0}{2}\left\{ \left| \left| \mathbf {u}_{c,h}^{k+1}\right| \right| ^2_{L^2}-\left| \left| \overline{\mathbf {u}}_{c,h}^{k+1}\right| \right| ^2_{L^2}+\left| \left| \mathbf {u}_{c,h}^{k+1}-\overline{\mathbf {u}}_{c,h}^{k+1}\right| \right| ^2_{L^2} \right\} + \tau a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {u}_{c,h}^{k+1}\right) \nonumber \\&\quad + \tau \int _{\varGamma _{cm}} P_{m,h}^{k+1} \left( \mathbf {u}_{c,h}^{k+1}\cdot \mathbf {n}_{cm}\right) dS =0. \end{aligned}$$
(3.27)

Similarly, by using the intermediate velocity in Eq. (3.6), taking the test functions \(\mathbf {v}_{m,h}=\tau \mathbf {u}_{m,h}^{k+1}\) and \(q_{m,h}= \tau P_{m,h}^{k+1}\) in Eq. (3.11), one obtains that

$$\begin{aligned}&\frac{\rho _0}{2\chi }\left\{ \left| \left| \mathbf {u}_{m,h}^{k+1}\right| \right| ^2_{L^2}-\left| \left| \overline{\mathbf {u}}_{m,h}^{k+1}\right| \right| ^2_{L^2}+\left| \left| \mathbf {u}_{m,h}^{k+1}-\overline{\mathbf {u}}_{m,h}^{k+1}\right| \right| ^2_{L^2} \right\} +\tau \left| \left| \sqrt{\nu /\varPi }\mathbf {u}_{m,h}^{k+1}\right| \right| _{L^2}^2 \nonumber \\&\quad -\tau \int _{\varGamma _{cm}} \mathbf {u}_{c,h}^{k+1} \cdot \mathbf {n}_{cm} P_{m,h}^{k+1}\, dS =0. \end{aligned}$$
(3.28)

Finally summing up Eqs. (3.25), (3.26), (3.27) and (3.28), we obtain the modified energy law

$$\begin{aligned}&{\mathcal {E}}^{k+1}-{\mathcal {E}}^k + \tau \left| \left| \sqrt{M}\nabla \mu _h^{k+1}\right| \right| _{L^2}^2+ \tau a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {u}_{c,h}^{k+1}\right) + \tau \left| \left| \sqrt{\nu /\varPi }\mathbf {u}_{m,h}^{k+1}\right| \right| _{L^2}^2 \nonumber \\&\quad \le -\frac{\gamma \epsilon }{2}\left| \left| \nabla \left( \varphi _h^{k+1}-\varphi _h^{k}\right) \right| \right| _{L^2}^2 -\frac{\rho _0}{4}\left| \left| \mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^k\right| \right| _{L^2}^2-\frac{\rho _0}{4\chi }\left| \left| \mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^k\right| \right| _{L^2}^2, \end{aligned}$$

where the elementary inequality \(2(a^2+b^2)\ge (a+b)^2\) has been used.

We also observe that our scheme is mass conservative by simply taking the test function in the phase-field equation to be 1.

This completes the proof. \(\square \)

In the scheme (PD), the Darcy equations are solved in the primitive velocity-pressure formalism Eq. (3.11). It is natural to solve the Darcy equations using the pressure alone as the primary variable, since the Darcy pressure (more precisely, the hydraulic head) is of practical importance in applications of flow in porous media. Moreover, there are efficient fast solvers for Poisson equation. By solving for \(\mathbf {u}_{m}^{k+1}\) from Eq. (3.15) and substituting the resulting expression into Eq. (3.16), one can solve the Darcy equation (3.11) (coupled with the Stokes equation (3.8)) via

find \(P_{m,h}^{k+1} \in M_m^h\) such that for any \(q_{m,h}\in M_m^h\),

$$\begin{aligned}&\Big (\frac{\tau \varPi \chi }{\rho _0 \varPi +\tau \nu \chi } \nabla P^{k+1}_{m,h}-\frac{\rho _0 \varPi }{\rho _0 \varPi +\tau \nu \chi } \overline{\mathbf {u}}^{k+1}_{m,h}, \nabla q_{m,h}\Big )_m- \int _{\varGamma _{cm}} \mathbf {u}_{c,h}^{k+1} \cdot \mathbf {n}_{cm} q_{m,h}\, dS=0 . \end{aligned}$$
(3.29)

Then the Darcy velocity at time level \(k+1\) is recovered via the projection of the algebraic equation

$$\begin{aligned}&\frac{\rho _0}{\chi } \frac{\mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^k}{\tau }+ \frac{\nu (\varphi _{m,h}^{k})}{\varPi }\mathbf {u}_{m,h}^{k+1} +\nabla P_{m,h}^{k+1} +\varphi _{m,h}^k \nabla \mu _{m,h}^{k+1} =0. \end{aligned}$$
(3.30)

3.2 A fully decoupled numerical scheme (FD)

In the scheme (3.3)–(3.11), the Darcy equation is still coupled with the Stokes equation. We present here a fully decoupled scheme such that the order parameter, the Darcy pressure and the Stokes velocity can be calculated independently while maintaining the desired energy stability. In the scheme (FD) below, we consider using the domain decomposition method to decouple the Darcy–Stokes system, which has been studied intensively for single phase flow, for instance, in [2,3,4,5,6, 8,9,10, 12, 16,17,18, 36]. In the following scheme (FD), the solution to Darcy system is firstly computed, and then the solution of Stokes system is computed after \(P_{m,h}^{k+1}\) is obtained.

The fully decoupled scheme (FD) reads as follows:

Step 1: Cahn–Hilliard equation: find \(\varphi _h^{k+1} \in Y_h\) and \(\mu _h^{k+1} \in Y_h\) such that for any \(v_h, \phi _h \in Y_h\),

$$\begin{aligned}&\left( \delta _t\varphi ^{k+1}_h,v_h\right) +\left( \mathrm{M}\left( \varphi ^k_h\right) \nabla \mu ^{k+1}_h,\nabla v_h\right) -\left( \overline{\mathbf {u}}^{k+1}_h \varphi ^k_h ,\nabla v_h\right) =0, \end{aligned}$$
(3.31)
$$\begin{aligned}&\gamma \left[ \frac{1}{\epsilon }\left( f\left( \varphi ^{k+1}_h, \varphi ^k_h\right) ,\phi _h\right) +\epsilon \left( \nabla \varphi ^{k+1}_h,\nabla \phi _h\right) \right] -\left( \mu ^{k+1}_h,\phi _h\right) =0, \end{aligned}$$
(3.32)

where \(f(\varphi ^{k+1}_h, \varphi ^k_h)=(\varphi ^{k+1}_h)^3-\varphi ^k_h\), and the intermediate velocity \(\overline{\mathbf {u}}^{k+1}_h\) in Eq. (3.31) is defined as

$$\begin{aligned} \overline{\mathbf {u}}^{k+1}_h=\left\{ \begin{aligned}&\overline{\mathbf {u}}_{m,h}^{k+1}, \quad x \in \varOmega _m, \\&\overline{\mathbf {u}}_{c,h}^{k+1}, \quad x \in \varOmega _c. \end{aligned} \right. \end{aligned}$$
(3.33)

Here \(\overline{\mathbf {u}}_{m,h}^{k+1}\) and \(\overline{\mathbf {u}}_{c,h}^{k+1}\) are defined through the following equations

$$\begin{aligned}&\frac{\rho _0}{\chi }\frac{\overline{\mathbf {u}}_{m,h}^{k+1}-\mathbf {u}_{m,h}^k}{\tau }+\varphi _{m,h}^{k}\nabla \mu _{m,h}^{k+1}=0, \end{aligned}$$
(3.34)
$$\begin{aligned}&\rho _0 \frac{\overline{\mathbf {u}}_{c,h}^{k+1}-\mathbf {u}_{c,h}^k}{\tau }+\varphi _{c,h}^{k}\nabla \mu _{c,h}^{k+1}=0. \end{aligned}$$
(3.35)

Step 2: Darcy equation: find \(\mathbf {u}_{m, h}^{k+1} \in \mathbf {X}_{m}^h\) and \(P_{m,h}^{k+1} \in M_m^h\) such that for any \(\mathbf {v}_{m,h}\in \mathbf {X}_{m}^h\) and \(q_{m,h}\in M_m^h\),

$$\begin{aligned}&\left( \frac{\rho _0}{\chi }\frac{\mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^k}{\tau }+\frac{\nu \left( \varphi _{m,h}^{k}\right) }{\varPi }\mathbf {u}_{m,h}^{k+1}+ \nabla P_{m,h}^{k+1} +\varphi _{m,h}^k \nabla \mu _{m,h}^{k+1},\mathbf {v}_{m,h}\right) _m =0. \end{aligned}$$
(3.36)
$$\begin{aligned}&\beta \tau \left( \nabla P_{m,h}^{k+1},\nabla q_{m,h}\right) _m-\Big (\mathbf {u}_{m,h}^{k+1}, \nabla q_{m,h}\Big )_m- \int _{\varGamma _{cm}} \mathbf {u}_{c,h}^{k} \cdot \mathbf {n}_{cm} q_{m,h}\, dS=0. \nonumber \\ \end{aligned}$$
(3.37)

Step 3: Stokes equation: find \(\mathbf {u}_{c, h}^{k+1} \in \mathbf {X}_{c}^h\) and \(P_{c,h}^{k+1} \in M_c^h\) such that for any \(\mathbf {v}_{c,h}\in \mathbf {X}_{c}^h\) and \(q_{c,h}\in M_c^h\),

$$\begin{aligned}&\rho _0\left( \delta _t\mathbf {u}_{c,h}^{k+1},\mathbf {v}_{c,h} \right) _c + a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {v}_{c,h}\right) + b_c\left( \mathbf {v}_{c,h}, P_{c,h}^{k+1}\right) + \int _{\varGamma _{cm}} P_{m,h}^{k+1} (\mathbf {v}_{c,h}\cdot \mathbf {n}_{cm}) dS\nonumber \\&\quad - b_c\left( \mathbf {u}_{c,h}^{k+1}, q_{c,h}\right) _c +\left( \varphi _{c,h}^k \nabla \mu _{c,h}^{k+1}, \mathbf {v}_{c,h} \right) _c =0, \end{aligned}$$
(3.38)

where we one may recall the definition of \(a_c\) and \(b_c\) from (3.9) and (3.10).

Note that a first order stabilization term has been added to the Eq. (3.37). The parameter \(\beta >0\) will be a suitable constant that only depends on the geometry of \(\varOmega _m\) and \(\varOmega _c\). By using the domain decomposition, the Darcy–Stokes system can be solved in a decoupled manner and legacy codes can be used in each of those steps. The scheme can also be regarded as one of implicit-explicit(IMEX) schemes. Let us define the interface term:

$$\begin{aligned} {{\mathcal {E}}_{\varGamma }} = - \int _{\varGamma _{cm}}\left( \mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}\right) \cdot \mathbf {n}_{cm} P_{m,h}^{k+1}\, dS, \end{aligned}$$
(3.39)

and we need the following lemma to bound this term.

Lemma 1

Suppose \(\mathbf {v}_{c,h}\in \mathbf {X}_c^h\) satisfies

$$\begin{aligned} (\nabla \cdot \mathbf {v}_{c,h},q_{c,h})_c=0, \quad \forall q_{c,h}\in M_c^h, \end{aligned}$$
(3.40)

then

$$\begin{aligned} \left| \int _{\varGamma _{cm}}\mathbf {v}_{c,h} \cdot \mathbf {n}_{cm} w \, dS\right| \le C\Vert \nabla w\Vert _{L^2(\varOmega _m)}\Vert \mathbf {v}_{c,h}\Vert _{L^2(\varOmega _c)}, \forall w \in X_m. \end{aligned}$$
(3.41)

Proof

Since \(w \in X_m:=H^1(\varOmega _m)\cap L_0^2(\varOmega _m)\), there exists an extension \(W\in {H}^1(\varOmega )\) such that: \(W|_{\varOmega _m}=w\), \( W|_{\varGamma _{cm}}=w|_{\varGamma _{cm}}\) and

$$\begin{aligned} \Vert W\Vert _{H^1(\varOmega )}\le C\Vert \nabla w\Vert _{L^2(\varOmega _m)} \end{aligned}$$
(3.42)

where C is a constant independent of Then by Green’s formula,

$$\begin{aligned} \int _{\varGamma _{cm}}\mathbf {v}_{c,h} \cdot \mathbf {n}_{cm} w \, dS=(\nabla \cdot \mathbf {v}_{c,h}, W)_c+(\nabla W, \mathbf {v}_{c,h})_c. \end{aligned}$$
(3.43)

Let \(W_h\) be the \(L^2\) projection of W on the space \(M_c^h\cap L_0^2(\varOmega _c)\). We have

$$\begin{aligned} \Vert W-W_h\Vert _{L^2}\le Ch\Vert W\Vert _{H^1}. \end{aligned}$$
(3.44)

Consequently, thanks to the inverse estimate,

$$\begin{aligned} |(\nabla \cdot \mathbf {v}_{c,h}, W)_c|= & {} |(\nabla \cdot \mathbf {v}_{c,h}, W-W_h)_c|\le Ch\Vert \nabla \cdot \mathbf {v}_{c,h}\Vert _{L^2}\Vert W\Vert _{H^1}\nonumber \\\le & {} C \Vert \mathbf {v}_{c,h}\Vert _{L^2}\Vert W\Vert _{H^1}. \end{aligned}$$
(3.45)

Now by using the extension theorem,

$$\begin{aligned} \int _{\varGamma _{cm}}\mathbf {v}_{c,h} \cdot \mathbf {n}_{cm} w \, dS\le C \Vert \mathbf {v}_{c,h}\Vert _{L^2}\Vert W\Vert _{H^1}\le C \Vert \mathbf {v}_{c,h}\Vert _{L^2(\varOmega _c)} \Vert \nabla w\Vert _{L^2(\varOmega _m)}. \end{aligned}$$
(3.46)

This proves the lemma. \(\square \)

Following the same argument as in the proof of Theorem 1, we have the following solvability and stability result:

Theorem 2

The scheme (FD) (3.31)-(3.38) is unconditionally uniquely solvable and mass conservative. There exists a constant \(\beta \) depending only on the geometry and \(\rho _0\) such that the following modified energy law holds

$$\begin{aligned}&{\mathcal {E}}^{k+1} + \tau ||\sqrt{M}\nabla \mu _h^{k+1}||_{L^2}^2+ \tau a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {u}_{c,h}^{k+1}\right) \nonumber \\&\qquad +\tau ||\sqrt{\nu /\varPi }\mathbf {u}_{m,h}^{k+1}||_{L^2}^2 + \frac{\beta \tau ^2}{2}||\nabla P_{m,h}^{k+1}||^2_{L^2}\nonumber \\&\qquad + \frac{\tau ^2}{4\rho _0}\left( \chi \Vert \varphi ^k_{m,h}\nabla \mu _{m,h}^{k+1}\Vert ^2_{L^2}+\Vert \varphi ^k_{c,h}\nabla \mu _{c,h}^{k+1}\Vert ^2_{L^2}\right) \nonumber \\&\quad \le {\mathcal {E}}^k-\frac{\rho _0}{6\chi } ||\mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^{k}||^2_{L^2}-\frac{\rho _0}{12}||\mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}||^2_{L^2}-\frac{\gamma \epsilon }{2}\left| \left| \nabla \left( \varphi _h^{k+1}-\varphi _h^{k}\right) \right| \right| _{L^2}^2 . \end{aligned}$$
(3.47)

Proof

Note that the discretization of the Cahn–Hilliard equations is the same in the fully decoupled scheme (FD) and in the scheme (PD). Hence the inequality (3.25) holds for the Eqs. (3.31) and (3.32), which we copy here for completeness

$$\begin{aligned}&E(\varphi _h^{k+1})-E(\varphi _h^{k})+\tau ||\sqrt{M}\nabla \mu _h^{k+1}||_{L^2}^2 - \tau \left( \overline{\mathbf {u}}^{k+1}_h \varphi ^k_h ,\nabla \mu _h^{k+1}\right) \nonumber \\&\quad \le -\frac{\gamma \epsilon }{2}\Big |\Big |\nabla \Big (\varphi _h^{k+1}-\varphi _h^{k}\Big )\Big |\Big |_{L^2}^2. \end{aligned}$$
(3.48)

By using the definition of \(\overline{\mathbf {u}}^{k+1}_h\) in Eqs. (3.33), (3.34) and (3.35), one can rewrite Eq. (3.48) as follows

$$\begin{aligned}&E(\varphi _h^{k+1})-E(\varphi _h^{k})+\tau ||\sqrt{M}\nabla \mu _h^{k+1}||_{L^2}^2 - \tau \left( \mathbf {u}^{k}_h \varphi ^k_h ,\nabla \mu _h^{k+1}\right) + W_1 \nonumber \\&\quad \le -\frac{\gamma \epsilon }{2}\Big |\Big |\nabla \Big (\varphi _h^{k+1}-\varphi _h^{k}\Big )\Big |\Big |_{L^2}^2, \end{aligned}$$
(3.49)

where

$$\begin{aligned} W_1=\frac{\tau ^2}{\rho _0}\left( \chi \Vert \varphi ^k_{m,h}\nabla \mu _{m,h}^{k+1}\Vert ^2+\Vert \varphi ^k_{c,h}\nabla \mu _{c,h}^{k+1}\Vert ^2\right) . \end{aligned}$$
(3.50)

Take the test function \(\mathbf {v}_{c,h}= \tau \mathbf {u}_{c,h}^{k+1}\) and \(q_{c,h}= P_{c, h}^{k+1}\) in Eq. (3.38),

$$\begin{aligned}&\frac{\rho _0}{2}\left\{ ||\mathbf {u}_{c,h}^{k+1}||^2_{L^2}-||\mathbf {u}_{c,h}^{k}||^2_{L^2}+||\mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}||^2_{L^2} \right\} + \tau a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {u}_{c,h}^{k+1}\right) \nonumber \\&\quad + \tau \int _{\varGamma _{cm}} P_{m,h}^{k+1} \left( \mathbf {u}_{c,h}^{k+1}\cdot \mathbf {n}_{cm}\right) dS +\tau \left( \mathbf {u}^{k+1}_{c,h} \varphi ^k_{c,h} ,\nabla \mu _{c,h}^{k+1}\right) _c =0. \end{aligned}$$
(3.51)

Testing Eq. (3.36) with \(\tau \mathbf {u}_{m,h}^{k+1}\), taking \(q_{m,h}= \tau P_{m,h}^{k+1}\) in Eq. (3.37), and summing up the results gives us

$$\begin{aligned}&\frac{\rho _0}{2\chi }\left\{ ||\mathbf {u}_{m,h}^{k+1}||^2_{L^2}-||\mathbf {u}_{m,h}^{k}||^2_{L^2}+||\mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^{k}||^2_{L^2} \right\} \nonumber \\&\quad +\tau ||\sqrt{\nu /\varPi }\mathbf {u}_{m,h}^{k+1}||_{L^2}^2 + \beta \tau ^2||\nabla P_{m,h}^{k+1}||^2_{L^2}\nonumber \\&\quad +\tau \left( \mathbf {u}^{k+1}_{m,h} \varphi ^k_{m,h} ,\nabla \mu _{m,h}^{k+1}\right) _m-\tau \int _{\varGamma _{cm}} \mathbf {u}_{c,h}^{k} \cdot \mathbf {n}_{cm} P_{m,h}^{k+1}\, dS =0. \end{aligned}$$
(3.52)

Now summing up the three estimates (3.49), (3.51) and (3.52), we have

$$\begin{aligned}&{\mathcal {E}}^{k+1}-{\mathcal {E}}^k + \tau ||\sqrt{M}\nabla \mu _h^{k+1}||_{L^2}^2+ \tau a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {u}_{c,h}^{k+1}\right) + \tau ||\sqrt{\nu /\varPi }\mathbf {u}_{m,h}^{k+1}||_{L^2}^2 +W_2 \nonumber \\&\qquad + \beta \tau ^2||\nabla P_{m,h}^{k+1}||^2_{L^2}+\frac{\gamma \epsilon }{2}\Big |\Big |\nabla \Big (\varphi _h^{k+1}-\varphi _h^{k}\Big )\Big |\Big |_{L^2}^2 \nonumber \\&\quad \le - \tau \int _{\varGamma _{cm}}\left( \mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}\right) \cdot \mathbf {n}_{cm} P_{m,h}^{k+1}\, dS, \end{aligned}$$
(3.53)

where

$$\begin{aligned} W_2&=\frac{\rho _0}{2}||\mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}||^2_{L^2} +\frac{\rho _0}{2\chi }||\mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^{k}||^2_{L^2}\\&\quad +\, W_1 +\tau \left( \mathbf {u}^{k+1}_{ h}-\mathbf {u}^{k}_{ h}, \varphi ^k_{h} \nabla \mu _{h}^{k+1}\right) , \end{aligned}$$

with \(W_1\) defined in Eq. (3.50).

Applying Young’s inequality \((a,b)\le \frac{a^2}{3}+\frac{3b^2}{4}\) to the term \(\tau (\mathbf {u}^{k+1}_{h}-\mathbf {u}^{k}_{h}, \varphi ^k_{h} \nabla \mu _{h}^{k+1})\), one obtains

$$\begin{aligned} W_2 \ge \frac{\rho _0}{6}||\mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}||^2_{L^2} +\frac{\rho _0}{6\chi }||\mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^{k}||^2_{L^2}+ \frac{1}{4}W_1. \end{aligned}$$
(3.54)

By Lemma 1, the right-hand side of inequality (3.53) can be bounded as follows

$$\begin{aligned} \tau |{\mathcal {E}}_{\varGamma }|\le C\tau \Vert \nabla P_{m,h}^{k+1}\Vert _{L^2}\Vert \mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}\Vert _{L^2} \le \frac{\rho _0}{12}\Vert \mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}\Vert _{L^2}^2+C_1\tau ^2\Vert \nabla P_{m,h}^{k+1}\Vert _{L^2}. \end{aligned}$$
(3.55)

If we impose \(\beta \ge 2 C_1\) which only depends on the geometry of \(\varOmega _m\), \(\varOmega _c\) and \(\rho _0\), then one has,

$$\begin{aligned}&{\mathcal {E}}^{k+1}-{\mathcal {E}}^k + \tau ||\sqrt{M}\nabla \mu _h^{k+1}||_{L^2}^2+ \tau a_c\left( \mathbf {u}_{c,h}^{k+1},\mathbf {u}_{c,h}^{k+1}\right) \nonumber \\&\qquad + \tau ||\sqrt{\nu /\varPi }\mathbf {u}_{m,h}^{k+1}||_{L^2}^2 + \frac{\beta \tau ^2}{2}||\nabla P_{m,h}^{k+1}||^2_{L^2}\\&\qquad +\frac{\gamma \epsilon }{2}\Big |\Big |\nabla \Big (\varphi _h^{k+1}-\varphi _h^{k}\Big )\Big |\Big |_{L^2}^2 +\frac{\rho _0}{12}||\mathbf {u}_{c,h}^{k+1}-\mathbf {u}_{c,h}^{k}||^2_{L^2} \nonumber \\&\qquad +\frac{\rho _0}{6\chi }||\mathbf {u}_{m,h}^{k+1}-\mathbf {u}_{m,h}^{k}||^2_{L^2}+ \frac{1}{4}W_1\\&\quad \le 0. \end{aligned}$$

Hence we have established the energy inequality (3.47).

Finally we comment on the unique solvability of the fully decoupled scheme (FD). The unique solvability of the Cahn–Hilliard equation is the same as in the scheme (PD). The Darcy equations (3.36)–(3.37) are unconditionally uniquely solvable by the standard energy estimate, which does not rely on the inf-sup condition. Then the solvability of the Stokes equation (3.38) is the same as in the proof of Theorem 1. The conservation of mass follows from setting the test function in the phase-filed equation to be 1. This concludes the proof of Theorem 2. \(\square \)

It is also possible to formulate this fully decoupled scheme utilizing the Darcy pressure as the primary variable in the porous media instead of the velocity and the pressure following the same argument as the one used to derive the Darcy pressure formulation for the partially decoupled scheme presented at the end of the previous subsection.

4 Numerical experiments

In this section, we present some numerical examples to show that our numerical schemes can accurately capture the dynamics of two-phase flow in a karst geometry. In the first numerical example, we demonstrate numerically that our schemes are of first order accuracy in time and are long-time stable. The second example illustrates that a droplet passes through the karst system driven by boundary-injection. In the last numerical example, we show that a lighter bubble rises and penetrates the domain interface due to buoyancy. All the numerical tests are performed using the free software FreeFem++ [29].

4.1 Convergence and stability

In the first numerical test, we verify that our schemes are first-order accurate in time. The computational domain is \([0, 1] \times [-1, 1]\) with the lower half being the conduit and the upper half being the matrix. The approach that we take for the accuracy test is as follows. We calculate a solution using our numerical schemes with sufficiently small \(h=0.01\) and \(\tau =0.0001\), and view this solution as an accurate one. We then compare the numerical solutions with larger time step-size to this accurate solution and calculate the error measured in \(L^2\) norm. Throughout, the celebrated Taylor-Hood P2–P1 finite elements are employed for the approximation of velocity and pressure, and the P1–P1 pair is used for the discretization of order parameter and chemical potential. Hence the temporal error is the dominating factor in the overall error. As an example, we show the results for the fully decoupled scheme (FD), i.e., Eqs. (3.31)–(3.38). The error behavior for the other scheme is similar, as far as the accuracy is concerned.

For simplicity, all the parameters appearing in the system (1.1)–(1.6) are set to be unity. The initial conditions are \(\varphi _0= 0.24 \cos (2\pi x) \cos (2\pi y)+ 0.4 \cos (\pi x) \cos (3 \pi y) +1.0\), \(\mathbf {u}_0=(-2 \sin ^2(\pi x) \sin (2\pi y), 2 \sin (2 \pi x) \sin ^2(\pi y))\). The convergence result is shown in Fig. 2. The first order convergence rate in time is observed for the variables \(\mathbf {u}_c\), \(\mathbf {u}_m\), \(p_m\), and \(\phi \).

Fig. 2
figure 2

Log–Log plot of the error measured in \(L^2\) norm as a function of time step \(\tau \) for \(\mathbf {u}_c\), \(\mathbf {u}_m\), \(p_m\), and \(\phi \). The solid green line is the reference line \(e=0.008 \tau \). The final time is \(T=1.0\). \(h=0.01\). The other parameters are set to be unity

Next, we demonstrate numerically that our schemes satisfy discrete energy laws, i.e., the discrete energy \({\mathcal {E}}^{k}\) defined in (3.17) is nonincreasing in time. We perform the classical numerical experiment of spinodal decomposition and coarsening. The initial velocities are the same as in the convergence test. For the initial condition of the order parameter, we take a random field of values \(\varphi _0={\bar{\phi }}+r(x,y)\) with an average composition \({\bar{\phi }}=-0.05\) and random \(r \in [-0.05, 0.05]\). The parameters in this experiment are taken to be: \(\frac{\rho _0}{\chi }=0.01, \epsilon =0.01, \nu _c=\nu _m=0.1, \varPi =1, \gamma =0.1, M=0.1\). The evolution of the discrete energy \({\mathcal {E}}^{k}\) is shown in Fig. 3 where \(h=0.01, \tau =0.1\).

Fig. 3
figure 3

Time evolution of the discrete energy \({\mathcal {E}}^{k}\) in the simulation of spinodal decomposition; \(\tau = 0.1\)

4.2 Boundary-driven flow

In this example, we consider a horizontal channel \(\varOmega =[0,2]\times [0,1]\) with the domain interface boundary \(\{1\}\times [0,1]\) separating the conduit \(\varOmega _c=[0,1] \times [0,1]\) and the porous media \(\varOmega _m=[1,2] \times [0,1]\).

The set-up of the experiment is as follows. We impose an inflow boundary condition of parabolic profile on part of the left boundary \(\varGamma _{in}:=\{0\} \times [0.4, 0.6]\), i.e., \(u1_c=-100a(y-0.4)(y-0.6)\) on \(\varGamma _{in}\). On the right boundary \(\varGamma _{out}:=\{2\} \times [0,1]\), ambient pressure is prescribed for the Darcy pressure, i.e., \(P_m=0\) on \(\varGamma _{out}\). The rest of the boundary conditions are the same as given in (1.8)–(1.9). The initial condition \(\mathbf {u}_c|_{t=0}\) is given as the solution of the steady-state Stokes equation with the same injection boundary condition in the whole domain. An initial Darcy velocity is then determined by using the explicit interface boundary conditions derived from Stokes fluid fields. The initial order parameter is set to be \(\phi _0= -\tanh \big ((0.15-\sqrt{(x-0.4)^2+(y-0.5)^2})/\sqrt{2.0\epsilon }\big )\). The initial order parameter and initial horizontal velocity are shown in Fig. 4.

Fig. 4
figure 4

Filled contour plots of a the initial order parameter \(\phi _0\), and b the initial horizontal velocity \(u1_0\). The domain interface is at \(\{1\}\times [0,1]\) separating the conduit (left) and the porous media (right)

Fig. 5
figure 5

Evolution of a droplet driven by boundary injection in a karstic domain. From top to bottom, first column, a \(t=0.4\), b \(t=2\), c \(t=3\); second column, d \(t=3.5\), e \(t=4\), f \(t=7\). Blue color \(\phi \approx -1\) and red color \(\phi \approx 1\) (color figure online)

The parameters in this simulation are listed as \(\epsilon =0.01\), \(\gamma =0.001\), \(\varPi =0.001\), \(\nu (\varphi _c)=\nu (\varphi _m)=0.1\), \(\alpha _{BJSJ}=0.1\), \(a=1.0\), \(M(\varphi )=\epsilon \sqrt{(1-\varphi ^2)^2+\epsilon ^2}\). We remark that the modified degenerate mobility function \(M(\varphi )\) limits the chemical diffusion in the diffuse interface region. In the bulk of each fluid region, the mobility is essentially \(\epsilon ^2\). We employ three meshes for the computation of Cahn–Hilliard equation, Darcy equation and Stokes equation, respectively, thanks in part to the complete decoupling of the three equations. The temporal time step-size is \(\tau =0.001\) for accuracy.

Figure 5 shows some snapshots of the droplet passing through the domain interface under the influence of boundary-driven flow. We note that the surface tension parameter is relatively small (\(\gamma =0.001\)) compared to the maximum velocity on the inflow boundary \(u1(0, 0.5)=1\). The round droplet quickly deforms into a cap shape with the flat side facing the injection boundary (a). A dimple is formed in (b), as the fluid velocity takes the maximum value at the center line. As it moves through the domain interface at \(\{1\} \times [0,1]\), the front of the droplet (with respect to fluid flow) becomes flatter, and elongates in the vertical direction, cf. (c) and (d). This is due to conservation of mass and the fact that the magnitude of the velocity in porous media is significantly smaller than that in conduit. Once the droplet enters the porous media, the shape remains comparatively steady. One can see that the upper and lower “tip” of the droplet becomes soft [compare (e) to (f)] as a result of the surface tension effect.

Fig. 6
figure 6

Snapshots of bubble rising due to buoyancy in a karstic domain. From left to right, first row, a \(t=0.0\), b \(t=0.75\), c \(t=1.7\); second row, d \(t=1.97\), e \(t=3.2\), f \(t=4.5\). White color \(\phi \approx -1\) and black color \(\phi \approx 1\). The domain interface is at \([0,1] \times \{0\}\) (color figure online)

4.3 Buoyancy-driven flow

Here, the karst geometry is modelled by a long tube \(\varOmega =[0,1]\times [-1,1]\) with the conduit \(\varOmega _c=[0,1]\times [-1,0]\) and porous media \(\varOmega _m=[0,1] \times [0,1]\). The interface boundary is at \([0,1] \times \{0\}\).

In this experiment, we consider a binary system where the densities of the two fluids are different. But the density difference is small so that a Boussinesq approximation is applicable. Specifically, a buoyancy term \(G(\rho (\phi )-{\bar{\rho }}){\hat{y}}:=B(\phi -{\bar{\phi }}){\hat{y}}\) is added to Stokes equation (1.1) and Darcy equation (1.4), respectively. Here \(\rho (\phi )=\frac{1+\phi }{2}\rho _1+\frac{1-\phi }{2}\rho _2, \) \({\bar{\rho }}\) and \({\bar{\phi }}\) are the spatial averages of \(\rho \) and \(\phi \), \(B=G\frac{\rho _1-\rho _2}{2}\), \({\hat{y}}=(0,1)^{T}\). We consider a lighter round bubble released in an initially quiescent heavier fluids. The boundary conditions are given in (1.8)-(1.9). Most of the parameters used in this simulation are the same as those in boundary driven flow case, except \(B=2.0\) and \(\varPi =0.01\).

The filled contour plots in gray scale of the rising bubble are shown in Fig. 6. As the bubble rises in the conduit domain, it deforms into an ellipsoid. When it passes through the domain interface, one can clearly see an interface separating the bubble in conduit and in porous medium. Two corners of the bubble in some sense are formed along the domain interface with the part in the conduit being wider than that in porous medium. A tail of the bubble is seen later as it leaves the domain interface. The tail is eventually smoothed out by the surface tension effect.

5 Conclusions

We have proposed, analyzed and implemented two novel uniquely solvable, energy stable decoupled algorithms for the Cahn–Hilliard–Stokes–Darcy system which models two-phase flows in karstic geometry. The decoupling of the phase-field and the velocity field is realized via an intermediate velocity that takes into account the capillary force term only. Therefore, we are required to solve a strictly convex variational problem for the phase field part at each time step. The phase-field update is independent of the velocity update for both schemes (and hence decoupled). For the first scheme, the velocity field is governed by the linear Stokes–Darcy system once the phase-field is updated. For the second scheme, we further decouple the linear Stokes–Darcy system into a linear Darcy type equation and a Stokes type system. Therefore, appropriate legacy code for the Cahn–Hilliard equations, the Stokes–Darcy system, the Darcy equation and the Stokes system can be utilized. We have also established the unique solvability and energy stability of both algorithms rigorously. So far as we know, these two schemes are the first set of decoupled uniquely solvable and energy stable algorithms for simulating two phase flows in karstic geometry. Two physically interesting numerical experiments are conducted, one buoyancy driven and one boundary driven. The numerics illustrate the efficiency and the stability of the schemes.

The error estimates of the schemes proposed here will be the subject of a future work.