Next Article in Journal
New Two-Level Time-Mesh Difference Scheme for the Symmetric Regularized Long Wave Equation
Previous Article in Journal
Assessment of the Water Distribution Networks in the Kingdom of Saudi Arabia: A Mathematical Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

High-Effectiveness and -Accuracy Difference Scheme Based on Nonuniform Grids for Solving Convection–Diffusion Equations with Boundary Layers

1
School of Mathematics and Statistics, Ningxia University, Yinchuan 750021, China
2
School of Science, Dalian Minzu University, Dalian 116600, China
*
Author to whom correspondence should be addressed.
Axioms 2023, 12(11), 1056; https://doi.org/10.3390/axioms12111056
Submission received: 17 October 2023 / Revised: 7 November 2023 / Accepted: 13 November 2023 / Published: 16 November 2023

Abstract

:
In this paper, some rational high-accuracy compact finite difference schemes on nonuniform grids (NRHOC) are introduced for solving convection–diffusion equations. The derived NRHOC schemes not only can suppress the oscillatory property of numerical solutions but can also obtain a high-accuracy approximate solution, and they can effectively solve the convection–diffusion problem with boundary layers by flexibly adjusting the discrete grid, which can be obtained with the singularity in the computational region. Three numerical experiments with boundary layers are conducted to verify the accuracy of the proposed NRHOC schemes. We compare the computed results with the analytical solutions, the results of the rational high-accuracy compact finite difference schemes on uniform grids (RHOC), and the other schemes in the literature. For all test problems, good computed results are obtained with the presented NRHOC schemes. It is shown that the presented NRHOC schemes have a better resolution for the solution of convection-dominated problems.

1. Introduction

The Navier–Stokes equations are very difficult to solve due to their highly nonlinear nature, and in particular, approximate solutions are required to have high accuracy. The convection–diffusion equation is a linearized model of the Navier–Stokes equations, and the study of its high-precision values can help develop algorithms for solving Navier–Stokes equations with high accuracy. At the same time, the convection–diffusion equation itself has a wide range of applications in certain fields of physics, chemistry, biology, environment, finance, biology, etc. [1,2,3]. Therefore, the study of high-precision numerical solutions to convection–diffusion equations is very important and has some academic research value. Researchers have developed various higher-accuracy, compact finite difference methods to solve kinds of convection–diffusion problems [4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24].
For the 1D (one-dimensional) convection–diffusion equation
ε u x x + c x u x = f x
the fourth-order high-accuracy compact finite difference scheme (referred to as FOC scheme) obtained by Spotz [7] using the original equation and truncation error correction method is
ε 1 + c 2 h 2 12 ε 2 δ x 2 u i + c δ x u i = 1 c h 2 12 ε δ x + h 2 12 δ x 2 f i
This scheme gives theoretical fourth-order accuracy when solving problems with smooth solutions in the computational region, but when the computational region contains boundary layers or singularities, the computational error of this scheme on coarse grids is large and does not achieve theoretical fourth-order accuracy. If the boundary-layer problem is to be solved with high accuracy, the mesh must be divided finely enough. Too fine grids result in huge computational cost, are memory-consuming, and greatly reduce computational efficiency. From the derivation process, it is not difficult to find that the FOC scheme is a strongly differential scheme. As the mesh Reynolds number, P e ( P e = c h / ε ) , increases, the dissipation error increases rapidly, thus greatly reducing the resolution of the difference scheme. As we know, in numerical simulation, the resolution of the difference scheme is a key factor affecting the numerical accuracy and reliability of the numerical results. To reduce dissipation errors and improve computational accuracy, we have modified the FOC scheme to obtain a rational fourth-order compact difference scheme on a uniform grid (see Appendix A).
α δ x 2 u i + c δ x u i = f i + c 1 f x i + c 2 f x x i
where the coefficients are
α = ε 1 + c 2 h 2 6 ε 2 1 + c 2 h 2 12 ε 2 , C 1 = h 12 c h ε 1 + c 2 h 2 12 ε 2 , C 2 = h 2 12 1 + c 2 h 2 6 ε 2 1 + c 2 h 2 12 ε 2
For both the FOC scheme and the modified rational scheme in (3), Fourier error analysis reveals that the dissipation error is significantly reduced for the modified scheme for larger grid Reynolds numbers, but the error is still larger at medium and high wavelengths (see Appendix B). By monitoring the calculation process of specific examples, it is easy to see that if the computational grid is not sufficiently subdivided, there are no computational nodes or not enough computational nodes are distributed near and inside the boundary layer, which results in large computational errors in places with large gradient changes. Therefore, a more feasible and reasonable approach to improving the calculation accuracy of boundary-layer attachments is to distribute more calculation nodes in the area with large gradients or boundary layers, while fewer calculation nodes are distributed in the area with a small gradient or relatively gentle changes in physical quantities. This not only can consider the stability of the algorithm and the accuracy of the calculation results but can also reduce the calculation amount, which requires nonuniform mesh generation in the calculation area and that the calculation be carried out on a nonuniform grid. The main methods currently available to solve this type of problem are local grid refinement methods [25,26], mesh adaptive algorithms [27], coordinate transformation techniques [28,29,30], transform-free, nonuniform, grid-based direct discretization methods [31,32,33,34], and other new methods [35,36,37,38].
A fourth-order compact difference scheme for solving the two-dimensional convection–diffusion equation was first proposed by Gupta [4] using the original equation and the truncation error correction method. However, the difference scheme is a strongly dissipative scheme that performs poorly in solving large-gradient or boundary-layer problems. Kalita et al. [31] extended this fourth-order compact difference scheme to a nonuniform grid and developed a polynomial compact difference scheme on nonuniform grids, which improved the solution accuracy of some boundary-layer problems but did not completely improve the strong dissipation of the difference scheme. In this paper, we obtain fourth-order rational compact difference schemes based on nonuniform grids for 1D and 2D convection–diffusion equations using the ideas of the construction of modified differential Equation (3).
The remainder of this study is arranged into four sections as follows.
Section 2 develops NRHOC difference schemes for 1D convection–diffusion equations.
Section 3 constructs NRHOC difference schemes for 2D convection–diffusion equations.
Section 4 carries out numerical experiments to verify the feasibility of the presented NRHOC finite difference schemes.
Section 5 concludes the work of the paper.

2. RHOC Scheme on Nonuniform Grids (NRHOC Scheme) for 1D Convection–Diffusion Equations

Let us consider the following 1D convection–diffusion equation:
ε u x x + c x u x = f , a < x < b u a = ϕ x , u b = ψ x
where ε is constant, with ε > 0 , and is the diffusion coefficient; c ( x ) is the convection coefficient; f ( x ) is called the source term; u ( x ) is the unknown quantity to be computed. Suppose that c ( x ) , f ( x ) , and u ( x ) are all sufficiently smooth functions of x.

2.1. NRHOC Scheme for 1D Constant-Coefficient Convection–Diffusion Equations

If c ( x ) is a constant, Equation (5) is
ε u x x + c u x = f x
First, the solution interval [ a , b ] is subdivided arbitrarily into N sub-intervals, and the inserted computational nodes are a = x 0 < x 1 < x 2 < < x N = b in order. We define the step lengths of the left and right sides of node x i as h L = x i x i 1 and h R = x i + 1 x i , i = 0 , 1 , 2 , , N , respectively.
Assuming that solution u is smooth enough in the computational region, the approximate formula for calculating the first- and second-order derivatives at node x i is derived using Taylor’s formula as
u x i = δ x u i χ 1 3 u x 3 i χ 2 4 u x 4 i + O η
2 u x 2 i = δ x 2 u i χ 3 3 u x 3 i χ 4 4 u x 4 i + O ω
where
χ 1 = h L h R 6 , χ 2 = h L h R h R h L 24 , χ 3 = h R h L 3 , χ 4 = h R 2 h L h R + h L 2 12
η = h L h R h R 2 h L h R + h L 2 , ω = h R h L h R 2 + h L 2 60
δ x u i = h L 2 u i + 1 + h R 2 h L 2 u i h R 2 u i 1 h L h R h L + h R
δ x 2 u i = 2 h L u i + 1 h R + h L u i + h R u i 1 h L h R h L + h R
where δ x u i and δ x 2 u i are the second-order central difference operators on nonuniform grids, respectively.
By substituting (7) and (8) in (6), we yield the following equation:
ε δ 2 x u i + c i δ x u i + ε χ 3 c χ 1 3 u x 3 i + ε χ 4 c χ 2 4 u x 4 i + o η + o ( ω ) = f i
The derivative function is calculated directly from Equation (6), and using the original equation gives
u x x x = c ε u x x 1 ε f x
u x x x x = c 3 ε 3 u x c 2 ε 3 f c ε 2 f x 1 ε f x x
And by substituting this in (13), we obtain
ε δ 2 x u i + c i δ x u i + c 2 ε χ 1 + c χ 3 u x x i + c 3 ε 2 χ 4 c 4 ε 3 χ 2 u x i + o η + o ( ω ) = 1 c 3 ε 3 χ 2 + c 2 ε 2 χ 4 f i + χ 3 c ε χ 1 + c ε χ 4 c 2 ε 2 χ 2 f x i + χ 4 c ε χ 2 f x x i
By substituting (7) and (8) in (14), we obtain
ε 1 + c 2 ε 2 χ 1 c ε χ 3 δ 2 x u i + c i 1 c 3 ε 3 χ 2 + c 2 ε 2 χ 4 δ x u i + κ 1 u x x x i + o η + o ( ω ) = 1 c 3 ε 3 χ 2 + c 2 ε 2 χ 4 f i + χ 3 c ε χ 1 + c ε χ 4 c 2 ε 2 χ 2 5 f x i + χ 4 c ε χ 2 f x x i
where
η 1 = c 3 ε 2 χ 4 c 4 ε 3 χ 2 η , ω 1 = c 2 ε χ 1 + c χ 3 ω κ 1 = χ 3 c 2 ε χ 1 + c χ 3 χ 1 c 3 ε 2 χ 4 c 4 ε 3 χ 2
By replacing u x x x in (15) with u x x x = c ε u x x 1 ε f x and omitting the high-order terms, we obtain
ε 1 + c 2 ε 2 χ 1 c ε χ 3 δ x 2 u i + c 1 c 3 ε 3 χ 2 + c 2 ε 2 χ 4 δ x u i + κ 1 + κ ε u x x x x i + o η 1 + ω 1 = 1 c 3 ε 3 χ 2 + c 2 ε 2 χ 4 f i + χ 3 c ε χ 1 + c ε χ 4 c 2 ε 2 χ 2 f x i + χ 4 c ε χ 2 κ f x x i
Then, the NRHOC difference scheme of constant-coefficient convection–diffusion Equation (6) is yielded.
α δ x 2 u i + c i δ x u i = f i + c 1 f x i + c 2 f x x i
where
α = ε 1 + c 2 ε 2 χ 1 c ε χ 3 1 + c 3 ε 3 χ 2 + c 2 ε 2 χ 4 , c 1 = ε c ε χ 1 c 2 ε 2 χ 2 + χ 3 + c ε χ 4 1 c 3 ε 3 χ 2 + c 2 ε 2 χ 4 , c 2 = χ 4 c ε χ 2 κ 1 c 1 c 3 ε 3 χ 2 + c 2 ε 2 χ 4
κ = χ 3 c ε χ 1 + χ 3 χ 1 c 2 ε 2 χ 4 c 3 ε 3 χ 2 χ 1 = h L h R 6 , χ 2 = h L h R h R h L 24 , χ 3 = h R h L 3 , χ 4 = h R 2 h L h R + h L 2 12

2.2. NRHOC Scheme for 1D Variable-Coefficient Convection–Diffusion Equations

In this subsection, the RHOC scheme for model Equation (5) will be derived based on difference scheme (17). Suppose that model Equation (5) has the following difference scheme:
α i δ x 2 u i + c i δ x u i = f i + c 1 i f x i + c 2 i f x x i
Using Taylor’s formula and the original equation (Equation (5)), the modified differential equation of difference scheme (19) can be derived as
ε u x x + c u x = f + 2 c 2 c x u x x + ( c 1 c x + c 2 c x x ) u x + O η + ω
where η = h L h R h R 2 h L h R + h L 2 , ω = h R h L h R 2 + h L 2 60 .
To obtain the higher-order difference scheme of the original equation (Equation (5)), its modified differential equation is obtained using residual correction:
B u x x + D ( x ) u x = f x
where
B = ε 2 c 2 c x , D ( x ) = c + c 1 c x + c 2 c x x
By applying (17) to (21), we obtain the NRHOC scheme for one-dimensional variable-coefficient convection–diffusion Equation (5) as follows:
Λ i δ x 2 u i + D i δ x u i = f i + C 1 i f x i + C 2 i f x x i
where the coefficients are
Λ i = B i 1 + D i 2 B 2 i χ 1 D i B i χ 3 1 D i 3 B i 3 χ 2 + D i 2 B i 2 χ 4 , D 1 i = D i B i χ 1 D i 2 B i 2 χ 2 + χ 3 + D i B i χ 4 1 D i 3 B i 3 χ 2 + D i 2 B i 2 χ 4 , D 2 i = χ 4 D i B i χ 2 K 1 i D i 1 D i 3 B i 3 χ 2 + D i 2 B i 2 χ 4 , K 1 i = χ 3 D i 2 B i χ 1 + c χ 3 χ 1 D i 3 B i 2 χ 4 D i 4 B i 3 χ 2 , B i = ε 2 c 2 i c x i , D i = c i + c 1 i c x i + c 2 i c x x i ,
c 1 i = c i ε χ 1 c i 2 ε 2 χ 2 + χ 3 + c i ε χ 4 1 c i 3 ε 3 χ 2 + c i 2 ε 2 χ 4 , c 2 i = χ 4 c i ε χ 2 K 1 i ε 1 1 + c i 3 ε 3 χ 2 + c i 2 ε 2 χ 4 , χ 1 = h L h R 6 , χ 2 = h L h R h R h L 24 , χ 3 = h R h L 3 , χ 4 = h R 2 h L h R + h L 2 12 .
Difference Equation (23) is the rational compact difference scheme on nonuniform grids of model Equation (5). In particular, if h L = h R , the difference equation is degenerated into difference Equation (A13) on the grid.

3. NRHOC Scheme for 2D Convection–Diffusion Equations

Let us consider the following 2D convection–diffusion equation:
ε 1 u x x ε 2 u y y + c x , y u x + d x , y u y = f x , y , a < x < b , c < y < d u a , y = ϕ 1 y , u b , y = ϕ 2 y u x , c = ψ 1 x , u x , d = ψ 2 x
where ε 1 , ε 2 are constant and ε 1 > 0 , ε 2 > 0 , c , d , and f are smooth enough functions of variables x and y. It is a linearized model equation of a two-dimensional, steady, incompressible Navier–Stokes equation.
First, the constant-coefficient problem is considered; then, the NRHOC scheme of Equation (25) with variable coefficients can be obtained by modifying the difference equation.

3.1. NRHOC Scheme for 2D Constant-Coefficient Convection–Diffusion Equations

Let us consider the following two-dimensional convection–diffusion equation with constant coefficients:
ε 1 u x x ε 2 u y y + c u x + d u y = f ( x , y )
We rewrite Equation (26) into the following equivalent equations:
ε 1 u x x + c u x = f 1 ( x , y ) ε 2 u y y + d u y = f 2 ( x , y )
where
f 1 ( x , y ) = f ( x , y ) + ε 2 u y y d u y f 2 ( x , y ) = f ( x , y ) + ε 2 u x x c u x
Applying difference scheme (17) to (27) and (28) yields
α 1 δ x 2 u i j + c δ x u i j = F 1 i j α 2 δ y 2 u i j + d δ y u i j = F 2 i j
where
F 1 i j = f 1 i j + c 1 f 1 x i j + c 2 f 1 x x i j F 2 i j = f 2 i j + d 1 f 2 y i j + d 2 f 2 y y i j
We use Equation (28) to calculate the derivative and substitute it into (29); then, the two obtained equations are added together to obtain the NRHOC scheme of two-dimensional constant-coefficient model Equation (26) as follows:
α x δ x 2 α y δ y 2 + c δ x + d δ y + E δ x 2 δ y 2 + G δ x 2 δ y + H δ y 2 δ x + R δ x δ y u i j = F i j
where
α x = ε 1 1 + c 2 ε 1 2 χ 1 c ε 1 χ 3 1 c 3 ε 1 3 χ 2 + c 2 ε 1 2 χ 4 , α y = ε 2 1 + d 2 ε 2 2 χ 1 d ε 2 χ 3 1 d 3 ε 2 3 χ 2 + d 2 ε 2 2 χ 4 c 1 = c ε 1 χ 1 c 2 ε 1 2 χ 2 + χ 3 + c ε 1 χ 4 1 c 3 ε 1 3 χ 2 + c 2 ε 1 2 χ 4 , c 2 = χ 4 c ε 1 χ 2 κ 1 c 1 c 3 ε 1 3 χ 2 + c 2 ε 1 2 χ 4 d 1 = d ε 2 χ 1 d 2 ε 2 2 χ 2 + χ 3 + d ε 2 χ 4 1 d 3 ε 2 3 χ 2 + d 2 ε 2 2 χ 4 , d 2 = χ 4 d ε 2 χ 2 κ 2 d 1 d 3 ε 2 3 χ 2 + d 2 ε 2 2 χ 4
E = c 2 ε 2 d 2 ε 1 , G = c 2 d d 1 ε 1 , H = d 2 c c 1 ε 2 , R = c 1 d + d 1 c κ 1 = χ 3 c 2 ε 1 χ 1 + c χ 3 χ 1 c 3 ε 1 2 χ 4 c 4 ε 1 3 χ 2 κ 2 = χ 3 d 2 ε 2 χ 1 + d χ 3 χ 1 d 3 ε 2 2 χ 4 d 4 ε 2 3 χ 2 F i , j = 1 + c 1 δ x + c 2 δ x 2 + d 1 δ y + d 2 δ y 2 f i , j

3.2. NRHOC Scheme for 2D Variable-Coefficient Convection–Diffusion Equations

Assume that model Equation (25) has a difference scheme at point x i , y j like (31):
α x i j δ x 2 α y i j δ y 2 + c δ x + d δ y + E δ x 2 δ y 2 + G δ x 2 δ y + H δ y 2 δ x + R δ x δ y u i j = F i j
where the coefficients are
α x i j = ε 1 1 + c i j 2 ε 1 2 χ 1 c i j ε 1 χ 3 1 c 3 ε 1 3 χ 2 + c 2 ε 1 2 χ 4 , α y i j = ε 2 1 + d i j 2 ε 2 2 χ 1 d i j ε 2 χ 3 1 d 3 ε 2 3 χ 2 + d 2 ε 2 2 χ 4 , c 1 i j = c i j ε 1 χ 1 c i j 2 ε 1 2 χ 2 + χ 3 + c i j ε 1 χ 4 1 c i j 3 ε 1 3 χ 2 + c i j 2 ε 1 2 χ 4 , c 2 i j = χ 4 c i j ε 1 χ 2 κ 1 i j c i j 1 c i j 3 ε 1 3 χ 2 + c i j 2 ε 1 2 χ 4 d 1 i j = d i j ε 2 χ 1 d i j 2 ε 2 2 χ 2 + χ 3 + d i j ε 2 χ 4 1 d i j 3 ε 2 3 χ 2 + d i j 2 ε 2 2 χ 4 , d 2 = χ 4 d i j ε 2 χ 2 κ 2 i j d i j 1 d i j 3 ε 2 3 χ 2 + d i j 2 ε 2 2 χ 4
E i j = c 2 i j ε 2 d 2 i j ε 1 , G i j = c 2 i j d i j d 1 i j ε 1 H i j = d 2 i j c i j c 1 i j ε 2 , R i j = c 1 i j d i j + d 1 i j c i j κ 1 i j = χ 3 c i j 2 ε 1 χ 1 + c i j χ 3 χ 1 c i j 3 ε 1 2 χ 4 c i j 4 ε 1 3 χ 2 κ 2 i j = χ 3 d i j 2 ε 2 χ 1 + d i j χ 3 χ 1 d i j 3 ε 2 2 χ 4 d i j 4 ε 2 3 χ 2 F i j = 1 + c 1 i j δ x + c 2 i j δ x 2 + d 1 i j δ y + d 2 i j δ y 2 f i j
Difference Equation (33) is expanded using Taylor’s formula to obtain the corresponding modified differential equation as follows:
a u x x b u y y + c ( x , y ) u x + d ( x , y ) u y ( 2 c 2 d x + 2 d 2 c y ) u x y 2 c 2 c x u x x 2 d 2 d y u y y ( c 1 c x + c 2 c x x + d 1 c y + d 2 c y y ) u x ( c 1 d x + c 2 d x x + d 1 d y + d 2 d y y ) u y = f ( x , y ) + o ( η + ω )
where η = h L h R h R 2 h L h R + h L 2 , ω = h R h L h R 2 + h L 2 60 .
To obtain the difference scheme with higher-order accuracy, adding the term
[ ( 2 c 2 d x + 2 d 2 c y ) u x y + 2 c 2 c x u x x + 2 d 2 d y u y y + ( c 1 c x + c 2 c x x + d 1 c y + d 2 c y y ) u x + ( c 1 d x + c 2 d x x + d 1 d y + d 2 d y y ) u y ]
to Equation (25) yields its modified differential equation,
A u x x B u y y + C ( x , y ) u x + D ( x , y ) u y = F ( x , y )
where
A = ε 1 2 c 2 c x , C = c + c 1 c x + c 2 c x x + d 1 c y + d 2 c y y B = ε 2 2 d 2 d y , D = d + c 1 d x + c 2 d x x + d 1 d y + d 2 d y y F = f 2 c 2 d x + 2 d 2 c y u x y
Then, we apply (31) to (36), and the NRHOC scheme of two dimensional variable-coefficient convection–diffusion model Equation (25) is obtained as follows:
Λ x i j δ x 2 Λ y i j δ y 2 + C i j δ x + D i j δ y + E i j δ x 2 δ y 2 + G i j δ x 2 δ y + H i j δ y 2 δ x + R i j δ x δ y u i j = 1 + C 1 i j δ x + C 2 i j δ x 2 + D 1 i j δ y + D 2 i j δ y 2 F i j
where the coefficients are
Λ x i j = A i j 1 + C i j 2 A i j 2 χ 1 C i j A i j χ 3 1 C i j 3 A i j 3 χ 2 + C i j 2 A i j 2 χ 4 , Λ y i j = B i j 1 + D i j 2 B i j 2 χ 1 D i j B i j χ 3 1 D i j 3 B i j 3 χ 2 + D i j 2 B i j 2 χ 4 , C 1 i j = C i j A i j χ 1 C i j 2 A i j 2 χ 2 + χ 3 + C i j A i j χ 4 1 C i j 3 A i j 3 χ 2 + C i j 2 A 2 χ 4 , C 2 i j = χ 4 C i j A i j χ 2 κ 1 i j C i j 1 C i j 3 A i j 3 χ 2 + C i j 2 A i j 2 χ 4 D 1 i j = D i j B i j χ 1 D i j 2 B i j 2 χ 2 + χ 3 + D i j B i j χ 4 1 D i j 3 B i j 3 χ 2 + D i j 2 B i j 2 χ 4 , D 2 i = χ 4 D i j B i j χ 2 κ 2 i j D i j 1 D i j 3 B i j 3 χ 2 + D i j 2 B i j 2 χ 4
E i j = C 2 i j Λ y i j D 2 i j Λ x i j , G i j = C 2 i j D i j D 1 i j Λ x i j , H i j = D 2 i j C i j C 1 i j Λ y i j , R i j = C 1 i j D i j + D 1 i j C i j + 2 c 2 i j d x i j + d 2 i j c y i j κ 1 i j = χ 3 C i j 2 Λ x i j χ 1 + C i j χ 3 χ 1 C i j 3 Λ x i j 2 χ 4 C i j 4 Λ x i j 3 χ 2 κ 2 i j = χ 3 D i j 2 Λ y i j χ 1 + D i j χ 3 χ 1 D i j 3 Λ y i j 2 χ 4 D i j 4 Λ y i j 3 χ 2
In particular, difference Equation (38) is the RHOC difference scheme on uniform grids of model Equation (25) when and only when h L = h R .

4. Numerical Examples

In this section, we select several cases to further verify the high accuracy and validity of the NRHOC schemes and compare the results with those in the literature. For the one-dimensional linear problem, the Thomas algorithm is used to solve a system of tridiagonal linear equations directly. For one-dimensional nonlinear problems and two-dimensional problems, we use the BiCGSTab(2) iterative method [39] to solve the discrete algebraic equations. The iterative process takes zero initial value and terminates when the condition
u n + 2 u n 2 10 14
is satisfied.
Above, n is the iteration number. The convergence order is calculated as
R a t e = log ( err ( N 1 ) err ( N 1 ) err ( N 2 ) err ( N 2 ) ) log ( N 2 N 2 N 1 ) N 1 )
where E( N 1 ) and E( N 2 ) are the maximum absolute errors calculated for two different grids N 1 and N 2 .
For the one-dimensional problem, it is assumed that the defined interval to be solved is X min , X max , while the two-dimensional problem is the square region X min , X max × Y min , Y max . We use the following grid generation function to obtain the computing grid nodes:
x i = X min + i X max X min N x + λ x π sin π · i X max X min N x
y j = Y min + j Y max Y min N y + λ y π sin π · j Y max Y min N y
where N x and N y are the numbers of sub-intervals along the x-direction and y-direction. λ x and λ y are the scaling parameters that control the density of grid points in the x-direction and y-direction, respectively. When 1 λ x , λ y < 0 , the computational nodes on the obtained nonuniform grid are dense near the left or lower boundary points of the interval; when 0 < λ x , λ y 1 , the computational nodes on the obtained nonuniform grid are dense near the right or upper boundary. The larger the absolute values of λ x or λ y , the more grid points are concentrated in the area that needs to be dense, and vice versa.
When the grid-stretching parameter is equal to 0, the corresponding computational grid is a uniform grid. To represent uniformity, in the following numerical experiments, we use RHOC to represent the rational higher-order compact difference scheme on a unform grid.
Example 1. 
ε u x x + 1 1 + x u x = f ( x ) , 0 < ε 1 , 0 < x < 1 .
For this equation, the boundary conditions are u ( 0 ) = 1 + 2 1 1 ε ε , u ( 1 ) = e + 2 . The exact solution is u ( x ) = e x + 2 1 1 ε ε ( 1 + x ) 1 + 1 1 ε ε . f ( x ) is determined by the exact solution, When ε is small, the solution to the equation has a boundary layer at x = 1 . Table 1 shows that both the FOC scheme and the NRHOC scheme are stable and effective when ε = 1 , 10 2 , but when ε = 10 3 and ε = 10 5 , the error of the FOC scheme is large and no longer decreases as the number of grids increases, while the NRHOC scheme can obtain very exact solutions with appropriate values of grid parameters and can reach the theoretical fourth order. From Figure 1 and Figure 2, it is seen that the NRHOC scheme has obvious advantages over the FOC scheme in terms of computational accuracy and resolution.
Example 2. 
ε u x x + u u x = f ( x ) , 0 < ε 1 , 0 < x < 1 .
The exact solution is u ( x ) = e x + e ( x 1 ) ( 1 + ε ) ε , and the boundary conditions and source item f ( x ) are given by the exact solution. When ε is small, the solution has a boundary layer at x = 1 . We calculated the solution for parameter ε = 10 1 , 10 2 , 10 3 , 10 4 , 10 5 using three difference schemes, FOC [7], RHOC, and NRHOC. As shown in Table 2, when ε = 10 1 , 10 2 , the computational accuracy of all schemes can reach the theoretical fourth-order accuracy, but when ε = 10 3 , 10 4 , 10 5 , the computational errors of the FOC scheme and the RHOC scheme are large, while the NRHOC scheme can still obtain the fourth-order accuracy solution with appropriate values of the grid-scaling parameters.
Figure 3 and Figure 4 give a comparison of the computed and exact solutions, and the error distribution over the computational region using the three difference schemes when ε = 10 3 and ε = 10 5 , respectively. As shown in Figure 3 and Figure 4, the computational solutions obtained with the FOC scheme and the RHOC scheme all produce nonphysical oscillations near x = 1 , while the NRHOC scheme matches well with the exact solution because there are enough computational nodes distributed in the boundary layer.
Example 3. 
( u x x + u y y ) + Re u x = 0 , 0 x , y 1 .
The exact solution is
u ( x , y ) = e Re x 2 sin ( π y ) [ 2 e Re x 2 sinh ( σ x ) + sinh σ ( 1 x ) ] sinh ( σ x ) σ = π 2 + Re 2 / 4
The boundary conditions are determined by the exact solution. When the Reynolds number ( R e ) is large, The solution to this equation has a boundary layer at x = 0 . We calculated the solutions for Reynolds numbers R e = 1 , 10 , 100 , 1000 , 5000 , 7500 using the NRHOC scheme and the HOC scheme [31]. Table 3 lists the computational error and convergence order when different values of R e are taken. The computational data in the table show that compared with the HOC scheme, the NRHOC scheme has higher computational accuracy.

5. Conclusions

In this paper, we develop rational fourth-order compact difference schemes on uniform and nonuniform grids for convection–diffusion equations.
(1) The fourth-order rational compact difference scheme on uniform grids (the RHOC scheme) for one-dimensional convection–diffusion equations was developed by modifying the strongly dissipative polynomial fourth-order compact difference scheme of the one-dimensional convection–diffusion equation in reference [7]. The dispersion and dissipation errors of the RHOC scheme are significantly smaller than those of the FOC scheme; especially, the larger Pe is, the more obvious the advantage of the RHOC scheme in terms of resolution.
(2) To efficiently solve the large-gradient-variation and boundary-layer problems, we extended the obtained difference scheme on uniform grids to nonuniform grids and constructed a rational higher-order compact difference scheme for one-dimensional convection–diffusion equations on nonuniform grids (the NRHOC scheme).
(3) A fourth-order rational compact difference scheme on nonuniform grids for two- dimensional convection–diffusion equations was developed by using the dimensionality reduction method and a partial differential equation correction technique.
(4) Several typical numerical cases were selected for solution to demonstrate the advantages of the NRHOC scheme proposed in this paper in terms of computational accuracy, validity, and stability. Numerical experiments show that the NRHOC scheme has better scale resolution and is more fit to solve convection-dominated problems precisely.
In follow-up research, we aim to focus on the following three aspects: (i) based on the present NRHOC difference scheme of convection–diffusion equations, conducting high-accuracy numerical simulations of flow and heat transfer problems [40]; (ii) combining the present scheme and adaptive methods to improve the computational accuracy of convection–diffusion with convective dominance [41]; (iii) theoretically analyzing the stability and convergence of the proposed differential scheme [42,43]. We look forward to reporting the results of the corresponding studies in the future.

Author Contributions

F.T., Methodology, Programming, Writing, Funding Acquisition; Y.G., Methodology, Supervision and Guidance; M.W., Method validation, procedure validation. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by Natural Science Foundation of Ningxia Province (2020AAC03059), National Natural Science Foundation of China (11902170, 12161067).

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

The 1D convection–diffusion equation with constant coefficients is
ε u x x + c u x = f x
where ε and c are constants and ε > 0 .
Generally, we divide the interval [0,1] into N equal parts, and the coordinates of the inserted points are x i = i h , where h = x i + 1 x i is the mesh step size. Let u i = u ( x i ) , c i = c ( x i ) , f i = f ( x i ) , i 0 , 1 , 2 , . . . , N . Using Taylor’s formula,
u x i = δ x u i h 2 6 3 u x 3 i + O h 4
2 u x 2 i = δ 2 x u i h 2 12 4 u x 4 i + O h 4
where δ x u i = u i + 1 u i 1 2 h , δ x 2 u i = u i + 1 2 u i u i + 1 h 2 are the second-order central difference operators for the first- and second-order derivatives of u ( x i ) .
Substituting (A2) and (A3) into (A1) yields
ε δ 2 x u i + c i δ x u i c i h 2 6 3 u x 3 i + ε h 2 12 4 u x 4 i + O h 4 = f i
Then, we directly calculate the third-order and fourth-order derivative functions with Equation (A1) to obtain
u x x x = c ε u x x 1 ε f x
u x x x x = c 2 ε 2 u x x c ε 2 f x 1 ε f x x
We rewrite model Equation (6) as
u x x = c ε u x 1 ε f
We substitute (A7) into (A6):
u x x x x = c 3 ε 3 u x c 2 ε 3 f c ε 2 f x 1 ε f x x
We substitute (A5) and (A8) into (A4):
ε δ 2 x u i + c δ x u i c 2 h 2 6 ε u x x i + c 3 h 2 12 ε 2 u x i + O h 4 = 1 + c 2 h 2 12 ε 2 f i + c h 2 12 ε f x i + h 2 12 f x x i
Then, we substitute (A2) and (A3) into (A9):
ε 1 + c 2 h 2 6 ε 2 δ 2 x u i + c 1 + c 2 h 2 12 ε 2 δ x u i + c 2 h 4 72 ε 4 u x 4 i c 3 h 4 72 ε 2 3 u x 3 i + O h 6 = 1 + c 2 h 2 12 ε 2 f i + c h 2 12 ε f x i + h 2 12 f x x i
We rewrite model Equation (A1) again as
u x = ε c u x x + 1 c f
We calculate the second derivative directly:
u x x x = ε c u x x x x + 1 c f x x
By substituting (A12) into (A10) and omitting the higher-order terms, we obtain
ε 1 + c 2 h 2 6 ε 2 δ x 2 u i + c 1 + c 2 h 2 12 ε 2 δ x u i = 1 + c 2 h 2 12 ε 2 f i + c h 2 12 ε f x i + h 2 12 1 + c 2 h 2 6 ε 2 f x x i
Then, both sides of the above equation are divided by 1 + c 2 h 2 12 ε 2 simultaneously to obtain a fourth-order compact difference equation for model Equation (A1).
α δ x 2 u i + c δ x u i = f i + c 1 f x i + c 2 f x x i
where the coefficients are
α = ε 1 + c 2 h 2 6 ε 2 1 + c 2 h 2 12 ε 2 , C 1 = h 12 c h ε 1 + c 2 h 2 12 ε 2 , C 2 = h 2 12 1 + c 2 h 2 6 ε 2 1 + c 2 h 2 12 ε 2

Appendix B

In order to explain the effect of the scheme modification in this paper in more detail, Fourier analysis is carried out for difference Equation (A13). Fourier analysis, also known as modified wave number analysis, provides an effective means to quantitatively analyze the resolution characteristics of different difference approximations. The Fourier transform and its inverse transform of the function defined in one-dimensional space are as follows:
f ˜ ( k ) = 1 2 π + f ( x ) e I k x d k
f ( x ) = 1 2 π + f ˜ ( k ) e I k x d x
where I = 1 . Using the Fourier transform and Euler formula, the following imaginary and real parts of RHOC scheme (A13) are obtained:
κ = 1 h ε P e 1 + h 2 k 2 6 + P e 2 36 + 3 P e 2 k 1 4 ε h 2 P e 12 + P e 2 6 + P e 2 12 + P e 2 k 2 k 1 1 6 + P e 2 36 + 3 P e 2 h 2 k 2 2 + P e 12 + P e 2 h k 1 2
κ 2 = 1 h 2 4 ε 6 + P e 2 12 + P e 2 1 + 1 3 6 + P e 2 12 + P e 2 h 2 k 2 h 2 k 2 ε P e 2 12 + P e 2 h 2 k 1 2 1 1 3 6 + P e 2 12 + P e 2 h 2 k 2 2 + P e 12 + P e 2 h k 1 2
They are called effective (or numerical) wave numbers. Above, k 1 = sin k h h , k 2 = 1 cos k h h 2 .
Using the same analysis method, the effective (or numerical) wave numbers of the FOC scheme are
κ F O C = 1 h ε 2 P e h 2 1 h 2 k 2 6 k 1 ε 2 P e 6 1 + P e 2 12 k 1 k 2 1 h 2 k 2 6 2 + P e 12 h k 1 2
κ F O C 2 = 1 h 2 2 ε 2 1 + P e 2 12 1 h 2 k 2 6 k 2 + ε 2 P e 2 12 k 1 2 1 h 2 k 2 6 2 + P e 12 h k 1 2
Figure A1 and Figure A2 show the relationship between the effective (or numerical) wave number and the exact wave number for different mesh Reynolds numbers ( P e ) on the interval 0 k h π . The results show that in the case of P e = 0.1 and P e = 1 , there is almost no difference between κ h (corresponding to the dispersion error) and κ 2 h 2 (corresponding to the dissipation error) of the RHOC scheme and the FOC scheme. However, when the mesh Reynolds number (Pe) equals 10 and 100, the dispersion error and dissipation error of the RHOC scheme are smaller than those of the FOC scheme. Especially, the larger the value of P e , the more obvious the advantage of the RHOC scheme in resolution.
Figure A1. Graph of variable κ 2 h 2 changing with k h : (a) P e = 0.1 , (b) P e = 1 , (c) P e = 10 , (d) P e = 100 .
Figure A1. Graph of variable κ 2 h 2 changing with k h : (a) P e = 0.1 , (b) P e = 1 , (c) P e = 10 , (d) P e = 100 .
Axioms 12 01056 g0a1aAxioms 12 01056 g0a1b
Figure A2. Graph of variable κ h changing with k h : (a) P e = 0.1 , (b) P e = 1 , (c) P e = 10 , (d) P e = 100 .
Figure A2. Graph of variable κ h changing with k h : (a) P e = 0.1 , (b) P e = 1 , (c) P e = 10 , (d) P e = 100 .
Axioms 12 01056 g0a2

References

  1. Meis, T.; Marcowitz, U. Numerical Solution of Partial Differential Equations; Applied Mathematical Science Series; Springer-Verlag: Berlin, Germany; New York, NY, USA, 1981; Volume 22. [Google Scholar]
  2. Patanker, S.V. Numerical Heat Transfer and Fluid Flow; McGraw-Hill: New York, NY, USA, 1980. [Google Scholar]
  3. Roache, P.J. Computational Fluid Dynamics; Hermosa: Albuquerque, NM, USA, 1976. [Google Scholar]
  4. Gupta, M.M.; Manohar, R.P.; Stephenson, J.W. A single cell high order scheme for the convection-diffusion equation with variable coefficients. Int. J. Numer. Meth. Fluids 1984, 4, 641–651. [Google Scholar] [CrossRef]
  5. Gupta, M.M.; Manohar, R.P.; Stephenson, J.W. High-order difference schemes for two-dimensional elliptic equations. Numer. Methods Partial Differ. Equ. 1985, 1, 71–80. [Google Scholar] [CrossRef]
  6. Chen, G.Q.; Gao, Z.; Yang, Z.F. A perturbational h4 exponential finite difference scheme for convection diffusion equation. J. Comput. Phys. 1993, 104, 129–139. [Google Scholar] [CrossRef]
  7. Spotz, W.F. High-Order Compact Finite Difference Schemes for Computational Mechanics. Doctor’s Thesis, The University of Texas at Austin, Austin, TX, USA, December 1995. [Google Scholar]
  8. Roos, H.G.; Stynes, M.; Tobiska, L. Numerical Solution of Convection’CDiffusion Problems: Convection-Diffusion and Flow Problems; Springer Series in Computational Mathematics; Springer-Verlag: New York, NY, USA, 1996; Volume 24. [Google Scholar]
  9. Zhang, J. Accurated high accuracy multigrd solution of the convection-diffusion with high Reynolds number. Numer. Meth. Partial Differ. Equ. 1997, 13, 77–92. [Google Scholar] [CrossRef]
  10. Sun, H.; Zhang, J. A high order finite difference discretization strategy based on extrapolation for convection diffusion equations. Numer. Meth. Partial Differ. Equ. 2004, 20, 18–32. [Google Scholar] [CrossRef]
  11. Tian, Z.F.; Dai, S.Q. High-order compact exponential finite difference methods for convection-diffusion type problems. J. Comput. Phys. 2007, 220, 952–974. [Google Scholar] [CrossRef]
  12. Sanyasiraju, Y.V.S.S.; Mishra, N. Spectral resolution exponential compact higher order scheme (SRECHOS) for convection-diffusion equations. Comput. Meth. Appl. Mech. Eng. 2008, 197, 4737–4744. [Google Scholar] [CrossRef]
  13. Kadalbajoo, M.K.; Gupta, V. Numerical solution of singularly perturbed convection-diffusion problem using parameter uniform B-spline collocation method. J. Math. Anal. Appl. 2009, 355, 439–452. [Google Scholar] [CrossRef]
  14. Mittal, R.C.; Jain, R.K. Redefined cubic B-splines collocation method for solving convection-diffusion equations. Appl. Math. Model. 2012, 36, 5555–5573. [Google Scholar] [CrossRef]
  15. Qian, L.; Feng, X.; He, Y. The characteristic finite difference streamline diffusion method for convection-dominated diffusion problems. Appl. Math. Model. 2012, 36, 561–572. [Google Scholar] [CrossRef]
  16. Mai-Duy, N.; Thai-Quang, N.; Hoang-Trieu, T.T.; Tran-Cong, T. A compact 9 point stencil based on integrated RBFs for the convection-diffusion equation. Appl. Math. Model. 2014, 38, 1495–1510. [Google Scholar] [CrossRef]
  17. Wang, G.; Wang, Y.; He, Y.N. Least-squares virtual element method for the convection-diffusion-reaction problem. Int. J. Numer. Methods Eng. 2021, 122, 11. [Google Scholar] [CrossRef]
  18. Kadalbajoo, M.K.; Gupta, V. A brief survey on numerical methods for solving singularly perturbed problems. Appl. Math. Comput. 2010, 217, 3641–3716. [Google Scholar] [CrossRef]
  19. Jeon, Y.; Tran, M.L. The upwind hybrid difference methods for a convection diffusion equation. Appl. Numer. Math. 2018, 133, 69–82. [Google Scholar] [CrossRef]
  20. Lan, B.; Sheng, Z.Q.; Yuan, G.W. A new positive finite volume scheme for two-dimensional convection-diffusion equation. Zamm-J. Appl. Math. Mech. Angew. Math. Und Mech. 2019, 99, 2. [Google Scholar] [CrossRef]
  21. Xiao, X.F.; Feng, X.L.; Li, Z.L. A gradient recovery-based adaptive finite element method for convection-diffusion-reaction equations on surfaces. Int. J. Numer. Methods Eng. 2019, 120, 7. [Google Scholar] [CrossRef]
  22. Chen, G.; Hu, W.W.; Shen, J.G.; Singler, J.R.; Zhang, Y.W.; Zheng, X.B. An HDG method for distributed control of convection diffusion PDEs. J. Comput. Appl. Math. 2018, 343, 643–661. [Google Scholar] [CrossRef]
  23. Choo, J.Y.; Schultz, D.H. Stable high order method for differential equations with small coefficients for the second order terms. Comput. Math. Appl. 1993, 25, 105–123. [Google Scholar] [CrossRef]
  24. Choo, J.Y. Stable high order methods for elliptic equations with large first order terms. Comput. Math. Appl. 1994, 27, 65–80. [Google Scholar] [CrossRef]
  25. Zhang, J.; Sun, H.; Zhao, J.J. High order compact scheme with multigrid local mesh refinement procedure for convection diffusion problems. Comput. Meth. Appl. Mech. Eng. 2002, 191, 4661–4674. [Google Scholar] [CrossRef]
  26. Teigland, R.; Eliassen, I.K. A multiblock/multilevel mesh refinement procedure for CFD computations. Int. J. Numer. Meth. Fluids 2001, 36, 519–538. [Google Scholar]
  27. Berger, M.J.; Coella, P. Local adaptive mesh refinement for shock hydrodynamics. J. Comput. Phys. 1997, 82, 64–84. [Google Scholar] [CrossRef]
  28. Spotz, W.F.; Carey, G.F. Formulation and experiments with high-order compact schemes for nonuniform grids. Int. J. Numer. Meth. Heat Fluid Flow 1998, 8, 288–297. [Google Scholar] [CrossRef]
  29. Ge, L.; Zhang, J. High accuracy iterative solution of convection diffusion equation with boundary layers on nonuniform grids. J. Comput. Phys. 2001, 171, 560–578. [Google Scholar] [CrossRef]
  30. Zhang, J.; Ge, L.; Gupta, M.M. Fourth order compact difference schemes for 3D convection diffusion equation with boundary layers on nonuniform grid. Neural Parallel Sci. Comput. 2000, 8, 373–392. [Google Scholar]
  31. Kalita, J.C.; Dass, A.K.; Dalal, D.C. A transformation-free HOC scheme for steady convection-diffusion on non-uniform grids. Int. J. Numer. Methods Fluids 2004, 44, 33–53. [Google Scholar] [CrossRef]
  32. Hu, S.G.; Pan, K.; Wu, X.X.; Ge, Y.B.; Zhang, L. An efficient extrapolation multigrid method based on a HOC scheme on nonuniform rectilinear grids for solving 3D anisotropic convection diffusion problems. Comput. Method. Appl. M 2023, 403, 115724. [Google Scholar] [CrossRef]
  33. Ge, Y.; Cao, F. Multigrid method based on the transformation-free HOC scheme on nonu niform grids for 2D convection diffusion problems. J. Comput. Phys. 2011, 230, 4051–4070. [Google Scholar] [CrossRef]
  34. Tian, F.; Ge, Y.B.; Tian, Z.F. Exponential high-order compact finite difference method for convection-dominated diffusion problems on nonuniform grids. Numer. Heat Transf. Part B Fundam. 2019, 75, 145–177. [Google Scholar] [CrossRef]
  35. Bataineh, A.S.; Noorani, M.S.M.; Hashim, I. Homotopy analysis method for singular IVPs of Emden-Fowler type. Commun. Nonlinear. Sci. 2009, 14, 1121–1131. [Google Scholar] [CrossRef]
  36. Venturino, E. The Galerkin method for singular integral eiquationsrevisited. J. Comput. Appl. Math. 1992, 40, 91–103. [Google Scholar] [CrossRef]
  37. Mustafa, T. Solution of Initial and Boundary Value Problems by an Effective Accurate Method. Int. J. Compu.t Methods 2017, 14, 1750069. [Google Scholar]
  38. Turkyilmazoglu, M. Analytic approximate solutions of parameterized unperturbed and singularly perturbed boundary value problems. Appl. Math. Model 2011, 35, 3879–3886. [Google Scholar] [CrossRef]
  39. Sleijpen, G.L.G.; Diederik, R.F. BiCGStable(L) for linear equations involing unsymmetic matrices with complex spectrum. Electron. Trans. Numer. Anal. 1993, 1, 11–32. [Google Scholar]
  40. Liang, X.; Zhang, H.Y.; Tian, Z.F. A fourth-order compact difference algorithm for numerical solution of natural convection in an inclined square enclosure. Numer. Heat Transf. Part A Appl. 2021, 80, 255–290. [Google Scholar] [CrossRef]
  41. Gupta, A.; Kaushik, A.; Sharma, M. A higher-order hybrid spline difference method on adaptive mesh for solving singularly perturbed parabolic reaction-diffusion problems with robin-boundary conditions. Numer. Methods Partial Differ. Equ. 2023, 39, 1220–1250. [Google Scholar] [CrossRef]
  42. Weinan, E.; Liu, J.G. Essentially compact schemes for unsteady viscous incompressible flows. J. Comput. Phys. 1996, 126, 122–138. [Google Scholar]
  43. Wang, C.; Liu, J.G. Fourth order convergence of compact finite difference solver for 2-D incompressible flow. Commun. Appl. Anal. 2003, 7, 171–192. [Google Scholar]
Figure 1. Comparison of computed and exact solutions, and error distribution ( ε = 10 3 ,   N = 41 ,   λ = 0.95 ), Example 1.
Figure 1. Comparison of computed and exact solutions, and error distribution ( ε = 10 3 ,   N = 41 ,   λ = 0.95 ), Example 1.
Axioms 12 01056 g001
Figure 2. Comparison of computed and exact solutions, and error distribution ( ε = 10 5 ,   N = 221 ,   λ = 1 ), Example 1.
Figure 2. Comparison of computed and exact solutions, and error distribution ( ε = 10 5 ,   N = 221 ,   λ = 1 ), Example 1.
Axioms 12 01056 g002
Figure 3. Comparison of computed and exact solutions, and error distribution ( ε = 10 3 ,   N = 81 ,   λ = 1 ), Example 2.
Figure 3. Comparison of computed and exact solutions, and error distribution ( ε = 10 3 ,   N = 81 ,   λ = 1 ), Example 2.
Axioms 12 01056 g003
Figure 4. Comparison of computed and exact solutions, and error distribution ( ε = 10 5 ,   N = 321 ,   λ = 1 ), Example 2.
Figure 4. Comparison of computed and exact solutions, and error distribution ( ε = 10 5 ,   N = 321 ,   λ = 1 ), Example 2.
Axioms 12 01056 g004
Table 1. Comparison of maximum absolute error and convergence order, Example 1.
Table 1. Comparison of maximum absolute error and convergence order, Example 1.
ε NodesFOC [7]NRHOC
ErrorRateErrorRate λ
1112.18 (−7)4.18 (−8)0.00
211.38 (−8)3.982.71 (−9)3.94
418.63 (−10)4.001.71 (−10)3.99
10 2 213.35 (−2)6.50 (−3)0.75
412.83 (−3)3.574.08 (−4)3.99
811.65 (−4)4.102.61 (−5)3.97
10 3 213.60 (−1)1.76 (−1)0.95
417.72 (−1)−1.101.35 (−2)3.71
813.05 (−1)1.347.93 (−4)4.08
10 5 2014.52 (−1)2.95 (−2)1.00
4012.18 (−1)1.051.88 (−3)3.98
8011.03 (−1)1.081.15 (−4)4.03
Table 2. Comparison of maximum absolute error and convergence order, Example 2.
Table 2. Comparison of maximum absolute error and convergence order, Example 2.
NodesFOC [7]RHOCNRHOC
ErrorRateErrorRateErrorRate
ε = 10 1 λ = 0.20
419.72 (−6)1.16 (−5)9.41 (−6)
816.28 (−7)3.957.68 (−7)3.926.00 (−7)3.97
1613.99 (−8)3.984.89 (−8)3.973.76 (−8)3.99
3212.50 (−9)4.003.07 (−9)4.002.35 (−9)4.00
ε = 10 2 λ = 0.85
411.06 (−2)2.03 (−2)8.34 (−4)
811.30 (−3)3.037.50 (−4)4.764.92 (−5)4.08
1613.32 (−4)3.033.74 (−4)1.012.99 (−6)4.04
3212.44 (−5)3.763.03 (−5)3.621.86 (−7)4.01
ε = 10 3 λ = 0.95
416.17 (+0)4.26 (+0)2.65 (−2)
811.93 (+0)1.683.37 (+0)0.331.69 (−3)3.97
1612.59 (−1)2.896.68 (−1)2.341.10 (−4)3.93
3211.52 (−2)4.093.87 (−2)4.116.82 (−6)4.02
ε = 10 4 λ = 1.00
813.70 (+1)1.93 (+1)1.11 (−1)
1611.83 (+1)1.029.65 (+0)1.006.09 (−3)4.19
3218.43 (+0)1.125.02 (+0)0.943.74 (−4)4.02
6413.03 (+0)1.483.26 (+0)0.622.38 (−5)3.97
ε = 10 5 λ = 1.00
1601.86 (+2)9.65 (+1)1.62 (−1)
3209.32 (+1)1.004.80 (+1)1.018.24 (−3)4.30
6404.66 (+1)1.002.39 (+1)1.015.03 (−4)4.03
12802.31 (+1)1.011.20 (+1)1.003.15 (−6)4.00
Table 3. Comparison of maximum absolute error and convergence order, Example 3.
Table 3. Comparison of maximum absolute error and convergence order, Example 3.
NodesHOC [31]NRHOCNodesHOC [31]NRHOC
ErrorRateErrorRateErrorRateErrorRate
Re = 1 λ = 0.00 Re = 10 λ = 0.25
11 × 11 2.15 (−6)2.15 (−6) 11 × 11 2.96 (−3)2.22 (−3)
21 × 21 1.29 (−7)4.071.29 (−7)4.07 21 × 21 1.85 (−4)4.001.37 (−4)4.01
41 × 41 7.94 (−9)4.027.94 (−9)4.02 41 × 41 1.15 (−5)4.008.49 (−6)4.00
Re = 100 λ = 0.85 Re = 1000 λ = 0.90
21 × 21 2.23 (−1)1.18 (−2) 32 × 16 7.82 (−1)1.41 (−1)
41 × 41 5.07 (−2)2.137.14 (−4)4.04 64 × 32 6.06 (−1)0.371.45 (−2)3.29
81 × 81 5.26 (−3)3.274.38 (−5)4.03 128 × 64 3.65 (−1)0.739.00 (−4)4.01
Re = 5000 λ = 0.945 Re = 7500 λ = 0.95
128 × 64 8.16 (−1)3.35 (−2) 128 × 64 8.74 (−1)7.66 (−2)
256 × 128 6.66 (−1)0.292.86 (−3)3.55 256 × 128 7.62 (−1)0.208.98 (−3)3.09
512 × 256 4.43 (−1)0.591.79 (−4)4.00 512 × 256 5.81 (−1)0.395.77 (−4)3.96
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Tian, F.; Wang, M.; Ge, Y. High-Effectiveness and -Accuracy Difference Scheme Based on Nonuniform Grids for Solving Convection–Diffusion Equations with Boundary Layers. Axioms 2023, 12, 1056. https://doi.org/10.3390/axioms12111056

AMA Style

Tian F, Wang M, Ge Y. High-Effectiveness and -Accuracy Difference Scheme Based on Nonuniform Grids for Solving Convection–Diffusion Equations with Boundary Layers. Axioms. 2023; 12(11):1056. https://doi.org/10.3390/axioms12111056

Chicago/Turabian Style

Tian, Fang, Mingjing Wang, and Yongbin Ge. 2023. "High-Effectiveness and -Accuracy Difference Scheme Based on Nonuniform Grids for Solving Convection–Diffusion Equations with Boundary Layers" Axioms 12, no. 11: 1056. https://doi.org/10.3390/axioms12111056

APA Style

Tian, F., Wang, M., & Ge, Y. (2023). High-Effectiveness and -Accuracy Difference Scheme Based on Nonuniform Grids for Solving Convection–Diffusion Equations with Boundary Layers. Axioms, 12(11), 1056. https://doi.org/10.3390/axioms12111056

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop