In this paper, the Crank-Nicolson difference method is applied to a simple problem involving one dimensional heat equation. Numerical solution to the heat equation using Crank-Nicolson difference equation is obtained. The method of solving the problem is implemented by using Python Programming. We have discussed the local truncation error and stability analysis of Crank-Nicolson difference method difference method of heat equation.
Introduction
I. INTRODUCTION
The heat diffusion equation is a parabolic partial differential equation which describes the heat distribution in a given region and provides the basic tool for heat conduction analysis. The heat equation is used to solve problems arising in the field of Engineering, Fluid Mechanics, Atmospheric Science, Climate Physics, Weather Forecasting and Solar Physics. Analytical and Numerical methods have gained the interest of researchers for finding approximate solution to partial differential equations. Numerical Methods have applied to calculate the approximate solutions using Crank-Nicolson difference method. The Crank-Nicolson method for solving heat equation was developed by John Crank and Phyllis Nicolson in 1947. This method is for numerically evaluating the partial differential equations which gives the accuracy of a second order approach in both space and time with the stability of an implicit method.
Liu J. and Hao Y. have applied the Crank-Nicolson difference method to obtain an analytical solution of uncertain heat equation. Besides, the two algorithms are investigated to compute two characteristics of uncertain heat equation solution the expected value and the extreme value with various examples [1]. Umar Ali et al. have described the Crank-Nicolson difference method for two – dimensional sub diffusion equation. They have found that the scheme is convergent and it is unconditionally stable. The result shows that the scheme is feasible and accurate [2]. Halil ANAC et al. have successfully applied Crank-Nicolson difference method to solve a random component heat equation. They have obtained the expected value and variance of this solution. The numerical solution shows that this method is very effective by implementing MAPLE software [3]. Cem Celik and Melda Duman have applied Crank-Nicolson difference method to a linear fractional diffusion equation and proved that the method is unconditionally stable and convergent. The numerical solution shows that the accuracy by using simulation method [4]. Chen Jing had developed for a one-dimensional and two-dimensional diffusion equation for Crank-Nicolson difference method. The alternating block technique is further extended to a three-dimensional space diffusion equation and he found that the new method is suitable to MIMD computers [5]. Fadugba S. E. et al. have demonstrated that the Crank-Nicolson difference method performs well and provides better accuracy for exact solution. This method is robust, unconditionally stable and converges faster than the two finite difference methods FTCS and BCTS [6]. Omar Abdullah Ajeel and A.M.Gaftan have solved the heat diffusion problem by using Crank-Nicolson difference method and ADI numerical method. Both the results were compared and it reveals that Crank-Nicolson difference method is more accurate than the ADI method [7].
F. Jamaluddin et al. have solved the homogeneous one-dimensional heat equation by using Implicit Crank-Nicolson difference method. The results are compared with analytical solution and exact solution. The results are very precise or remain the same as exact solution [8]. H. Zureigat et al. have obtained the results using Crank-Nicolson difference method satisfy the complex fuzzy number properties by taking the triangular fuzzy number shape for both the real part and imaginary part and have an accuracy. Further, it was found that the complex fuzzy approach is general and computationally efficient to transfer the information that happens periodically [9].
Irfan Raju et al. have proposed to solve the two-dimensional heat equation with initial conditions by using Crank-Nicolson difference method. They have suggested that the Digital Image Processing can be a valuable tool for numerical modeling of the heat equation by using MATLAB Codes [10].
S. K. Maritim had proposed that the modified Crank-Nicolson difference method produces more accurate results and unconditionally stable as compared to the ordinary Crank-Nicolson difference method [11]. This paper proposes the numerical solution for the heat equation using Crank-Nicolson difference method by Python programming. The paper is organized as follows: Section II presents the heat equation, Section III discusses the discrete grid, Section IV discusses the Discrete Initial and Boundary conditions, Section V presents the Crank- Nicolson difference method, Section VI focuses on implementation and results, Section VII discusses local truncation error, Section VIII focuses on stability analysis and finally the conclusion is presented in Section IX.
Conclusion
We first introduced the one-dimensional heat equation to obtain the numerical approximation using Crank-Nicolson difference method. We have proposed the initial value problem with boundary conditions to find the numerical solution. The region is discretized into a uniform mesh. The solution is obtained by implementing Python programming by using initial and boundary conditions. The numerical solution for the heat equation is shown in Figure 4. We have investigated the local truncation error and stability analysis of the Crank-Nicolson difference method of the heat equation.
References
[1] Liu J. and Hao Y., “Crank-Nicolson Method for Solving Uncertain Heat Equation”, Soft Computing, Volume 26, January 2022, pp. 937-945.
[2] Umair Ali et al., “Crank-Nicolson Finite Difference Method for Two-Dimensional Fractional Sub-diffusion Equation”, Journal of Interpolation and Approximation in Scientific Computing, Volume 2017, Issue 2, 2017, pp. 18-29.
[3] Halil ANAC et al., “Application of Crank-Nicolson Method to a Random Component Heat Equation”, Sigma Journal of Engineering and Natural Sciences, Volume 38(1), 2020, pp. 475-480.
[4] Cem Celik and Melda Duman, “Crank-Nicolson Method for the Fractional diffusion Equation with the Riesz Fractional Derivative”, Journal of Computational Physics, Volume 231, Issue 4, February 2012, pp. 1743-1750.
[5] Chen Jing., “Alternating Block Crank-Nicolson Method for the 3-D Heat Equation”, Applied Mathematics and Computation, Volume 66, Issue 1, November 1994, pp.41-61.
[6] Fadugba S. E. et al., “Crank-Nicolson Method for Solving Parabolic Partial Differential Equations”, International Journal of Applied Mathematics and Modeling, Volume 1, Issue 3, September 2013, pp.08-23.
[7] Omar Abdullah Ajeel and A. M. Gaftan., “Using Crank-Nicolson Numerical Method Equation to Solve Heat Diffusion Problem”, Tikrit Journal of Pure Science, Volume 28, Issue 3, June 2023, pp.101-104.
[8] F. Jamaluddin et al., “Numerical Solution of Homogeneous One-dimensional Heat Equation Using Crank-Nicolson Method”, Conference Proceeding, IJURECON 2020, pp. 01-07.
[9] H. Zureigat et al, “A Solution of the Complex Fuzzy Heat Equation in terms of Complex Dirichlet Conditions Using a Modified Crank-Nicolson Method”, Hindawi Advances in Mathematical Physics, Volume 2023, September 2023, pp.01-08.
[10] Irfan Raju et al.,“A Case Study on Simulation of Heat Equation by Crank-Nicolson Method in Accordance with Digital Image Processing”, International Journal of Scientific and Engineering Research, Volume 13, Issue 1, January 2022, pp.461-465.
[11] S. K. Maritim, “Modified Crank-Nicolson Based Methods on the Solution of One-dimensional Heat Equation”, Non-linear Analysis and Differential Equations, HIKARI Ltd., Volume 7, No. 1, 2019, pp.33-37.
[12] G D Smith, “Numerical Solution of Partial Differential Equations: Finite Difference Method” Oxford 1992.