2018 International Conference on Applied Mechanics, Mathematics, Modeling and Simulation (AMMMS 2018) ISBN: 978-1-60595-589-6
Combined Compact Difference Scheme for Solving Unsteady
Convection-Diffusion Equations
Hui BI
*, Shan LIU, Wei SUN and
Yang SUN
College of Science, Harbin University of Science and Technology, Harbin 150080, China
*Corresponding author
Keywords: Inside point, Boundary, Truncation error, Compact difference scheme, Convection
diffusion equation.
Abstract. By using a fifth-order upwind discrete scheme for the convection term, a fourth-order central difference scheme for the diffusion term, we construct a boundary scheme that matches the interior point and obtain a stable combination semi-discrete compact scheme which is discretized by the third-order Runge-Kutta method in the time direction. Compared with the other fourth-order scheme, the error of the proposed method is small and the accuracy is high.
Introduction
The convection-diffusion equation is widely used in many engineering and practical problems. It is a typical mathematical model for studying the numerical solution of partial differential equations. The usual numerical methods include finite element methods, finite volume methods and finite difference method. Compact difference scheme as a kind of finite difference method is getting more and more attention due to its advantages with fewer grid points and higher accuracy. Hirsh [1] proposed a Hermitian type three-fourth order compact scheme. Lele [2] constructed a class of high accurate compact schemes and gave second, third and fourth order boundary schemes. Tian and Yu [3] derived an unconditionally stable implicit fourth-order accurate difference scheme for one -dimensional unsteady convection-diffusion equations. Wang and Liu [4] used the fourth-order Padé scheme and the four order upwind scheme to discretize the space and time variables respectively and derived a consistent fourth-order compact difference scheme in which the inner point and the boundary are both fourth-order. Zhao [5] used the idea of average weighting to obtain a combined upwind compact scheme with space accuracy at least fourth order. The upwind compact scheme of aerodynamic calculation proposed by Ma and Fu [6] provides an effective method for solving fluid mechanics problems.
In this paper, by using a fifth-order upwind discrete scheme for the convection term, a fourth-order central difference scheme for the diffusion term, we construct a boundary scheme that matches the interior point, and then obtain a stable combination semi-discrete compact scheme which is discretized by the third-order Runge-Kutta method in the time direction. Compared with other fourth-order scheme, the error of the proposed method is small and the accuracy is high.
Scheme Construction
This paper considers the following one-dimensional convection-diffusion equation:
0
,
,
,
,
0
,
.
,
,
0
,
0
,
,
,
0
,
0
,
,
,
,
1
1
u
l
t
g
t
T
g
t
u
l
x
x
x
u
T
l
t
x
t
x
f
vu
u
t
x
c
u
t x xx
(1)Spatial Dispersion
We first introduce some notations. Select a positive integerN,M, and lethl/N,
T
/
M
. Write xj
j1
h, j1,,N1, wherex10, xN1l,tn n ,n0,1,,M.n j
u
represents the approximation of the solution functionu
x, at pointt
xj,tn
.Interior Point Scheme
We use the fourth-order padé scheme [2] to discretize the diffusion term. Let ''
j
u
denote the
approximation of the second-order partial derivative 2
2
x u
at pointxj.
The specific scheme is
1 1
2 ''
1 ''
''
1 2
1 12
1 6 5 12
1
j j j j j
j u u u
h u u u
j2,3,,N. (2) The scheme truncation error is
6 )5 ( 4 240
1 h u oh j
. (3) The inner point of the convection term is discretized by the fifth-order upwind compact scheme,
where
j x
u
represents the approximation of x
u
at point xjunder the condition of c0,
j x
u
represents the approximation of x
u
at point xjunder the condition of c0.
3 44 36 12
3,4, , 1 121 3
2 1 u2 u1 u u1u2 j N h
u
ux j x j j j j j j
. (4)
12 36 44 3
3,4, , 1 121 2
3 1 u 2 u1 u u 1 u 2 j N h
u
ux j x j j j j j j
. (5) Here we discuss the case ofc0, the truncation error of this scheme is
6
6 5206
1 h u oh
j
. (6) Boundary Scheme
Constructing the diffusion term left boundary scheme [4]
1 1 2 2 3 3 4 4 5 5 6 6 7 7
2 '' 2 1 '' 1
1
u b u b u b u b u b u b u b h u
u
. (7) The truncation error is
7
61 5 7 1
6 1 4 7
1 3
12 19 45
7 180
137 180
13 b h u b h u oh
. (8) Note this boundary scheme is fourth-order accuracy. In order to keep the boundary and inner point truncation errors (3) consistent [4], we have
1 1
240 1 180
137 180
13
1 7 1
b
. (9)
Furthermore, we have 720. 597 720
493
7
Note that the second item of (8) 7 7 1 13 11 234 11 3 12 19 45 7 b
b
(10) is an increasing function of b7. In order to ensure that the truncation error of the boundary scheme
is closest to the truncation error of the inner point scheme, let 720 494
7
b
and institute 52 51
1
into(8). Thus, we obtain the following left boundary scheme
2 1 2 3 4 5 6 7
'' 2 '' 1 720 494 1040 5063 26 387 936 23914 104 2891 1040 18903 2430 12293 1 52 51 u u u u u u u h u u
. (11) Analogously, we have the right boundary scheme
2 1 1 2 3 4 5
'' '' 1 720 596 1040 6117 104 1871 936 28735 26 795 1040 17237 4680 17599 1 52 51 N N N N N N N N
N u u u u u u u
h u u
. (12) Combining the interior point scheme (2) with the boundary schemes (11) and (12), we write them
into a matrix form of
U B h U
B 2 2
'' 1 1 , where 1 52 51 0 0 0 0 12 1 6 5 12 1 0 0 0 0 12 1 6 5 0 0 0 0 0 0 6 5 12 1 0 0 0 0 12 1 6 5 12 1 0 0 0 0 52 51 1 1 B
1 1
3 2 1 2 0 0 0 1 2 1 0 0 0 0 1 2 0 0 0 0 0 0 2 1 0 0 0 0 1 2 1 0 0 0 N N
N b b
b b b b B 1 '' 1 '' '' 1 '' 3 '' 2 '' 1 '' N N N N u u u u u u
U ,
where B1,B2 are two matrix of
N1
N1
, and U B h B
U'' 11 12 2
.
Next, the boundary scheme of the convection term is constructed. Since the discretize scheme of convection term is a five-point scheme, which fails to calculate the points adjacent to the left and right boundaries which are called the near-boundary points. Therefore, we choose a three-point four-order difference scheme [7] to deal with these near-boundary points.
u u
j Nh u u
uj''14 j'' j''11 3 j13 j1 2,
(13)
The truncation error is
6 ) 5 ( 4 1201 h u oh j
.
Next, construct the convection term boundary scheme as follows.
1 1 2 2 3 3 4 4 5 5 6 6 7 7
' 2 1 ' 1
1 au au au au au au au
h u
u
. (14) The truncation error is as follow
6
6 1 5 7 1 1237 145 751 2620 494857 a h u oh
Same as the calculation method of the diffusion term boundary scheme, we obtain the following left boundary scheme and the right boundary as follows.
' 1 2 3 4 5 6 7
2 ' 1 13907 401 1805 284 931 255 4075 99 1597 806 199 469 597 1207 1 597 0 1 6 u u u u u u u h u
u . (16)
1 1 2 3 4 5
' ' 1 1170 229 5986 211 2084 755 29578 427 1463 1954 695 833 1831 145 1 1831 1686 N N N N N N N N
N u u u u u u u
h u
u . (17)
Write the inner point scheme (4) and the boundary schemes (13), (16) and (17) in a matrix form
as:AU h A2U
' 1 1 . 1 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 0 3 2 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 2 0 0 0 0 0 0 0 3 2 0 0 0 0 0 0 1 4 1 0 0 0 0 0 0 1 1831 1686 597 610 1 A
N N
N b b
b b b b b b A 1 2 5 4 3 2 1 2 3 0 3 12 1 12 12 12 36 0 12 1 12 12 12 12 12 36 12 44 12 3 0 12 1 12 12 12 36 12 44 12 3 0 0 3 0 3 0 0 0 1 ' 1 ' ' 1 ' 3 ' 2 ' 1 ' N N N N u u u u u u U
where A1,A2 are two matrixes of
N1
N1
.Furthermore, we have . 1 2 1 1 ' U A A h
U
Then the semi-discrete equation of the compact difference scheme of the equation (1)is
1 12 2 .1 1 2 1
1 B U
h vB A A h c U
R (18)
Stability Analysis
According to the stability theory of ordinary differential equations [9], for the semi-discrete equation (18), when the real parts of all eigenvalues of the matrix are negative, the semi-discrete scheme corresponding to the equation is asymptotically stable. Otherwise it is gradual nearly unstable.
Solve the eigenvalues of the matrix
2 1 1 2 1 1
1 B B
h D A A Y
, where c
v D
and the eigenvalues of matrix Y1 are denoted as.
Through the numerical experiments, we found that the scheme is stable whenhis 1/20,1/30, 1/100. For example, Figures 1 and 2 show that whenDis taken as 0.01, 0.001, 00010. , respectively and take h as 1/40 and 1/80, the real parts of all eigenvalues of matrix Y1 are negative. Thus, the
Figure 1. h1/40. Figure 2. h1/80.
Numerical Illustrations
Think of the equation as an ordinary differential equation, then
u vu'' cu' f .R dt
du
For time discretization, we use TVD type third-order Runge-Kutta method [10]
, 0.5
.3 2 3 1
, ,
4 1 4 3
, ,
2 2
1
1 1
2 1
t t
u tR u
u u
t t u tR u
u u
t u tR u
u
n n
n n n
Maximum absolute error L error uiexactuicomput
max
.
To verify the accuracy and reliability of the proposed scheme, consider the constant coefficient convection-diffusion equation with source term:
x t f xu x
u t
u
, 01
. 0 1 .
0 2
2
,
where f
x,t 1.1cos
xt
0.01sin
xt
x
0,1,t 0,T .The exact solution is u
x,t sin
xt
, and the initial value is given by the exact solution. The followings are the curves of the numerical solution of the scheme and the exact solution of the equation when the step length changes.Figure 3. h1/20,T 40. Figure 4. h1/50,T40. Figure 5. h1/100,T40.
Table 1. Calculation error and convergence order of different grid numbers (t 0.001,T 40).
th
h L-error Rate L-error Rate
1/20 1.484(-3) — 5.756(-3) —
1/30 4.673(-4) 1.992 9.732(-4) 4.384
1/40 2.134(-4) 2.724 2.788(-5) 4.345
1/50 8.217(-5) 4.277 1.101(-5) 4.164
1/80 1.190(-6) 6.109 1.482(-6) 4.267
[image:6.595.176.420.68.215.2]1/100 9.136(-7) 0.381 5.797(-7) 4.206
Table 1 shows that the error and convergence order of the two schemes under the different step size whenT 40,t0.001, which indicates that the scheme of this paper achieves fourth-order accuracy in space.
Conclusions
Based on the idea of Taylor expansion, this paper constructs a stable boundary scheme with the interior point scheme through the method of undetermined coefficients. Numerical experiments show that the scheme is stability and has fourth-order accuracy.
Acknowledgement
This research was financially supported by the National Natural Science Foundation of China (No. 51406044).
References
[1] R. S. Hirsh. Higher order accurate difference solutions of fluid mechanics problems by a compact differencing technique [J]. Computs. Phys., 1975, (19): 90-109.
[2] S. K. Lele. Compact finite difference schemes with spectral-like resolution [J]. Computs. Phys., 1992, 103(1): 16-42.
[3] Z. F. Tian, P. X. Yu. A high-order exponential scheme for solving 1D unsteady convection difffusion equation [J]. Journal of Computational and Applied Mathematics, 2011(235): 2477-2491. [4] T. Wang, T. G. Liu. A consistent fourth-order compact scheme for solving convection-diffusion equation [J]. Mathematica Numerica Sinica, 2012(4):391-404.
[5] B. X. Zhao. A high-order combined compact upwind difference scheme for solving 1d unsteady convection-diffusion equation [J]. Journal on Numerical Methods and Computer Applications, 2012(2):138-148.
[6] Y. W. Ma, D. X. Fu. A compact scheme and an upwind compact scheme for solving aerodynamic equations[J]. Mathematica Numerica Sinica, 1992(2): 216-223.
[7] C. H. Wang. A class of high-order compact difference scheme for a convection-diffusion equation [J]. Journal of hydrodynamics, 2004, 19(5): 655-663.
[8] F. Tian. A High-Order Compact Exponential-type Finite Difference Scheme on Non-Uniform Grid for Convection-Diffusion Equation [J]. Mathematics in Practice and Theory, 2015(4): 268-275. [9] H. X. Zhang, F. J. Li, Mixed High-order Compact Difference Scheme for Solving the Convection Diffusion Reaction Equation [J]. Mathematics in Practice and Theory, 2017(7): 266-271.