# High-Order Compact Difference Scheme and Multigrid Method for Solving the 2D Elliptic Problems

Authors: Yan Wang; Yongbin Ge
Journal: Mathematical Problems in Engineering
 (2018)

---

## Abstract

A high-order compact difference scheme for solving the two-dimensional (2D) elliptic problems is proposed by including compact approximations to the leading truncation error terms of the central difference scheme. A multigrid method is employed to overcome the difficulties caused by conventional iterative methods when they are used to solve the linear algebraic system arising from the high-order compact scheme. Numerical experiments are conducted to test the accuracy and efficiency of the present method. The computed results indicate that the present scheme achieves the fourth-order accuracy and the effect of the multigrid method for accelerating the convergence speed is significant.


---

## Body

## 1. Introduction

In this paper, we consider the 2D elliptic equation with a mixed derivative term in the form of(1)-ε∂2u∂x2+∂2u∂y2+βx,y∂2u∂x∂y+px,y∂u∂x+qx,y∂u∂y+rx,yu=fx,y,where ε is a constant, the coefficients β(x,y),p(x,y),q(x,y),r(x,y), and forcing function f(x,y), and the solution u(x,y) are assumed to be continuously differentiable and have the required partial derivatives on the computational domain.While elliptic equations are a kind of basic partial equations, it is of great importance to study their accurate, stable, and efficient numerical methods. In the past decades, high-order compact difference methods for solving the elliptic equations have attracted increasing interests [1–23]. In [3], Gupta et al. derived a fourth-order compact finite difference approximation for the 2D convection-diffusion equation. Then, they extended the method to the 2D elliptic equation without mixed derivative term [4]. Karaa extended Gupta et al.’s work in [4] to the 2D elliptic and parabolic problems with mixed derivatives [5]. The basic idea of their methods lies in utilizing the Taylor expansions by 2D power series of all the functions involved in the differential equation at the reference grid point (i,j), substituting these expansions into the original equation and comparing the coefficients of xiyj to get the linear constraints on the unknown coefficients. Additionally, high-order compact difference schemes for the Poisson equations can be found in [6–10], for the convection-diffusion equations in [11–17], and for some practical problems that have boundary layers or local singularities in the computational domain in [14–17]. The Richardson extrapolation technique and the operator interpolation scheme were utilized to solve the 2D and 3D convection-diffusion equations in [18, 19] and the sixth-order accurate numerical solutions are achieved. Fourth-order difference schemes on hexagonal grids and rotated grids for solving the 2D convection-diffusion equation were proposed in [20, 21].It needs to solve large linear algebraic systems arising from the discretization of partial differential equations by finite element or finite difference, etc. As for the limitations of the computer storage space and the effect of the rounding error, it is difficult to achieve satisfactory solutions for these large linear algebraic systems by using direct methods like Gauss elimination methods. Therefore, iterative methods such as Jacobi method, Gauss-Seidel method, or Successive Overrelaxation (SOR) method become common approaches for solving large linear algebraic systems. However, the convergence speed of the traditional iterative methods is slow. In order to obtain a fast convergence, the various convergence accelerating techniques have been proposed, such as biconjugate gradient stabilized method (BiCGStab) [24], preconditioned iterative method [25], and multigrid method [26]. Since Brant published his pioneering work [26], multigrid method has been widely used in numerical solutions of various kinds of differential equations discretized by finite difference methods [14, 17, 23, 27–39] and finite element methods [40–43]. It has been proved a high efficient and effective iterative method for solving linear elliptic problems. Multigrid method combined with high-order compact difference schemes for solving the Poisson equations and the convection-diffusion equations can be found in [14, 23, 31–39]. In this paper, we will employ it to solve the elliptic equation (1) discretized by the novel high-order compact difference scheme.We are aiming at developing a fourth-order compact difference scheme and multigrid method for solving the 2D elliptic equation (1). The reminder of this paper is organized as follows. In Section 2, a fourth-order compact difference scheme for the 2D elliptic equation (1) is proposed by including compact approximations to the leading truncation error terms of the central difference scheme. In Section 3, a multigrid method is presented. Section 4 displays the numerical results to demonstrate the accuracy and efficiency of the present method. Finally, a brief conclusion is given in Section 5.


## 2. Fourth-Order Compact Difference Scheme

We consider a square domain0≤x,y≤1, and divide the interval [0,1] into subintervals by grid points 0=x0<x1<x2<⋯<xN-1<xN=1, and 0=y0<y1<y2<⋯<yN-1<yN=1. The length of subintervals is given by h=1/N in the both x- and y-directions, and N is the number of subintervals. The finite difference approximation of (1) is derived on a square mesh cell with the grid point (i,j) and its eight adjoining neighbors (i+1,j),(i,j+1),(i-1,j),(i,j-1),(i+1,j+1), (i-1,j+1),(i-1,j-1), and (i+1,j-1).The values of u(x,y) at the nine points are denoted by uij, ui+1,j, ui,j+1, ui-1,j, ui,j-1, ui+1,j+1, ui-1,j+1, ui-1,j-1, and ui+1,j-1,respectively.The pointsui+1,j and ui-1,j can be expanded in Taylor series at the grid point (i,j) as follows:(2)ui+1,j=uij+h∂u∂xij+h22!∂2u∂x2ij+h33!∂3u∂x3ij+h44!∂4u∂x4ij+h55!∂5u∂x5ij+Oh6,(3)ui-1,j=uij-h∂u∂xij+h22!∂2u∂x2ij-h33!∂3u∂x3ij+h44!∂4u∂x4ij-h55!∂5u∂x5ij+Oh6.From (2) and (3), we can get(4)∂u∂xij=ui+1,j-ui-1,j2h-h26∂3u∂x3ij+Oh4,(5)∂2u∂x2ij=ui+1,j-2uij+ui-1,jh2-h212∂4u∂x4ij+Oh4.Thus the first- and second-order central difference operators in the x-direction can be defined as(6)δxuij=ui+1,j-ui-1,j2h,δx2uij=ui+1,j-2uij+ui-1,jh2.With the similar derivations, the first- and second-order central difference operators in the y-direction can be defined as(7)δyuij=ui,j+1-ui,j-12h,δy2uij=ui,j+1-2uij+ui,j-1h2.Thus, (4) and (5) can be written in the form of(8)∂u∂xij=δxuij-h26∂3u∂x3ij+Oh4,(9)∂2u∂x2ij=δx2uij-h212∂4u∂x4ij+Oh4.Similarly,(10)∂u∂yij=δyuij-h26∂3u∂y3ij+Oh4,(11)∂2u∂y2ij=δy2uij-h212∂4u∂y4ij+Oh4,(12)∂2u∂x∂yij=δxδyuij-h26∂4u∂x3∂yij-h26∂4u∂x∂y3ij+Oh4.Substituting (8)-(12) into (1), we can obtain the following scheme:(13)-εδx2-εδy2+βijδxδy+pijδx+qijδy+rijuij+τij=fij,where τij is the truncation error and can be written as (14)τij=H1∂3u∂x3ij+K1∂3u∂y3ij+H2∂4u∂x4ij+K2∂4u∂y4ij+H3∂4u∂x∂y3ij+K3∂4u∂x3∂yij+Oh4,in which(15)H1=-h26pij,K1=-h26qij,H2=K2=εh212,H3=K3=-h26βij.If τij is ignored in (13), the central difference scheme (CDS) is obtained: (16)-εδx2-εδy2+βijδxδy+pijδx+qijδy+rijuij=fij.Obviously, the truncation error is O(h2). In order to get a compact fourth-order accurate discretization, the third- and the fourth-order derivatives in the truncation error given by (14) may be discretized. Therefore, by differentiating (1) with respect to x and y, respectively, we get(17)∂3u∂x3=-∂3u∂x∂y2+1ε∂β∂x∂2u∂x∂y+βx,y∂3u∂x2∂y+∂p∂x∂u∂x+px,y∂2u∂x2+∂q∂x∂u∂y+qx,y∂2u∂x∂y+ux,y∂r∂x+rx,y∂u∂x-∂f∂x,(18)∂3u∂y3=-∂3u∂x2∂y+1ε∂β∂y∂2u∂x∂y+βx,y∂3u∂x∂y2+∂p∂y∂u∂x+px,y∂2u∂x∂y+∂q∂y∂u∂y+qx,y∂2u∂y2+ux,y∂r∂y+rx,y∂u∂y-∂f∂y.Differentiating (17) and (18) again with respect to x and y, respectively, we obtain(19)∂4u∂x4=-∂4u∂x2∂y2+1ε∂2β∂x2∂2u∂x∂y+2∂β∂x∂3u∂x2∂y+βx,y∂4u∂x3∂y+∂2p∂x2∂u∂x+2∂p∂x∂2u∂x2+px,y∂3u∂x3+∂2q∂x2∂u∂y+2∂q∂x∂2u∂x∂y+qx,y∂3u∂x2∂y+2∂r∂x∂u∂x+ux,y∂2r∂x2+rx,y∂2u∂x2-∂2f∂x2=-∂4u∂x2∂y2+1εβx,y∂4u∂x3∂y+1ε∂2β∂x2+2∂q∂x+1εpx,y∂β∂x+1εpx,yqx,y∂2u∂x∂y+1ε2∂β∂x+qx,y+1εpx,yβx,y∂3u∂x2∂y+1ε∂2p∂x2+2∂r∂x+1εpx,y∂p∂x+1εpx,yrx,y∂u∂x-1εpx,y∂3u∂x∂y2+1ε2∂p∂x+rx,y+1εp2x,y∂2u∂x2+1ε∂2q∂x2+1εpx,y∂q∂x∂u∂y+1ε∂2r∂x2+1εpx,y∂r∂xux,y-1ε∂2f∂x2+1εpx,y∂f∂x,(20)∂4u∂y4=-∂4u∂x2∂y2+1ε∂2β∂y2∂2u∂x∂y+2∂β∂y∂3u∂x∂y2+βx,y∂4u∂x∂y3+∂2p∂y2∂u∂x+2∂p∂y∂2u∂x∂y+px,y∂3u∂x∂y2+∂2q∂y2∂u∂y+2∂q∂y∂2u∂y2+qx,y∂3u∂y3+2∂r∂y∂u∂y+ux,y∂2r∂y2+rx,y∂2u∂y2-∂2f∂y2=-∂4u∂x2∂y2+1εβx,y∂4u∂x∂y3+1ε∂2β∂y2+2∂p∂y+1εqx,y∂β∂y+1εpx,yqx,y∂2u∂x∂y+1ε2∂β∂y+px,y+1εqx,yβx,y∂3u∂x∂y2+1ε∂2q∂y2+2∂r∂y+1εqx,y∂q∂y+1εqx,yrx,y∂u∂y-1εqx,y∂3u∂x2∂y+1ε2∂q∂y+rx,y+1εq2x,y∂2u∂y2+1ε∂2p∂y2+1εqx,y∂p∂y∂u∂x+1ε∂2r∂y2+1εqx,y∂r∂yux,y-1ε∂2f∂y2+1εqx,y∂f∂y.Differentiating (17) with respect toy and rearranging it, this results in(21)∂4u∂x3∂y+∂4u∂x∂y3=1εβx,y∂4u∂x2∂y2+1ε∂2β∂x∂y+∂p∂x+∂q∂y+rx,y∂2u∂x∂y+1ε∂β∂y+px,y∂3u∂x2∂y+1ε∂β∂x+qx,y∂3u∂x∂y2+1ε∂2p∂x∂y+∂r∂y∂u∂x+1ε∂2q∂x∂y+∂r∂x∂u∂y+1ε∂p∂y∂2u∂x2+1ε∂q∂x∂2u∂y+1ε∂2r∂x∂yux,y-1ε∂2f∂x∂y.We notice that all the derivatives in the right hand of (17)-(21) can be discretized compactly with the central difference operators. Substituting (17)-(21) into (14), the truncation error τij can be written as (22)τij=R1δx2+R2δy2+R3δxδy+R4δx+R5δy+R6δxδy2+R7δx2δy-R8δx2δy2+R9uij-1εH1+1εH2pijδx+K1+1εK2qijδy+H2δx2+K2δy2-h212βijδxδyfij+Oh4,where(23)R1=1εH1pij+H22δxpij+rij+1εpij2-h212βijδypij,R2=1εK1qij+K22δyqij+rij+1εqij2-h212βijδxqij,R3=1εH1δxβij+qij+K1δyβij+pij+H2δx2βij+2δxqij+1εpijδxβij+1εpijqij+K2δy2βij+2δypij+1εqijδyβij+1εpijqij-h212βijδxδyβij+δxpij+δyqij+rij,R4=1εH1δxpij+rij+K1δypij+H2δx2pij+2δxrij+1εpijδxpij+1εpijrij+K2δy2pij+1εqijδypij-h212βijδxδypij+δyrij,R5=1εK1δyqij+rij+H1δxqij+K2δy2qij+2δyrij+1εqijδyqij+1εqijrij+H2δx2qij+1εpijδxqij-h212βijδxδyqij+δxrij,R6=-H1+1εK1βij-1εH2pij+1εK22δyβij+pij+1εqijβij-h212εβijδxβij+qij,R7=-K1+1εH1βij-1εK2qij+1εH22δxβij+qij+1εpijβij-h212εβijδyβij+pij,R8=H2+K2+h212εβij2,R9=1εH1δxrij+K1δyrij+H2δx2rij+1εpijδxrij+K2δy2rij+1εqijδyrij-h212βijδxδyrij.Combining (13) and (22), we get(24)-ε+R1δx2+-ε+R2δy2+βij+R3δxδy+pij+R4δx+qij+R5δy+R6δxδy2+R7δx2δy-R8δx2δy2+rij+R9uij=1+1εH1+1εH2pijδx+1εK1+1εK2qijδy+1εH2δx2+1εK2δy2-h212εβijδxδyfij+Oh4.Using the definitions of the first- and second-order central difference operators δx,δy,δx2, and δy2 above and the other difference operators as follows:(25)δxδyuij=14h2ui+1,j+1-ui-1,j+1+ui-1,j-1-ui+1,j-1,δxδy2uij=12h3ui+1,j+1-ui-1,j+1-2ui+1,j+2ui-1,j+ui+1,j-1-ui-1,j-1,δx2δyuij=12h3ui+1,j+1+ui-1,j+1-2ui,j+1+2ui,j-1-ui+1,j-1-ui-1,j-1,δx2δy2uij=1h44ui,j-2ui+1,j-2ui,j+1-2ui-1,j-2ui,j-1+ui+1,j+1+ui-1,j+1+ui-1,j-1+ui+1,j-1,substituting them into (24), dropping off the high-order truncation error term O(h4), and rearranging it, finally we can derive a fourth-order compact (FOC) difference scheme for solving (1), written out explicitly as(26)A0uij+A1ui+1,j+A2ui,j+1+A3ui-1,j+A4ui,j-1+A5ui+1,j+1+A6ui-1,j+1+A7ui-1,j-1+A8ui+1,j-1=F0,where the coefficients are given by (27)A0=-2h2-ε+R1-2h2-ε+R2-4h4R8+rij+R9,A1=1h2-ε+R1+12hpij+R4-1h3R6+2h4R8,A2=1h2-ε+R2+12hqij+R5-1h3R7+2h4R8,A3=1h2-ε+R1-12hpij+R4+1h3R6+2h4R8,A4=1h2-ε+R2-12hqij+R5+1h3R7+2h4R8,A5=14h2βij+R3+12h3R6+R7-1h4R8,A6=-14h2βij+R3-12h3R6-R7-1h4R8,A7=14h2βij+R3-12h3R6+R7-1h4R8,A8=-14h2βij+R3+12h3R6-R7-1h4R8,F0=1+1εH1+1εH2pijδx+1εK1+1εK2qijδy+1εH2δx2+1εK2δy2-h212εβijδxδyfij.From the process of the derivation, it is easy to know the scheme has fourth-order accuracy. We also point out that if letting ε=-1 and r(x,y)≡0, it reduces to the fourth-order compact scheme for the elliptic equation in [5], which was derived by Karaa by a different way. Since nine points are used for both the present scheme and the scheme in [5], the structure of both matrix equations is the same. The difference is that the expressions of R1-R9 are different. If letting all ri,j≡0 and ε=-1 in R1-R9, then the present matrix (26) reduces to the matrix equation in [5]. Furthermore, if letting ε=-1, β(x,y)≡0 and r(x,y)≡0, it reduces to the fourth-order compact scheme proposed by Gupta et al. [3] for solving the 2D convection-diffusion equation.


## 3. Multigrid Method

Multigrid method is one of the fastest and most efficient iterative methods for solving linear algebraic systems arising from the discretization of the elliptic differential equations. The main characteristics of multigrid method are to solve error equation (also called residual equation) by using conventional relaxation methods on each coarse grid level until the error is convergent and then return the error correction results to fine grid by means of interpolation method. Multigrid method can be implemented through its cycle algorithm. A simple multigrid V-cycle process includes the following three steps: (1) smooth the error by using a relaxation method (such as Gauss-Seidel or Jacobi methods, etc.); (2) project the residuals to the coarse grid and solve an approximation to the error equation on the coarse grid; (3) return the error correction results to the fine grid and finally add them to the approximation. Ifv1 relaxation sweeps are performed at each grid level before projecting the residuals to the coarse grid space (presmoothing sweeps), and v2 relaxation sweeps are performed after interpolating the coarse grid correction back to the fine grid space (post-smoothing sweeps), it is called a multigrid V (v1,v2) cycle algorithm.Projection, interpolation, and relaxation operators are three important factors in multigrid method and only when they are suitably chosen and match with each other well, the multigrid method can get convergent results with the least computational cost [44]. The commonly used residual projection operator is the direct injection or the full weighting. The injection operator is the cheapest projection operator, but it is not accurate. The full weighting operator evaluates the residuals at all the nearest nine points in a square stencil at the reference point and then projects a weighted average value to the coarse grid, so it is more accurate than the direct injection operator is. The full weighting projection operator on equal-mesh size-discretization grids [44] is used in this paper:(28)r-i-,j-=1164ri,j+2ri-1,j+ri,j-1+ri+1,j+ri,j+1+ri-1,j-1+ri+1,j-1+ri+1,j+1+ri-1,j+1.For interpolation operator, the bilinear interpolation operator on equal-mesh size-discretization grids [44] is used: (29)ri,j=r-i-,j-,ri-1,j=12r-i--1,j-+r-i-,j-,ri,j-1=12r-i-,j--1+r-i-,j-,ri-1,j-1=14r-i--1,j-+r-i-,j-+r-i--1,j--1+r-i-,j--1.Here ri,j is the residual at the fine grid points (i,j) and r-i-,j- is the corresponding residual at coarse grid points (i-,j-).Relaxation operator (the smoother) plays an important role in the multigrid method. Its role is not to remove the errors, but to dump the high frequency components of the errors on the current grid while leaving the low frequency components to be removed by the coarser grids. The point Gauss-Seidel relaxation in lexicographical ordering, in red-black ordering, in four-coloring, the line Gauss-Seidel relaxation, and the alternating line Gauss-Seidel relaxation are very popular in relaxation operators. In [45], Fourier analyses are conducted for the point Gauss-Seidel relaxation, the line Gauss-Seidel relaxation, and the alternating line Gauss-Seidel relaxation. It showed that the point Gauss-Seidel relaxation and line Gauss-Seidel relaxation may be good smoothers for small Reynolds number problems and the alternating line Gauss-Seidel relaxation is a robust smoother for all Reynolds number problems of the convection-diffusion equations discretized by the fourth-order compact scheme. So, in this paper, we prefer to use the alternating line Gauss-Seidel relaxation to remove the residuals on each coarse grid.


## 4. Numerical Tests

In order to verify the high-order accuracy and high efficiency of the present method, we compute the following three elliptic problems with exact solutions on the square domain of0≤x,y≤1. For comparison, numerical results computed by the central difference scheme are also examined. The forcing function f(x,y) and the Dirichlet boundary conditions are chosen to satisfy the given exact solution u(x,y). Re is referred to as the Reynolds number and changed between 1 and 106. Computer programs are coded in Fortran 77 programming language and run in double precision on P4/2.8G dual-core personal computer with 2GB memory. All computations begin with zero guesses and are terminated when the error residuals in L2-norm on the finest grid are reduced by a factor of 1010.The maximum absolute error (Error) and convergence rate (Rate) are defined as(30)Error=maxui,j-comput-ui,j-exact,and (31)Rate=log⁡Error2h/Errorhlog⁡2.Here Error(2h) and Error(h) are maximum absolute errors on the grids with the mesh size of 2h and h, respectively.(32)Problem1ε=-1βx,y=1-x1-yex+ypx,y=-Re⁡yy-11-2yqx,y=-Re⁡xx-11-2xrx,y=xyx2+y2ux,y=e-x-0.52-y2Problem2ε=-1βx,y=cos⁡3πysin⁡πxpx,y=-Re2y-11-x2qx,y=2Re⁡xyy-1rx,y=x+yexyux,y=sin⁡πx+cos⁡3πy+exyProblem3ε=1βx,y=x+ycos⁡πysin⁡πxpx,y=Re⁡x1-yqx,y=Re⁡y1-xrx,y=x-yex-yux,y=xy1-x1-yex+yFor comparison, Tables1–3 show the maximum absolute error and convergence rate computed by the central difference scheme and the fourth-order compact difference scheme with different h at Re=100 for Problems 1–3, respectively. Since Re is moderate, multigrid V(1,1) cycle is used. Number of multigrid V(1,1) iterations (Num) and correspondingly CPU time are also reported in Tables 1–3. From the results, we note that both schemes seem to maintain their typical accuracy orders, while the fourth-order compact scheme yields much better solution than the central difference scheme. The results reveal that the fourth-order compact difference scheme on coarse grid can achieve equivalent accuracy to the central difference scheme on fine grid. For instance, in Tables 1–3, the maximum absolute errors computed by the fourth-order compact difference scheme with h=1/32 are approximately equal to that of the central difference scheme with h=1/256. Additionally, comparing the numbers of multigrid V(1,1) iterations and CPU time of the two schemes, we find that the numbers of multigrid V(1,1) iterations of the two schemes are almost equal for each mesh size h, though the CPU time of the fourth-order compact difference scheme with the multigrid method is a little bigger than that of the central difference scheme with the multigrid method. However, if we consider a certain accuracy, e.g., maximum absolute error is around 1.18 × 10−5 for Problem 3, fine grid (h=1/256) is needed, and the CPU time is 1.047 seconds for the central difference scheme while just coarse grid (h=1/32) is needed and the CPU time is just 0.032 seconds for the fourth-order compact difference scheme. Similar comparison can be made for other data to reach similar conclusions.Table 1
Maximum absolute error and convergence rate of the CDS and the FOC scheme with Re=100 for Problem 1.
h CDS FOC Num CPU Error Rate Num CPU Error Rate 1/8 6 0.000 2.57(-3)  7 0.000 3.69(-4) 1/16 8 0.000 6.41(-4) 2.00 8 0.000 2.31(-5) 4.00 1/32 10 0.032 1.61(-4) 1.99 9 0.047 1.43(-6) 4.01 1/64 11 0.140 4.03(-5) 2.00 9 0.156 8.94(-8) 4.00 1/128 11 0.360 1.01(-5) 2.00 9 0.406 5.60(-9) 4.00 1/256 10 1.203 2.52(-6) 2.00 9 1.422 3.50(-10) 4.00 Note: 2.57(-3) = 2.57 × 10−3, etc.Table 2
Maximum absolute error and convergence rate of the CDS and the FOC scheme with Re=100 for Problem 2.
h CDS FOC Num CPU Error Rate Num CPU Error Rate 1/8 8 0.000 5.59(-1)  6 0.000 1.35(-1) 1/16 10 0.000 1.07(-1) 2.39 8 0.016 8.77(-3) 3.94 1/32 10 0.031 2.43(-2) 2.14 8 0.047 5.52(-4) 3.99 1/64 9 0.125 6.05(-3) 2.01 9 0.172 3.46(-5) 4.00 1/128 10 0.328 1.51(-3) 2.00 9 0.390 2.16(-6) 4.00 1/256 9 1.078 3.78(-4) 2.00 9 1.391 1.35(-7) 4.00Table 3
Maximum absolute error and convergence rate of the CDS and the FOC scheme with Re=100 for Problem 3.
h CDS FOC Num CPU Error Rate Num CPU Error Rate 1/8 11 0.000 1.62(-2)  5 0.000 2.90(-3) 1/16 9 0.015 3.32(-3) 2.29 7 0.016 1.77(-4) 4.03 1/32 7 0.031 7.58(-4) 2.13 8 0.032 1.08(-5) 4.03 1/64 8 0.109 1.89(-4) 2.00 8 0.156 6.76(-7) 4.00 1/128 8 0.282 4.72(-5) 2.00 9 0.375 4.22(-8) 4.00 1/256 9 1.047 1.18(-5) 2.00 9 1.375 2.64(-9) 4.00By computation, we find multigrid V(1,1) cycle with both schemes cannot converge for large Re number (Re≥105) for these three problems. Therefore, for comparisons under the same circumstance, we use multigrid V(2,2) cycle to compute all Re numbers changed from 1 to 106. Tables 4–6 give the comparison of number of multigrid V(2,2) iterations and CPU time of the central difference scheme and the fourth-order compact difference scheme for Problems 1–3 with different h and Re numbers, respectively. The numerical results show that the multigrid method with the fourth-order compact difference scheme is more stable than that with the central difference scheme. It always converges with all h and Re numbers computed. However, it diverges with the central difference scheme when Re≥103. The results also reveal that the number of multigrid V(2,2) iterations with the two schemes for each h and Re is close when Re≤103, but it increases with the increase of Re when Re≥104 for the fourth-order compact difference scheme. Generally speaking, the effect is quite significant by using multigrid method combined with the fourth-order compact difference scheme for accelerating the speed of iteration convergence.Table 4
Number of multigrid V(2,2) iterations and CPU time of the CDS and the FOC scheme for Problem 1.
Re h=1/64 h=1/128 h=1/256 CDS FOC CDS FOC CDS FOC Num CPU Num CPU Num CPU Num CPU Num CPU Num CPU 1 9 0.17 7 0.18 9 0.42 7 0.45 9 1.56 7 1.61 10 9 0.17 7 0.17 9 0.42 7 0.43 9 1.56 7 1.59 102 8 0.15 8 0.17 8 0.39 8 0.48 8 1.42 7 1.61 103 - - 9 0.18 - - 8 0.48 - - 8 1.77 104 - - 22 0.28 - - 24 1.03 - - 20 3.56 105 - - 136 1.14 - - 115 4.11 - - 103 15.98 106 - - 177 1.45 - - 583 19.94 - - 955 134.2 Note: - indicates divergence, etc.Table 5
Number of multigrid V(2,2) iterations and CPU time of the CDS and the FOC scheme for Problem 2.
Re h=1/64 h=1/128 h=1/256 CDS FOC CDS FOC CDS FOC Num CPU Num CPU Num CPU Num CPU Num CPU Num CPU 1 7 0.17 7 0.17 7 0.34 7 0.43 7 1.23 7 1.59 10 8 0.15 7 0.18 7 0.34 7 0.43 7 1.25 7 1.59 102 7 0.15 7 0.18 8 0.37 7 0.45 8 1.375 7 1.58 103 - - 6 0.17 - - 8 0.46 - - 8 1.73 104 - - 42 0.43 - - 32 1.29 - - 24 4.13 105 - - 349 2.75 - - 364 12.53 - - 232 35.23 106 - - 403 3.17 - - 1402 47.70 - - 3423 514.1Table 6
Number of multigrid V(2,2) iterations and CPU time of the CDS and the FOC scheme for Problem 3.
Re h=1/64 h=1/128 h=1/256 CDS FOC CDS FOC CDS FOC Num CPU Num CPU Num CPU Num CPU Num CPU Num CPU 1 8 0.16 7 0.17 9 0.41 7 0.45 9 1.50 7 1.59 10 8 0.16 7 0.17 8 0.38 7 0.44 8 1.36 7 1.56 102 6 0.14 7 0.17 6 0.32 7 0.42 6 1.06 7 1.55 103 - - 5 0.16 - - 6 0.41 - - 7 1.56 104 - - 39 0.44 - - 27 1.11 - - 16 2.92 105 - - 296 2.39 - - 416 14.31 - - 205 31.22 106 - - 325 2.56 - - 1096 37.34 - - 2949 456.2WhenRe≥103, the central difference scheme diverges, so we just report maximum absolute error computed by the fourth-order compact difference scheme with h=1/64, 1/128, and 1/256 for Problems 1–3 in Tables 7–9, respectively. Figures 1–3 describe the maximum absolute errors of the present scheme changes with the Reynolds number (Re) for the three problems, respectively. The mesh size is set to be h=1/64. The results show that the magnitude of Re affects the computed accuracy of the discretization scheme inversely. The present scheme yields inaccuracy solution when the convection is dominant. For all test problems, the fourth-order compact scheme seems to maintain fourth-order accuracy when Re≤104. However it fails to achieve its optimal accuracy order when Re≥105. It becomes typically second- to third-order accuracy for Re≥105. The reason is the truncation error of this scheme is O(Re2h4); i.e., when Re number becomes large, the coefficient of accuracy order O(h4) also becomes large, it lowers the accuracy of the scheme. This fact is consistent with the conclusions of the 2D convection-diffusion problems studied in [25, 33].Table 7
Maximum absolute error and convergence rate of the FOC scheme for different Re for Problem 1.
Re Error(h=1/64) Error(h=1/128) Rate Error(h=1/256) Rate 1 0 3 2.41(-6) 1.51(-7) 4.00 9.43(-9) 4.00 1 0 4 3.29(-5) 2.26(-6) 3.86 1.45(-7) 3.96 1 0 5 1.33(-4) 1.89(-5) 2.82 1.67(-6) 3.50 1 0 6 1.56(-4) 4.32(-5) 1.85 8.94(-6) 2.27Table 8
Maximum absolute error and convergence rate of the FOC scheme for different Re for Problem 2.
Re Error(h=1/64) Error(h=1/128) Rate Error(h=1/256) Rate 1 0 3 4.42(-4) 2.80(-5) 3.98 1.75(-6) 4.00 1 0 4 4.07(-3) 2.74(-4) 3.89 1.76(-5) 3.96 1 0 5 1.24(-2) 2.23(-3) 2.48 1.64(-4) 3.77 1 0 6 1.12(-2) 3.49(-3) 1.68 9.41(-4) 1.89Table 9
Maximum absolute error and convergence rate of the FOC scheme for different Re for Problem 3.
Re Error(h=1/64) Error(h=1/128) Rate Error(h=1/256) Rate 1 0 3 1.61(-5) 1.01(-6) 3.99 6.28(-8) 4.01 1 0 4 2.11(-4) 1.32(-5) 4.00 8.24(-7) 4.00 1 0 5 4.44(-4) 1.05(-4) 2.08 9.14(-6) 3.52 1 0 6 4.28(-4) 1.28(-4) 1.74 3.61(-5) 1.83Figure 1
Maximum absolute error of the FOC scheme for different Re, Problem 1.Figure 2
Maximum absolute error of the FOC scheme for different Re, Problem 2.Figure 3
Maximum absolute error of the FOC scheme for different Re, Problem 3.


## 5. Conclusion

In this paper, a fourth-order compact finite difference scheme has been developed for solving the 2D elliptic boundary value problems by including compact approximations to the leading truncation error terms of the central difference scheme. A multigrid method is employed to overcome the difficulties caused by traditional iterative methods when they are used to solve the linear algebraic system arising from the fourth-order compact difference scheme. Finally, numerical experiments are carried out to test the accuracy of the present scheme and the efficiency of the multigrid method. It showed that the fourth-order compact scheme with the multigrid method is very robust and efficient in solving this kind of elliptic problems.



---

*Source: 7831731-2018-06-11.xml*