Applied Mathematics, 2011, 2, 883889 doi:10.4236/am.2011.27118 Published Online July 2011 (http://www.SciRP.org/journal/am) Copyright © 2011 SciRes. AM A Note on CrankNicolson Scheme for Burgers’ Equation Kanti Pandey, Lajja Verma Department of Mathematics and Astronomy, University of Lucknow, Lucknow, India Email: pandey_kanti@yahoo.co.in, lajjamaths@yahoo.co.in Received April 5, 2011; revised May 23, 2011; accepted May 26, 2011 Abstract In this work we generate the numerical solutions of the Burgers’ equation by applying the CrankNicolson method directly to the Burgers’ equation, i.e., we do not use HopfCole transformation to reduce Burgers’ equation into the linear heat equation. Absolute error of the present method is compared to the absolute error of the two existing methods for two test problems. The method is also analyzed for a third test problem, nu merical solutions as well as exact solutions for different values of viscosity are calculated and we find that the numerical solutions are very close to exact solution. Keywords: HopfCole Transformation, Burgers’ Equation, CrankNicolson Scheme, Nonlinear Partial Differential Equations 1. Introduction Burgers’ equation is one of the most important nonlinear partial differential equations governed by the following equation 2 =, 22 ,, ,0,10,. d tx x w ww ww xtxtT (1) This equation is nonlinear and can be considered as nonlinear analog of the NavierStokes equations. It has a convection term, a diffusion term and a timedependent term. It also has a large variety of applications in modeling of water in unsaturated oil, dynamics of soil in water, statics of flow problems, mixing and turbulent diffusion, cosmology and seismology [13]. With viscous term the Burgers’ Equation (1) is parabolic while without viscous term it is hyperbolic. In the later case it possesses discontinuous solutions due to the nonlinear term and even if smooth initial condition is considered the solution may be discontinuous after finite time. It also governs the phenomenon of shock waves [4]. In the present work we consider the Burgers’ Equation (1) with the initial condition ,0=, 01,wxf xx (2) and the boundary conditions 1 2 0,=, 0, 0,=, 0, wt gttT wt gttT (4) where >0 d is a coefficient of viscous diffusion and , 1 and 2 are the sufficiently smooth given func tions. Several researchers have successfully used Burgers’ equation to develop new algorithms and to test various existing algorithms. In most of the cases researchers used HopfCole [5,6] transformation to linearize the Burgers’ equations into parabolic partial differential equation. Some of the researchers also tried to tackle the nonlinear Burgers’ equation directly (without HopfCole). Kadal bajoo et al. [7] applied CrankNicolson finite difference method to the linearized Burgers’ equation by HopfCole transformation which is unconditionally stable and is second order convergent in both space and time with no restriction on mesh size. Gorguis [8] applied the Adomian decomposition method on the Burgers’ equation directly and compared the numerical result with the analytical result. In another result due to Kutluay et al. [9] a direct approach via least square quadratic Bspline finite element method is discussed. Recently Pandey et al. [10] discussed Douglas finite difference scheme on linearized Burgers’ equation which is fourth order convergent in space and second order convergent in time. In this paper we first apply CrankNicolson finite difference scheme directly on the nonlinear Equation (1) and derive a nonlinear finite difference scheme, and then use it to derive a system of linear equations which we
K. PANDEY ET AL. 884 solve by using Mathematica (version 7.0). For two test problems we compare the absolute error of the numerical solutions to the absolute error of the numerical results established by Kadalbajoo et al. [7] and Pandey et al. [10]. For the third test problem we compare our numerical results with the analytical solution. The exact solution for the third problem is calculated on Mathematica (version 7.0). In this paper we show that it is more appropriate to consider the Burgers’ equation directly than reducing it into linear parabolic problem and then discretize it. Therefore this paper is an improvement over the results in [7] and [10]. This paper is divided in 4 sections. In Section 2 we give expression for exact solution by HopfCole transfor mation which is used to calculate the exact solutions. In the same section we collocate and discretize to get a nonlinear finite difference equation and then through a simple approximation we deduce linear finite difference equation. In Section 3 we give three examples and in Section 4 we demonstrate properties of the computed numerical solutions in the form of Tables 111 and Figures 14. 2. Description of the Method 2.1. Exact Solution Hopf and Cole [5,6] suggested that (1) can be reduced to linear heat equation by the nonlinear transformation. Let =log d, (5) and =. w (6) Putting in (1) we get 2 1= 22 d tx . xx (7) Next applying the transformation (5) we get = 2 d t. x x (8) The fourier series solution to the linearized heat equa tion is 22 0 =1 π ,= expcosπ 2 d n n nt tA An x (9) with fourier coefficients at as =0t 1 00 1 0 =d, =2cosπd, n AExx Exnx x (11) where 0=,ww 0 0 1 =exp d x d Ex w . Using the HopfCole transformation we have the exact solution =1 0 =1 sin π ,=π cos π nn n d nn n Htn nx wxt AHtn x (12) where 22 π =exp2 d nnt Ht . 2.2. Discretization First of all we divide the solution space into a uniform mesh. For this we divide the interval 0, 1 into equal subintervals and divide the interval N 0, T into equal subintervals. Let =1hN be the mesh width in space and = i ih for . Let =1 1iN=kTM be the mesh width in time and for = j tjk =0 1jM. Now Collocating the Burgers’ Equation (1) we get 22 , ,, 2 1= 22 =11, =0 1. ij ij ij d w ww tx x iNjM , (13) where ,=, ijij wwxt. The CrankNicolson method [11,12] gives the following system of nonlinear equations, 2 ,1 , ,1 , ,1 , 2 2 1 22 =. 22 ij ij ijijx x ij ij dx ww k ww h ww k h (14) where and are central difference operator and averaging operator respectively. To linearize we put ,1 ,ij ij,j v=ww i into (14) where ,,1 = ij ijij vw w , and neglecting 2 ,ij Ov we get 1, 1,, 1, 1, 1, 1,, 1, 1, 11 422 2 1 422 1 =24 1 24 dd ij ijij d ij ij dij ijdij dij ij r wvr r sw v rrwwrw rsww v (15) where = kh and 2 =rkh. 3. Numerical Results and Discussions 0 and In this section we demonstrate the accuracy of the Copyright © 2011 SciRes. AM
K. PANDEY ET AL.885 present method by solving three test problems and compare the results with the two existing results. The computations are performed using Mathematica 7.0 and Origin 7.5. 3.1. Problem 1 Consider Equation (1) with boundary conditions and initial condition as 0,=1,=0, >0,wtwtt (16) ,0 =sinπ,wx x (17) where 2 d is the coefficient of kinematic viscosity. We substitute ,= dx wxt (18) in Equation (1) and get =, 0<<1, > 2 d txx xt 0 with initial condition 1 ,0=exp1cos π, 0<<1. πd xx x (19) and boundary condition 0,=1,=0, >0. xx ttt The exact solution of the Burgers’ Equation (1) is (12) with given Fourier coefficients: 1 00 1 0 1 =exp1cosπd, π 1 =2exp1cos πcosπd. π d nd Axx xnxx 3.2. Problem 2 As a second example consider (1) with the boundary conditions (16) and initial condition ,0=41 , 0<<1.wxxxx (20) The exact solution (12) can be obtained in the similar fashion as in Problem 3.1 with the Fourier coefficients as follows : 2 1 00 2 1 0 2 =exp32 d, 3 2 =2 exp3 2cosπd. 3 d nd x Axx x xnx x 3.3. Problem 3 Consider Equation (1) with boundary conditions (16) and initial condition 2πsinπ ,0=, 0<<1. 2cosπ x wx x (21) The exact solution can be calculated by using the formula (12) where 2/ 1 00 2/ 1 0 2cosπ =d, 2 2cosπ =2cos πd. 2 d d n x Ax x nxx (22) 4. Conclusions We present CrankNicolson finite difference scheme for Burgers’ equation without HopfCole transformation. We claim that it is better to solve the nonlinear Burgers’ equation directly, i.e., without reducing it to linear heat equation by HopfCole transformation. Our claim is very well supported by the Tables 1 10 and Graphs 13. From Table 11 and Graph 4 it is also proved that numerical results are in good agreement with the analytical solution. The exact solution for the Problem 3.3 is calculated by using Mathematica 7.0. Figure 4 also depicts the physical behavior of the solutions and thus behavior of any physical system governed by Burgers’ equation can be studied by this method. 4.1. Tables Computed results are displayed in Tables 1 to 11 at different nodal points for different values of viscosity. In Tables 1 to 6 we compare the absolute error with the absolute error of [7,10] for the Problem 3.1. From Table 7 to Table 10 absolute error is compared to the absolute Table 1. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.1 at T = 0.01, for vd = 20 and K = 0.0001 for N = 40. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.1 5.78801E–05 6E–05 0.00016 0.2 0.000109996 0.00011 0.00031 0.3 0.000151182 0.00016 0.00044 0.4 0.000177403 0.00019 0.00051 0.5 0.000186149 0.0002 0.00054 0.6 0.000176667 0.00019 0.00051 0.7 0.000149991 0.00016 0.00044 0.8 0.000108805 0.00011 0.00031 0.9 5.71442E–05 6E–05 0.00016 Copyright © 2011 SciRes. AM
K. PANDEY ET AL. 886 Table 2. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.1 at T = 0.01, for vd = 20 and K = 0.0001 for N = 80. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.1 1.37807E–05 1E–05 7E–05 0.2 2.61869E–05 3E–05 0.00014 0.3 3.59876E–05 5E–05 0.00021 0.4 4.22225E–05 5E–05 0.00024 0.5 4.42961E–05 6E–05 0.00025 0.6 4.20319E–05 5E–05 0.00024 0.7 3.56792E–05 5E–05 0.00021 0.8 2.58784E–05 3E–05 0.00014 0.9 0.00001359 1E–05 8E05 Table 3. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.1 at T = 0.1, for vd = 2 and K = 0.001 for N = 40. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.1 6.10384E–05 6E–05 0.00016 0.2 0.0001156 0.00011 0.0003 0.3 0.000157849 0.00016 0.00042 0.4 0.00018329 0.00018 0.0005 0.5 0.000189452 0.0002 0.00054 0.6 0.000176365 0.00019 0.00052 0.7 0.000146518 0.00017 0.00045 0.8 0.000104112 0.00048 0.00033 0.9 5.38605E–05 0.00026 0.00018 Table 4. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.1 at T = 0.1, for vd = 2 and K = 0.001 for N = 80. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.1 1.45914E–05 2E–05 7E–05 0.2 2.76247E–05 3E–05 0.00014 0.3 3.76962E–05 4E–05 0.0002 0.4 4.37257E–05 4E–05 0.00023 0.5 4.51272E–05 5E–05 0.00025 0.6 4.19278E–05 5E–05 0.00024 0.7 3.47543E–05 5E–05 0.00021 0.8 0.000024642 3E–05 0.00016 0.9 1.27275E–05 2E–05 8E–05 Table 5. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.1 for vd = 20, K = 0.01, N = 80 at different times. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.4 5.9E–05 8.00E–05 0.00023 0.6 4.4E–05 5.00E–05 0.00016 1 4E–05 2.00E–05 8E–05 3 1.48E–05 0 1E–05 0.4 0.000118 8.00E–05 0.00029 0.6 9.5E–05 7.00E–05 0.00024 1 7.1E–05 4.00E–05 0.00015 3 2.39E–05 1.00E–05 2E–05 0.4 3.7E–05 4.00E–05 0.00021 0.6 7.5E–05 6.00E–05 0.00021 1 7.2E–05 3.00E–05 0.00015 3 0.0010165 0.00101 0.0002 Table 6. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.1 for vd = 0.02, K = 0.01, N = 80 at different times. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.4 7.2E–05 0.00038 0.00076 0.6 5E–05 6E–05 0.00012 1 2.7E–05 2E–05 0.00013 3 8E–06 0 6E–05 0.4 0.000167 0.00726 0.01517 0.6 0.000106 0.00269 0.00736 1 5.2E–05 0.00058 0.00229 3 7E–06 0 4E05 0.4 0.000384 0.02654 0.04398 0.6 0.000234 0.01 0.02528 1 9.6E–05 0.00228 0.0093 3 3.3E–05 0 0.00047 Table 7. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.2 at T = 0.1, for vd = 2 and K = 0.001 for N = 40. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.1 6.34389E–05 6E–05 0.00012 0.2 0.000119993 0.00011 0.00023 0.3 0.000163549 0.00016 0.00032 0.4 0.00018952 0.00019 0.00037 0.5 0.000195514 0.0002 0.00039 0.6 0.000181726 0.0002 0.00038 0.7 0.000150809 0.00017 0.00033 0.8 0.000107093 0.00012 0.00024 0.9 5.53858E–05 7E–05 0.00013 Copyright © 2011 SciRes. AM
K. PANDEY ET AL.887 Table 8. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.2 at T = 0.1, for vd = 2 and K = 0.001 for N = 80. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.1 0.000015144 1E–05 3E–05 0.2 2.86478E–05 3E–05 6E–05 0.3 3.90448E–05 5E–05 9E–05 0.4 4.52233E–05 5E–05 9E–05 0.5 0.000046599 5E–05 1E–04 0.6 4.32271E–05 5E–05 1E–04 0.7 3.57791E–05 5E–05 9E–05 0.8 2.53375E–05 3E–05 6E–05 0.9 1.30758E–05 2E–05 3E–05 Table 9. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.2 for vd = 0.2, K = 0.01, N = 80 at different times. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.4 6.3E–05 9E–05 0.00017 0.6 4.6E–05 5E–05 0.00011 1 3.5E–05 2E–05 6E–05 3 1.16E–05 0 1E–05 0.4 0.000118 8E–05 0.00013 0.6 0.000101 7E–05 0.00012 1 8.1E–05 3E–05 8E–05 3 2.46E–05 1E–05 1E–05 0.4 3.6E–05 4E–05 8E–05 0.6 7.1E–05 7E–05 3E–05 1 6.8E–05 4E–05 6E–05 3 1.45E–05 0 1E–05 Table 10. Comparison of the absolute error with the absolute error of [7,10] for Problem 3.2 for vd = 0.02, K = 0.01, N = 80 at different times. /Error Without HopfCole Kadalbajoo et al. Pandey et al. 0.4 0.00012 0.00047 0.00113 0.6 8.6E–05 8E–05 0.00024 1 4.9E–05 2E–05 0.00011 3 1.21E–05 0 6E–05 0.4 0.000167 0.00818 0.0172 0.6 0.000128 0.00293 0.00839 1 7.7E–05 0.00059 0.00258 3 1.6E–05 0 5E–05 0.4 0.000286 0.0289 0.04617 0.6 0.000212 0.011 0.02718 1 0.000109 0.00238 0.0101 3 4.4E–05 4E–05 0.0005 Table 11. Comparison of the numerical solution with the exact solution for Problem 3.3 at different space points at T = 0.01, for vd = 20 and K = 0.0001 for different values of N. =10N=20N=40N =80N Exact 0.10.368710.377309 0.370262 0.370173 0.370141 0.2 0.705991 0.720825 0.708758 0.708574 0.70851 0.3 0.9818120.998880.985219 0.984931 0.984834 0.41.16936 1.18429 1.17275 1.17236 1.17224 0.51.24751 1.25697 1.25035 1.24988 1.24973 0.61.20385 1.20667 1.20583 1.20532 1.20517 0.71.03763 1.0351 1.03875 1.03827 1.03813 0.8 0.761828 0.757042 0.762304 0.761929 0.761818 0.9 0.403226 0.399692 0.403361 0.403154 0.403094 (a) (b) Figure 1. Absolute errors of Problem 3.1 at different times for vd = 20 and K = 0.0001, (a) N = 40, (b), N = 80. Copyright © 2011 SciRes. AM
K. PANDEY ET AL. Copyright © 2011 SciRes. AM 888 (a) (b) Figure 2. Absolute errors of Problem 3.1 at different times for vd = 2 and K = 0.001, (a) N = 40, (b) N = 80. (a) (b) Figure 3. Absolute errors of Problem 3.2 at different times for vd = 2 and K = 0.001, (a) N = 40, (b) N = 80. (a) (b) Figure 4. Numerical solutions of Problem 3.3 at different times for vd = 2 and K = 0.001, (a) N = 40, (b) N = 80.
K. PANDEY ET AL. Copyright © 2011 SciRes. AM 889 error of [7,10] for the Problem 3.2. In Table 11 for Problem 3.3 we compare the numerical solution to the exact solution and it is observed that computed result shows greater agreement with the exact solution as the mesh size is refined. 4.2. Figures In Figures 1 and 2 we compare the absolute error with the absolute error of [7] for Problem 3.1 and in Figure 3 we compare the absolute error with the absolute error of [7] for Problem 3.2. Finally in Figure 4 we compare the exact solution with the numerical solution for Problem 3.3. 5. References [1] N. Su, J. P. C. Watt, K. W. Vincent, M. E. Close and R. Mao, “Analysis of Turbulent Flow Patterns of Soil Water under Field Conditions Using Burgers’ Equation and Po rous SuctionCup Samplers,” Australian Journal of Soil Research, Vol. 42, No. 1, 2004, pp. 916. doi:10.1071/SR02142 [2] N. J. Zabusky and M. D. Kruskal, “Interaction of Solitons in a Collisionless Plasma and the Recurrence of Initial States,” Physical Revi ew, Vol. 15, No. 6, 1965, pp. 240243. doi:10.1088/03054470/33/18/308 [3] P. F. Zhao and M. Z. Qin, “Multisymplectic Geometry and Multisymplectic Preissmann Scheme for the Kdv Equation,” Journal of Physics A, Vol. 33, No. 18, 2000, pp. 36133626. [4] H. Brezis and F. Browder, “Partial Differential Equations in the 20th Century,” Advances in Mathematics, Vol. 135, No. 1, 1998, pp. 76144. doi:10.1006/aima.1997.1713 [5] J. D. Cole, “On a Quasilinear Parabolic Equation Occur ring in Aerodynamics,” Quarterly of Applied Mathemat ics, Vol. 9, 1951, pp. 225236. [6] E. Hopf, “The Partial Differential Eqaution u t + uux= vuxx,” Communication s on Pure and Applied Mathematics, Vol. 3, 1950, pp. 201230. doi:10.1002/cpa.3160030302 [7] M. K. Kadalbajoo and A. Awasthi, “A Numerical Method Based on CrankNicolson Scheme for Burgers’ Equa tion,” Applied Mathematics and Computation, Vol. 182, No. 2, 2006, pp. 14301442. doi:10.1016/j.amc.2006.05.030 [8] A. Gorguis, “A Comparison between ColeHopf Trans formation and Decomposition Method for Solving Bur gers’ Equations,” Applied Mathematics and Computation, Vol. 173, No. 1, 2006, pp. 126136. doi:10.1016/j.amc.2005.02.045 [9] S. Kutluay, A. Esen and I. Dag, “Numerical Solutions of the Burgers’ Equation by the Least—Squares Quadratic BSpline Finite Element Method,” Journal of Computa tional and Applied Mathematics, Vol. 167, No. 1, 2004, pp. 2133. doi:10.1016/j.cam.2003.09.043 [10] K. Pandey, L. Verma and A. K. Verma, “On a Finite Difference Scheme for Burgers’ Equation,” Applied Mathematics and Computation, Vol. 215, No. 6, 2009, pp. 22062214. doi:10.1016/j.amc.2009.08.018 [11] M. K. Jain, “Numerical Solution of Differential Equa tions,” New Age International (P) Limited, New Delhi, 1984. [12] G. D. Smith, “Numerical Solution of Partial Differential Equations,” Oxford University Press, Oxford, 1978.
