EIT Agent
登录
← 校园网页目录

校园网页 · 学校官网

Discrete Maximum principle of a high order finite difference scheme for a generalized Allen-Cahn equation.pdf

COMMUN. MA TH.SCI. © 2022 International Press Vol. 20, No. 5, pp. 1409–1436 DISCRETE MAXIMUM PRINCIPLE OF A HIGH ORDER FINITE DIFFERENCE SCHEME FOR A GENERALIZED ALLEN-CAHN EQUATION ∗ JIE SHEN † AND XIANGXIONG ZHANG ‡ Abstract. We consider solving a generalized Allen-Cahn equation coupled with a passive convec- tion for a given incompressible velocity field. The numerical scheme consists of the first order accurate stabilized implicit explicit time discretization and a fourth order accurate finite difference scheme, which is obtained from the finite difference formulation of the Q2 spectral element method. We prove that the discrete maximum principle holds under suitable mesh size and time step constraints. The same result also applies to the construcion of a bound-preserving scheme for any passive convection with an incompressible velocity field. Keywords. Discrete maximum principle; high order accuracy; monotonicity; bound-preserving; phase field equations; incompressible flow. AMS subject classifications. 65M06; 65M60; 65M12. 1. Introduction In this paper we consider bound-preserving schemes for a generalized Allen-Cahn equation ϕt + uϕx + vϕy = µ∆ϕ − F ′(ϕ) ε , (x,y) ∈ Ω, (1.1) where Ω is an open bounded domain in R2, µ,ε > 0 are parameters, F (ϕ) is an energy function, and ( u,v) is a given incompressible velocity field. The Allen-Cahn equation, i.e.(1.1) with ( u,v) ≡ 0, plays an important role in materials science [1, 2]. The gener- alized Allen-Cahn Equation (1.1), often with an extra Lagrange multiplier to conserve the volume fraction [22], is frequently encountered in modeling of multi-phase incom- pressible flows, e.g., [14]. The generalized Allen-Cahn Equation (1.1) usually satisfies a maximum principle, so it is desired to have its numerical solution to preserve the maximum principle or to remain in a prescribed bound. In particular, this becomes crucial when the energy function F (ϕ) is of the form F (ϕ) = θ 2[(1+ ϕ)ln(1+ ϕ)+(1 − ϕ)ln(1 − ϕ)] − θc 2 ϕ (1.2) where θ,θ c are two positive constants. To construct bound-preserving schemes for Equation (1.1), we can first consider bound-preserving schemes for a convection-diffusion equation, e.g., F (ϕ) ≡ 0. In the lit- erature, there are many fully explicit high order accurate bound-preserving schemes for a scalar convection-diffusion equation [3,8,11,18,20,21,23]. In these schemes, the time ∗Received: April 22, 2021; Accepted (in revised form): December 23, 2021. Communicated by Qiang Du. J. Shen is supported in part by NSF grant DMS-2012585 and AFOSR grant FA9550-20-1-0309 while X. Zhang is supported in part by the NSF grant DMS-1913120. †Department of Mathematics, Purdue University, 150 N. University Street, West Lafayette, IN 47907-2067, USA (shen@math.purdue.edu). ‡Department of Mathematics, Purdue University, 150 N. University Street, West Lafayette, IN 47907-2067, USA (zhan1966@purdue.edu). 1409 1410 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES discretizations are high order explicit time strong stability preserving (SSP) Runge- Kutta and multistep methods, which are convex combinations of forward Euler steps. Even though such an approach allows various high order accurate spatial discretiza- tions, all these fully explicit schemes require a small time step ∆ t = O( 1 µ∆x2), which is inpractical unless µ is very small. To construct bound-preserving schemes without the parabolic type CFL constraint ∆t = O( 1 µ∆x2) for (1.1), the second order finite difference was used in [19] with an implicit explicit (IMEX) time discretization ϕn+1 − ϕn ∆t + un+1ϕn+1 x + vn+1ϕn+1 y = µ∆ϕn+1 − F ′(ϕn) ε , (1.3) and a stabilized scheme with a parameter S ≥ 0: ϕn+1 − ϕn ∆t + S(ϕn+1 − ϕn)+ un+1ϕn+1 x + vn+1ϕn+1 y = µ∆ϕn+1 − F ′(ϕn) ε . (1.4) For spatial discretization, it is well-known that the second order finite difference for (1.3) and (1.4) forms an M-matrix [19], thus the matrix of the linear system in (1.3) and (1.4) is monotone, i.e., the inverse matrix is entrywise non-negative. Monotonicity is the key property which implies the discrete maximum principle. In general, high order accurate schemes do not form M-matrices, thus it is also quite challenging to extend the method in [19] to higher spatial accuracy. Nonetheless, recent progress in [12] shows that the finite element method with Q2 polynomial (tensor product quadratic polynomial) on structured meshes is a product of two M-matrices for a diffusion operator and thus is still monotone. The main purpose of this paper is to extend the results in [12] to the spatial dis- cretization for (1.3) and (1.4). In particular, when Q2 finite element method for a convection-diffusion operator in (1.3) and (1.4) is implemented with 3-point Gauss- Lobatto quadrature as a finite difference scheme, it can be rigorously proven that it is a fourth order accurate spatial discretization in the discrete l2-norm [10,13]. In the lit- erature, Qk finite element method implemented by m-point Gauss-Lobatto quadrature with m ≥ k +1 is also called spectral element method [16]. The fourth order finite dif- ference scheme in this paper is also equivalent to Q2 spectral element method with only 3-point Gauss-Lobatto quadrature. More precisely, we will prove that this fourth order finite difference spatial discretization for (1.3) and (1.4) satisfies the discrete maximum principle under certain mesh size and time step constraints. For the discrete maximum principle to hold for a convection-diffusion equation, the time step constraint in this paper is a lower bound condition on ∆t ∆x2 , thus still practical. For extensions to higher order time accuracy, in general it is quite difficult since there are no high order SSP implicit time discretizations without the constraint ∆ t = O( 1 µ∆x2), see [7]. For a second order spatial discretization, one possible approach to obtain a second order accurate time scheme is to consider the exponential time differencing schemes [5, 6, 9], which heavily depend on the ℓ∞ estimate of the matrix exponential e∆h, with ∆h denoting the discrete Laplacian matrix. For the second order finite difference, such an estimate can be established by the exact solution of the ordinary differential equations of the semi-discrete scheme for solving heat equation since the second order finite difference gives a diagonally dominant matrix ∆ h. Unfortunately, if using the fourth order accurate spatial discretization in this paper, the discrete Laplacian matrix ∆h is no longer diagonally dominant. The rest of the paper is organized as follows. In Section 2, we review the finite dif- ference scheme obtained from Q2 spectral element method. Its monotonicity is proved J. SHEN AND X. ZHANG 1411 in Section 3. In Section 4, we establish the discrete maximum principle for the general- ized Allen-Cahn equation with both polynomial and logarithmic energy functions. The main results in Section 3 can also be used to construct a fourth order bound-preserving finite difference spatial discretization for any passive convection. As a demonstration, we apply it to the two-dimensional incompressible Navier-Stokes equation in stream function vorticity formulation in Section 5. We present in Section 6 several numerical tests to validate our scheme. Some concluding remarks are given in Section 7. 2. Finite difference implementation of Q2 spectral element method For simplicity, we derive the scheme for an elliptic equation with incompressible velocity field u = (u,v) and a given function f on a square domain Ω = (0,1) ×(0,1) and Dirichlet boundary conditions: ϕ+u · ∇ϕ − ∇ ·(µ∇ϕ) =f on Ω, ϕ (x,y) =g(x,y) on ∂Ω. (2.1) We only consider a constant scalar µ and Q2 elements on a uniform mesh, even though the scheme can also be easily extended to general scenarios such as Neumann boundary conditions, and diffusion terms like a variable µ or ∇ ·(A∇ϕ) with a positive definite matrix function A, see [13]. Let Ω h denote a uniform rectangular mesh as shown in Figure 2.1 (a). Let Q2(e) be the set of tensor products of quadratic polynomials on a rectangular cell e: Q2(e) =   p(x,y) = 2X i=0 2X j=0 pijxiyj,(x,y) ∈ e   . Let V h and V h 0 denote two continuous piecewise Q2 finite element spaces on Ω h: V h = {p(x,y) ∈ C0(Ωh) :p|e ∈ Q2(e), ∀e ∈ Ωh}, V h 0 = {vh ∈ V h : vh = 0 on ∂Ω}. (a) A rectangular mesh and quadra- ture points. (b) All quadrature points correspond to a finite difference grid. Fig. 2.1 . An illustration of a uniform rectangular mesh for Q2 elements and the 3 ×3 Gauss- Lobatto quadrature. 1412 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES 2.1. Variational formulation. Assume there is a function ¯ g ∈ H1(Ω) as a smooth extension of g so that ¯g|∂Ω = g. Introduce a bilinear form B(ϕ,ψ) :=⟨ϕ,ψ ⟩+ ⟨u · ∇ϕ,ψ ⟩+ µ⟨∇ϕ,∇ψ⟩, where ⟨·,·⟩ is the standard L2 inner product on Ω, then the variational form of (2.1) is to find ˜ϕ = ϕ − ¯g ∈ H1 0(Ω) satisfying B(˜ϕ,ψ) =⟨f,ψ ⟩ −B(¯g,ψ ), ∀ψ ∈ H1 0(Ω). (2.2) In practice, ¯g is not used explicitly. By abusing notation, the most convenient implementation is to consider g(x,y) = ( 0, if ( x,y) ∈ (0,1) ×(0,1), g(x,y), if ( x,y) ∈ ∂Ω, and gI ∈ V h which is defined as the Q2 Lagrange interpolation of g(x,y) at 3 ×3 Gauss- Lobatto points for each rectangular cell on Ω. Namely, gI ∈ V h is the piecewise Qk interpolation of g along the boundary grid points and gI = 0 at the interior grid points. The spectral element method, i.e., finite element method with suitable quadrature, is to find ϕh ∈ V h 0 , s.t. Bh(ϕh + gI ,ψ h) =⟨f,v h⟩h, ∀ψh ∈ V h 0 , (2.3) where Bh(ϕh,ψ h) and ⟨f,v h⟩h denote using 3×3 Gauss-Lobatto quadrature for integrals B(ϕh,ψ h) and ⟨f,ψ h⟩, respectively. Then ϕh + gI will be our numerical solution toϕ(x,y) for (2.1). Notice that (2.3) is not a straightforward approximation to (2.2) since ¯ g is never used. The scheme (2.3) is fourth order accurate, see [10,13]. 2.2. One-dimensional fourth order scheme. To derive an explicit expression of the scheme (2.3), we start with a one-dimensional steady state equation on x ∈ (0,1) with homogeneous Neumann boundary conditions: ϕ(x)+ u(x)ϕ′(x) −(µϕ′)′ = f(x), ϕ ′(0) =ϕ′(1) = 0. The variational form is to find ϕ(x) ∈ H1([0,1]) satisfying B(ϕ,ψ) :=⟨ϕ,ψ ⟩+ ⟨uϕ′,ψ ⟩+ ⟨µϕ′,ψ ′⟩ = ⟨f,ψ ⟩, ∀ψ(x) ∈ H1([0,1]), where ⟨·,·⟩ denotes standard L2 inner product. Consider a uniform mesh xi = ih, i = 0,1,...,n +1, h = 1 n+1. Assume n is odd and let N = n+1 2 . Define a finite element mesh for P 2 basis with intervals Ik = [x2k,x2k+2] for k = 0,...,N −1. Define V h = {ψ ∈ C0([0,1]) :ψ|Ik ∈ P 2(Ik),k = 0,...,N −1}. Let {ψi}n+1 i=0 ⊂ V h be a basis of V h such that ψi(xj) =δij, i,j = 0,1,...,n +1. Then the continuous P 2 finite element method with 3-point Gauss-Lobatto quadrature is to seek ϕh(x) ∈ V h satisfying Bh(ϕh,ψ h) :=⟨ϕh,ψ i⟩h + ⟨uϕ′ h,ψ i⟩h + ⟨µϕ′ h,ψ ′ i⟩h = ⟨f,ψ i⟩h, i = 0,1,...,n +1 , (2.4) J. SHEN AND X. ZHANG 1413 where ⟨·,·⟩h denotes 3-point Gauss-Lobatto quadrature for approximating integration on each interval Ik. Let ϕj = ϕh(xj) and uj = u(xj), then ϕh(x) = n+1P j=0 ϕjψj(x). We have n+1X j=0 ϕj ⟨ψj,ψ i⟩h + ⟨uψ′ j,ψ i⟩h + µ⟨ψ′ j,ψ ′ i⟩h  = n+1X j=0 fj⟨ψj,ψ i⟩h, i = 0,1,...,n +1 . The matrix form of this scheme is ¯M ¯ϕ+ ¯U ¯T ¯ϕ+ µ ¯S ¯ϕ = ¯M¯f, where ¯U =   u0 u1 ... un un+1   , ¯ϕ =   ϕ0 ϕ1 ... ϕn ϕn+1   , ¯f =   f0 f1 ... fn fn+1   . The stiffness matrix ¯S has size ( n+2) ×(n+2) with ( i,j )-th entry as ⟨ψ′ i,ψ ′ j⟩h, the matrix ¯T has size ( n+2) ×(n+2) with ( i,j )-th entry as ⟨ψ′ j,ψ i⟩h and the lumped mass matrix ¯M is a ( n+2) ×(n+2) diagonal matrix with diagonal entries h 1 3 , 4 3 , 2 3 , 4 3 , 2 3 ,..., 2 3 , 4 3 , 1 3  . Notice that ¯U and ¯M are diagonal, thus they commute. Multiplying ¯M −1 for both sides, we get a finite difference representation ¯ϕ+ ¯U ¯D1 ¯ϕ − µ ¯D2 ¯ϕ =¯f , with square difference matrices for approximating first order and second order deriva- tives as ¯D1 = ¯M −1 ¯T = 1 2h   −3 4 −1 −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1 ... ... ... −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1 1 −4 3   , ¯D2 = − ¯M −1 ¯S = − 1 h2   7 2 −4 1 2 −1 2 −1 1 4 −2 7 2 −2 1 4 −1 2 −1 1 4 −2 7 2 −2 1 4 −1 2 −1 ... ... ... 1 4 −2 7 2 −2 1 4 −1 2 −1 1 2 −4 7 2   . Now consider the one-dimensional Dirichlet boundary value problem: ϕ(x)+ u(x)ϕ′(x) −(µϕ′)′ = f(x) on [0 ,1], ϕ (0) =σ1, ϕ (1) =σ2. Consider the same mesh as above and define V h 0 = {ψ ∈ C0([0,1]) :ψ|Ik ∈ P 2(Ik),k = 0,...,N −1;ψ(0) =ψ(1) = 0}. 1414 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES Then {ψi}n i=1 ⊂ V h is a basis of V h 0 . Let gI(x) =σ0ψ0(x)+ σ1ψn+1(x), then the one- dimensional version of (2.3) is to seek ϕh ∈ V h 0 satisfying Bh(ϕh + gI ,ψ i)h = ⟨f,ψ i⟩h, i = 1,2,...,n. (2.5) Notice that we can obtain (2.5) by simply setting ϕh(0) =σ0 and ϕh(1) =σ1 in (2.4). So the finite difference implementation of (2.5) is given as ϕ+ U D1 ¯ϕ − µD2 ¯ϕ = f, ϕ0 = σ0,ϕ1 = σ1, (2.6) with U =   u1 ... un  , f =   f1 ... fn  ,ϕ =   ϕ1 ... ϕn  , ¯ϕ =   ϕ0 ϕ1 ... ϕn ϕ1   , and difference matrices of size n ×(n+2): D1 = 1 2h   −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1 ... ... ... −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1   ,D2 =− 1 h2   −1 2 −1 1 4 −2 7 2 −2 1 4 −1 2 −1 1 4 −2 7 2 −2 1 4 −1 2 −1 ... ... ... 1 4 −2 7 2 −2 1 4 −1 2 −1   . Let In denote the identity matrix of size n × n, and define a restriction matrix R = 0 In 0  n×(n+2) . Then the left-hand side of (2.6) for interior points can be regarded as a linear operator on ¯ϕ: L(¯ϕ) =R ¯ϕ+ U D1 ¯ϕ − µD2 ¯ϕ = f. The scheme can also be explicitly written as ϕ0 = σ0, ϕ n+1 = σ1; (2.7a) ϕi + ui ϕi+1 − ϕi−1 2h + µ −ϕi−1 +2 ϕi − ϕi+1 h2 = fi,if i is odd, i.e., xi is a cell center; (2.7b) ϕi + ui ϕi−2 −4ϕi−1 +4 ϕi+1 − ϕi+2 4h + µ ϕi−2 −8ϕi−1 +14 ϕi −8ϕi+1 + ϕi+2 4h2 = fi, (2.7c) if i is even, i.e., xi is a cell end . Remark 2.1. The difference matrices D1 and D2 are only second order accurate in truncation errors approximating derivatives. But they give a fourth order accurate scheme for second order PDEs such as elliptic equations [13], and wave and parabolic equations [10]. However, if only using D1 for a pure convection equation, then the scheme can only be second order accurate. J. SHEN AND X. ZHANG 1415 2.3. Two-dimensional fourth order scheme. Consider a uniform grid (xi,y j) for a rectangular domain ¯Ω = [0,1] ×[0,1] where xi = i∆x, i = 0,1,...,n x +1, ∆ x = 1 nx+1 and yj = j∆y, j = 0,1,...,n y +1, ∆ y = 1 ny+1. Assume nx and ny are odd and let Nx = nx+1 2 and Ny = ny+1 2 . We consider a Q2 finite element mesh consisting of rectangular cells ekl = [x2k,x2k+2] ×[y2l,y2l+2] for k = 0,...,N x −1 and l = 0,...,N y −1. For given functions u,v,f and g, let indices denote point values at corresponding grid points, e.g., uij = u(xi,y j). Let u,v,f denote matrices of size ny × nx consisting of point values of corresponding functions, e.g., u =   u11 u12 ... u 1,nx u21 u22 ... u 2,nx ... ... ... uny,1 uny,2 ... u ny,nx   ny×nx ,f =   f11 f12 ... f 1,nx f21 f22 ... f 2,nx ... ... ... fny,1 fny,2 ... f ny,nx   ny×nx . Let Dix and Diy denote the Di (i = 1,2) matrices for x and y variables correspondingly, e.g., D1x = 1 2∆x   −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1 ... ... ... −1 0 1 1 2 −2 0 2 − 1 2 −1 0 1   nx×(nx+2) , D2y = − 1 ∆y2   −1 2 −1 1 4 −2 7 2 −2 1 4 −1 2 −1 1 4 −2 7 2 −2 1 4 −1 2 −1 ... ... ... 1 4 −2 7 2 −2 1 4 −1 2 −1   ny×(ny+2) . Let ϕ be a ny × nx matrix consisting of interior point values of ϕh: ϕ =   ϕ11 ... ϕ 1,nx ... ... ϕny,1 ... ϕ ny,nx   ny×nx . Let ¯ϕ be a ( ny +2) ×(nx +2) matrix consisting of both interior and boundary point values ϕh + gI: ¯ϕ =   ϕ00 ϕ01 ... ϕ 0,nx ϕ0,nx+1 ϕ10 ϕ11 ... ϕ 1,nx ϕ1,nx+1 ... ... ... ... ϕny,0 ϕny,1 ... ϕ ny,nx ϕny,nx+1 ϕny+1,0 ϕny+1,2 ... ϕ ny+1,nx ϕny+1,nx+1   ny×nx . Let Rx and Ry denote restriction matrices: Rx = 0 Inx 0 nx×(nx+2) , R y = 0 Iny 0 ny×(ny+2) . 1416 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES Then the scheme (2.3) for interior grid points is equivalent to the linear operator form L(¯ϕ) :=ϕ+ u. ∗(Ry ¯ϕDT 1x)+ v. ∗(D1y ¯ϕRT x ) − µ(Ry ¯ϕDT 2x + D2y ¯ϕRT x ) =f, (2.8) where .∗ denotes entrywise product of two matrices. For the boundary points, we simply have ϕij = gij, if (xi,y j) ∈ ∂Ω. Define the following operators: • ⊗ denotes Kronecker product of two matrices; • vec(X) denotes the vectorization of the matrixX by rearranging X into a vector column by column; • diag(x) denotes a diagonal matrix with the vector x as diagonal entries. Then (2.8) is also equivalent to an abstract matrix-vector form [Rx⊗Rx+diag(vec(u))D1x⊗Ry+diag(vec(v))Rx⊗D1y −µ(D2x⊗Ry+Rx⊗D2y)]vec(¯ϕ) =vec(f). Fig. 2.2. Three types of interior grid points: red cell center, blue knots and black edge centers for a finite element cell. For interior grid points, there are three types: cell center, edge center and knots. See Figure 2.2. The scheme can also be explicitly written as: ϕij +∆ tuij ϕi+1,j − ϕi−1,j 2∆x +∆ tvij ϕi,j+1 − ϕi,j−1 2∆y +∆ tµ −ϕi−1,j +2 ϕij − ϕi+1,j ∆x2 +∆ tµ −ϕi,j−1 +2 ϕij − ϕi,j+1 ∆y2 = fij, if (xi,y j) is a cell center; ϕij +∆ tuij ϕi+1,j − ϕi−1,j 2∆x +∆ tvij ϕi,j−2 −4ϕi,j−1 +4 ϕi,j+1 − ϕi,j+2 4∆y +∆ tµ −ϕi−1,j +2 ϕi,j − ϕi+1,j ∆x2 +∆ tµ ϕi,j−2 −8ϕi,j−1 +14 ϕi,j −8ϕi,j+1 + ϕi,j+2 4∆y2 = fij if (xi,y j) is an interior edge center for an edge parallel to x-axis; ϕij +∆ tuij ϕi−2,j −4ϕi−1,j +4 ϕi+1,j − ϕi+2,j 4∆x +∆ tvij ϕi,j+1 − ϕi,j−1 2∆y ∆tµ ϕi−2,j −8ϕi−1,j +14 ϕi,j −8ϕi+1,j + ϕi+2,j 4∆x2 +∆ tµ −ϕi,j−1 +2 ϕi,j − ϕi,j+1 ∆y2 = fij, if (xi,y j) is an interior edge center for an edge parallel to y-axis; ϕij +∆ tuij ϕi−2,j −4ϕi−1,j +4 ϕi+1,j − ϕi+2,j 4∆x +∆ tvij ϕi,j−2 −4ϕi,j−1 +4 ϕi,j+1 − ϕi,j+2 4∆y +∆tµ ϕi−2,j −8ϕi−1,j +14 ϕi,j −8ϕi+1 ,j +ϕi+2 ,j 4∆x2 +∆ tµ ϕi,j −2 −8ϕi,j −1+14 ϕi,j −8ϕi,j +1+ϕi,j +2 4∆y2 = fij if (xi,y j) is an interior knot . J. SHEN AND X. ZHANG 1417 2.4. The second order scheme. If using P 1 basis for one-dimensional case or Q1 basis for two-dimensional case in continuous finite element method with 2-point Gauss-Lobatto quadrature in (2.3), we get exactly the classical second order centered difference scheme which can be written in the same abstract form (2.6) or (2.8) with difference matrices defined as D1 = 1 2h   −1 0 1 −1 0 1 ... ... ... −1 0 1  ,D2 = − 1 h2   −1 2 −1 −1 2 −1 ... ... ... −1 2 −1  . The scheme can also be written explicitly in one dimension as ϕi + ui ϕi+1 − ϕi−1 2h + µ −ϕi−1 +2 ϕi − ϕi+1 h2 = fi, and in two dimensions as ϕij + uij ϕi+1,j −ϕi−1,j 2∆x + vij ϕi,j+1−ϕi,j−1 2∆y + µ −ϕi−1,j+2ϕij −ϕi+1,j ∆x2 + µ −ϕi,j−1+2ϕij −ϕi,j+1 ∆y2 = fi. (2.9) 3. Monotonicity and discrete maximum principle 3.1. Backward Euler time discretization. Now consider backward Euler time discretization for solving an initial value problem for a linear convection-diffusion equation on a square domain Ω = (0,1) ×(0,1) with Dirichlet boundary conditions: ϕt + uϕx + vϕy = ∇ ·(µ∇ϕ), (x,y) ∈ Ω, ϕ(x,y, 0) =f(x,y), (x,y) ∈ Ω, ϕ(x,y,t ) =g(x,y,t ), (x,y) ∈ ∂Ω. We get an elliptic equation for ϕn+1: ϕn+1 +∆ tun+1ϕn+1 x +∆ tvn+1ϕn+1 y −∆t∇ ·(µ∇ϕn+1) =ϕn, (3.1) with boundary condition ϕ(x,y,t n+1) =g(x,y,t n+1),(x,y) ∈ ∂Ω. With the same nota- tions in Section 2, the variational difference scheme for (3.1) at interior grid points is L(¯ϕn+1) :=ϕn+1+∆tun+1.∗(Ry¯ϕn+1DT1x)+vn+1.∗(D1y¯ϕn+1RTx)−µ(Ry¯ϕn+1DT2x+D2y¯ϕn+1RTx)=ϕn. (3.2a) Now define a linear operator ¯L : R (ny+2)×(nx+2) → R (ny+2)×(nx+2): ¯L(¯ϕn+1)ij := ( L(¯ϕn+1)ij, (xi,y j) ∈ Ω, ϕn+1 ij , (xi,y j) ∈ ∂Ω. Then the finite difference scheme can be written as ( ¯L(¯ϕn+1)ij = ϕn ij, (xi,y j) ∈ Ω, ¯L(¯ϕn+1)ij = gn+1 ij , (xi,y j) ∈ ∂Ω. (3.2b) We first have two straightforward results: Theorem 3.1. Let ¯1 denote a matrix of the same size as ¯ϕ with all entries being 1; for the scheme operator in (3.2), ¯L(¯1) =¯1. 1418 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES Proof. Notice that row sums of D1 and D2 in second order and fourth order accurate schemes are all zeros, thus D11 = D21 =0, which implies the result. Theorem 3.2. For the scheme (3.2b), let ¯L be the matrix representation of the linear operator ¯L. If the inverse matrix has non-negative entries, i.e., ¯L−1 ≥ 0, then the finite difference scheme satisfies a discrete maximum principle: min  min (xi,yj)∈Ω ϕn ij, min (xi,yj)∈∂Ω gn+1 ij  ≤ ϕn+1 ij ≤ max  max (xi,yj)∈Ω ϕn ij, max (xi,yj)∈∂Ω gn+1 ij  . (3.3) Proof. Let 1 denote the vector consisting of ones, then Theorem 3.1 implies ¯L1 =1 thus ¯L−11 =1. Since all entries in ¯L−1 are non-negative, each row in ¯L−1 forms a set of coefficients for a convex combination, which implies the maximum principle. 3.2. M-matrix and the second order scheme. Nonsingular M-matrices are inverse-positive matrices, which is the main tool for proving inverse positivity. There are many equivalent definitions or characterizations of M-matrices, see [17]. One convenient sufficient but not necessary characterization of nonsingular M-matrices is as follows: Theorem 3.3. For a real square matrix A with positive diagonal entries and non- positive off-diagonal entries, A is a nonsingular M-matrix if all the row sums of A are non-negative and at least one row sum is positive. Proof. By condition C10 in [17], A is a nonsingular M-matrix if and only ifA+ aI is nonsingular for any a ≥ 0. Since all the row sums of A are non-negative and at least one row sum is positive, the matrix A is irreducibly diagonally dominant, thus nonsingular, and A+ aI is strictly diagonally dominant, thus nonsingular for any a >0. By condition K35 in [17], a sufficient and necessary characterization of nonsingular M-matrices is the following: Theorem 3.4. For a real square matrix A with positive diagonal entries and non- positive off-diagonal entries, A is a nonsingular M-matrix if and only if there exists a positive diagonal matrix D such that AD has all positive row sums. If using second order scheme (2.9) in (3.2b), then the scheme operator ¯L acting on ¯ϕ is given as    ¯L(¯ϕ)ij = ϕij +∆ tuij ϕi+1,j −ϕi−1,j 2∆x +∆ tvij ϕi,j+1−ϕi,j−1 2∆y +∆tµ −ϕi−1,j+2ϕij −ϕi+1,j ∆x2 +∆ tµ −ϕi,j−1+2ϕij −ϕi,j+1 ∆y2 , (xi,y j) ∈ Ω, ¯L(¯ϕ)ij = ϕij, (xi,y j) ∈ ∂Ω. For interior points (xi,y j) ∈ Ω, we have ¯L(¯ϕ)ij =  1+ 2µ∆t ∆x2 + 2µ∆t ∆y2  ϕij − ∆t ∆x µ ∆x − uij 2 (ϕi+1,j+ϕi−1,j)− ∆t ∆y  µ ∆y − vij 2  (ϕi,j+1+ϕi,j−1). Assume ∆xmax ij |uij| ≤2µ, ∆ymax ij |vij| ≤2µ, (3.4) then all off-diagonal entries of ¯L will be non-positive, thus ¯L is an M-matrix. Theorem 3.5. Under the mesh constraints (3.4), the second order accurate scheme (2.9) is monotone, i.e., ¯L−1 ≥ 0, and satisfies the discrete maximum principle (3.3). J. SHEN AND X. ZHANG 1419 3.3. Lorenz’s condition for the fourth order scheme. Unfortunately, almost all high order schemes will lead to positive off-diagonal entries in the system matrix, which can no longer be an M-matrix, see [4]. In [15], Lorenz proposed a conve- nient condition under which a matrix can be shown to be a product of M-matrices. We briefly review Lorenz’s condition in this subsection. Definition 3.1. Let N = {1,2,...,n }. For N1,N2 ⊂ N, we say a matrix A of size n × n connects N1 with N2 if ∀i0 ∈ N1,∃ir ∈ N2,∃i1,...,i r−1 ∈ N s.t. aik−1ik ̸= 0, k = 1,··· ,r. (3.5) If perceiving A as a directed graph adjacency matrix of vertices labeled by N , then (3.5) simply means that there exists a directed path from any vertex in N1 to at least one vertex in N2. In particular, if N1 = ∅, then any matrix A connects N1 with N2. Given a square matrix A and a column vector x, we define N 0(Ax) ={i : (Ax)i = 0}, N +(Ax) ={i : (Ax)i > 0}. Given a matrix A = [aij] ∈ R n×n, define its diagonal, positive and negative off- diagonal parts as n × n matrices Ad, Aa, A+ a , A− a : (Ad)ij = ( aii, if i = j 0, if i ̸= j , A a = A − Ad, (A+ a )ij = ( aij, if aij > 0, i ̸= j 0, otherwise. , A − a = Aa − A+ a . The following result was proven in [15]. See also [12] for a detailed proof. Theorem 3.6 ( Lorenz’s condition ). If A− a has a decomposition: A− a = Az + As = (az ij)+( as ij) with As ≤ 0 and Az ≤ 0, such that Ad + Az is a nonsingular M-matrix , (3.6a) A+ a ≤ AzA−1 d As or equivalently ∀aij > 0 with i ̸= j,a ij ≤ nX k=1 az ika−1 kk as kj , (3.6b) ∃e ∈ R n \ {0},e ≥ 0 with Ae ≥ 0 s.t. Az or As connects N 0(Ae) with N +(Ae). (3.6c) Then A is a product of two nonsingular M-matrices, thus A−1 ≥ 0. In general, the condition (3.6c) can be difficult to verify. But for the finite difference schemes, the vector e can be taken as 1 to simply (3.6c). In particular, for the fourth order accurate scheme (3.2), we have ¯L(¯1) =¯1, thus ¯L1 =1. Therefore, N 0(¯L1) =∅ implies that the condition (3.6c) is trivially satisfied. So we can state a simpler Lorenz’s condition for the scheme considered in this paper: Theorem 3.7. Let A denote the matrix representation of a new linear operator A := h2 µ∆t ¯L for the scheme (3.2), with a corresponding matrix A := h2 µ∆t ¯L. Assume A− a has a decomposition A− a = Az + As with As ≤ 0 and Az ≤ 0. Then A−1 ≥ 0 if the following are satisfied: (1) Ad + Az is a nonsingular M-matrix; (2) A+ a ≤ AzA−1 d As. 1420 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES 3.4. Verification of Lorenz’s condition: one-dimensional case. We first show how to verify Theorem 3.7 for the one-dimensional version of (3.2). For simplic- ity, let c = h2 µ∆t, then we have the linear operator A := h2 µ∆t ¯L = c ¯L with a corresponding matrix A := c¯L. Applying (2.7) to (3.1), we get the explicit expression of A(¯ϕ) as A(¯ϕ)0 = cϕ0, A(¯ϕ)n+1 = cϕn+1; A(¯ϕ)i = cϕi + hui 2µ (ϕi+1 − ϕi−1)+( −ϕi−1 +2 ϕi − ϕi+1), if xi is a cell center; A(¯ϕ)i = cϕi + hui µ ϕi−2 −4ϕi−1 +4 ϕi+1 − ϕi+2 4 + ϕi−2 −8ϕi−1 +14 ϕi −8ϕi+1 + ϕi+2 4 , if xi is a cell end . 3.4.1. A splitting A− a = Az + As. In order to have fixed signs for all entries, we assume h|ui| ≤2µ, ∀i. (3.7) Then we have Ad(¯ϕ)0 = cϕ0, Ad(¯ϕ)n+1 = cϕn+1, Ad(¯ϕ)i = cϕi +2 ϕi, if i is odd, i.e., xi is a cell center; Ad(¯ϕ)i = cϕi + 7 2 ϕi, if i is even, i.e., xi is a cell end . A+ a (¯ϕ)0 = A+(¯ϕ)n+1 = 0, A+ a (¯ϕ)i = 0, if i is odd, i.e., xi is a cell center; A+ a (¯ϕ)i =  1+ hui µ  1 4 ϕi−2 +  1 − hui µ  1 4 ϕi+2, if i is even, i.e., xi is a cell end . A− a (¯ϕ)0 = A−(¯ϕ)n+1 = 0, A− a (¯ϕ)i = −  1+ hui 2µ  ϕi−1 −  1 − hui 2µ  ϕi+1, if i is odd, i.e., xi is a cell center; A− a (¯ϕ)i = −2  1+ hui 2µ  ϕi−1 −2  1 − hui 2µ  ϕi+1 if i is even, i.e., xi is a cell end . Next, we define a splitting A− a = Az + As as: Az(¯ϕ)i = 0, if i is odd, i.e., xi is a cell center; Az(¯ϕ)i = −2  1 − hui 2µ  ϕi−1 −2  1+ hui 2µ  ϕi+1 if i is even, i.e., xi is a cell end . As(¯ϕ)i = −  1 − hui 2µ  ϕi−1 −  1+ hui 2µ  ϕi+1, if i is odd, i.e., xi is a cell center; As(¯ϕ)i = 0, if i is even, i.e., xi is a cell end . 3.4.2. Verification of Ad + Az being an M-matrix. For simplicity, define B = Ad + Az, then the corresponding linear operator B = Ad + Az: B(¯ϕ)0 = cϕ0, B(¯ϕ)n+1 = cϕn+1, J. SHEN AND X. ZHANG 1421 B(¯ϕ)i = cϕi +2 ϕi, if i is odd, i.e., xi is a cell center; B(¯ϕ)i =  c+ 7 2  ϕi −2  1 − hui 2µ  ϕi−1 −2  1+ hui 2µ  ϕi+1, if i is even, i.e., xi is a cell end . Since for even i, B(1) =c − 1 2 which is for small c, thus Theorem 3.3 cannot be applied. Define the following linear operator D: D(¯ϕ)0 = ϕ0, D(¯ϕ)n+1 = ϕn+1, D(¯ϕ)i = 1 2 ϕi, if i is odd, i.e., xi is a cell center; D(¯ϕ)i = ϕi, if i is even, i.e., xi is a cell end . Let D be the matrix representing the operator D, then D is a diagonal matrix with positive diagonal entries. And we have B[D(¯ϕ)]0 =cϕ0, B[D(¯ϕ)]n+1 = cϕn+1, B[D(¯ϕ)]i =(c+2) D(¯ϕ)i = c+2 2 ¯ϕi, if i is odd, i.e., xi is a cell center; B[D(¯ϕ)]i =  c+ 7 2  D(¯ϕ)i −2  1 − hui 2µ  D(¯ϕ)i−1 −2  1+ hui 2µ  D(¯ϕ)i+1 =  c+ 7 2  ϕi −  1 − hui 2µ  ϕi−1 −  1+ hui 2µ  ϕi+1 if i is even, i.e., xi is a cell end . Then it is easy to see that B[D(¯1)] > 0, thus BD1 > 0 for any c >0. By Theorem 3.4, BD has positive row sums, thus Ad + Az = B is a nonsingular M-matrix. 3.4.3. Verification of A+ a ≤ AzA−1 d As. Since AzA−1 d As ≥ 0, in order to verify A+ a ≤ AzA−1 d As, we only need to compare A+ a (¯ϕ)i with Az[A−1 d (As(¯ϕ))]i for even i. For a cell end xi, we have Az[A−1 d (As(¯ϕ))]i = −2  1 − hui 2µ  A−1 d (As(¯ϕ))i−1 −2  1+ hui 2µ  A−1 d (As(¯ϕ))i+1 = −2  1 − hui 2µ  1 c+2 As(¯ϕ)i−1 −2  1+ hui 2µ  1 c+2 As(¯ϕ)i+1 =2  1 − hui 2µ  1 − hui−1 2µ  c+2 ϕi−2 +2  1 − hui 2µ  1+ hui−1 2µ  c+2 ϕi +2  1+ hui 2µ  1 − hui+1 2µ  c+2 ϕi +2  1+ hui 2µ  1+ hui+1 2µ  c+2 ϕi+2. It suffices to have  1+ hui µ  1 4 ≤ 2  1 − hui 2µ  1 − hui−1 2µ  c+2 ,  1 − hui µ  1 4 ≤ 2  1+ hui 2µ  1+ hui+1 2µ  c+2 , which are equivalent to (12+2 c) hui 2µ +8 hui−1 2µ − 8 hui−1 2µ hui 2µ ≤ 6 − c, −(12+2 c) hui 2µ − 8 hui+1 2µ − 8 hui−1 2µ hui 2µ ≤ 6 − c. 1422 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES Let a = maxi |ui| h 2µ, then it suffices to require (12+2 c)a+8 a+8 a2 ≤ 6 − c ⇐ ⇒8a2 +(20+2 c)a −(6 − c) ≤ 0. From the inequality above, we get a ≤ √ (c+6)2+112−(c+10) 8 for a fixed c >0. Since√ (c+6)2+112−(c+10) 8 > 0 implies c <6, we have c ∈ (0,6). For a fixed a >0, then we need c ≤ −8a2−20a+6 2a+1 . For −8a2−20a+6 2a+1 > 0, we must have a < √ 37−5 4 . 3.4.4. Sufficient conditions in 1-D. Now we can summarize all the constraints to apply Theorem 3.7. Theorem 3.8. Let ∥u∥∞ = maxi |ui|. For the scheme (2.7) to be inverse positive, i.e., ¯L−1 ≥ 0, the following conditions are sufficient: • For a mesh size h satisfying h ∥u∥∞ 2µ = a < √ 37−5 4 ≈ 0.271, time step ∆t satisfies ∆t µ h2 ≥ 2a+1 −8a2−20a+6. • For a time step ∆t satisfying ∆t µ h2 = 1 c > 1 6, the mesh size h satisfies h ∥u∥∞ µ ≤√ (c+6)2+112−(c+10) 4 . In particular, the following are convenient explicit sufficient mesh constraints for the inverse positivity: • For a mesh size h satisfying h ∥u∥∞ µ ≤ 1 2, time step satisfies ∆t µ h2 ≥ 3. • For a time step ∆t satisfying ∆t µ h2 ≥ 1 2, the mesh size h satisfies h ∥u∥∞ µ ≤ 1 2. Remark 3.1. We emphasize that the time step and mesh size conditions in The- orem 3.8 are not sharp, but the constraint ∆ t ≥ O(h2) is necessary for monotonicity of the fourth order accurate scheme (2.7) in numerical tests. For achieving temporal convergence with monotonicity always satisfied, we can set ∆t → 0 with h → 0 satisfying ∆t µ h2 ≥ 3. On the other hand, if setting ∆ t → 0 for fixed h, monotonicity will be simply lost because the semi-discrete system of ordinary differential equations might not be as bound-preserving as the PDE it approximates. For example, consider solving the simple heat equation ut = ∆u, the semi-discrete scheme with space variable discretized by finite difference can be written as d dtu = ∆hu. If using second order centered differ- ence, then u(t) =e∆htu(0) will preserve the bound or positivity of u(0) because −∆h is a diagonally dominant matrix with all off-diagonal entries being non-positive. If using the Q2 spectral element method, then −∆h is not diagonally dominant because of the positive off-diagonal entries, thus it is easy to construct a non-negative initial condition u(0) such that u(t) =e∆htu(0) contains negative values. This simply implies that we should not approximate the ODE system u(t) =e∆htu(0) too accurately if high order spatial discretization is used and positivity is a concern. On the other hand, one can still achieve convergence to the PDE solution with positivity enforced in the high order spatial discretization, if the constraints such as the ones in Theorem 3.8 are enforced. 3.5. Verification of Lorenz’s condition: two-dimensional case. For sim- plicity, we only consider the case ∆ x = ∆y = h. Let c = h2 µ∆t. For the linear operator A = h2 µ∆t ¯L : R (ny+2)×(nx+2) → R(ny+2)×(nx+2), we have A(¯ϕ)ij = cϕij, (xi,y j) is a boundary point; A(¯ϕ)ij = cϕij + huij 2µ (ϕi+1,j − ϕi−1,j)+ hvij 2µ (ϕi,j+1 − ϕi,j−1) J. SHEN AND X. ZHANG 1423 +( −ϕi−1,j +2 ϕij − ϕi+1,j)+( −ϕi,j−1 +2 ϕij − ϕi,j+1), if (xi,y j) is a cell center; A(¯ϕ)ij = cϕij + huij 2µ (ϕi+1,j − ϕi−1,j)+ hvij 4µ (ϕi,j−2 −4ϕi,j−1 +4 ϕi,j+1 − ϕi,j+2) +( −ϕi−1,j +2 ϕi,j − ϕi+1,j)+ ϕi,j−2 −8ϕi,j−1 +14 ϕi,j −8ϕi,j+1 + ϕi,j+2 4 if (xi,y j) is an interior edge center for an edge parallel to x-axis; A(¯ϕ)ij = cϕij + huij 4µ (ϕi−2,j −4ϕi−1,j +4 ϕi+1,j − ϕi+2,j)+ hvij 2µ (ϕi,j+1 − ϕi,j−1) + ϕi−2,j −8ϕi−1,j +14 ϕi,j −8ϕi+1,j + ϕi+2,j 4 +( −ϕi,j−1 +2 ϕi,j − ϕi,j+1), if (xi,y j) is an interior edge center for an edge parallel to y-axis; A(¯ϕ)ij = cϕij + huij µ ϕi−2,j −4ϕi−1,j +4 ϕi+1,j − ϕi+2,j 4 + hvij µ ϕi,j−2 −4ϕi,j−1 +4 ϕi,j+1 − ϕi,j+2 4 + ϕi−2,j −8ϕi−1,j +14 ϕi,j −8ϕi+1,j + ϕi+2,j 4 + ϕi,j−2 −8ϕi,j−1 +14 ϕi,j −8ϕi,j+1 + ϕi,j+2 4 if (xi,y j) is an interior knot . 3.5.1. Splitting of negative off-diagonal entries. In order to have fixed signs for all entries, we assume hmaxij{|uij|,|vij|} ≤2µ for all i,j . Then we have Ad(¯ϕ)ij = cϕij, (xi,y j) is a boundary point; Ad(¯ϕ)ij = (c+4) ϕij,(xi,y j) is a cell center; Ad(¯ϕ)ij =  c+ 11 2  ϕij,(xi,y j) is an interior edge center; Ad(¯ϕ)ij = (c+7) ϕij,(xi,y j) is an interior knot . For positive off-diagonal parts, we have: A+ a (¯ϕ)ij = 0, (xi,y j) is a boundary point; A+ a (¯ϕ)ij = 1 4  1+ hvij µ  ϕi,j−2 + 1 4  1 − hvij µ  ϕi,j+2, (xi,y j) is an interior edge center for an edge parallel to x-axis; A+ a (¯ϕ)ij = 1 4  1+ huij µ  ϕi−2,j + 1 4  1 − huij µ  ϕi+2,j, (xi,y j) is an interior edge center for an edge parallel to y-axis; A+ a (¯ϕ)ij = 1 4  1+ hvij µ  ϕi,j−2 + 1 4  1 − hvij µ  ϕi,j+2 + 1 4  1+ huij µ  ϕi−2,j + 1 4  1 − huij µ  ϕi+2,j, (xi,y j) is an interior knot . Then we defined a splitting A− a = Az + As as: Az(¯ϕ)ij = 0, (xi,y j) is a boundary point; Az(¯ϕ)ij = 0, (xi,y j) is a cell center; Az(¯ϕ)ij = −2  1+ hvij 2µ  ϕi,j−1 −2  1 − hvij 2µ  ϕi,j+1 1424 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES (xi,y j) is an interior edge center for an edge parallel to x-axis; Az(¯ϕ)ij = −2  1+ huij 2µ  ϕi−1,j −2  1 − huij 2µ  ϕi+1,j, (xi,y j) is an interior edge center for an edge parallel to y-axis; Az(¯ϕ)ij = −2  1+ hvij 2µ  ϕi,j−1 −2  1 − hvij 2µ  ϕi,j+1 −2  1+ huij 2µ  ϕi−1,j −2  1 − huij 2µ  ϕi+1,j, (xi,y j) is an interior knot . As(¯ϕ)ij = 0, (xi,y j) is a boundary point; As(¯ϕ)ij = −  1 − huij 2µ  ϕi+1,j −  1+ huij 2µ  ϕi−1,j −  1 − hvij 2µ  ϕi,j+1 −  1+ hvij 2µ  ϕi,j−1, (xi,y j) is a cell center; As(¯ϕ)ij = −  1 − huij 2µ  ϕi+1,j −  1+ huij 2µ  ϕi−1,j (xi,y j) is an interior edge center for an edge parallel to x-axis; As(¯ϕ)ij = −  1 − hvij 2µ  ϕi,j+1 −  1+ hvij 2µ  ϕi,j−1, (xi,y j) is an interior edge center for an edge parallel to y-axis; As(¯ϕ)ij = 0, (xi,y j) is an interior knot . 3.5.2. Verification of Ad + Az being an M-matrix. Let B = Ad + Az, then we have B(¯ϕ)ij = cϕij, (xi,y j) is a boundary point; B(¯ϕ)ij = (c+4) ϕij, (xi,y j) is a cell center; B(¯ϕ)ij =  c+ 11 2  ϕij −2  1+ hvij 2µ  ϕi,j−1 −2  1 − hvij 2µ  ϕi,j+1, (xi,y j) is an interior edge center for an edge parallel to x-axis; B(¯ϕ)ij =  c+ 11 2  ϕij −2  1+ huij 2µ  ϕi−1,j −2  1 − huij 2µ  ϕi+1,j, (xi,y j) is an interior edge center for an edge parallel to y-axis; B(¯ϕ)ij = (c+7) ϕij −2  1+ hvij 2µ  ϕi,j−1 −2  1 − hvij 2µ  ϕi,j+1 −2  1+ huij 2µ  ϕi−1,j −2  1 − huij 2µ  ϕi+1,j, (xi,y j) is an interior knot . Define a positive diagonal operator D as D(¯ϕ)ij = ϕij, (xi,y j) is a boundary point, or a cell center, or an interior knot; J. SHEN AND X. ZHANG 1425 D(¯ϕ)ij = 3 4 ϕij, (xi,y j) is an interior edge center. Then we have B[D(¯ϕ)]ij =cD(¯ϕ)ij = cϕij, (xi,y j) is a boundary point; B[D(¯ϕ)]ij =(c+4) D(¯ϕ)ij = (c+4) ϕij, (xi,y j) is a cell center; B[D(¯ϕ)]ij =  c+ 11 2  D(¯ϕ)ij −2  1+ hvij 2µ  D(¯ϕ)i,j−1 −2  1 − hvij 2µ  D(¯ϕ)i,j+1 = 3 4 c+ 33 8  ϕij −2  1+ hvij 2µ  ϕi,j−1 −2  1 − hvij 2µ  ϕi,j+1, (xi,y j) is an interior edge center for an edge parallel to x-axis; B[D(¯ϕ)]ij =  c+ 11 2  D(¯ϕ)ij −2  1+ huij 2µ  D(¯ϕ)i−1,j −2  1 − huij 2µ  D(¯ϕ)i+1,j = 3 4 c+ 33 8  ϕij −2  1+ huij 2µ  ϕi−1,j −2  1 − huij 2µ  ϕi+1,j, (xi,y j) is an interior edge center for an edge parallel to y-axis; B[D(¯ϕ)]ij =(c+7) D(¯ϕ)ij −2  1+ hvij 2µ  D(¯ϕ)i,j−1 −2  1 − hvij 2µ  D(¯ϕ)i,j+1 −2  1+ huij 2µ  D(¯ϕ)i−1,j −2  1 − huij 2µ  D(¯ϕ)i+1,j, =(c+7) ϕij − 3 2  1+ hvij 2µ  ϕi,j−1 − 3 2  1 − hvij 2µ  ϕi,j+1 − 3 2  1+ huij 2µ  ϕi−1,j − 3 2  1 − huij 2µ  ϕi+1,j, (xi,y j) is an interior knot . And the matrix BD has positive row sums for any c >0 due to the following: B[D(¯1)]ij =c, (xi,y j) is a boundary point; B[D(¯1)]ij =c+4 , (xi,y j) is a cell center; B[D(¯1)]ij =3 4 c+ 1 8 , (xi,y j) is an interior edge center; B[D(¯1)]ij =c+1 , (xi,y j) is an interior knot . By Theorem 3.4, Ad + Az = B is a nonsingular M-matrix. 3.5.3. Verification of A+ a ≤ AzA−1 d As for edge centers. Next, we verify A+ a ≤ AzA−1 d As. We first compare Az[A−1 d (As(¯ϕ))]ij with A+ a (¯ϕ)ij for the case that (xi,y j) is an interior edge center for an edge parallel to x-axis. Az[A−1 d (As(¯ϕ))]ij = −2  1+ hvij 2µ  A−1 d (As(¯ϕ))i,j−1 −2  1 − hvij 2µ  A−1 d (As(¯ϕ))i,j+1 = −2  1+ hvij 2µ  (c+4) −1 As(¯ϕ)i,j−1 −2  1 − hvij 2µ  (c+4) −1 As(¯ϕ)i,j+1 = 2 1+ hvij 2µ c+4 h 1− hui,j−1 2µ  ϕi+1,j−1+  1+ hui,j−1 2µ  ϕi−1,j−1+  1− hvi,j−1 2µ  ϕi,j+  1+ hvi,j−1 2µ  ϕi,j−2 i 1426 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES +2 1− hvij 2µ c+4 h 1− hui,j+1 2µ  ϕi+1,j+1+  1+ hui,j+1 2µ  ϕi−1,j+1+  1− hvi,j+1 2µ  ϕi,j+2+  1+ hvi,j+1 2µ  ϕi,j i . For A+ a ≤ AzA−1 d As to hold, we need 2 1+ hvij 2µ c+4  1+ hvi,j−1 2µ  ≥ 1 4  1+ hvij µ  , 2 1 − hvij 2µ c+4  1 − hvi,j+1 2µ  ≥ 1 4  1 − hvij µ  , which are equivalent to 2c hvij 2µ −8 hvi,j−1 2µ −8 hvij 2µ hvi,j−1 2µ ≤ 4 − c, −2c hvij 2µ +8 hvi,j+1 2µ −8 hvij 2µ hvi,j+1 2µ ≤ 4 − c. Let a = maxi,j |vij| h 2µ > 0, then it suffices to have 2ca+8 a+8 a2 ≤ 4 − c ⇐ ⇒8a2 +(8+2 c)a −(4 − c) ≥ 0 ⇐ ⇒0 < a≤ √ c2 +48 −(c+4) 8 . For √ c2+48−(c+4) 8 > 0 to hold, we need c <4. For fixed a >0, we have 2ca+8 a+8 a2 ≤ 4 − c ⇐ ⇒c ≤ 4 −8a2 −8a 1+2 a = −8(a+ 1 2)2 +6 2a+1 . For −8(a+ 1 2 )2+6 2a+1 to be positive, we need a < √ 3−1 2 . For the case that (xi,y j) is an interior edge center for an edge parallel to y-axis, the discussion will be similar and the same mesh constraints apply due to the symmetry. We summarize the constraints obtained so far as the following: • For any c ∈ (0,4), 0 < a≤ √ c2+48−(c+4) 8 ; • For any a ∈ (0, √ 3−1 2 ), 0 < c≤ c ≤ 4−8a2−8a 1+2a . 3.5.4. Verification of A+ a ≤ AzA−1 d As for knots. Next, consider the case (xi,y j) being an interior knot. Az[A−1 d (As(¯ϕ))]ij = −2  1+ hvij 2µ  A−1 d (As(¯ϕ))i,j−1 −2  1 − hvij 2µ  A−1 d (As(¯ϕ))i,j+1 −2  1+ huij 2µ  A−1 d (As(¯ϕ))i−1,j −2  1 − huij 2µ  A−1 d (As(¯ϕ))i+1,j, = −2 1+ hvij 2µ c+ 11 2 As(¯ϕ)i,j−1 −2 1− hvij 2µ c+ 11 2 As(¯ϕ)i,j+1 −2 1+ huij 2µ c+ 11 2 As(¯ϕ)i−1,j −2 1− huij 2µ c+ 11 2 As(¯ϕ)i+1,j, = 2 1+ hvij 2µ c+ 11 2  1 − hvi,j−1 2µ  ϕi,j +  1+ hvi,j−1 2µ  ϕi,j−2  +2 1 − hvij 2µ c+ 11 2  1 − hvi,j+1 2µ  ϕi,j+2 +  1+ hvi,j+1 2µ  ϕi,j  J. SHEN AND X. ZHANG 1427 +2 1+ huij 2µ c+ 11 2  1 − hui−1,j 2µ  ϕi,j +  1+ hui−1,j 2µ  ϕi−2,j  +2 1 − huij 2µ c+ 11 2  1 − hui+1,j 2µ  ϕi+2,j +  1+ hui+1,j 2µ  ϕi,j  . For A+ a ≤ AzA−1 d As to hold, we need 2 1+ hvij 2µ c+ 11 2  1+ hvi,j−1 2µ  ≥ 1 4  1+ hvij µ  , 2 1 − hvij 2µ c+ 11 2  1 − hvi,j+1 2µ  ≥ 1 4  1 − hvij µ  , 2 1+ huij 2µ c+ 11 2  1+ hui−1,j 2µ  ≥ 1 4  1+ huij µ  , 2 1 − huij 2µ c+ 11 2  1 − hui+1,j 2µ  ≥ 1 4  1 − huij µ  , which are equivalent to (3+2 c) hvij 2µ −8 hvi,j−1 2µ −8 hvij 2µ hvi,j−1 2µ ≤ 5 2 − c, −(3+2 c) hvij 2µ +8 hvi,j−1 2µ −8 hvij 2µ hvi,j−1 2µ ≤ 5 2 − c, (3+2 c) huij 2µ −8 hui−1,j 2µ −8 huij 2µ hui−1,j 2µ ≤ 5 2 − c, −(3+2 c) huij 2µ +8 hui−1,j 2µ −8 huij 2µ hui−1,j 2µ ≤ 5 2 − c. Let a = max{maxi,j |vij|,maxi,j |uij|} h 2µ > 0, then it suffices to require (3+2 c)a+8a+8a2 ≤ 5 2 −c ⇐ ⇒16a2+(11+2 c)2a−5+2 c ≤0 ⇐= 0≤a ≤ √ (c+ 3 2)2+48−(c+ 11 2 ) 8 . To ensure √ (c+ 3 2 )2+48−(c+ 11 2 ) 8 > 0, we need c < 5 2, with which we have√ (c+ 3 2 )2+48−(c+ 11 2 ) 8 < √ c2+48−(c+4) 8 . For a fixed a >0, we also have (3+2 c)a+8 a+8 a2 ≤ 5 2 − c ⇐ ⇒0 < c≤ −8a2 −11a+ 5 2 2a+1 . For −8a2−11a+ 5 2 2a+1 > 0, we need a < √ 201−11 16 which is smaller than √ 3−1 2 . When −8a2−11a+ 5 2 2a+1 > 0, we also have −8a2−11a+ 5 2 2a+1 < 4−8a2−8a 1+2a . Now we can summarize all mesh constraints forA+ a ≤ AzA−1 d As at both edge centers and knots: • For any c ∈ (0, 5 2), 0 < a≤ √ (c+ 3 2 )2+48−(c+ 11 2 ) 8 ; • For any a ∈ (0, √ 201−11 16 ), 0 < c≤ −8a2−11a+ 5 2 2a+1 . 3.5.5. Sufficient conditions in 2-D. Since AzA−1 d As ≥ 0 and A+ a (ϕ)ij are nonzero only at interior knots and interior edge centers, we have already found all con- straints to ensure A+ a ≤ AzA−1 d As. By applying Theorem 3.7, we get the monotonicity result for the high order scheme: Theorem 3.9. Let ∥u∥∞ = maxij{|uij|,|vij|}|. For the fourth order accurate scheme (3.2) to be inverse positive, i.e., ¯L−1 ≥ 0, the following conditions are sufficient: 1428 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES • For a mesh size h satisfying h ∥u∥∞ 2µ = a < √ 201−11 16 ≈ 0.199, time step ∆t satisfies ∆t µ h2 ≥ 2a+1 −8a2−11a+ 5 2 . • For a time step ∆t satisfying ∆t µ h2 = 1 c > 2 5, the mesh size h satisfies h ∥u∥∞ µ ≤√ (c+ 3 2 )2+48−(c+ 11 2 ) 8 . In particular, the following are convenient explicit sufficient mesh constraints for the inverse positivity: • For a mesh size h satisfying h ∥u∥∞ µ ≤ 1 3, time step satisfies ∆t µ h2 ≥ 3. • For a time step ∆t satisfying ∆t µ h2 ≥ 1, the mesh size h satisfies h ∥u∥∞ µ ≤ √ 217−13 8 ≈ 0.216. 4. The generalized Allen-Cahn equation We now consider (1.1). We shall assume that the free energy functional F (ϕ) has a double well form with minima at ±β, where β satisfies F ′(β) =F ′(−β) = 0, (4.1a) F ′(β) satisfies the monotone conditions away from ( −β,β ): F ′(ϕ) < 0,∀ϕ <−β; F ′(β) > 0,∀ϕ > β. (4.1b) Such energy functionals include the polynomial energy F (ϕ) = 1 4(ϕ2 −1)2 with β = 1, and the logarithmic energy (1.2) with β given by 1 2β ln 1+β 1−β = θc θ , see [19]. By Lemma 2.1 in [19], we have Lemma 4.1. For an energy function satisfying (4.1) and f(x) =x − ∆t ε F ′(x), the following bounds of f(x) hold: f(x) ∈ [−β,β ], ∀x ∈ [−β,β ], under the time step constraint ∆t max x∈[−β,β] F ′′(x) ≤ ε. Consider a first order implicit explicit time (IMEX) discretization with the fourth order difference scheme: ϕn+1+∆tun+1. ∗(Ry ¯ϕn+1DT 1x)+ vn+1. ∗(D1y ¯ϕn+1RT x )−µ(Ry ¯ϕn+1DT 2x +D2y ¯ϕn+1RT x ) =ϕn − ∆t ε F ′(ϕn), (4.2) where F ′(ϕn) is a matrix with entries F ′(ϕn ij). Notice that the time step has a lower bound ∆t > 2 5 h2 µ in Theorem 3.9 and an upper bound ∆ t ≤ ε max x∈[−β,β ] F ′′(x) in Lemma 4.1, thus we need an upper bound on the mesh size h < r 5 2 µε max x∈[−β,β ] F ′′(x) so that the time step interval is not empty. Combined with Theorem 3.9, we have: Theorem 4.1. The scheme (4.2) for homogeneous Dirichlet boundary condition satisfies the discrete maximum principle: min i,j ϕn ≤ ϕn+1 ij ≤ max i,j ϕn, J. SHEN AND X. ZHANG 1429 under the following convenient mesh and time step constraints: (1) h ≤ min    1 3 µ ∥u∥∞ , vuut 3µε max x∈[−β,β] F ′′(x)    , 3 h2 µ ≤ ∆t ≤ ε max x∈[−β,β] F ′′(x) . (2) h ≤ min   0.216 µ ∥u∥∞ , s µε max x∈[−β,β] F ′′(x)   , h2 µ ≤ ∆t ≤ ε max x∈[−β,β] F ′′(x) . Remark 4.1. As a comparison, for the second order scheme with IMEX time dis- cretization to satisfy the discrete maximum, there is no lower bound on the time step. By Theorem 3.5, we have the mesh constraints needed for second order scheme to be bound-preserving: h ≤ min2 µ ∥u∥∞ , ∆t ≤ ε max x∈[−β,β] F ′′(x) . Next, we consider the stabilized IMEX time discretization with the fourth order difference scheme with S ≥ 0: ϕn+1+∆tSϕn+1+un+1.∗(Ry¯ϕn+1DT1x)+vn+1.∗(D1y¯ϕn+1RTx)−µ(Ry¯ϕn+1DT2x+D2y¯ϕn+1RTx) =ϕn − ∆t ε F ′(ϕn)+ S∆tϕn. (4.3) Notice that the stabilized IMEX time discretization (1.4) can be written as ϕn+1 − ϕn f∆t + un+1ϕn+1 x + vn+1ϕn+1 y = µ∆ϕn+1 − F ′(ϕn) ε with f∆t = ∆t 1+∆tS . Replacing ∆t by f∆t in Theorem 4.1, we can easily get the result for the stabilized IMEX time discretization: Theorem 4.2. The scheme (4.3) with S ≥ 0 for homogeneous Dirichlet boundary condition satisfies the discrete maximum principle: min i,j ϕn ≤ ϕn+1 ij ≤ max i,j ϕn, under the following convenient mesh and time step constraints: (1) h ≤ min    1 3 µ ∥u∥∞ , vuut 3µε max x∈[−β,β] F ′′(x)    ,3 h2 µ ≤ ∆t 1+∆ tS ≤ ε max x∈[−β,β] F ′′(x); (2) h ≤ min   0.216 µ ∥u∥∞ , s µε max x∈[−β,β] F ′′(x)   , h2 µ ≤ ∆t 1+∆ tS ≤ ε max x∈[−β,β] F ′′(x) . 1430 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES Remark 4.2. As a comparison, for the spatially second order scheme with the stabilized IMEX time discretization to satisfy the discrete maximum, there is no lower bound on the time step, and by Theorem 3.5, the mesh constraints for this scheme to be bound-preserving are: h ≤ min2 µ ∥u∥∞ , 1 ∆t + S ≥ max x∈[−β,β] F ′′(x) ε . 5. Stream function vorticity formulation of 2D incompressible flow The results in Section 3 can also be used to construct a bound-preserving scheme for any passive convection-diffusion with an incompressible velocity field. As an example, we consider the two-dimensional incompressible Navier-Stokes equation in stream function vorticity form: ωt + uωx + vωy = µ∆ω ∆ψ = ω, (u,v) = (−ψy,ψ x) ω(x,y, 0) =ω0(x,y), (x,y) ∈ Ω, where ω is the vorticity, and ψ is the stream function. For simplicity, we only con- sider homogeneous Dirichlet boundary conditions, and extensions to periodic boundary conditions are straightforward. We consider a first order time discretization: ∆ψn+1 = ωn, (un+1,v n+1) = (−ψn+1 y ,ψ n+1 x ), ωn+1 − ωn ∆t + un+1ωn+1 x + vn+1ωn+1 y = µ∆ωn+1, with second order or fourth order finite difference spatial discretization as described in Section 2. When using the fourth order scheme for ω, the same fourth order scheme can also be used to solve the Poisson equation ∆ ψ = ω. See [13] for an efficient inversion of the discrete Laplacian via an eigenvector method. Once ψ is obtained from the Poisson equation, the velocity field can be computed by taking finite difference of ψ. However, for a fourth order scheme, the difference matrix D1 cannot be used because it is only a second order finite difference approximating first order derivatives. Instead, a conventional fourth order finite difference operator should be used to compute the numerical differentiation. Notice that the scheme for ω here is the same as (3.2). With Theorem 3.2, the fully discrete scheme with homogeneous Dirichlet boundary condition satisfies the discrete maximum principle min i,j ωn ≤ ωn+1 ij ≤ max i,j ωn, if the mesh size and time step constraints in Theorem 3.5, Theorem 3.8 and Theorem 3.9 are satisfied. 6. Numerical tests For implementation of the scheme, biconjugate gradient stabilized (BiCGSTAB) method is used for solving the linear system with variable coefficients at each time, with the discrete Laplacian as a preconditioner which can be efficiently inverted, see [13] for details. J. SHEN AND X. ZHANG 1431 6.1. Accuracy test. We first test accuracy for the generalized Allen-Cahn equation with F (ϕ) = 1 4(ϕ2 −1)2, parameters µ = 0.1 and ε = 0.05 and a given velocity field u = v = sin(y − x). A source term is added so that the exact solution is ϕ = (0.75+0 .25sin(t))sin ysin2 x. Homogeneous Dirichlet boundary conditions are used on the domain [0 ,2π] ×[0,2π]. In order to test the designed spatial accuracy, a third order accurate IMEX backward differentiation formula (BDF) time discretization is used: the nonlinear term is treated explicitly in time, and the convection diffusion terms are treated implicitly. Errors at T = 0.2 are listed in Table 6.1, in which we can observe the expected spatial order of accuracy. Finite Difference Grid second order scheme fourth order scheme l1 error order l∞ error order l1 error order l∞ error order 9×9 6.58E-2 - 2.38E-1 - 6.63E-2 - 2.66E-1 - 19×19 1.75E-2 1.91 8.80E-2 1.61 1.36E-2 2.28 5.23E-2 2.35 79×79 1.04E-3 2.02 4.75E-3 2.00 1.92E-5 4.85 1.21E-4 4.22 159×159 2.56E-4 2.02 1.19E-3 2.00 1.13E-6 4.09 7.15E-6 4.08 Table 6.1 . Accuracy test on uniform meshes for an Allen-Cahn equation. Third order IMEX BDF time discretization is used for time discretization. Next, we test accuracy of two schemes solving the stream function vorticity equa- tions of incompressible flow on the domain [0 ,2π] ×[0,2π] with periodic boundary con- ditions. An exact solution ω = −2e−2µtsinxsiny with µ = 0.1 is considered. In order to test the designed spatial accuracy, a third order accurate BDF time discretization is used. Errors at T = 0.2 are listed in Table 6.2, in which we can observe the expected spatial order of accuracy. Finite Difference Grid second order scheme fourth order scheme l1 error order l∞ error order l1 error order l∞ error order 40×40 4.82E-5 - 1.14E-4 - 5.69E-5 - 2.30E-4 - 80×80 1.34E-5 1.84 3.23E-5 1.81 3.67E-6 3.96 1.51E-5 3.93 160×160 3.78E-6 1.83 9.21E-6 1.81 2.27E-7 4.01 9.47E-7 4.00 320×320 9.64E-7 1.97 2.36E-6 1.96 1.41E-8 4.00 5.91E-8 4.00 Table 6.2. Accuracy test on uniform meshes for stream function vorticity equations with periodic boundary conditions. Third order BDF time discretization is used for time discretization. 6.2. The generalized Allen-Cahn equation. Next, we take a given velocity field u = v = sin(y − x) in (1.1) with a logarithmic energy function F (ϕ) = θ 2[(1+ ϕ)ln(1+ ϕ)+(1 − ϕ)ln(1 − ϕ)] − θc 2 ϕ2, and parameters, θ = 1, θc = 0.5, µ = 0.01 and ε = 0.03. The initial condition is ϕ0(x,y) = 0.99sin ysin2 x. The stability parameter S = 0 is used, i.e., the time discretization is first 1432 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES 0 2 4 60 1 2 3 4 5 6 -0.5 0 0.5 (a) Second order scheme with first or- der IMEX on a 239 ×239 grid 0 2 4 60 1 2 3 4 5 6 -0.5 0 0.5 (b) Fourth order scheme with first or- der IMEX on a 239 ×239 grid 0 2 4 60 1 2 3 4 5 6 -0.5 0 0.5 (c) Second order scheme with third order IMEX BDF on a 239 ×239 grid 0 2 4 60 1 2 3 4 5 6 -0.5 0 0.5 (d) Reference Solution Fig. 6.1 . Allen-Cahn with log energy at T = 1.8. The reference solution is generated by second order scheme with third order IMEX BDF time discretization on a 479 ×479 grid. 0 1 2 3 4 5 6 0 1 2 3 4 5 6 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 (a) Second order scheme with first or- der IMEX on a 239 ×239 grid 0 1 2 3 4 5 6 0 1 2 3 4 5 6 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 (b) Fourth order scheme with first or- der IMEX on a 239 ×239 grid 0 1 2 3 4 5 6 0 1 2 3 4 5 6 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 (c) Second order scheme with third order IMEX BDF on a 239 ×239 grid 0 1 2 3 4 5 6 0 1 2 3 4 5 6 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 (d) Reference Solution Fig. 6.2 . Allen-Cahn with polynomial energy at T = 2.2. The reference solution is generated by second order scheme with third order IMEX BDF time discretization on a 479 ×479 grid. J. SHEN AND X. ZHANG 1433 order IMEX method. See Figure 6.1 for performance of the schemes. We observe that the second order scheme with first order IMEX time discretization produces erroneous numerical artifacts on a relatively coarse 239×239 grid, and higher order time discretiza- tion does not help reducing such an error. On the other hand, the fourth order scheme with first order IMEX method produces a satisfying solution on the 239 ×239 grid. For both second order and fourth order schemes, the time step is taken as ∆ t = 1 7∆x, and iterations needed for convergence in BiCGSTAB are almost the same for two schemes in each time step, thus the computational cost of both second order and fourth order schemes is almost the same on the same grid. Therefore, the fourth order scheme is obviously superior. Next, we test a given velocity field u = v = sin(y − x) for (1.1) with a polynomial en- ergy function F (ϕ) = 1 4(ϕ2 −1)2, parameters µ = 0.01 and ε = 0.05. The initial condition is ϕ0(x,y) = 0.75sin ysin2 x. The stability parameter S = 0 is used, i.e., the time dis- cretization is first order IMEX method. See Figure 6.2 for performance of the schemes. We observe that the second order scheme with first order IMEX time discretization produces erroneous numerical artifacts on a relatively coarse 239 ×239 grid, and higher order time discretization does not help reducing such an error. On the other hand, the fourth order scheme with first order IMEX method produces a satisfying solution on the 239 ×239 grid. For both second order and fourth order schemes, the time step is taken as ∆t = 1 6∆x, and iterations needed for convergence in BiCGSTAB are almost the same for two schemes in each time step, thus the computational cost of both second order and fourth order schemes is almost the same on the same grid. Therefore, the fourth order scheme is obviously superior. 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (a) Second order difference scheme with first order IMEX on a 120×120 grid 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (b) Fourth order difference scheme with first order IMEX on a 120×120 grid 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (c) Second order difference scheme with third order IMEX BDF on a 120 ×120 grid 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (d) Reference Solution Fig. 6.3 . The 2D incompressible Navier-Stokes in vorticity form at T = 6 with µ = 0.001. The reference solution is generated by second order difference scheme with third order IMEX BDF time discretization on a 240 ×240 grid. 1434 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (a) Second order difference scheme with first order IMEX on a 120×120 grid 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (b) Fourth order difference scheme with first order IMEX on a 120×120 grid 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (c) Second order difference scheme with third order IMEX BDF on a 120 ×120 grid 1 2 3 4 5 6 1 2 3 4 5 6 -4 -3 -2 -1 0 1 2 3 4 (d) Reference Solution Fig. 6.4 . The 2D incompressible Navier-Stokes in vorticity form at T = 8 with µ = 0.001. The reference solution is generated by second order difference scheme with third order IMEX BDF time discretization on a 240 ×240 grid. 6.3. Incompressible flow: double shear layer. We test the same schemes for solving the incompressible Navier-Stokes system with µ = 0.001 consisting of a scalar convection-diffusion for vorticity and a Poisson equation for stream function, as de- scribed in Section 5. We consider the following initial condition with the periodic boundary conditions on [0 ,2π] ×[0,2π]: ω(x,y, 0) = ( δcosx − 1 ρ sech2 y− π 2 ρ , y ≤ π δcosx+ 1 ρ sech2 3π 2 −y ρ , y > π with ρ = π 15 and δ = 0.05. This is a classical test for 2D incompressible Navier Stokes in vorticity form. See Figure 6.3 and Figure 6.4 for the performance of the schemes. For both schemes, the time step is taken as ∆ t = 1 6∥u∥∞ ∆x and iterations needed for con- vergence in BiCGSTAB are almost the same, thus the computational cost is almost the same. Similar to observations for the Allen-Cahn equation, we can see that the second order scheme with first order IMEX time discretization produces erroneous numerical oscillations on a relatively coarse 120 ×120 grid, and higher order time discretization does not help reducing such an error. The fourth order scheme produces much better solutions on the 120 ×120 grid. 7. Concluding remarks In this paper we have proven the monotonicity of the finite difference implemen- tation of the Q2 spectral element method for a linear convection-diffusion operator with a given incompressible velocity field. Thanks to the monotonicity, we obtained a fourth order accurate finite difference spatial discretization satisfying the discrete max- J. SHEN AND X. ZHANG 1435 imum principle, and used it to construct bound-preserving schemes for the generalized Allen-Cahn equation. To the best of our knowledge, this is the first time that a high order spatial discretization with an IMEX discretization in time is proven to satisfy a discrete maximum principle for a linear convection-diffusion operator. We presented several numerical tests which showed superiority of higher order spatial accuracy com- pared to the most popular bound-preserving second order scheme. Even though we only discussed the monotonicity for the fourth order finite difference scheme solving the two- dimensional problem, it is straightforward to extend the discussion of monotonicity to a three-dimensional linear convection-diffusion problem with an incompressible velocity field. REFERENCES [1] S.M. Allen and J.W. Cahn, A microscopic theory for antiphase boundary motion and its appli- cation to antiphase domain coarsening , Acta Metall., 27(6):1085–1095, 1979. 1 [2] L.-Q. Chen, Phase-field models for microstructure evolution, Annu. Rev. Mater. Res., 32(1):113– 140, 2002. 1 [3] Z. Chen, H. Huang, and J. Yan, Third order maximum-principle-satisfying direct discontinuous Galerkin methods for time dependent convection diffusion equations on unstructured trian- gular meshes, J. Comput. Phys., 308:198–217, 2016. 1 [4] L.J. Cross and X. Zhang, On the monotonicity of high order discrete Laplacian , arXiv preprint, arXiv:2010.07282, 2020. 3.3 [5] Q. Du, L. Ju, X. Li, and Z. Qiao, Maximum principle preserving exponential time differencing schemes for the nonlocal Allen–Cahn equation , SIAM J. Numer. Anal., 57(2):875–898, 2019. 1 [6] Q. Du, L. Ju, X. Li, and Z. Qiao, Maximum bound principles for a class of semilinear parabolic equations and exponential time-differencing schemes , SIAM Rev., 63(2):317–359, 2021. 1 [7] S. Gottlieb, D.I. Ketcheson, and C.-W. Shu, High order strong stability preserving time discretiza- tions, J. Sci. Comput., 38(3):251–289, 2009. 1 [8] L. Guo, X. Li, and Y. Yang, Energy dissipative local discontinuous Galerkin methods for Keller- Segel chemotaxis model, J. Sci. Comput., 78:1387–1404, 2019. 1 [9] L. Ju, X. Li, Z. Qiao, and J. Yang, Maximum bound principle preserving integrating factor Runge– Kutta methods for semilinear parabolic equations , J. Comput. Phys., 439:110405, 2021. 1 [10] H. Li, D. Appel¨ o, and X. Zhang, Accuracy of spectral element method for wave, parabolic and Schr¨ odinger equations, SIAM J. Numer. Anal., 60(1):339–363, 2021. 1, 2.1, 2.1 [11] H. Li, S. Xie, and X. Zhang, A high order accurate bound-preserving compact finite difference scheme for scalar convection diffusion equations , SIAM J. Numer. Anal., 56(6):3308–3345, 2018. 1 [12] H. Li and X. Zhang, On the monotonicity and discrete maximum principle of the finite difference implementation of C0-Q2 finite element method, Numer. Math., 145:437–472, 2020. 1, 3.3 [13] H. Li and X. Zhang, Superconvergence of high order finite difference schemes based on variational formulation for elliptic equations , J. Sci. Comput., 82(2):36, 2020. 1, 2, 2.1, 2.1, 5, 6 [14] C. Liu and J. Shen, A phase field model for the mixture of two incompressible fluids and its approximation by a Fourier-spectral method, Phys. D, 179(3-4):211–228, 2003. 1 [15] J. Lorenz, Zur inversmonotonie diskreter probleme , Numer. Math., 27(2):227–238, 1977. 3.3, 3.3 [16] Y. Maday and E.M. Rønquist, Optimal error analysis of spectral methods with emphasis on non-constant coefficients and deformed geometries , Comput. Methods Appl. Mech. Eng., 80(1-3):91–115, 1990. 1 [17] R.J. Plemmons, M-matrix characterizations. I—nonsingular M-matrices , Linear Algebra Appl., 18(2):175–188, 1977. 3.2, 3.2 [18] C. Qiu, Q. Liu, and J. Yan, Third order positivity-preserving direct discontinuous Galerkin method with interface correction for chemotaxis Keller-Segel equations , J. Comput. Phys., 433:110191, 2021. 1 [19] J. Shen, T. Tang, and J. Yang, On the maximum principle preserving schemes for the generalized Allen–Cahn equation, Commun. Math. Sci., 14(6):1517–1534, 2016. 1, 1, 4 [20] S. Srinivasan, J. Poggie, and X. Zhang, A positivity-preserving high order discontinuous Galerkin scheme for convection–diffusion equations , J. Comput. Phys., 366:120–143, 2018. 1 [21] Z. Sun, J.A. Carrillo, and C.-W. Shu, A discontinuous Galerkin method for nonlinear parabolic equations and gradient flow problems with interaction potentials , J. Comput. Phys., 352:76– 1436 MAXIMUM PRINCIPLE OF HIGH ORDER SCHEMES 104, 2018. 1 [22] X. Yang, J.J. Feng, C. Liu, and J. Shen, Numerical simulations of jet pinching-off and drop formation using an energetic variational phase-field method , J. Comput. Phys., 218(1):417– 428, 2006. 1 [23] X. Zhang, Y. Liu, and C.-W. Shu, Maximum-principle-satisfying high order finite volume weighted essentially nonoscillatory schemes for convection-diffusion equations , SIAM J. Sci. Comput., 34(2):A627–A658, 2012. 1

采集于

查看校方原文 ↗