# Accuracy of the Crank-Nicolson method depending on the parameter of the method r

• Vesna Gunova University"Goce Delcev"
• Vlado Gicev

### Abstract

The method of Crank-Nicolson is powerful implicit method for numerical solving of parabolic partial differential equations. Because the method is implicit, it is unconditionally stable. We analyze the accuracy of the Crank-Nicolson method depending on the parameter r which is the ratio of the time step and the square of the spatial interval. To do this study, we consider metal rod initially heated with specific heat distribution. Temperature at the ends of the rod is prescribed at each time. For this example, close analytical solution given in Fourier series exists. Using Crank-Nicolson method, with Matlab we solve the problem for specific r. We compare this numerical solution with the exact analytical solution and obtain the error for the actual parameter r. Then we repeat the procedure for other values of the parameter r. On this way we are obtaining the dependence of the error of the method upon the parameter r.

### References

Kocaleva,M and Gicev, V. Application of the Crank-Nicolson method for solving heat equations (on Macedonian), Yearbook of the Faculty of Computer Science 01/2013; 2(2), 2013

Gicev, V. and Trifunac, M.D. Non-linear earthquake waves in seven-storey reinforced concrete hotel,NISEE, Pacific Earthquake Engineering (PEER) Center, Univ. of California, Berkeley, 2006.

Gicev, V. and Trifunac, M.D. Amplification of linear strain in a layer excited by a shear-wave earthquake pulse, Soil Dynamics and Earthquake Engineering, vol. 30, issue 10, 2010, 1073-1081.

Giordano, N.J. and Nakanishi, H. Computational Physics, 2nd edition “Implicit Methods: the Crank Nicolson Algorithm”, 2005.

Kreyszig, E. “Advanced Engineering Mathematics”, 8th edition, 1999

Li, J-R., and Greengard, L. On the numerical solution of the heat equation I: Fast solvers in free space, Journal of Computational Physics 226, 2007, 1891-1901

McKenney, A., Greengard, L., and Mayo, A. A fast Poisson Solver for Complex Geometries, Journal of Computational Physics 118, 1995, 348-355

Proskurowski, W. Lectures on CE504 “Numerical Solution of PDE”, Univ. of Southern California, 2001

Smith G.D., Numerical Solution of Partial Differential Equations, 3rd Edition, Oxford Univ. Press,

Published
2015-05-19
Section
Articles