1 Introduction

Subsurface fluid flow problems have significant applications in hydrology, geosciences, oil recovery, chemical and biomedical engineering. The comprehension of multiphase flows is of vital importance for institutions concerned with energy, especially oil production. In this paper, we study the model of incompressible and immiscible two-phase flows in porous media with heterogeneous properties for wetting phases (such as water) and non-wetting phases (such as oil). This mathematical model is also applied to soil infiltration problems [6, 47]. Effectively and accurately solving this problem is required to simulate more complicated models, such as CO2 sequestration or increased oil recovery [11].

Numerical methods for two-phase flows in heterogeneous media have been studied intensively. Among the industrial reservoir simulators currently available, finite volume (FV) [16] and finite difference (FD) [38] methods are the typical frameworks for simulating the fluid flows in practical issues [12, 28]. However, such methods may lose robustness on unstructured meshes and are not optimal for complex geometries [4, 40]. In recent years, the discontinuous Galerkin (DG) methods have been widely used to simulate two-phase flows in porous media [1, 2, 18, 20, 32, 35]. Moreover, Hoteit et al. [29] and Hou et al. [30] combined mixed finite element (MFE) and DG methods in heterogeneous media. The DG method is locally mass conservative, which is not influenced by grid distortions and has high accuracy and robustness even in heterogeneous media.

In this paper, the local DG (LDG) methods are applied for both the pressure and saturation equations. Motivated by [3], the LDG method was originally introduced in [14] as an extension of the DG method [43] for the convection-diffusion equations. The main idea of the LDG method is to rewrite the equation with high order derivatives into a system of first order derivatives by introducing new auxiliary variables, and then discretize the system with the DG method. The LDG method shares all the advantages of the DG methods.

The bound-preserving (BP) technique, as another important aspect of the LDG method, has been developed to acquire physically relevant numerical approximations. Physically, the saturation should be between 0 and 1. However, the approximation of the saturation obtained by applying the LDG method may not fall within the range of [0, 1]. This is mainly due to the overshoots and undershoots near the shocks in the saturation, leading to blow-up of the approximations in some extreme cases. This gap will be bridged by applying the BP technique. In 2010, the genuinely maximum-principle-preserving (MPP) higher-order DG scheme was first constructed by Zhang et al. [55] for the conservation laws on rectangular meshes. In 2012, the MPP technique was extended successfully to the problem on triangular meshes [58]. Later, numerous problems have applied this technique, such as relativistic hydrodynamics [42], shallow water equations [49], pressureless Euler equations [50], hyperbolic equations with \(\delta \)-functions [51], compressible Euler equations [56, 57], and extended magneto-hydrodynamic equations [60], etc. In the meantime, Shu et al. introduced the second-order MPP LDG method in [59] for the convection-diffusion equation. In 2016, Chen et al. [7] developed the third-order MPP direct DG methods for convection-diffusion equations on unstructured triangular meshes. Subsequently, third-order MPP LDG methods on overlapping meshes for parabolic equations were investigated by Du and Yang [17]. If the exact solution has only one lower bound 0, then the technique is also called the positivity-preserving (PP) technique. In recent years, the BP techniques were successfully extended to problems in petroleum engineering. In [27], Guo and Yang first proposed a BP DG method for a two-component compressible miscible displacements in porous media. Later, Chuenjarern et al. [10] applied the idea to multi-component miscible displacements on triangular meshes. Recently, Guo et al. [26] applied BP technique to the incompressible miscible displacements in fractured porous media. In 2020, Feng et al. [21] constructed BP interior penalty discontinuous Galerkin (IPDG) methods with a second-order implicit pressure explicit concentration (SIPEC) time marching for the coupled system of two-component compressible miscible displacements. Afterwards, this work was extended to generalized coupled non-Darcy flow and transport problems in petroleum engineering [22]. However, these works are all about single-phase flow, and there are few studies on two-phase flows. For incompressible and immiscible two-phase flows in porous media, Chen et al. considered fully mass-conservative IMPES schemes [8] and a new efficient version [9]. The authors applied the lowest-order Raviart-Thomas mixed finite element method for spatial discretization. In [34], Joshaghani et al. proposed MPP DG methods with piecewise linear polynomials, where post-processing flux and slope limiters are applied simultaneously, which made the algorithm more complicated to implement. To the best knowledge of the authors, there are no high-order BP techniques for two-phase flows available in the literature.

In this paper, we propose the high-order BP LDG method for incompressible and immiscible two-phase flows. The whole procedure is as follows: (1) We design the LDG schemes for both the pressure and saturation equations. In the pressure equation, the non-wetting phase pressure is substituted by the wetting phase pressure and the capillary pressure, thus the numerical fluxes of both (see (2.15), (2.16)) should be chosen consistently. (2) We implicitly solve the pressure equation and explicitly for the saturation, leading to the IMPES method. (3) We perform theoretical analysis of the BP technique for the saturation. The main idea of this paper is to apply the PP technique for the saturation of each phase, respectively, and enforce \(S_w+S_n = 1\) numerically. The BP technique studied in this paper keeps the high-order accuracy and only requires a slope limiter, which is rather straightforward to implement. (4) Finally, the time integration follows from the explicit high-order strong-stability-preserving (SSP) Runge–Kutta (RK) method [24, 25]. We implicitly solve the pressure equation and then explicitly update the wetting and non-wetting phase saturation.

The organization of this paper is as follows. In Sect. 2, we introduce the model of incompressible and immiscible two-phase flows in porous media, and derive the LDG scheme for both the pressure and saturation equations. In Sect. 3, we discuss the BP techniques and verify that the approximate saturations of both phases satisfy the local mass conservation. Numerical experiments are given in Sect. 4. Finally, we end in Sect. 5 with concluding remarks.

2 Mathematical Model and LDG Scheme

2.1 Mathematical Model

We now introduce the mathematical model for incompressible and immiscible two-phase flows in porous media. The wetting and non-wetting phases are denoted by the subscripts w and n, respectively. Then the governing equations over the computational domain \(\Omega \subset R^d(d=1,2)\) read

$$\begin{aligned}&\phi \frac{\partial S_{\alpha }}{\partial t}+\nabla \cdot {\textbf {u}}_\alpha =q_\alpha ,\quad \quad \,\,\,\,in\,\,\Omega ,\,\,\alpha =w,n, \end{aligned}$$
(2.1)
$$\begin{aligned}&{\textbf {u}}_\alpha =-\frac{k_{r\alpha }}{\mu _{\alpha }} {\textbf {K}}\nabla p_{\alpha },\quad \quad \quad \quad \,in\,\,\Omega ,\,\,\alpha =w,n, \end{aligned}$$
(2.2)
$$\begin{aligned}&S_n+S_w=1,\quad \quad \quad \quad \quad \quad \,\,in\,\,\Omega , \end{aligned}$$
(2.3)
$$\begin{aligned}&p_c(S_w)=p_n-p_w,\quad \quad \quad \quad \,in\,\,\Omega , \end{aligned}$$
(2.4)

where \(\phi \) is the porosity of the medium, \({\textbf {K}}\) denotes the absolute permeability tensor, \(S_\alpha \), \({\textbf {u}}_\alpha \), \(p_\alpha \), \(q_\alpha \) are the saturation, Darcy’s velocity, pressure and the source term of phase \(\alpha \), respectively. \(p_c\) is the capillary pressure. In (2.2), \(k_{r\alpha }\), \(\mu _\alpha \) are relative permeability and viscosity of phase \(\alpha \), respectively. The phase mobility is defined by \(\lambda _\alpha =\frac{k_{r\alpha }}{\mu _\alpha }\), and the total mobility is given by \(\lambda _t = \lambda _w + \lambda _n\). The fractional flow functions are also defined as \(f_w=\lambda _w/\lambda _t\), \(f_n=\lambda _n/\lambda _t\). Relative permeability \(k_{r\alpha }\) and capillary pressure \(p_c\) are given functions of \(S_w\).

Let \(\Gamma =\partial \Omega \) be composed of \(\Gamma _D\) and \(\Gamma _N\) such that \(\Gamma =\Gamma _D\cup \Gamma _N\) and \(\Gamma _D\cap \Gamma _N=\emptyset \), where \(\Gamma _D\) denotes the Dirichlet part of the boundary and \(\Gamma _N\) is the Neumann part. We also denote by \(\Gamma =\Gamma _{in}\cup \Gamma _{out}\). Here \(\Gamma _{in}=\{{\textbf {x}}\in \Gamma : {\textbf {u}}_t({\textbf {x}})\cdot {\textbf {n}}({\textbf {x}})\le 0\} \) is the inflow boundary and \(\Gamma _{out}=\{{\textbf {x}}\in \Gamma : {\textbf {u}}_t({\textbf {x}})\cdot {\textbf {n}}({\textbf {x}})> 0\} \) is the outflow boundary, where \({\textbf {u}}_t={\textbf {u}}_w+{\textbf {u}}_n\) is the total velocity and \({\textbf {n}}\) is the unit outward normal of \(\Gamma \). We impose the initial and boundary conditions to (2.1)–(2.4) as follows:

$$\begin{aligned}&S_\alpha =S_\alpha ^0,\quad \quad \quad \,\,t=0,{{\,\,\,\,\alpha =w,n,}} \end{aligned}$$
(2.5)
$$\begin{aligned}&p_\alpha =p_\alpha ^B,\quad \quad \quad \,\,on\,\,\Gamma _D,\,\,\alpha =w,n, \end{aligned}$$
(2.6)
$$\begin{aligned}&{\textbf {u}}_{\alpha }\cdot {\textbf {n}}=g^N_{\alpha }, \quad \,\,\,\,on\,\,\Gamma _N,\,\,\alpha =w,n, \end{aligned}$$
(2.7)
$$\begin{aligned}&S_\alpha =S_\alpha ^B,\quad \quad \quad \,on\,\,\Gamma _{in},\,\,\alpha =w,n. \end{aligned}$$
(2.8)

We also assume that the absolute permeability tensor \({\textbf {K}}\) is symmetric positive definite, the porosity \(\phi \) is assumed to be a constant. In case that \(\phi \) is not a constant but uniformly bounded, the analysis can be obtained following [10] and [27]. We use the subscript \(\alpha \) to specifically denote the wetting phase or non-wetting phase, \(\alpha =w,n\).

2.2 Basic Notations

In this paper, the analysis we present below is based on the two-dimensional case. Let \(\Omega =[0,1]\times [0,1]\) be a bounded rectangular domain in \(R^2\). Denote the grid points in x and y directions by \(0=x_{\frac{1}{2}}<x_{\frac{3}{2}}<\cdots<x_{N_x-\frac{1}{2}}<x_{N_x+\frac{1}{2}}=1\) and \(0=y_{\frac{1}{2}}<y_{\frac{3}{2}}<\cdots<y_{N_y-\frac{1}{2}}<y_{N_y+\frac{1}{2}}=1\), respectively. Define \(I_i=[x_{i-\frac{1}{2}},x_{i+\frac{1}{2}}]\), \(J_j=[y_{j-\frac{1}{2}},y_{j+\frac{1}{2}}]\). Let \(K_{ij}=I_i\times J_j\) be a quasi-uniform partition of \(\Omega \) and denote \(\Omega _h= \{K_{ij}\}\). For simplicity, we assume uniform meshes. However, this assumption is not essential. We use K to denote a typical cell, and the mesh sizes in x and y directions are given as \(\Delta x\) and \(\Delta y\), respectively. We further define \(h=\max \{\Delta x,\Delta y\}\). The idea for triangular meshes can be otained following [10], and we skip the details.

We define the following finite element spaces:

$$\begin{aligned} W_h=\{w\in L^2 (\Omega ):w|_K\in P_k(K),\forall K\in \Omega _h\},\quad {\textbf {V}}_h=[W_h]^2, \end{aligned}$$

where \(P_k(K)\) denotes the space of polynomials of degree at most k in K. It is possible to use the following finite element spaces:

$$\begin{aligned} W_h=\{w\in L^2 (\Omega ):w|_K\in Q_k(K),\forall K\in \Omega _h\}, \quad \varvec{V}_h=[W_h]^2, \end{aligned}$$

where \(Q_k(K)\) denotes the space of tensor product polynomials of degree at most k in K.

Let \(\varvec{\beta }=(1,1)^T\) be a fixed vector. We define the left element \(K_L\) and right element \(K_R\) that share the same element interface e, such that \(\varvec{\beta }\cdot {\textbf {n}}_{K_L}|_e>0\), \(\varvec{\beta }\cdot {\textbf {n}}_{K_R}|_e<0\), where \({\textbf {n}}_K\) is the external normal vector of element K. For any \(u\in W_h\) and \(e\in \partial K\), we define \(u^+=(u|_{K_R})|_e\) and \(u^-=(u|_{K_L})|_e\), respectively. In addition, we use \(\partial _K^-=\{e\in \partial K:\varvec{\beta }\cdot {\textbf {n}}_K|_e<0\}\) and \(\partial _K^+=\{e\in \partial K:\varvec{\beta }\cdot {\textbf {n}}_K|_e>0\}\) to denote the inflow and outflow boundaries of K, respectively. Moreover, we define \({\textbf {n}}_e= (1, 0)\) if e is parallel to the y-axis while \({\textbf {n}}_e=(0, 1)\) if e is parallel to the x-axis. Finally, we denote \(\Gamma _h\) as the set of all element interfaces and \(\Gamma _0=\Gamma _h\setminus \partial \Omega \).

2.3 The LDG Scheme

In this section, we will construct the LDG scheme for (2.1)–(2.4). The total mass conservation can be obtained by summing up (2.1) over \(\alpha \) and applying the constraint of the saturations (2.3). Firstly, summing the mass conservation equations of the two phases, we have

$$\begin{aligned} \phi \frac{\partial S_w}{\partial t}+\phi \frac{\partial S_n}{\partial t}+\nabla \cdot {\textbf {u}}_w+\nabla \cdot {\textbf {u}}_n=q_w+q_n. \end{aligned}$$

Then applying \(S_w+S_n=1\), we can get

$$\begin{aligned} \begin{aligned} \nabla \cdot {\textbf {u}}_w+\nabla \cdot {\textbf {u}}_n=q_w+q_n. \end{aligned} \end{aligned}$$
(2.9)

By the Darcy law (2.2) and the equation of capillary pressure (2.4), we can rewrite (2.9) as

$$\begin{aligned} -\nabla \cdot (\lambda _w(S_w){\textbf {K}}\nabla p_w)-\nabla \cdot (\lambda _n(S_w){\textbf {K}}\nabla p_w)=q_w+q_n+\nabla \cdot (\lambda _n(S_w){\textbf {K}}\nabla p_c(S_w))\nonumber \\ \end{aligned}$$
(2.10)

which is known as the pressure equation. For the wetting phase, substituting (2.2) with \(\alpha =w\) into (2.1), we get the saturation equation:

$$\begin{aligned} \begin{aligned} \phi \frac{\partial S_{w}}{\partial t}=q_w+\nabla \cdot \left( \lambda _w(S_w){\textbf {K}}\nabla p_w\right) . \end{aligned} \end{aligned}$$
(2.11)

In this paper, we choose the saturation of the wetting phase and pressure \((S,p)=(S_w,p_w)\) as the primary unknowns.

Define \(\varvec{\sigma }_\alpha =\nabla p_\alpha \) and \(\varvec{\sigma }_c=\varvec{\sigma }_n-\varvec{\sigma }_w=\nabla p_c(S)\), then (2.10), (2.11) can be rewritten as

$$\begin{aligned} \left\{ \begin{aligned}&-\nabla \cdot (\lambda _w(S){\textbf {K}}\varvec{\sigma }_w) -\nabla \cdot (\lambda _n(S){\textbf {K}}\varvec{\sigma }_w) =q_w+q_n+\nabla \cdot \left( \lambda _n(S){\textbf {K}}\varvec{\sigma }_c\right) ,\\&\varvec{\sigma }_w=\nabla p,\\&\varvec{\sigma }_c=\nabla p_c(S),\\&\phi \frac{\partial S}{\partial t}=q_w+\nabla \cdot \left( \lambda _w(S){\textbf {K}} \varvec{\sigma }_w\right) . \end{aligned} \right. \end{aligned}$$
(2.12)

For simplicity, if not otherwise stated, we use \(p, S, \varvec{\sigma }_w, \varvec{\sigma }_c\) as the numerical approximations from now on, then the LDG scheme for (2.12) is to find \((p,S,\varvec{\sigma }_w,\varvec{\sigma }_c)\in W_h\times W_h\times {\textbf {V}}_h\times {\textbf {V}}_h\), such that the following equations hold for arbitrary cell \(K\in \Omega _h\) and test function \((\varsigma ,\xi ,\varvec{\eta },\varvec{\zeta })\in W_h\times W_h\times {\textbf {V}}_h\times {\textbf {V}}_h\):

$$\begin{aligned}{} & {} -G_w(S,\varvec{\sigma }_w,\varsigma )-G_n(S,\varvec{\sigma }_w,\varsigma )= G_n(S,\varvec{\sigma }_c,\varsigma ) +\int _K \left( q_w+q_n\right) \varsigma dxdy,\nonumber \\ \end{aligned}$$
(2.13a)
$$\begin{aligned}{} & {} \int _K\varvec{\sigma }_w\cdot \varvec{\eta }dxdy=L_w(p,\varvec{\eta }), \end{aligned}$$
(2.13b)
$$\begin{aligned}{} & {} \int _K\varvec{\sigma }_c\cdot \varvec{\zeta }dxdy=L_c(p_c(S),\varvec{\zeta }), \end{aligned}$$
(2.13c)
$$\begin{aligned}{} & {} \int _K\phi \frac{\partial S}{\partial t}\xi dxdy= G_w(S,\varvec{\sigma }_w,\xi )+\int _K q_w\xi dxdy, \end{aligned}$$
(2.13d)

where

$$\begin{aligned}{} & {} G_{\alpha }(S,\varvec{\sigma }_w,\varsigma )=-\int _K {\textbf {K}}(\lambda _{\alpha } (S)\varvec{\sigma }_w)\cdot \nabla \varsigma dxdy+\int _{\partial K}{} {\textbf {K}}\widehat{(\lambda _{\alpha }(S)\varvec{\sigma }_w)} \cdot {\textbf {n}}_K \varsigma ds,\nonumber \\ \end{aligned}$$
(2.14a)
$$\begin{aligned}{} & {} G_n(S,\varvec{\sigma }_c,\varsigma )=-\int _K {\textbf {K}}(\lambda _n (S)\varvec{\sigma }_c)\cdot \nabla \varsigma dxdy+\int _{\partial K}{} {\textbf {K}}\widehat{(\lambda _n(S)\varvec{\sigma }_c)} \cdot {\textbf {n}}_K \varsigma ds, \end{aligned}$$
(2.14b)
$$\begin{aligned}{} & {} L_w(p,\varvec{\eta })=-\int _Kp\nabla \cdot \varvec{\eta }dxdy+\int _{\partial K}{\widehat{p}}\varvec{\eta }\cdot {\textbf {n}}_K ds, \end{aligned}$$
(2.14c)
$$\begin{aligned}{} & {} L_c(p_c,\varvec{\zeta })=-\int _K p_c(S)\nabla \cdot \varvec{\zeta }dxdy+\int _{\partial K}{p_c(\widehat{S}})\varvec{\zeta }\cdot {\textbf {n}}_K ds. \end{aligned}$$
(2.14d)

The “hat” terms are the numerical fluxes at the cell interfaces. For any \(e=\partial K_L\cap \partial K_R \):

$$\begin{aligned} {\textbf {K}}\widehat{(\lambda _{\alpha }(S)\varvec{\sigma }_w)}\cdot {\textbf {n}}_e= {\textbf{K}}\left( \lambda _\alpha (S^-)\varvec{\sigma }^-_w\right) {{\cdot {\textbf {n}}_e}} +C_{LF}(S_\alpha ^+-S_\alpha ^-),\quad \quad {\widehat{p}}=p^+, \end{aligned}$$
(2.15)

where \(C_{LF}\ge 0\) is a constant independent of h and is chosen by the BP technique. The flux of \((\lambda _n(S)\varvec{\sigma }_c)\) should be selected in the same way as \((\lambda _n(S)\varvec{\sigma }_w)\):

$$\begin{aligned} {\textbf {K}}\widehat{(\lambda _n(S)\varvec{\sigma }_c)}\cdot {\textbf {n}}_e= {\textbf {K}}\left( \lambda _n(S^-)\varvec{\sigma }_c^-\right) \cdot {\textbf {n}}_e,\quad \quad p_c({\widehat{S}})=p_c(S^+). \end{aligned}$$
(2.16)

Moreover, \(-{\textbf {K}}\widehat{\left( \lambda _{\alpha }(S)\varvec{\sigma }_{\alpha }\right) } \cdot {\textbf {n}}=g_\alpha ^N\) on \(e=\partial K\cap \Gamma _N\), \({\widehat{p}}=p_w^B\) on \(e=\partial K\cap \Gamma _D\) and \(p_c({\widehat{S}})=p_c(S_w^B)\) on \(e=\partial K\cap \Gamma _{in}\), where \({\textbf {n}}\) is the unit outward normal vector of \(\Gamma \).

Remark 2.1

In practice the direction of fluid flow is from bottom left to top right, so we use the above mentioned numerical fluxes. It is possible to use the following Lax-Friedrich flux

$$\begin{aligned}&{\textbf{K}}\widehat{(\lambda _\alpha (S)\varvec{\sigma }_\alpha )}\cdot {\textbf{n}}_e =\frac{1}{2}\left( {\textbf {K}}\left( \lambda _{\alpha }(S^+)\varvec{\sigma }^+_w\right) \cdot {\textbf {n}}_e+{\textbf {K}}\left( \lambda _{\alpha }(S^-)\varvec{\sigma }^-_w\right) \cdot {\textbf {n}}_e\right) +{C_{LF}\left( S_\alpha ^+-S_\alpha ^-\right) },\\&{\widehat{p}}=\frac{1}{2}\left( p^++p^-\right) ,\quad \quad p_c({\widehat{S}})=\frac{1}{2}\left( p_c(S^+)+p_c(S^-)\right) ,\\&{\textbf {K}}\widehat{(\lambda _n(S)\varvec{\sigma }_c)}\cdot {\textbf {n}}_e=\frac{1}{2}\left( {\textbf {K}}\left( \lambda _n(S^+)\varvec{\sigma }_c^+\right) \cdot {\textbf {n}}_e+{\textbf {K}}\left( \lambda _n(S^-)\varvec{\sigma }_c^-\right) \cdot {\textbf {n}}_e\right) . \end{aligned}$$

Note that if the direction of fluid flow is fixed, we use the upwind flux; otherwise, apply the Lax-Friedrich flux.

3 Bound-Preserving Technique

In this section, we describe how to apply the BP technique to the LDG scheme. We only discuss the first-order Euler forward time discretization, and the high-order ones are straightforward extendable. We use \(o_{ij}\) to denote the numerical approximation o in \(K_{ij}\) and use \({\bar{o}}_{ij}\) to denote its cell average. Moreover, we use \(o^n\) to represent the solution o at time level n. For simplicity, if we consider two time levels n and \(n+1\), and the numerical approximations are at time level n, then the corresponding indices will be omitted. The key ingredients in constructing the BP LDG scheme are:

  • Given numerical approximations of S at time level n, such that \(0\le S\le 1\). The cell average at the next time level by Euler forward time stepping remains in [0, 1] under a suitable CFL condition.

  • Construct a slope limiter to modify the numerical approximations of \(S_{ij}\) into \({\tilde{S}}_{ij}\) such that \(0\le {\tilde{S}}_{ij}\le 1\) without changing its cell average.

3.1 Bound-Preserving LDG Scheme

In this subsection, we will demonstrate the first ingredient. We only discuss the techniques for cells away from \(\partial \Omega \), and the boundary cells can be analyzed following the same lines. We propose three reasonable assumptions [8]:

  • There exists a positive constant \(\chi _{\alpha }\) such that

    $$\begin{aligned} \lambda _{\alpha }(S_{\alpha })\le \chi _{\alpha }S_{\alpha }. \end{aligned}$$
    (3.1)
  • If \(q_{\alpha }\le 0\), then there exist two positive constants \(r_1\) and \(r_2\) such that

    $$\begin{aligned} r_1S_{\alpha }\le |q_{\alpha }|\le r_2S_{\alpha }. \end{aligned}$$
    (3.2)
  • There exists a positive constant \(\kappa _{\alpha }\) such that

    $$\begin{aligned} |g_\alpha ^N|\le \kappa _{\alpha }S_{\alpha }. \end{aligned}$$
    (3.3)

In fact, the above three assumptions are reasonable. For example, when applying the Brooks-Corey model [5] to the two-phase flow in porous media, the phase mobilities are nonlinear functions and defined as \(\lambda _w(S)=\frac{1}{\mu _w}S_e^{\frac{2+3\theta }{\theta }}\), \(\lambda _n(S)=\frac{1}{\mu _n}(1-S_e)^2(1-S_e^{\frac{2+\theta }{\theta }})\), where \(\theta \) is the parameter associated with pore size distribution, \(S_e\) is the effective saturation defined as

$$\begin{aligned} S_e=(S-S_{rw})/(1-S_{rn}-S_{rw}). \end{aligned}$$
(3.4)

Here, \(S_{r\alpha }, \alpha =w,n\), is the residual phase saturation, namely, \(S_{\alpha }\ge S_{r\alpha }>0\). Let \(\eta =\frac{2+3\theta }{\theta }>1\), then we can easily derive that \( \lambda _w(S)\le \frac{1}{\mu _w}(2\,S)^\eta \le \frac{2^\eta }{\mu _w}S. \) Thus we can choose \(\chi _w=\frac{2^\eta }{\mu _w}\) in (3.1). Similarly, we can also assume there exists a positive constant \(\chi _n\) such that \(\lambda _n(S_n)\le \chi _nS_n\). For the estimate (3.2) in the second assumption, this is also reasonable since the sink term \(q_{\alpha }\) is derived from the internal flow rate. It is legitimate for the third assumption as well by the fact that the flux \(g_\alpha ^N\) is related to the velocity \(u_\alpha \) and the saturation \(S_\alpha \), where the velocity is bounded.

We consider Euler forward time stepping and find the suitable CFL condition. In (2.13d), we take \(\xi =1\) in \(K_{ij}\) (\(K_{ij}\) away from \(\partial \Omega \)) to obtain the equation

$$\begin{aligned} \begin{aligned} \phi {\bar{S}}_{ij}^{n+1} =H_x^c(S,\varvec{\sigma }_w)+H_y^c(S,\varvec{\sigma }_w)+H^s(S,q_w), \end{aligned} \end{aligned}$$
(3.5)

where

$$\begin{aligned}{} & {} \begin{aligned} H^c_x(S,\varvec{\sigma }_w)&=\frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{J_j}\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w}\cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},j}-\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w}\cdot {\textbf {n}}_e\right) _{i-\frac{1}{2},j}dy, \end{aligned} \\{} & {} \begin{aligned} H^c_y(S,\varvec{\sigma }_w)&=\frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{I_i}\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w}\cdot {\textbf {n}}_e\right) _{i,j+\frac{1}{2}} -\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w}\cdot {\textbf {n}}_e\right) _{i,j-\frac{1}{2}}dx, \end{aligned} \\{} & {} \begin{aligned} H^s(S,q_w)&=\frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{K_{ij}}q_wdxdy. \end{aligned} \end{aligned}$$

Here \(\Delta t\) is the time mesh size, \(\lambda =\frac{\Delta t}{\Delta x \Delta y}\). Let us assume \(S_i^x=\{x_i^\beta :\beta =1,\cdot \cdot \cdot ,L\}\) to be the Gaussian quadrature points on \(I_i\), and \(S_j^y=\{y_j^\beta :\beta =1,\cdot \cdot \cdot ,L\}\) to be those on \(J_j\). Also, we use \(w_{\beta }\) for the corresponding quadrature weight on \([-\frac{1}{2},\frac{1}{2}]\), so that \(\sum ^L_{\beta =1}w_{\beta }=1\). We will also need the N-point Gauss-Lobatto quadrature rule. We distinguish the two quadrature rules by adding hats to the Gauss-Lobatto points, i.e., \({\widehat{S}}_i^x=\{{\widehat{x}}_i^{\gamma }:\gamma =1,\cdot \cdot \cdot ,N\}\) gives the Gauss-Lobatto quadrature points on \(I_i\), and \({\widehat{S}}_j^y=\{{\widehat{y}}_j^{\gamma }:\gamma =1,\cdot \cdot \cdot ,N\}\) gives those on \(J_j\). Let \({\widehat{w}}_{\gamma }\) be the quadrature weights on \([-\frac{1}{2},\frac{1}{2}]\) such that \(\sum ^N_{\gamma =1}{\widehat{w}}_{\gamma }=1\). Subscripts or superscripts \(\beta \) will be used only for Gaussian quadrature points and \(\gamma \) only for Gauss-Lobatto points. We define \(o^+_{i-\frac{1}{2},\beta }=o_{ij}(x^+_{i-\frac{1}{2}},y_j^{\beta })\) and \(o_{\gamma ,\beta }=o_{ij}({\widehat{x}}_i^{\gamma },y_j^{\beta })\). Likewise for the other function values. We will prove that if \(\Delta t\) is sufficiently small, then \(H_x^c\), \(H_y^c\), \(H^s\) are all positive, and the results are given in the following two lemmas.

Lemma 3.1

Suppose \(S\ge 0\), then \(H^c_x(S,\varvec{\sigma }_w)\ge 0\) and \(H^c_y(S,\varvec{\sigma }_w)\ge 0\) under the conditions

$$\begin{aligned} \begin{aligned} C_{LF}\ge \max \limits _{i,j,\beta }\{ \chi _\alpha |{\textbf{K}}\varvec{\sigma }_\alpha ^\mp \cdot {\textbf {n}}_e|_{i\pm \frac{1}{2},\beta }, \chi _\alpha |{\textbf{K}}\varvec{\sigma }_\alpha ^\mp \cdot {\textbf {n}}_e|_{\beta , j\pm \frac{1}{2}}\}, \end{aligned} \end{aligned}$$
(3.6)
$$\begin{aligned} \begin{aligned} \lambda _1C_{LF}\le \frac{\phi }{6}\min _{\gamma =1,\cdot \cdot \cdot ,N} \ {\widehat{w}}_{\gamma }, \quad \lambda _2C_{LF}\le \frac{\phi }{6}\min _{\gamma =1,\cdot \cdot \cdot ,N} \ {\widehat{w}}_{\gamma }, \end{aligned} \end{aligned}$$
(3.7)

where \(\lambda _1=\frac{\Delta t}{\Delta x}\), \(\lambda _2=\frac{\Delta t}{\Delta y}\).

Proof

Let \({\bar{S}}_{i,\beta }\) denote the average of \(S_{{ij}}(x,y_j^{\beta })\) over \(I_i\), then the cell average \({\bar{S}}_{ij}\) is

$$\begin{aligned} \begin{aligned} {\bar{S}}_{ij}&=\frac{1}{\Delta x \Delta y}\int _{I_i}\int _{J_j}S_{ij}(x,y)dxdy=\frac{1}{\Delta x \Delta y}\int _{I_i}\left( \sum _{\beta =1}^Lw_{\beta }S_{ij}(x,y^{\beta }_j)\Delta y\right) dx\\&=\sum _{\beta =1}^Lw_{\beta }\left( \frac{1}{\Delta x}\int _{I_i} S_{ij}(x,y^{\beta }_j)dx\right) =\sum _{\beta =1}^Lw_{\beta }{\bar{S}}_{i,\beta }. \end{aligned} \end{aligned}$$
(3.8)

By (3.8), we rewrite \(H^c_x(S,\varvec{\sigma }_w)\) as

$$\begin{aligned} \begin{aligned} H^c_x(S,\varvec{\sigma }_w)&=\frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{J_j}\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w} \cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},j} -\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w} \cdot {\textbf {n}}_e\right) _{i-\frac{1}{2},j}dy\\&=\frac{1}{3}\phi \sum ^L_{\beta =1}w_{\beta }{\bar{S}}_{i,\beta } +\lambda _1\sum ^L_{\beta =1}w_{\beta } \left( \left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w} \cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},\beta }\right. \\&\quad \left. -\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w} \cdot {\textbf {n}}_e\right) _{i-\frac{1}{2},\beta }\right) \\&=\sum ^L_{\beta =1}w_{\beta }\left( \sum ^{N-1}_{\gamma =2}\frac{1}{3}\phi {\widehat{w}}_{\gamma }S_{\gamma ,\beta } +R_1+R_2\right) , \end{aligned} \end{aligned}$$
(3.9)

where

$$\begin{aligned}&R_1=\lambda _1 \left( \lambda _w(S^-_{i+\frac{1}{2},\beta }) \left( {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},\beta } +C_{LF} \left( S^+_{i+\frac{1}{2},\beta }-S^-_{i+\frac{1}{2},\beta }\right) \right) +\frac{1}{3}\phi {\widehat{w}}_NS^-_{i+\frac{1}{2},\beta },\\&R_2=-\lambda _1 \left( \lambda _w(S^-_{i-\frac{1}{2},\beta }) \left( {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right) _{i-\frac{1}{2},\beta } +C_{LF} \left( S^+_{i-\frac{1}{2},\beta }-S^-_{i-\frac{1}{2},\beta }\right) \right) +\frac{1}{3}\phi {\widehat{w}}_1S^+_{i-\frac{1}{2},\beta }. \end{aligned}$$

Since \(S_{ \gamma ,\beta }\ge 0\), we only need to prove \(R_1\ge 0\) and \(R_2\ge 0\). By (3.1), each of these two parts can be organized as

$$\begin{aligned}{} & {} \begin{aligned} R_1&=\lambda _1 \left( \lambda _w(S^-_{i+\frac{1}{2},\beta }) \left( {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},\beta } -C_{LF} S^-_{i+\frac{1}{2},\beta }\right) +\frac{1}{3}\phi {\widehat{w}}_NS^-_{i+\frac{1}{2},\beta } +\lambda _1C_{LF} S^+_{i+\frac{1}{2},\beta },\\&=\left( \frac{1}{3}\phi {\widehat{w}}_N -\lambda _1C_{LF}\right) S^-_{i+\frac{1}{2},\beta } +\lambda _1 \lambda _w(S^-_{i+\frac{1}{2},\beta }) \left( {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},\beta } +\lambda _1C_{LF} S^+_{i+\frac{1}{2},\beta }\\&\ge \left( \frac{1}{3}\phi {\widehat{w}}_N -\lambda _1C_{LF}\right) S^-_{i+\frac{1}{2},\beta } -\lambda _1 \lambda _w(S^-_{i+\frac{1}{2},\beta }) \left| {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right| _{i+\frac{1}{2},\beta } +\lambda _1C_{LF} S^+_{i+\frac{1}{2},\beta }\\&\ge \left( \frac{1}{3}\phi {\widehat{w}}_N -\lambda _1\left( C_{LF}+ \chi _w\left| {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right| _{i+\frac{1}{2},\beta }\right) \right) S^-_{i+\frac{1}{2},\beta } +\lambda _1C_{LF} S^+_{i+\frac{1}{2},\beta }, \end{aligned} \\{} & {} \begin{aligned} R_2&=-\lambda _1 C_{LF} S^+_{i-\frac{1}{2},\beta } {+}\frac{1}{3}\phi {\widehat{w}}_1S^+_{i-\frac{1}{2},\beta } {+}\lambda _1 \left( -\lambda _w(S^-_{i-\frac{1}{2},\beta }) \left( {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right) _{i-\frac{1}{2},\beta } {+}C_{LF} S^-_{i-\frac{1}{2},\beta }\right) \\&\ge \left( \frac{1}{3}\phi {\widehat{w}}_1 -\lambda _1C_{LF}\right) S^+_{i-\frac{1}{2},\beta } +\lambda _1 \left( -\lambda _w(S^-_{i-\frac{1}{2},\beta }) \left| {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right| _{i-\frac{1}{2},\beta } +C_{LF} S^-_{i-\frac{1}{2},\beta }\right) \\&\ge \left( \frac{1}{3}\phi {\widehat{w}}_1 -\lambda _1C_{LF}\right) S^+_{i-\frac{1}{2},\beta } +\lambda _1\left( -\chi _w\left| {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right| _{i-\frac{1}{2},\beta } +C_{LF}\right) S^-_{i-\frac{1}{2},\beta }. \end{aligned} \end{aligned}$$

Using (3.6) and (3.7),

$$\begin{aligned}{} & {} {\frac{1}{3}\phi {\widehat{w}}_N -\lambda _1\left( C_{LF} +\chi _w\left| {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right| _{i+\frac{1}{2},\beta }\right) \ge 0}, \\{} & {} \frac{1}{3}\phi {\widehat{w}}_1-\lambda _1 C_{LF}\ge 0, \quad -\chi _w\left| {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right| _{i-\frac{1}{2},\beta } +C_{LF}\ge 0. \end{aligned}$$

So we can obtain \(H^c_x(S,\varvec{\sigma }_w)\ge 0\). The proof for \(H^c_y(S,\varvec{\sigma }_w)\ge 0\) is similar, so we skip it. \(\square \)

Finally we proceed to prove \(H^s(S,q_w)\ge 0\).

Lemma 3.2

Suppose \(S\ge 0\), then \(H^s(S,q_w)\ge 0\) under the following condition

$$\begin{aligned} \begin{aligned} \Delta t\le \frac{\phi }{3}\frac{1}{r_2}. \end{aligned} \end{aligned}$$
(3.10)

Proof

Based on assumption (3.2), if \(q_w\le 0\),

$$\begin{aligned} H^s(S,q_w)&=\frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{K_{ij}}q_wdxdy \\&=\frac{1}{3}\phi {\bar{S}}_{ij} -\lambda \int _{K_{ij}}|q_w|dxdy\\&\ge \sum _{\gamma =1}^N {\hat{w}}_{\gamma }\sum _{\beta =1}^L w_{\beta }\left( (\frac{1}{3}\phi -\Delta tr_2)S_{\gamma ,\beta }\right) . \end{aligned}$$

Under the condition (3.10), \(H^s(S,q_w)\ge 0\). If \(q_w>0\), then \(H^s(S,q_w)\ge 0\) can be obtained directly. \(\square \)

Theorem 3.1

Consider the LDG scheme (2.13d) with first-order Euler forward time discretization. Suppose \(S\ge 0\), then \({\bar{S}}^{n+1}\ge 0\) under the conditions (3.6), (3.7) and (3.10).

To obtain \({\bar{S}}^{n+1}\le 1\), we only need to prove non-wetting phase saturation \({\bar{S}}_n^{n+1}=1-{\bar{S}}^{n+1}\ge 0\). Let \(\varsigma = 1\) in (2.13a) and \(\xi = 1\) in (2.13d), then subtracting (2.13d) from (2.13a) as well as using \(\varvec{\sigma }_n=\varvec{\sigma }_w+\varvec{\sigma }_c\) and (2.3), we can get

$$\begin{aligned} -\int _K \phi \frac{\partial S}{\partial t} dxdy = G_n(S,\varvec{\sigma }_n,1)+\int _K q_n dxdy. \end{aligned}$$

Then applying \(S_w+S_n=1\), we have

$$\begin{aligned} \int _K \phi \frac{\partial S_n}{\partial t} dxdy = G_n(S,\varvec{\sigma }_n,1)+\int _K q_n dxdy. \end{aligned}$$
(3.11)

Similar to (3.5), we can rewrite the above equation as

$$\begin{aligned} \begin{aligned} \phi {\bar{S}}_{nij}^{n+1}=H_x^c(S_n,\varvec{\sigma }_n)+H_y^c(S_n,\varvec{\sigma }_n)+H^s(S_n,q_n), \end{aligned} \end{aligned}$$
(3.12)

where

$$\begin{aligned} H^c_x(S_n,\varvec{\sigma }_n)= & {} \frac{1}{3}\phi {\bar{S}}_{nij} +\lambda \int _{J_j}\left( {\textbf {K}}\widehat{\lambda _n(S)\varvec{\sigma }_n}\cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},j}-\left( {\textbf {K}}\widehat{\lambda _n(S)\varvec{\sigma }_n}\cdot {\textbf {n}}_e\right) _{i-\frac{1}{2},j}dy, \\ H^c_y(S_n,\varvec{\sigma }_n)= & {} \frac{1}{3}\phi {\bar{S}}_{nij} +\lambda \int _{I_i}\left( {\textbf {K}}\widehat{\lambda _n(S)\varvec{\sigma }_n}\cdot {\textbf {n}}_e\right) _{i,j+\frac{1}{2}} -\left( {\textbf {K}}\widehat{\lambda _n(S)\varvec{\sigma }_n}\cdot {\textbf {n}}_e\right) _{i,j-\frac{1}{2}}dx, \\ H^s(S_n,q_n)= & {} \frac{1}{3}\phi \bar{S_n}_{ij} +\lambda \int _{K_{ij}}q_ndxdy. \end{aligned}$$

Then \({\bar{S}}_{nij}^{n+1}\ge 0\) can also be derived follow the same lines, and the result is given below.

Theorem 3.2

Suppose \(0\le S\le 1\), and the conditions in Theorem 3.1 are satisfied, then \(0\le {\bar{S}}^{n+1}\le 1\).

Next we study the cells near \(\partial \Omega \). The boundary cells can be analyzed following the same lines with some minor changes except that the convection term is treated slightly differently because of the existence of the boundary. Without loss of generality, we consider the bottom left cell, denoted as K, as an example to illustrate the technique.

In (2.13d), we take \(\xi =1\) in K to obtain the equation satisfied by the cell average of S,

$$\begin{aligned} \begin{aligned} \phi {\bar{S}}_K^{n+1} =H_x^{Bc}(S,\varvec{\sigma }_w)+H_y^{Bc}(S,\varvec{\sigma }_w)+H^s(S,q_w), \end{aligned} \end{aligned}$$
(3.13)

where

$$\begin{aligned} H^{Bc}_x(S,\varvec{\sigma }_w)= & {} \frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{J_j}\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w}\cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},j}-(g_w^N)_{i-\frac{1}{2},j}dy, \\ H^{Bc}_y(S,\varvec{\sigma }_w)= & {} \frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{I_i}\left( {\textbf {K}}\widehat{\lambda _w(S)\varvec{\sigma }_w}\cdot {\textbf {n}}_e\right) _{i,j+\frac{1}{2}}-(g_w^N)_{i,j-\frac{1}{2}}dx, \\ H^s(S,q_w)= & {} \frac{1}{3}\phi {\bar{S}}_{ij} +\lambda \int _{K}q_w dxdy, \end{aligned}$$

with \(i=1\), \(j=1\).

The positivity of source term was given in Lemma 3.2. Hence we only focus on the convection part, and we have the following conclusion.

Lemma 3.3

Suppose \(S\ge 0\), then \(H_x^{Bc}(S,\varvec{\sigma }_w)\ge 0\) and \(H_y^{Bc}(S,\varvec{\sigma }_w)\ge 0\) under the conditions

$$\begin{aligned} \begin{aligned} C_{LF}\ge \max \limits _{\beta }\{ \chi _\alpha |{\textbf{K}}\varvec{\sigma }_\alpha ^-\cdot {\textbf {n}}_e| _{i+\frac{1}{2},\beta }, \chi _\alpha |{\textbf{K}}\varvec{\sigma }_\alpha ^-\cdot {\textbf {n}}_e|_{\beta ,j+\frac{1}{2}}\}, \end{aligned} \end{aligned}$$
(3.14)
$$\begin{aligned} \begin{aligned} \lambda _1A\le \frac{\phi }{6}\min _{\gamma =1,\cdot \cdot \cdot ,N} \ {\widehat{w}}_{\gamma }, \quad \lambda _2A\le \frac{\phi }{6}\min _{\gamma =1,\cdot \cdot \cdot ,N} \ {\widehat{w}}_{\gamma }, \end{aligned} \end{aligned}$$
(3.15)

where \(\lambda _1=\frac{\Delta t}{\Delta x}\), \(\lambda _2=\frac{\Delta t}{\Delta y}\), \(A=\max \{C_{LF},\kappa _{\alpha }\}\).

Proof

$$\begin{aligned} \begin{aligned} H^{Bc}_x(S,\varvec{\sigma }_w)=\sum ^L_{\beta =1}w_{\beta } (\sum ^{N-1}_{\gamma =2}\frac{1}{3}\phi {\widehat{w}}_{\gamma } S_{\gamma ,\beta }+R_1+R_2), \end{aligned} \end{aligned}$$
(3.16)

where

$$\begin{aligned}&R_1=\lambda _1 \left( \lambda _w(S^-_{i+\frac{1}{2},\beta }) \left( {\textbf {K}}\varvec{\sigma }_w^- \cdot {\textbf {n}}_e\right) _{i+\frac{1}{2},\beta } +C_{LF} \left( S^+_{i+\frac{1}{2},\beta }-S^-_{i+\frac{1}{2},\beta }\right) \right) +\frac{1}{3}\phi {\widehat{w}}_NS^-_{i+\frac{1}{2},\beta },\\&R_2=-\lambda _1(g_w^N)_{i-\frac{1}{2},\beta } +\frac{1}{3}\phi {\widehat{w}}_1S^+_{i-\frac{1}{2},\beta }. \end{aligned}$$

The analysis of \(R_1\) is the same as above. By (3.3),

$$\begin{aligned} R_2&\ge -\lambda _1|g_w^N|_{i-\frac{1}{2},\beta } +\frac{1}{3}\phi {\widehat{w}}_1S^+_{i-\frac{1}{2},\beta }\\&\ge \left( -\lambda _1 \kappa _w +\frac{1}{3}\phi {\widehat{w}}_1\right) S^+_{i-\frac{1}{2},\beta }. \end{aligned}$$

Obviously, \(R_2\ge 0\) by (3.15). So we can obtain \(H_x^{Bc}(S,\varvec{\sigma }_w)\ge 0\). The proof for \(H_y^{Bc}(S,\varvec{\sigma }_w)\ge 0\) is similar, so we skip it. Moreover, we can conclude that the cell average expression for \(S_n\) is similar to the cell average for S. Therefore, \(0 \le {\bar{S}}_{\alpha }^{n+1} \le 1\) for boundary cells. \(\square \)

Remark 3.1

If we use the Lax-Friedrich flux given in Remark 2.1, the proofs are basically the same with some minor changes.

Lemma 3.4

For any \(K\in \Omega _h\), taking \(\xi =1\) in (2.13d), similar to (3.11), the approximate saturations of both phases satisfy the local mass-conservation property on K as follows:

$$\begin{aligned} \int _K\phi \frac{S^{n+1}_\alpha -S^{n}_\alpha }{\Delta t} -\int _{\partial K}{} {\textbf {K}}\widehat{(\lambda _{\alpha }(S)\varvec{\sigma }_\alpha )} \cdot {\textbf {n}}_K ds=\int _K q_\alpha dxdy. \end{aligned}$$

3.2 Slope Limiter

Under the CFL conditions introduced in Sect. 3.1, we can guarantee the numerical cell averages \({\bar{S}}\) to be physically relevant. However, the numerical solutions of the LDG scheme may still be negative or larger than 1. Therefore, a slope limiter is proposed to modify \(S_{ij}\).

We substitute \({\tilde{S}}_{ij}\) for \(S_{ij}\), where

$$\begin{aligned} \begin{aligned} {\tilde{S}}_{ij}=\theta (S_{ij}-{\bar{S}}_{ij})+{\bar{S}}_{ij}, \end{aligned} \end{aligned}$$
(3.17)

with

$$\begin{aligned} \theta =\min \{|\frac{1-{\bar{S}}_{ij}}{M_{ij}-{\bar{S}}_{ij}}|,&|\frac{- {\bar{S}}_{ij}}{m_{ij}-{\bar{S}}_{ij}}|,1\}, \\ M_{ij}=\max _{(x,y)\in K_{ij}}S_{ij}(x,y),\quad \quad&m_{ij}=\min _{(x,y)\in K_{ij}}S_{ij}(x,y). \end{aligned}$$

Then the IMPES scheme with the BP technique is briefly summarized as follows:

Step1:

Given S from the time step n, seek \(p^{n+1}\) by (2.13a)–(2.13c):

$$\begin{aligned}{} & {} -G_w(S,\varvec{\sigma }_w^{n+1},\varsigma )-G_n(S,\varvec{\sigma }_w^{n+1},\varsigma )= G_n(S,\varvec{\sigma }_c^{n+1},\varsigma ) +\int _K \left( q_w+q_n\right) \varsigma dxdy, \\{} & {} \int _K\varvec{\sigma }_w^{n+1}\cdot \varvec{\eta }dxdy=L_w(p^{n+1},\varvec{\eta }), \\{} & {} \int _K\varvec{\sigma }_c^{n+1}\cdot \varvec{\zeta }dxdy=L_c(p_c(S),\varvec{\zeta }). \end{aligned}$$

Then the non-wetting phase pressure \(p_n^{n+1}\) can be updated by

$$\begin{aligned} p_n^{n+1}=p^{n+1}+p_c(S). \end{aligned}$$
Step2:

Given S, \(p^{n+1}\), seek \(S^{n+1}\) by (2.13d) and modify \(S_{ij}^{n+1}\) by (3.17).

Step3:

The non-wetting phase saturation \(S_n^{n+1}\) is updated by

$$\begin{aligned} S_n^{n+1}=1-S^{n+1}. \end{aligned}$$

3.3 High-Order Time Integration

In this subsection, we introduce third-order SSP-RK [24, 25] time discretization to solve the ODE system \({\textbf{o}}_t={\textbf{L}}({\textbf{o}})\), which is a convex combination of Euler forward time discretization. We consider the third-order SSP-RK method

$$\begin{aligned} {\textbf{o}}^{(1)}={\textbf{o}}^n+\Delta t{\textbf{L}}({\textbf{o}}^n,t^n), \\ {\textbf{o}}^{(2)}=\frac{3}{4}{\textbf{o}}^n+\frac{1}{4} ({\textbf{o}}^{(1)}+\Delta t{\textbf{L}}({\textbf{o}}^{(1)},t^n+\Delta t), \\ {\textbf{o}}^{n+1}=\frac{1}{3}{\textbf{o}}^n+\frac{2}{3} ({\textbf{o}}^{(2)}+\Delta t{\textbf{L}}({\textbf{o}}^{(2)},t^n+\frac{\Delta t}{2}). \end{aligned}$$

We can rewrite (2.11) as follows:

$$\begin{aligned} \begin{aligned} \phi \frac{\partial S}{\partial t}={\textbf {L}}(S,p,t). \end{aligned} \end{aligned}$$
(3.18)

For three-order IMPES method, see Algorithm 1 below.

Algorithm 1
figure a

Three-order IMPES method

4 Numerical Experiments

In this section, we provide numerical examples to illustrate the performance of the numerical method. We assume \({\textbf {K}}\) is a diagonal matrix and \({\textbf {K}}=kE\), where \(k>0\) and E is the identity matrix. For simplicity, the flows in these tests are driven by boundary conditions in place of source terms, i.e., \(q_\alpha =0\).

We first test our numerical model with known analytical solutions in 1D and 2D space. In Example 4.1, we use \(P_2\) and \(P_3\) polynomials in the 1D finite element space and test the accuracy of LDG schemes with/without the BP technique. In Example 4.2, we use \(P_2\), \(Q_2\) and \(Q_3\) polynomials in the 2D finite element space. To verify the effectiveness of the BP technique, we simulate the example with/without the BP technique for incompressible and immiscible two-phase flows in porous media and compare the results. Examples 4.3- 4.5 are realistic cases in [29].

Example 4.1

Accuracy test in 1D

In this example, we test the accuracy of the LDG method with \(P_2\) and \(P_3\) polynomials, respectively. The exact solutions of the wetting phase saturation and pressure are given as

$$\begin{aligned} S(x,t)=e^{-t-\epsilon }\cos (x),\quad p(x)=\cos (x), \quad x\in \Omega =[0,\frac{\pi }{2}], \end{aligned}$$

where \(\epsilon =1\times 10^{-6}\) is a constant. We use uniform meshes with N elements. The corresponding Dirichlet boundary condition is prescribed at the right boundary \(x = \frac{\pi }{2}\), and the Neumann boundary condition is prescribed at the left boundary \(x = 0\). The relative permeabilities are given by:

$$\begin{aligned} k_{rw}=S_e^m,\quad k_{rn}=(1-S_e)^m, \end{aligned}$$
(4.1)

where \(m=2\), \(S_e\) is given in (3.4). The rock porosity is 0.2, and the capillary pressure is neglected. The viscosity of the wetting phase is set as \(\mu _w = 1cP\) and that of the non-wetting phase is \(\mu _n = 0.45cP\). The residual saturations are set as \(S_{rw}=0, S_{rn}=0\). The absolute permeability \({\textbf{K}}=1\).

The source terms \(q_w\) and \(q_n\) are taken as

$$\begin{aligned} q_w={\tilde{q}}_wS(x,t), \quad q_n={\tilde{q}}_n(1-S(x,t)), \end{aligned}$$

respectively, where \({\tilde{q}}_w=-0.2+e^{-t-\epsilon }\cos (x)^2-2e^{-t-\epsilon }\sin (x)^2\), \({\tilde{q}}_n=-0.2+\frac{0.2}{1-e^{-t-\epsilon }\cos (x)}+\frac{1}{0.45}(1-e^{-t-\epsilon }\cos (x))\cos (x)+\frac{2}{0.45}e^{-t-\epsilon }\sin (x)^2\). \({\tilde{q}}_w\) and \({\tilde{q}}_n\) are uniformly bounded from below and above for a given time t.

We compute the saturation S and pressure p at time \(T = 0.1\) with \(\Delta t=0.01h\). The accuracy test results with/without the BP technique are shown in Tables 1, 2, 3, 4, respectively, from which we can observe that the BP technique can make the numerical solutions between [0,1] without degenerating the high-order accuracy. In Tables 3, 4, the number of meshes is chosen densely since the accuracy of \(P_3\) polynomials drops too quickly. As the result shown in Table 3, the numerical solution may not be larger than 1 in the case of \(P_3\) polynomials since the choice of exact solutions, which is reasonable.

Table 1 Example 4.1: accuracy test by using \(P_2\) polynomials without the BP technique
Table 2 Example 4.1: accuracy test by using \(P_2\) polynomials with the BP technique
Table 3 Example 4.1: accuracy test by using \(P_3\) polynomials without the BP technique
Table 4 Example 4.1: accuracy test by using \(P_3\) polynomials with the BP technique

Example 4.2

Accuracy test in 2D

In this example, we test the accuracy of LDG method with \(P_2\), \(Q_2\) and \(Q_3\) polynomials, respectively. The exact solutions of the wetting phase saturation and pressure are given as

$$\begin{aligned}{} & {} S(x,y,t)=e^{-t-\epsilon }\cos (x)\cos (y),\quad p(x,y)=\cos (x)\cos (y), \\{} & {} (x,y)\in \Omega =[0,\frac{\pi }{2}]\times [0,\frac{\pi }{2}], \end{aligned}$$

where \(\epsilon =1\times 10^{-6}\) is a constant. We use uniform meshes with \(N_x \times N_y\) elements. The corresponding Dirichlet boundary condition is prescribed at the right boundary \(x = \frac{\pi }{2}\) and the upper boundary \(y=\frac{\pi }{2}\). The Neumann boundary condition is prescribed at the left boundary \(x = 0\) and the lower boundary \(y=0\). The absolute permeability tensor \({\textbf{K}} = diag(1,1)\). Other parameters are same as in Example 4.1.

The source terms \(q_w\) and \(q_n\) are taken as

$$\begin{aligned}q_w={\tilde{q}}_wS(x,y,t), \quad q_n={\tilde{q}}_n(1-S(x,y,t)), \end{aligned}$$

respectively, where \({\tilde{q}}_w=-0.2+2e^{-t}\cos (x)^2\cos (y)^2-2e^{-t}\sin (x)^2\cos (y)^2-2e^{-t}\cos (x)^2\sin (y)^2\), \({\tilde{q}}_n=-0.2+\frac{0.2}{1-e^{-t-\epsilon }\cos (x)\cos (y)}+\frac{2}{0.45}(1-e^{-t-\epsilon }\cos (x)\cos (y))\cos (x)\cos (y) +\frac{2}{0.45}e^{-t-\epsilon }\sin (x)^2\cos (y)^2+\frac{2}{0.45}e^{-t-\epsilon } \cos (x)^2\sin (y)^2 \). \({\tilde{q}}_w\) and \({\tilde{q}}_n\) are uniformly bounded from below and above for a given time t.

We compute the saturation S and pressure p at time \(T = 0.1\) with \(\Delta t=0.001h\). The accuracy test results of \(Q_2\) polynomials are shown in Tables 5, 6, and we can observe optimal convergence rates. Compared with the \(Q_2\) polynomials, the accuracy test results of \(P_2\) polynomials in Tables 7, 8 fail to reach the optimal convergence rates. In Tables 9, 10, we use the \(Q_3\) polynomials and the accuracy test results work to fourth order. From Tables 5, 6, 7, 8, 9, 10, we can observe that the BP technique is effective.

Table 5 Example 4.2: accuracy test by using \(Q_2\) polynomials without the BP technique
Table 6 Example 4.2: accuracy test by using \(Q_2\) polynomials with the BP technique
Table 7 Example 4.2: accuracy test by using \(P_2\) polynomials without the BP technique
Table 8 Example 4.2: accuracy test by using \(P_2\) polynomials with the BP technique
Table 9 Example 4.2: accuracy test by using \(Q_3\) polynomials without the BP technique
Table 10 Example 4.2: accuracy test by using \(Q_3\) polynomials with the BP technique

Example 4.3

Bukely-Leverett problem

We consider a 1D horizontal homogeneous domain with the length of 300 m, initially saturated with oil (non-wetting phase). Water (wetted phase) from one end is injected with a constant flow rate to displace the oil to the other end. The pressure at the production end is kept constant. The linear and nonlinear relative permeability functions are used and the capillary pressure is neglected. We use the time step size as 1 day, and the relevant data for this problem are provided in Table 11.

Table 11 Relevant data for Example 4.3
Fig. 1
figure 1

Example 4.3: Wetting phase saturation without the BP technique. a Linear relative permeabilities, \(\mu _w/\mu _n=1/1\), b Linear relative permeabilities, \(\mu _w/\mu _n=2/1\), c Linear relative permeabilities, \(\mu _w/\mu _n=2/3\), d Quadratic relative permeabilities, \(\mu _w/\mu _n=2/3\)

Fig. 2
figure 2

Example 4.3: Wetting phase saturation with the BP technique. a Linear relative permeabilities, \(\mu _w/\mu _n=1/1\), b Linear relative permeabilities, \(\mu _w/\mu _n=2/1\), c Linear relative permeabilities, \(\mu _w/\mu _n=2/3\), d Quadratic relative permeabilities, \(\mu _w/\mu _n=2/3\)

In this example, we observe the effect of the viscosities of the oil and water phases for the fluid flow. The simulation results for the buckley - leverett problem are given in Fig. 1 and Fig. 2, which are similar to those given in [29]. We assume that the viscosities of the two phases are the same in case 1, i.e., the viscosity ratio is \(\mu _w/\mu _n=1/1\) and use the linear permeabilities given in (4.1) with \(m = 1\). In Fig. 1a we can observe that since the residual saturation of oil \(S_{rw}\) is 0.2, the saturation of water at the left end of the domain is 0.8. After 300 days, the saturation of water falls rapidly at the approximately 50 m from the left, and this phenomenon occurs at the approximately 200 m after 1100 days. As shown in Fig. 1b, \(\mu _w/\mu _n=2/1\), the viscosity of the displaced fluid is higher than that of the fluid being displaced and linear relative permeabilities are used, the solution has one shock similar to the previous case. In Fig. 1c, the viscosity ratio is \(\mu _w/\mu _n=2/3\) and the linear permeabilities are used, in this case the solution has no shock. In Fig. 1d, the viscosity ratio is \(\mu _w/\mu _n=2/3\) and we use the quadratic permeabilities given in (4.1) with \(m = 2\). As shown in this figure, the saturation of water decreases slowly and then followed by a shock. In all cases (Fig. 1) the numerical solutions of the saturation do not satisfy the maximum principle and we can observe local oscillations. Figure 2 demonstrates that the BP technique is indispensable. It can be seen that the oscillations disappear and the saturation belongs to the interval [0,1] with the application of limiter.

Example 4.4

Van Duijn-De Neef problem

This example considers two-phase flow in a 1D horizontal domain with length of 200 m. The horizontal domain consists of two permeable media of equal length and different permeabilities. The two ends of the domain are set to be closed. The left side (Part 1) and the right side (Part 2) are initially saturated by the wetting fluid and the non-wetting fluid, respectively. Due to the contrast in capillary pressure at the interface, there is a redistribution of the fluid that occurs from counter-current displacement. The total velocity \({\textbf {u}}_t\) is equal to zero.

The relative permeability and capillary pressure are described as

$$\begin{aligned} k_{rw}=S_e^4,\quad k_{rn}=(1-S_e)^2(1-S_e^2),\quad p_c=p_tS_e^{-1/2}, \end{aligned}$$
(4.2)

where \(S_e\) is given in (3.4) and \(p_t\) is the threshold capillary pressure. Let \((k_l,k_r)\) and \((p_{t,l},p_{t,r})\) be the relative permeabilities and the threshold pressures in Part 1 (left) and Part 2 (right), respectively. Other relevant data are provided in Table 12.

We compute the saturation \(S_w\) at time \(T=30,120,300\) with \(\Delta t=0.0005,0.0015\). The numerical results are shown as Fig. 3, fluid redistribution occurs during countercurrent displacement due to the effect of pressure and capillary pressure. The results are similar to those given in [29]. Figure 3a and b are used to compare the effect of the BP technique. In Fig. 3a, we can obviously observe that the numerical solution has significant oscillations beyond the range of 0–1 without the BP technique. As shown in Fig. 3b, accurate numerical solutions can be obtained in larger time steps with the BP technique, in which the oscillations disappear and the numerical solution falls exactly within the interval [0,1]. Actually, a larger time step size (\(\Delta t = 0.002\)) can not be used. This is because larger \(\Delta t\) may break the BP technique.

Table 12 Relevant data for Example 4.4
Fig. 3
figure 3

Example 4.4: Wetting-phase saturation with different time steps

Example 4.5

Effect of capillarity on flow in heterogeneous media

In this example, we consider a 2D horizontal domain of \(500\,\textrm{m}\times 270\,\textrm{m}\). We demonstrate the importance of capillary pressure in a heterogeneous media. This domain consists of layers with alternating permeabilities (1 md and 100 md), as shown in Fig. 4. Water (wetting phase) is injected uniformly into the left side of the layered domain, which is initially saturated with oil (non-wetting phase). The production is on the right side. Other relevant data are provided in Table 13.

Fig. 4
figure 4

Example 4.5: permeability

Table 13 Relevant data for Example 4.5

The capillary pressure function is given by:

$$\begin{aligned} p_c(S)=-B_c\log S_e, \end{aligned}$$
(4.3)

where \(S_e\) is given in (3.4) and \(B_c\) is the capillary pressure parameter. Firstly, we test the problem in a heterogeneous porous media without capillary pressure, and compare the speed of pushing the wetting phase to the right with different injection rates. We compute the saturation of wetting phase at time \(T = 2,3,4,5\) with \(\Delta t = 0.001\), and the injection rate is 0.06PV/year, 0.11PV/year, respectively. The bound-preserving will fail if we apply a larger time step (\(\Delta t=0.002)\). We apply the BP limiter and the numerical results are shown as Figs. 5 and 6. The wetting phase pushes to the right at a rapid speed when the injection rate becomes higher. We repeat the test in a heterogeneous porous media with capillary pressure and apply the BP limiter. Since \(p_c(S)\) given in (4.3) is infinite with \(S=0\), the capillary pressure is calculated by making \(S=1\times 10^{-10}\) for \(S<1\times 10^{-10}\). Actually, this cut-off is reasonable, since in practice the saturation is greater than a non-zero residual saturation. The result is shown in Fig. 7, where \(\Delta t = 0.0005\) and the injection rate is 0.11PV/year. In Fig. 7, we consider the capillary pressure, where the speed of flow slows down in the more permeable layers due to cross-flow between layers thanks to the contrast of capillary pressure. The results are similar to those given in [29]. Unfortunately, we cannot plot the numerical solutions without the BP limiter due to the instability of the numerical simulation process. Therefore, the application of the BP limiter is essential.

Fig. 5
figure 5

Example 4.5: Wetting-phase saturation with zero capillary pressure and the injection rate is 0.06PV/year

Fig. 6
figure 6

Example 4.5: Wetting-phase saturation with zero capillary pressure and the injection rate is 0.11PV/year

Fig. 7
figure 7

Example 4.5: Wetting-phase saturation with nonzero capillary pressure and the injection rate is 0.11PV/year

5 Concluding Remarks

In this paper, we first constructed the high-order BP LDG scheme for incompressible and immiscible two-phase flow in porous media on rectangular meshes. We derived the LDG scheme for the pressure-saturation equation and applied the IMPES method to solve the pressure implicitly and update the saturation explicitly, which is locally mass conservative for both phases. Moreover, we applied the BP technique for the problem to maintain that the saturations to be between 0 and 1. Numerical experiments showed the high accuarcy and effectiveness of the BP technique.