Universal Journal of Physics Research
Article | Open Access | 10.31586/ujpr.2022.155

Compact Difference Schemes Combined with Runge-Kutta Methods for Solving Unsteady Convection-Diffusion

Zhenwei Zhu1 and Junjie Chen1,*
1
Department of Energy and Power Engineering, School of Mechanical and Power Engineering, Henan Polytechnic University, Jiaozuo, Henan, China

Abstract

The convection-diffusion equation is of primary importance in understanding transport phenomena within a physical system. However, the currently available methods for solving unsteady convection-diffusion problems are generally not able to offer excellent accuracy in both time and space variables. A procedure was given in detail to solve the one-dimensional unsteady convection-diffusion equation through a combination of Runge-Kutta methods and compact difference schemes. The combination method has fourth-order accuracy in both time and space variables. Numerical experiments were conducted and the results were compared with those obtained by the Crank-Nicolson method in order to check the accuracy of the combination method. The analysis results indicated that the combination method is numerically stable at low wave numbers and small CFL numbers. The combination method has higher accuracy than the Crank-Nicolson method.

1. Introduction

The convection-diffusion equation is a combination of the diffusion convection and diffusion equations, and describes physical phenomena where particles, energy, or other physical quantities are transferred inside a physical system due to convection and diffusion processes [1, 2]. This equation is of primary importance in understanding transport phenomena within a physical system [3, 4].

For a transport variable u, the one-dimensional unsteady advection-diffusion equation is usually written as

u(x,t) t +c u(x,t) x =α 2 u(x,t) x 2 ,  (x,t)(0,L)×(0,T) ,

with the initial condition

u(x,0)=ϕ(x) ,

and the boundary conditions

u(x,t) t +c u(x,t) x =α 2 u(x,t) x 2  (x,t)(0,L)×(0,T) (x,t)(0,L)×(0,T) ,

in which c is an arbitrary constant indicating the intensity of the convection, the diffusion coefficient α is positive constant, and g0 and g1 are assumed in this study to be smooth functions.

A variety of finite difference schemes have been presented to solve unsteady convection-diffusion problems approximately [5]. These schemes usually have first-order or second-order accurate in space variables, but have fallen short of expectations for convection-dominated flows if the mesh is not sufficiently refined [5]. Discretization with a higher order in space variables is usually associated with large stencils, thereby increasing the band-width of the resulting matrix [5, 6]. A class of compact finite difference approximations have been recently developed to solve convection-diffusion problems [7, 8, 9]. These compact finite difference schemes have fourth-order accuracy in space variables, but fail when accuracy in time variables is most needed [10, 11]. Additionally, most of these schemes have to compute the inverse of the block matrix [10, 11]. It is therefore entirely necessary to develop an effective numerical scheme in order to obtain satisfactory results with a higher order accuracy in time variables and reasonable computational cost.

The primary focus of this study is on developing an effective method to achieve higher accuracy in time variables by a combination of Runge-Kutta methods and high-order compact finite difference discretization schemes. This combination method is then used to solve the one-dimensional unsteady convection-diffusion equation and has fourth-order accuracy in both time and space variables. The Runge-Kutta methods are introduced briefly in Section 2. A fourth-order compact finite difference approximation scheme is presented in Section 3 for the unsteady convection-diffusion equation. A stability analysis is performed on the fully discretized equation in Section 4 to check the stability of the combination method. Some numerical examples are presented in Section 5 and concluding remarks are finally given in Section 6.

2. Runge-Kutta methods

In numerical analysis, Runge-Kutta methods are a family of implicit and explicit iterative methods [12]. When Runge-Kutta methods are used to solve the convection-diffusion equation, time is treated as an independent variable in an ordinary differential equation, for example,

dQ dt =R(t,Q) ,

in which Q is an unknown function of time, and R denotes the numerical approximation to the spatial derivatives. The Runge-Kutta method used in this study is given in the following form

Q n+1 = Q n +Δt R ^ ( Q n ,Δt) ,

in which Δt is the time increment. The increment function R ^ ( Q n ,Δt) is subdivided into N steps on the interval t n t t n+1

Q 1 = Q n +Δt( α 11 R n ) ,
Q 2 = Q n +Δt( α 21 R n + α 22 R 1 ) ,
Q 3 = Q n +Δt( α 31 R n + α 32 R 1 + α 33 R 2 ) ,
Q n+1 = Q n +Δt( α N1 R n + α N2 R 1 ++ α NN R N-1 ) ,

in which the superscript n, 1, 2, ..., and n + 1 denote the time steps on the time interval t n t 1 t 2 t N t n+1 , and αij is the weighting factor for the step i and term j.

A four-step algorithm is given by

Q 1 = Q n + Δt 4 R n  ,
Q 2 = Q n + Δt 3 R 1  ,
Q 3 = Q n + Δt 2 R 2  ,
Q n+1 = Q n +Δt R 3  .

This algorithm is convenient to program and no intermediate solution needs to be stored [13].

3. A fourth-order compact finite difference scheme

The differential equation considered here takes the form

α 2 u(x) x 2 -c u(x) x =f(x) , x(0,L) ,

with the boundary conditions

u(0)= g 0  , u(L)= g 1  .

A compact difference scheme with fourth-order accuracy can be obtained for Equation (14) as follows [14]: the interval 0 x 1 is subdivided into n equal subintervals by the grid points x i =ih , in which h= 1 n . The mesh function u(ih) is written as ui at grid point xi. The second-order central difference schemes for second and first derivatives of u can be written as δ x 2 u= ( u i+1 -2 u i + u i-1 ) h 2 and δ x u= ( u i+1 - u i-1 ) 2 h 2 , respectively. The following relation can be derived for Equation (14) at point xi:

α δ x 2 u i -c δ x u i - τ i = f i  ,

in which

τ i = h 2 12 ( α d 4 u d x 4 -2c d 3 u d x 3 )+O( h 4 ) .

The fourth and third derivatives of u in the above equation should be approximated in order to obtain a compact difference scheme with fourth-order accuracy.

Equation (14) gives:

d 3 u d x 3 | i = 1 α ( df dx +c d 2 u d x 2 )| i = 1 α ( δ x f i +c δ x 2 u i )+O( h 2 )

From Equation (14) and Equation (18), it follows that

d 4 u d x 4 | i = 1 α ( d 2 f d x 2 +c d 3 u d x 3 )| i = 1 α δ x 2 f i + c α 2 δ x f i + c 2 α 2 δ x 2 u i )+O( h 2 )

By substituting Equations (18) and (19) for the corresponding terms used in Equation (17), the solution is given by

τ i = 1 12 ( δ x 2 f i - c α δ x f i - c 2 α δ x 2 u i )+O( h 4 )

A fourth-order compact finite difference scheme for Equation (14) can be obtained by substituting Equation (20) in Equation (16). This gives

( α+ c 2 h 2 12α ) δ x 2 u i -c δ x f i = f i + h 2 12 ( δ x 2 f i - c α δ x f i )+O( h 4 )

Here, two difference operators are defined as follows:

L x =1+ h 2 12 ( δ x 2 - c α δ x ) ,  A x =-(α+ c 2 h 2 12α ) δ x 2 +c δ x ) .

Equation (21) can be formulated symbolically as

L x -1 A x u i = f i +O( h 4 )

The above compact finite difference scheme is combined with the Runge-Kutta method described earlier to solve the one-dimensional advection-diffusion equation.

4. Stability analysis

A von Neumann linear stability analysis is performed to check the stability of the combination method. Let u i n = b n e Ikhi to be the value of u i n at xi , in which I= -1 , bn is the amplitude at time level n, and k is the wave number. The amplification factor is defined as

g= b n+1 b n

The amplification factor of Equation (13) discretized by the Runge-Kutta method can be obtained as follows [13]:

g=1+Z+ 1 2 Z 2 + 1 6 Z 3 + 1 24 Z 4

The variable Z represents the spatial discretization applied to the convection-diffusion terms. The explicit, discretized form is given by

Z=[ ( 24 F Pe +2FPe )(1-cosk)-12IFsink ]/( 10+2cosk-IPesink )

in which F is the CFL number and is defined as

F= cΔt h

In Equation (26), Pe is the Péclet number and is defined as

Pe= ch α

When the Péclet number is high, the convection term dominates [15, 16]. When the Péclet number is low the diffusion term dominates [15, 16].

The amplification factor, as defined above, is rather complex. For stability, the amplification factor has to satisfy the relation | g |1 . When | g |>1 , the combination method for solving the advection-diffusion equation is numerically unstable. Contours of the absolute value of the amplification factor are plotted in the k-F plane in Figures 1-4, respectively, with various Péclet numbers such as 1, 10, 100, and 1000. The results indicate that the combination method for solving the advection-diffusion equation is numerically stable at low wave numbers and small CFL numbers.

5. Numerical experiments

In numerical analysis, the Crank-Nicolson method is a finite difference method used for numerically solving the heat equation and similar partial differential equations [17, 18]. Some numerical results are presented in examples 5.1-5.3 to compare the present method, denoted by P.M, with the Crank-Nicolson method, denoted by C-N.M. It is assumed that all exact solutions of the convection-diffusion equations given below are known.

Example 5.1. Given a convection-diffusion equation

u t +0.1 u x =0.01 2 u x 2   (x,t)(0,1)×(0,T) .

the exact solution of the above equation is given by

u(x,t)= e 5x-(0.25+0.01 π 2 )t sinπx

The initial and boundary conditions are defined so that the results are agreed well with the exact solution of the problem. The accuracy of the present method is compared with that of the Crank-Nicolson method. The results are presented in Table 1 for various values of t. Table 1 gives the absolute error along the x direction of the domain, where h is 0.005 and Δt is 0.001.

Example 5.2. Given a convection-diffusion equation

u t +0.22 u x =0.5 2 u x 2  , (x,t)(0,1)×(0,T) .

the exact solution is given by

u(x,t)= e 0.22x-(0.0242+0.5 π 2 )t sinπx

The initial and boundary conditions of the problem are defined so that the results are agreed well with the exact solution of the problem. The accuracy of the present method is compared with that of the Crank-Nicolson method. The results are presented in Table 2 for various values of t. Table 2 gives the absolute error along the x direction of the domain, where h is 0.01 and Δt is 0.5h2.

Example 5.3. Given a convection-diffusion equation

u t +0.1 u x =0.2 2 u x 2  , (x,t)(0,1)×(0,T) .

the exact solution is given by

u(x,t)= e 0.25x-(0.0125+0.02 π 2 )t sinπx

The initial and boundary conditions are defined so that the results are agreed well with the exact solution of the problem. The accuracy of the present method is compared with that of the Crank-Nicolson method. The results are presented in Table 3 for various values of t. Table 3 gives the absolute error along the x direction of the domain, where h is 0.01 and Δt is h2.

The comparison results presented in Table 1, Table 2 and Table 3 indicate that the present method has higher accuracy than the Crank-Nicolson method.

6. Conclusions

The primary focus of this study is on developing an effective method to solve the one-dimensional unsteady convection-diffusion equation by a combination of Runge-Kutta methods and high-order compact finite difference discretization schemes. A high-order compact finite difference scheme is used to approximate the spatial derivatives, and Runge-Kutta methods are used to approximate the time derivative. This combination method has fourth-order accuracy in both time and space variables. The numerical results obtained by the combination method have been found to be in good agreement with the exact solutions. Additionally, the combination method has higher accuracy than the Crank-Nicolson method. The combination method has superiority over most of the other high-order compact finite difference schemes in terms of computational cost, and is highly efficient as there is no need to compute the inverse of the block matrix.

Acknowledgement

This work was supported by the National Natural Science Foundation of China (No. 51506048).

References

  1. G. Peng, Z. Gao, and X. Feng. An extremum-preserving finite volume scheme for convection-diffusion equation on general meshes. Applied Mathematics and Computation, Volume 380, 2020, Article Number: 125301.[CrossRef]
  2. L. Wang, X. Yang, H. Wang, Z. Chai, and Z. Wei. A modified regularized lattice Boltzmann model for convection-diffusion equation with a source term. Applied Mathematics Letters, Volume 112, 2021, Article Number: 106766.[CrossRef]
  3. J.N. Reddy and M. Martinez. A dual mesh finite domain method for steady-state convection-diffusion problems. Computers & Fluids, Volume 214, 2021, Article Number: 104760.[CrossRef]
  4. Y. Liu, Y. Feng, and R. Zhang. A high order conservative flux optimization finite element method for steady convection-diffusion equations. Journal of Computational Physics, Volume 425, 2021, Article Number: 109895.[CrossRef]
  5. S. Karaa and J. Zhang. High order ADI method for solving unsteady convection-diffusion problems. Journal of Computational Physics, Volume 198, Issue 1, 2004, Pages 1-9.[CrossRef]
  6. A. Mohebbi and M. Dehghan. High-order compact solution of the one-dimensional heat and advection-diffusion equations. Applied Mathematical Modelling, Volume 34, Issue 10, 2010, Pages 3071-3084.[CrossRef]
  7. Y.-M. Wang and X. Wen. A compact exponential difference method for multi-term time-fractional convection-reaction-diffusion problems with non-smooth solutions. Applied Mathematics and Computation, Volume 381, 2020, Article Number: 125316.[CrossRef]
  8. F. Zhang, X. Gao, and Z. Xie. Difference numerical solutions for time-space fractional advection diffusion equation. Boundary Value Problems, Volume 2019, Issue 1, 2019, Article Number: 14.[CrossRef]
  9. R. Zhang, Z. Wang, J. Liu, and L. Liu. A compact finite difference method for reaction-diffusion problems using compact integration factor methods in high spatial dimensions. Advances in Difference Equations, Volume 2018, Issue 1, 2018, Article Number: 274.[CrossRef]
  10. Y. Zhang and Y. Zhang. A new difference scheme with high accuracy and absolute stability for solving convection-diffusion equations. Journal of Computational and Applied Mathematics, Volume 230, Issue 2, 2009, Pages 600-606.[CrossRef]
  11. M. Dehghan. Weighted finite difference techniques for the one-dimensional advection-diffusion equation. Applied Mathematics and Computation, Volume 147, Issue 2, 2004, Pages 307-319.[CrossRef]
  12. I. Fried. Numerical Solution of Differential Equations. Academic Press, Inc., London, United Kingdom, 1979, ISBN: 978-0-12-267780-9.[CrossRef]
  13. S.-T. Yu, K.-C. Hsieh, and Y.-L.P. Tsai. Simulating waves in flows by Runge-Kutta and compact difference schemes. AIAA Journal, Volume 33, Number 3, 1995, Pages 421-429.[CrossRef]
  14. A.L. Pardhanani, W.F. Spotz, and G.F. Carey. A stable multigrid strategy for convection-diffusion using high order compact discretization. Electronic Transactions on Numerical Analysis, Volume 6, 1997, Pages 211-223.
  15. T. Han, J.A.C. Humphrey, and B.E. Launder. A comparison of hybrid and quadratic-upstream differencing in high Reynolds number elliptic flows. Computer Methods in Applied Mechanics and Engineering, Volume 29, Issue 1, 1981, Pages 81-95.[CrossRef]
  16. P.P. Chinchapatnam, K. Djidjeli, and P.B. Nair. Unsymmetric and symmetric meshless schemes for the unsteady convection-diffusion equation. Computer Methods in Applied Mechanics and Engineering, Volume 195, Issues 19-22, 2006, Pages 2432-2453.[CrossRef]
  17. H. Fu, Y. Sun, H. Wang, and X. Zheng. Stability and convergence of a Crank-Nicolson finite volume method for space fractional diffusion equations. Applied Numerical Mathematics, Volume 139, 2019, Pages 38-51.[CrossRef]
  18. P. Wang and P. Huang. Convergence of the Crank-Nicolson extrapolation scheme for the Korteweg-de Vries equation. Applied Numerical Mathematics, Volume 143, 2019, Pages 88-96.[CrossRef]

Copyright

© 2025 by authors and Scientific Publications. This is an open access article and the related PDF distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Article Metrics

Citations
Google Scholar 1

If you find this article cited by other articles, please click the button to add a citation.

Article Access Statistics
Article Download Statistics
Article metrics
Views
Downloads
331
Citations
1

How to Cite

Chen, J., & Zhu, Z. (2021). Compact Difference Schemes Combined with Runge-Kutta Methods for Solving Unsteady Convection-Diffusion Problems. Universal Journal of Physics Research, 1(1), 1–10.
DOI: 10.31586/ujpr.2022.155
  1. G. Peng, Z. Gao, and X. Feng. An extremum-preserving finite volume scheme for convection-diffusion equation on general meshes. Applied Mathematics and Computation, Volume 380, 2020, Article Number: 125301.[CrossRef]
  2. L. Wang, X. Yang, H. Wang, Z. Chai, and Z. Wei. A modified regularized lattice Boltzmann model for convection-diffusion equation with a source term. Applied Mathematics Letters, Volume 112, 2021, Article Number: 106766.[CrossRef]
  3. J.N. Reddy and M. Martinez. A dual mesh finite domain method for steady-state convection-diffusion problems. Computers & Fluids, Volume 214, 2021, Article Number: 104760.[CrossRef]
  4. Y. Liu, Y. Feng, and R. Zhang. A high order conservative flux optimization finite element method for steady convection-diffusion equations. Journal of Computational Physics, Volume 425, 2021, Article Number: 109895.[CrossRef]
  5. S. Karaa and J. Zhang. High order ADI method for solving unsteady convection-diffusion problems. Journal of Computational Physics, Volume 198, Issue 1, 2004, Pages 1-9.[CrossRef]
  6. A. Mohebbi and M. Dehghan. High-order compact solution of the one-dimensional heat and advection-diffusion equations. Applied Mathematical Modelling, Volume 34, Issue 10, 2010, Pages 3071-3084.[CrossRef]
  7. Y.-M. Wang and X. Wen. A compact exponential difference method for multi-term time-fractional convection-reaction-diffusion problems with non-smooth solutions. Applied Mathematics and Computation, Volume 381, 2020, Article Number: 125316.[CrossRef]
  8. F. Zhang, X. Gao, and Z. Xie. Difference numerical solutions for time-space fractional advection diffusion equation. Boundary Value Problems, Volume 2019, Issue 1, 2019, Article Number: 14.[CrossRef]
  9. R. Zhang, Z. Wang, J. Liu, and L. Liu. A compact finite difference method for reaction-diffusion problems using compact integration factor methods in high spatial dimensions. Advances in Difference Equations, Volume 2018, Issue 1, 2018, Article Number: 274.[CrossRef]
  10. Y. Zhang and Y. Zhang. A new difference scheme with high accuracy and absolute stability for solving convection-diffusion equations. Journal of Computational and Applied Mathematics, Volume 230, Issue 2, 2009, Pages 600-606.[CrossRef]
  11. M. Dehghan. Weighted finite difference techniques for the one-dimensional advection-diffusion equation. Applied Mathematics and Computation, Volume 147, Issue 2, 2004, Pages 307-319.[CrossRef]
  12. I. Fried. Numerical Solution of Differential Equations. Academic Press, Inc., London, United Kingdom, 1979, ISBN: 978-0-12-267780-9.[CrossRef]
  13. S.-T. Yu, K.-C. Hsieh, and Y.-L.P. Tsai. Simulating waves in flows by Runge-Kutta and compact difference schemes. AIAA Journal, Volume 33, Number 3, 1995, Pages 421-429.[CrossRef]
  14. A.L. Pardhanani, W.F. Spotz, and G.F. Carey. A stable multigrid strategy for convection-diffusion using high order compact discretization. Electronic Transactions on Numerical Analysis, Volume 6, 1997, Pages 211-223.
  15. T. Han, J.A.C. Humphrey, and B.E. Launder. A comparison of hybrid and quadratic-upstream differencing in high Reynolds number elliptic flows. Computer Methods in Applied Mechanics and Engineering, Volume 29, Issue 1, 1981, Pages 81-95.[CrossRef]
  16. P.P. Chinchapatnam, K. Djidjeli, and P.B. Nair. Unsymmetric and symmetric meshless schemes for the unsteady convection-diffusion equation. Computer Methods in Applied Mechanics and Engineering, Volume 195, Issues 19-22, 2006, Pages 2432-2453.[CrossRef]
  17. H. Fu, Y. Sun, H. Wang, and X. Zheng. Stability and convergence of a Crank-Nicolson finite volume method for space fractional diffusion equations. Applied Numerical Mathematics, Volume 139, 2019, Pages 38-51.[CrossRef]
  18. P. Wang and P. Huang. Convergence of the Crank-Nicolson extrapolation scheme for the Korteweg-de Vries equation. Applied Numerical Mathematics, Volume 143, 2019, Pages 88-96.[CrossRef]

Citations of