Abstract

In this paper, we first present the expression of a model of a fourth-order compact finite difference (CFD) scheme for the convection diffusion equation with variable convection coefficient. Then, we also obtain the fourth-order CFD schemes of the diffusion equation with variable diffusion coefficients. In addition, a fine description of the sixth-order CFD schemes is also developed for equations with constant coefficients, which is used to discuss certain partial differential equations (PDEs) with arbitrary dimensions. In this paper, various ways of numerical test calculations are prepared to evaluate performance of the fourth-order CFD and sixth-order CFD schemes, respectively, and the empirical results are proved to verify the effectiveness of the schemes in this paper.

1. Introduction

The standard strategy associated with generating higher order finite difference schemes to expand the stencil is proposed by Leonard [1]. The major disadvantage of these approaches is to widen the computational stencil with the increasing order of the approximation, leading to larger matrix bandwidths, which shall complicate the numerical analysis near the boundaries, while communication to implement on parallel computer architecture is raising demand. In consideration of the problems caused by noncompact finite difference methods, it is desirable to develop a class of schemes involving compact with high order.

In recent years, a great deal of efforts has been devoted to developing the designing schemes of CFD for solving various partial differential equations (see, e.g., [27]). A derivation of fourth-order and sixth-order compact difference schemes for the three dimensional Poisson equation is developed by Zhai and Feng [8] finite volume (FV) method, based on two different types of dual partitions. A new design of sixth-order compact finite-difference method with a nine-point stencil is developed by Nabavi et al. [9] to solve the Helmholtz equation in two-dimensional domain under the circumstance of Dirichlet and Neumann boundary. With the idea of the immersed interface method, third- and fourth-order compact finite difference schemes were proposed for solving the Helmholtz equations with discontinuous coefficient [10, 11]. It is worth noting that the advert of [12, 13] a new high-order finite difference discretization strategy, based on the Richardson extrapolation technique and an operator interpolation scheme, is explored to solve convection diffusion equations [14] which exploits an innovative adaptive scheme in terms of Adaptive Mesh Refinement (AMR) and Multigrid Algorithms to achieve a settlement of the fourth-order two-dimensional Poisson equation. In addition, a great number of studies reported by Bilbao and Hamilton [15] provides a two-step schemes (which operate over three time levels) of higher order accurate finite difference schemes applied for the wave equation in any number of spatial dimensions.

The main aim of the present work is to provide a general formulation and simple approach of higher order CFD schemes for steady elliptic diffusion and convection-diffusion problems in any dimension. The primary concern of this paper focuses on the following convection-diffusion equation with Dirichlet boundary conditions where is the velocity vector with dimension , the source term is known analytically throughout the domain , and is given on the boundary , is the Laplacian operator, and is the divergence operator.

Obviously, it is not difficult to derive the fourth-order compact finite difference scheme, especially for the case when is a constant vector. The scheme in response to simple procedure is introduced in Theorems 2 and 4 in the next section. The compact scheme of the sixth-order finite difference scheme for (1) with constant parameters will be completely described by Theorem 6 in Section 3.

The paper is organized as follows. In Section 2, the forth-order CFD schemes are derived for the convection-diffusion problems with variable convective coefficients in any dimension. Since then, two different fourth-order CFD schemes are linked to the consequent of steady elliptic diffusion equations with variable diffusive coefficients. The sixth-order CFD schemes are considered to be the solution of the convection-diffusion problems with constant convective coefficients in Section 3. The analysis consisted of two numerical examples is presented to verify the feasibility and high-order accuracy of the proposed methods in Section 4. This paper concludes with a discussion in Section 5.

2. Fourth-Order CFD Schemes for Convection-Diffusion Equations

2.1. Fourth-Order CFD Schemes for Convection-Diffusion Equations with Variable Convective Coefficients

Let be a uniform partition of with the step size . Moreover, we introduce the central difference approximations and as the first and second derivatives, respectively, by using the immediate neighbours. Denote by the value of at the nodes , and by the first order and second order central difference schemes, respectively, in the direction.

By using the Taylor expansion, the problem (1) can be approximated by where with

Remark 1. By neglecting in (4), we obtain the simplest CFD scheme, with a second order accuracy, for (1), given by which is a 5-point scheme in 2D and a 7-point one in 3D.

To obtain higher order CFD schemes, we will approximate the high order partial differential terms in (4) in a compact stencil.

Theorem 2. For defined in (5), we have where and denote the derivation of along the direction.

Proof. Differentiating both sides of (1) with respect to the -th direction gives

Differentiating both sides of (10) respect to the -th direction again and then using (10) gives

Therefore, adding (11) with each direction, we get where appeared in (8). By using the central difference schemes with , we can get (7), which completes the proof of Theorem 2.

From equations (3), (4), (5), and Theorem 2, a fourth-order compact difference scheme for approximating (1) is obtained, which can be represented as follows where and are defined in (9).

Remark 3. (i)If , the scheme (14) is no other than one suggested by Gupta et al. [16], and if , the scheme (14) is no other than the one suggested by Zhang [17].(ii)If is a constant vector, it is easy to simplify the fourth-order CFD scheme (14) by reducing the terms (15) as

2.2. Fourth-Order CFD Schemes for Diffusion Equations with Variable Diffusive Coefficients

Consider the -dimensional diffusion equation where the diffusive coefficient is a scalar function which is assumed to be positive. It can be rewritten as

Scheme I. By using the Taylor series expansion, the problem (17) can be approximated by is the same as (4) with different force terms, where

Theorem 4. For defined in (21), we have where

Proof. Differentiating both sides of (17) once and twice with respect to , respectively, gives

From (25), we can obtain the expression of , and then, substituting (25) into (26) to eliminate the term concluding gives the expression of . By the definition of , we have

By using the central difference schemes defined in (13), we can get (22),which completes the proof of Theorem 4.

From (19), (4), (21), and Theorem 4, a fourth-order compact difference scheme for approximating (17) is obtained by dropping off the higher order terms where and are defined by (23) and (24).

Scheme II. Now, we derive another fourth-order CFD scheme for approximating (17) based on the fourth-order CFD scheme for convection-diffusion equations discussed in Section 2.1. Since is positive, we can also rewrite (17) as the form

Let with , then (31) has the same form of (1). Substituting this into (14) and (15) and then using some direct calculations, a new fourth-order compact finite difference scheme is obtained as where

Remark 5. (i)In practice, we should approximate the factors related to and with the accuracy in (24), like and . All of these can be approximated by the corresponding central difference scheme to meet the requirement.(ii)To guarantee the accuracy of the schemes (28) and (32), we also need to approximate and with the fourth-order accuracy. For the purpose of this, the following approximation will be introduced.

3. Sixth-Order CFD Schemes for Convection-Diffusion Equations

In the previous section, we have obtained the fourth-order CFD scheme for (1). Especially for the case that is a constant vector, this scheme seems very simple. Actually, after some further analysis, we can make it achieve higher order accuracy.

3.1. Sixth-Order CFD Schemes for Diffusion Equations with Variable Convection Coefficients

This study will offer a fresh insight into the following Theorem 6 to show the sixth-order CFD scheme for (1). By using the Taylor expansion, the problem (1) can be approximated by (3), where with

Theorem 6. Let be defined by (36), then we have where with defined by (44), (59),(60), (65), (66), (71), (72), and (76) and defined by (45), (53), (61), (67), (73), and (77) below.

This study will offer the compact sixth-order finite difference scheme for (1) where and are defined in (39) by replacing the exact solution by the approximating solution and dropping off the remainder term .

To prove Theorem 6, we define as follows: and the following Lemmas 7-13 are needed.

Lemma 7. Let be defined in (37) and be defined in (42), then we have where

Proof. Differentiating both sides of (1) once and twice with respect to , respectively, gives which leads to

Using (47) and (48) to eliminate the terms and in (37) yields

Taking account of the centered difference approximations with , and noting the definition of given by (44), then we have

Therefore, the proof is completed when conditions (42) and (50) are satisfied.

Lemma 8. Let be defined by (38) and be defined by (42), then where

Proof. Differentiating both sides of (1) three times and four times with respect to , respectively, gives rise to

Using (54) and (55) to eliminate the terms and in (38) yields which finishes the proof.

Lemma 9. Let be defined by (36) and be defined by (42), and be defined by (44), (45), and (53) then

Proof. The proof can be easily done by putting Lemma 7, Lemma 8., and the definition of together.

Now, we need to represent the terms by using compact finite difference approximations.

Lemma 10. Let be defined by (42), then where

Proof. Substituting (47) into (48) yields

Multiplying both sides of the above equation by and then summing them over , we can rewrite defined in (42) as the form

Therefore, the expected result can be easily obtained by replacing the central difference approximations (13) in (63).

Lemma 11. Let be defined by (42),then we have where

Proof. Differentiating both sides of (1) with respect to yields

Multiplying both sides of the above equation by yields

By using the centered difference approximations (13), we can obtain the results.

Lemma 12. Let and be defined in (42), then we have where

Proof. By using the definitions of and in (42), we have By using the centered difference approximations (13), we can obtain the results.

Lemma 13. Let and be defined in (42), then we have where

Proof. Differentiating both sides of (1) twice with respect to and then twice with respect to , and then summing them over and gives which can be rewritten as

By using the definition of and defined in (42), we have

By using the centered difference approximations (13),we can obtain the results.

Proof of Theorem 6. The proof can be easily done by putting Lemmas 913 and the definition of in (40) together.

3.2. Sixth-Order CFD Schemes for Diffusion Equations with Constant Convective Coefficients

It should be noted that the sixth-order CFD scheme given in (41) is valid for any dimension. For simplicity, we write down here the most commonly used schemes for (1), i.e., for 2 and 3 dimensions, in a concise way. (i)If , the terms including the summation symbol in , i.e., and , vanish. Therefore, the sixth-order CFD scheme can be described as where and appeared in (40).(ii)If , all of the exist, and the sixth-order CFD scheme can be described aswhere the forms of are the same as that defined in (82), except in this case and where but they are different from each other.

4. Numerical Results

The CFD schemes derived in Section 2.1 for 2D and 3D convection-diffusion equations are discussed in literature [16, 17], respectively, and the corresponding numerical results have been completed to established. Hence, two examples in this filed are shown to validate the accuracy of the CFD schemes proposed in Section 2.2 and Section 3.2.

Example 14. In this example, the diffusive coefficient is regarded as and then, the forcing function and the Dirichlet boundary conditions are prescribed to satisfy the exact solution . To exhibit the numerical results, we denote two schemes as (i)Scheme I: (28) with coefficients (30)(ii)Scheme II: (32) with coefficients (34)As the computation of the coefficients, we take the following two cases: (i)Case 1: coefficients (30) and (34) computed analytically(ii)Case 2: coefficients (30) and (34) computed by the approximation introduced in Remark 3.

The information relevant to maximum errors and convergence rates are listed in Tables 1 and 2 for 2D and 3D problems, severally.

From these tables, it offers a brief result that both two schemes are published in almost the same errors with a fourth-order convergence rate. Although the errors in essence were affected by the ways of computing the coefficients, the consequence of convergence rate still remains .

Example 15. An example to validate the accuracy of the CFD schemes is proposed in Section 3.2, considering the convection-diffusion equation, constant convection vector coefficients is regarded as , where is -dimensional vector with all unit elements. The forcing function and the Dirichlet boundary conditions are prescribed to satisfy the exact solution . is a representative of the constant conducted to reflect the ratio of the convection to diffusion and simulate the Reynolds number.

For the different , the refinement of the mesh size is undertaken to observe the convergence rate. The maximum errors and the convergence rate of 2D and 3D problems are listed as in Tables 3 and 4 and in Figure 1, clearly.

It has become apparent that is not very large leading to the rapid decrease of errors with the refinement of the mesh size and a sixth-order convergence rate. But with the increase of , the computed accuracy is reversely affected. For the large , only a second-order convergence rate can be achieved. It is expected that the deterioration of computed accuracy is attributed to a reason of the convection-dominated equation (1), and when the increases to be infinite, it approximates a first-order hyperbolic equation.

5. Conclusions

Compact finite-difference (CFD) schemes seem to be simple and powerful ways contributing to a deeper understanding of high accuracy and low computational cost. Compared with the traditional explicit finite-difference schemes of the same-order, the effects of compact schemes are significantly more accurate with the benefit of smaller stencil sizes. In the experimented present work, the fourth-order CFD schemes generate fresh insight into a general formulation of convection-diffusion equations with variable convective coefficients and elliptic diffusion equations with variable diffusive coefficients in any dimension. When the convective coefficients are constants, the sixth-order CFD schemes provide an important opportunity to solve convection-diffusion problems. Numerical results of preliminary work show the efficiency of the proposed CFD schemes. A significant analysis and discussion on similar approaches may be extended to elliptic diffusion problems with positive diffusive tensor in any dimension and are under investigation.

Data Availability

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that there are no conflicts of interests regarding the publication of this paper.

Acknowledgments

The first author acknowledges financial support from the Wuhan Business University Doctoral Foundation under Grant 2019KB003.