Professional Documents
Culture Documents
Comparativestudyofdifferent Implicit Finite Differencemethods
Comparativestudyofdifferent Implicit Finite Differencemethods
net/publication/351428779
CITATIONS READS
0 299
3 authors:
Muntasir Mamun
Khulna University of Engineering and Technology
9 PUBLICATIONS 4 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Controlling Photophysics of Defect Emission in Hexagonal Boron Nitride (hBN) View project
All content following this page was uploaded by Ashfaq Ahmed on 08 May 2021.
Abstract: Finite Difference Implicit methods have been frequently used for solving the heat
convection-diffusion equation. One of the biggest advantages of implicit schemes is that the
solution remains well behaved for arbitrarily large time steps. Crank Nicolson and Alternating
Direction implicit and Alternating Direction semi-implicit methods are very popular finite
difference methods. They have been previously applied in many heat convection-diffusion
problems. In this paper, we use these finite difference implicit methods to solve the heat
convection-diffusion equation for a thin copper plate. By comparing the results obtained by
these methods we determine the best method for solving problems related to heat transfer of a
thin plate. The results depict that the Alternating Direction method provides the most accurate
and stable solution. Crank Nicolson method is suitable for large scale solution and the
Alternate Direction semi-implicit method requires less computation time but provides detritus
solution in the x-direction.
Introduction
Finite Difference Method has been frequently used for solving the convection-diffusion
equation [1]. The convection-diffusion equation generally discusses the heat and energy flow
in a system. It is vastly used for two and three dimensional systems. Both implicit and explicit
schemes have been used to solve this equation [2-5]. The explicit method can be defined as the
process when by which a state of the system is calculated for a later time from the state of the
system at a current time whereas implicit system considers both the present time and the later
time [6]. In the unsteady state problems, explicit methods have been frequently used but the
problem of instability in the large-scale time-dependent problems has always been there [7]. In
this paper, we have analysed three different implicit schemes for the heat transfer analysis of a
thin plate. The schemes are Crank Nicolson method, Alternating Direct implicit method, and
Alternating Direct semi-implicit method. The Crank Nicolson method despite being
unconditionally stable provides some errors such as method error, representation error, and
rounding error. But as time increases these errors also tend to neutralize due to its unconditional
behavior [8]. An Alternating Directing Implicit method uses a direct, non-iterative method to
solve a small set of simultaneous equations. The advantage of this method is that it is stable for
any time step [9]. The semi-implicit scheme discretizes some terms into implicit and the
remaining into explicit of a time-dependent problem.[10]. But it has a problem that it may give
errors in one direction [11].
All of these schemes have been heavily used by the scientific community for solving various
practical problems. Lozinski et al. [12] use the Crank Nicolson method and finite element
discretization to derive two posterior upper bounds for the heat equation. Jin et al. [13] analyses
the sub diffusion equation and uses the Crank Nicolson time-stepping scheme. Geoola et al.
[14] studied a solid sphere indulged in an incompressible fluid and its time-dependent
convective heat transfer using the Alternating Direct Implicit method. Samir Karaa [15] solves
a three-dimensional convection-diffusion problem using a higher-order compact alternating
direction scheme. Banaszek et al. [16] use a semi-implicit scheme for the simulation of two-
dimensional solid-liquid phase change. Ramaswamy et al. [17] investigate the incompressible
flow using a semi-implicit finite element method.
Previous works regarding the discussed implicit methods were mainly focused on the
application of these schemes for solving various parabolic equations and phenomena. Their
main objective was to apply the schemes to solve complex numerical equations or to improve
the efficiency of the solution by introducing high order schemes. Although diffusion
convection of thin plate is a very common heat transfer related problem and explicit methods
have been previously used to solve them, but no impactful work using the mentioned implicit
scheme has been done. There has also been very little study regarding the comparison of the
three mentioned scheme. In this paper, the heat convection-diffusion analysis has been done
using the Crank Nicolson method, Alternating Direction Implicit method, and the Alternating
Direction semi-implicit method. The methods have been used to solve the two-dimensional
convection-diffusion equation. Then the set of equations achieved from the solution has been
solved using MATLAB programming language. The results obtained from the set of equations
have been used to compare the three different schemes, their stability, accuracy, and efficiency.
Our observations indicate that the Alternating Direction Implicit method provides the most
stable and accurate solution.
Numerical Solution
𝜕 2𝑇 𝜕 2𝑇 𝐺𝑒𝑛𝑒𝑟𝑎𝑡𝑖𝑜𝑛
𝐾( 2
+ 2 ) 𝑑𝑥𝑑𝑦𝑑𝑧 + [±𝐶𝑜𝑛𝑣𝑒𝑐𝑡𝑖𝑜𝑛] + [±𝑟𝑎𝑑𝑖𝑎𝑡𝑖𝑜𝑛] + [+ ] 𝑑𝑥𝑑𝑦𝑑𝑧
𝜕𝑥 𝜕𝑦 −𝐴𝑏𝑠𝑜𝑟𝑏𝑡𝑖𝑜𝑛
𝜕𝑇
= 𝜌𝑐𝑝 𝜕𝑡 𝑑𝑥𝑑𝑦𝑑𝑧 (1)
Here, K indicates the thermal conductivity of the material, 𝜌 indicates the density of the
material and 𝑐𝑝 indicates the specific heat at constant pressure and T indicates the temperature
profile.
For the problem discussed in this paper, the radiation is negligible so that can be ignored.
Convection can be considered as heat carried away. Here the generation and absorption are
considered zero. Hence equation (1) can be simplified as
𝜕2𝑇 𝜕2𝑇 𝜕𝑇
𝐾 (𝜕𝑥 2 + 𝜕𝑦 2 ) 𝑑𝑥𝑑𝑦𝑑𝑧 − 2ℎ(𝑇 − 𝑇∞ )𝑑𝑥𝑑𝑦 = 𝜌𝑐𝑝 𝜕𝑡 𝑑𝑥𝑑𝑦𝑑𝑧 (2)
Now both sides of equation (2) have been divided by dxdydz and thus we get a simplified form
of equation (2)
𝜕2 𝑇 𝜕2 𝑇 2ℎ(𝑇−𝑇∞ ) 𝜕𝑇
𝐾( + )− = 𝜌𝑐𝑝 (3)
𝜕𝑥 2 𝜕𝑦 2 𝑑𝑧 𝜕𝑡
Figure 1 indicates the problem domain that was selected for this analysis
Crank-Nicolson method is a very popular finite difference approach to solve heat conduction
equations and similar partial differential method. It is considered as a second-order method in
time. Here this method will be used to solve the heat conduction of a thin plate.
According to the finite difference method equation (4), (5) and (6) are discretized equations
𝜕𝑇 𝑇𝑖,𝑗,𝑡+1 −𝑇𝑖,𝑗,𝑡
| = (4)
𝜕𝑡 𝑖,𝑗,𝑡/2 ∆𝑡
𝜕𝑇 1 𝐾 𝜕2 𝑇 𝜕2 𝑇 2ℎ 𝐾 𝜕2 𝑇 𝜕2 𝑇 2ℎ
⌋ = 2 [𝜌𝑐 {(𝜕𝑥 2 + 𝜕𝑦2 ) − 𝜌𝑐 (𝑇 − 𝑇∞ )} + 𝜌𝑐 {(𝜕𝑥 2 + 𝜕𝑦2 ) − 𝜌𝑐 (𝑇 − 𝑇∞ )} ] (7)
𝜕𝑡 𝑖,𝑗,𝑡/2 𝑝 𝑝 𝑑𝑧 𝑝 𝑝 𝑑𝑧
𝑖,𝑗,𝑡+1 𝑖,𝑗,𝑡
Now to simplify the equation, Δx = Δy = Δ has been assumed and the discretized equations
have been implemented in equation (7)
Now by bringing t+1 related term on the left-hand side the final form of the solvable
differential equation has been obtained
𝐾∆𝑡
( ) (𝑇𝑖−1,𝑗,𝑡+1 + 𝑇𝑖+1,𝑗,𝑡+1 + 𝑇𝑖,𝑗−1,𝑡+1 + 𝑇𝑖,𝑗+1,𝑡+1 − 4𝑇𝑖,𝑗,𝑡+1 ) − 2𝑇𝑖,𝑗,𝑡+1 −
𝜌𝑐𝑝 ∆2
ℎ∆𝑡 𝐾∆𝑡
𝑇 = −2𝑇𝑖,𝑗,𝑡 − (𝜌𝑐 ) (𝑇𝑖−1,𝑗,𝑡 + 𝑇𝑖+1,𝑗,𝑡 + 𝑇𝑖,𝑗−1,𝑡 + 𝑇𝑖,𝑗+1,𝑡 − 4𝑇𝑖,𝑗,𝑡 ) −
𝜌𝑐𝑝 𝑑𝑧 𝑖,𝑗,𝑡+1 𝑝∆
2
ℎ∆𝑡 2ℎ∆𝑡𝑇∞
𝑇 − (9)
𝜌𝑐𝑝 𝑑𝑧 𝑖,𝑗,𝑡 𝜌𝑐𝑝 𝑑𝑧
𝐾∆𝑡
To simplify the equation let us assume = 𝑟 & 𝑑𝑧 = 𝑑 = 𝑡ℎ𝑖𝑐𝑘𝑛𝑒𝑠𝑠. Hence equation (9)
𝜌𝑐𝑝 ∆2
becomes
ℎ∆𝑡
𝑟(𝑇𝑖−1,𝑗,𝑡+1 + 𝑇𝑖+1,𝑗,𝑡+1 + 𝑇𝑖,𝑗−1,𝑡+1 + 𝑇𝑖,𝑗+1,𝑡+1 ) − 2 (1 + 2𝑟 + 2𝜌𝑐 𝑑) 𝑇𝑖,𝑗,𝑡+1 =
𝑝
ℎ∆𝑡 2ℎ∆𝑡𝑇∞
−𝑟(𝑇𝑖−1,𝑗,𝑡 + 𝑇𝑖+1,𝑗,𝑡 + 𝑇𝑖,𝑗−1,𝑡 + 𝑇𝑖,𝑗+1,𝑡 ) − 2(1 − 2𝑟 − 2𝜌𝑐 𝑑)𝑇𝑖,𝑗,𝑡 − (10)
𝑝 𝜌𝑐𝑝 𝑇
Here the value of i ranges from 2 to m-1 and the value of j ranges from 2 to n-1. Where m and
n indicate the number of nodes in x and y-direction. By implementing the values of i and j, a
system of linear equations will be obtained. By solving those systems of linear equations the
temperature for different nodes of a thin plate can be obtained. The mesh grid system of
analysis for heat conduction analysis of thin plate has been shown in figure (2)
Figure 2. Finite difference method heat transfer grid for Crank Nicolson method
The conventional two-dimensional Alternating Direction Implicit method has been used for
solving parabolic and elliptic partial differential equation and heat transfer problems [18]. The
Alternating Direction implicit method contains two directional solving method in one-time
step. Hence convection in one direction is considered as half of the total convection.
So similar to equation (8) we have
𝑇𝑖,𝑗,𝑡+1 −𝑇𝑖,𝑗,𝑡 𝐾
= (𝑇𝑖−1,𝑗,𝑡+1 − 2𝑇𝑖,𝑗,𝑡+1 + 𝑇𝑖+1,𝑗,𝑡+1 + 𝑇𝑖,𝑗−1,𝑡 − 2𝑇𝑖,𝑗,𝑡 + 𝑇𝑖,𝑗+1,𝑡 ) −
∆𝑡 𝜌𝑐𝑝 ∆2
ℎ
[(𝑇𝑖,𝑗,𝑡+1 − 𝑇∞ ) + (𝑇𝑖,𝑗,𝑡 − 𝑇∞ )] (11)
2𝜌𝑐𝑝 𝑑𝑧
𝐾∆𝑡
By assuming 𝜌𝑐 2
= 𝑟 and modifying equation (11) the following horizontal traverse equation
𝑝∆
is obtained
ℎ∆𝑡
𝑟(𝑇𝑖−1,𝑗,𝑡+1 + 𝑇𝑖+1,𝑗,𝑡+1 ) − (1 + 2𝑟 + 2𝜌𝑐 𝑑) 𝑇𝑖,𝑗,𝑡+1 = −𝑟(𝑇𝑖,𝑗−1,𝑡 + 𝑇𝑖,𝑗+1,𝑡 ) −
𝑝
ℎ∆𝑡 ℎ∆𝑡𝑇∞
(1 − 2𝑟 − 2𝜌𝑐 𝑑)𝑢𝑖,𝑗,𝑡 − (12)
𝑝 𝜌𝑐𝑝 𝑇
Here the value of i ranges from 2 to m-1 and the value of j ranges from 2 to n-1. Where m and
n indicate the number of nodes in x and y-direction.
ℎ∆𝑡
𝑟(𝑇𝑖,𝑗−1,𝑡+1 + 𝑇𝑖,𝑗+1,𝑡+1 ) − (1 + 2𝑟 + 2𝜌𝑐 𝑇) 𝑇𝑖,𝑗,𝑡+1 = −𝑟(𝑇𝑖−1,𝑗,𝑡 + 𝑇𝑖+1,𝑗,𝑡 ) −
𝑝
ℎ∆𝑡 ℎ∆𝑡𝑇∞
(1 − 2𝑟 − 2𝜌𝑐 𝑇)𝑇𝑖,𝑗,𝑡 − (13)
𝑝 𝜌𝑐𝑝 𝑑
Here the value of i ranges from 2 to m-1 and the value of j ranges from 2 to n-1. Where m and
n indicate the number of nodes in x and y-direction. By solving these systems of the linear
equation the nodal temperatures can be obtained.
Figure 3. FDM 2D Heat Transfer Stencil for ADI Method: (a) Horizontal Traverse, (b)
Vertical Traverse
Boundary Conditions
𝑇(x, 𝑦, 0) = 𝑇∞ (18)
This section is dedicated to comparing the obtained results by Crank Nicolson, Alternating
Direction Implicit, and ADI semi-implicit method has been analysed and compared. Amr
Mousa et al[1] designed an algorithm to solve the heat equation of a 2D plate. His algorithm
used similar “Dirichlet conditions” and an initial temperature at all nodes. He used the local
fractional Euler method and the second-order Runge Kutta method to solve the heat equation.
His analysis focused on determining the nodal temperature at various points of the plate for
different time steps. Figure 4 indicates the points whose temperature was considered during
analysis and Table 1 compares the result between the different algorithms for Aluminium and
boundary condition of 𝑇1 = 𝑇2 = 𝑇4 = 0𝐾 , 𝑇4 = 200𝐾 and an initial temperature of 0K.
Euler method is an explicit method and the methods used in this paper are implicit methods.
Table 1 indicates that when applied to two-dimensional heat transfer problems all four methods
exhibit similar results.
For further analysis, copper material has been used. Table 2 indicates the properties that were
used in the final analysis.
Table 2. Material Properties
Property Numerical value
Thermal Conductivity(W/mK) 385
Density(Kg/𝑚3 ) 8960
Specific heat capacity(J/KgK) 376.812
Convective heat transfer coefficient of air 10
1(a) Crank Nicolson method 1(b) ADI 1(c) ADI semi implicit
2(a) Crank Nicolson method 2(b) ADI 2(c) ADI semi implicit
3(a) Crank Nicolson method 3(b) ADI 3(c) ADI semi implicit
4(a) Crank Nicolson method 4(b) ADI 4(c) ADI semi implicit
Figure 5. Temperature profile for heat conduction and convection of thin plate. 1) t = 0 sec,
2) t = 0.1 sec, 3) t = 5 sec, 4) t = 10 sec
Figure 6 gives an elaborated idea about the differences between the two schemes. The results
elucidate that as time increases and the conditions move toward a steady state, the solution
obtained by three different schemes also converge. So it can be implied that all three schemes
can be used for steady-state analysis but for unsteady state analysis Alternating Direct Implicit
scheme has more similarity with the previously applied explicit method. Although the Crank
Nicolson method is considered stable and a very simple system of linear equation solution is
required for every time step but the system is not impervious to errors. Especially, when the
conduction term of the problem (the second derivative) is very small compared to the
convection term (the co-efficient of the first derivative). oscillations in the solution can also
occur if the situation is vice versa. That is the situation that has happened in this paper.
Although the problem can be solved by introducing a mesh size that is smaller than a certain
critical value. But that can’t be done due to the limitation of computational power. As a result,
there is a slight difference between the explicit method and the Crank Nicolson method. On the
contrary, the Alternating Direct Implicit method has unconditional stability which means that
the time step size does not have any effect on the result. Hence it provides a more accurate
result for both unsteady and steady-state.
Figure 7 illustrates the computational time required for three different schemes. For this paper,
a processor of 2.20 GHz, Random Access Memory of 8 gigabytes, and an M2 2242 Solid State
Drive has been used for computation. The processor was maintained at a constant temperature
for stable performance for all three schemes. The Crank Nicolson Method took the highest time
to execute the program although the Alternating Direction Implicit Method provided more
values.
Figure 6. Change in temperature in point A with time for four different solution schemes
Figure 7. Computation time analysis for three different solution schemes.
The Alternating Direction semi-implicit method took the least amount of Comparative
study of different Implicit Finite Difference methods time to execute the code. This
is because semi-implicit schemes split the terms in such a way that explicit discretization time
step is significantly smaller than the largest stable semi-implicit discretization time step.
Conclusion
In this work, we have used the crank Nicolson, Alternating Direct Implicit, and Alternating
direct semi-implicit to solve the heat convection-diffusion phenomenon of the copper thin
plate. From the obtained results analysis it was observed that the Crank Nicolson method is
unstable when the time step is large and analysed over a small period. It requires the highest
computational time amongst the three schemes. The alternating Direction implicit method
provides the best results for this problem. Although the computation time for the Alternating
Direction Semi Implicit scheme is much less than the two other methods its' solution is unstable
in the horizontal direction. Considering all the facts it is suggested that Alternating Direction
Implicit scheme should be used for such problems if the computation power is limited and the
problem is time-dependent.
Reference
[1] Amr Mousa (2020). 2D Heat Equation Using Finite Difference Method with Steady-
State Solution (https://www.mathworks.com/matlabcentral/fileexchange/55058-2d-heat-
equation-using-finite-difference-method-with-steady-state-solution), MATLAB Central File
Exchange. Retrieved June 23, 2020.
[2] Noye, B. J., & Tan, H. H. (1988). A third‐order semi‐implicit finite difference method
for solving the one‐dimensional convection‐diffusion equation. International journal for
numerical methods in engineering, 26(7), 1615-1629.
[3] Tian, Z. F., & Ge, Y. B. (2007). A fourth-order compact ADI method for solving two-
dimensional unsteady convection–diffusion problems. Journal of Computational and Applied
Mathematics, 198(1), 268-286.
[4] Karaa, S., & Zhang, J. (2004). High order ADI method for solving unsteady
convection–diffusion problems. Journal of Computational Physics, 198(1), 1-9.
[6] En.wikipedia.org. 2020. Explicit And Implicit Methods. [online] Available at:
<https://en.wikipedia.org/wiki/Explicit_and_implicit_methods#:~:text=Explicit%20methods
%20calculate%20the%20state,system%20and%20the%20later%20one.> [Accessed 23 June
2020].
[7] Schäfer, M., Turek, S., Durst, F., Krause, E., & Rannacher, R. (1996). Benchmark
computations of laminar flow around a cylinder. In Flow simulation with high-performance
computers II (pp. 547-566). Vieweg+ Teubner Verlag.
[8] J. Crank and P. Nicolson (1947). A practical method for numerical evaluation of
solutions of partial Differential equations of the heat conduction type. Mathematical
Proceedings of the Cambridge Philosophical Society, 43, pp 5067.
[9] Kelley, C. T. (1995). Iterative methods for linear and nonlinear equations. Society for
Industrial and Applied Mathematics.
[12] Lozinski, A., Picasso, M., & Prachittham, V. (2009). An anisotropic error estimator for
the Crank–Nicolson method: Application to a parabolic problem. SIAM Journal on Scientific
Computing, 31(4), 2757-2783.
[13] Jin, B., Li, B., & Zhou, Z. (2018). An analysis of the Crank–Nicolson method for
subdiffusion. IMA Journal of Numerical Analysis, 38(1), 518-541.
[14] Geoola, F., & Cornish, A. R. H. (1982). Numerical simulation of free convective heat
transfer from a sphere. International Journal of Heat and Mass Transfer, 25(11), 1677-1687.
[15] Karaa, S. (2006). A high‐order compact ADI method for solving three‐dimensional
unsteady convection‐diffusion problems. Numerical Methods for Partial Differential
Equations: An International Journal, 22(4), 983-993.
[16] Banaszek, J., Jaluria, Y., Kowalewski, T. A., & Rebow, M. (1999). Semi-implicit FEM
analysis of natural convection in freezing water. Numerical Heat Transfer: Part A:
Applications, 36(5), 449-472.
[17] Ramaswamy, B., Jue, T. C., & Akin, J. E. (1992). Semi‐implicit and explicit finite
element schemes for coupled fluid/thermal problems. International journal for numerical
methods in engineering, 34(2), 675-696.