Finite difference methods (FDM) are well‐known numerical methods to solve differential equations by approximating the derivatives using different difference schemes [1,2]. The finite difference approximations for derivatives are one of the simplest and oldest methods to solve differential equations [3]. Finite difference techniques in numerical applications began in the early 1950s as represented in Refs. [4,5], and their advancement was accelerated by the emergence of computers that offered a convenient framework for dealing with complex problems of science and technology. Theoretical results have been found during the last five decades related to accuracy, stability, and convergence of the finite difference schemes (FDS) for differential equations. Many science and engineering models involve nonlinear and nonhomogeneous differential equations, and solutions of these equations are sometimes beyond the reach by analytical methods. In such cases, FDM may be found to be practical, particularly for regular domains.
There are various types and ways of FDS [6,7] depending on the type of differential equations, stability, and convergence [8]. However, here only the basic idea of the titled method is discussed.
In this section, the fundamental concept and FDS are addressed. The numerical solutions of differential equations based on finite difference provide us with the values at discrete grid points. Let us consider a domain (Figure 5.1) in the xy‐plane. The spacing of the grid points in the x‐ and y‐directions are assumed to be uniform and given by Δx and Δy. It is not necessary that Δx and Δy be uniform or equal to each other [ 1 , 5 , 8 ] always.
Figure 5.1 Discrete grid points.
The grid points in the x‐direction are represented by index i and similarly j in the y‐direction. The concept of FDM is to replace the derivatives involved in the governing differential equations with algebraic difference techniques. This results in a system of algebraic equations which can be solved by any standard analytical/numerical methods for evaluating the dependent variables at the discrete grid points. There are three ways to express derivatives in FDS which are
In this scheme, the rate of change of the function with respect to the variable x is represented between the current value at x = xi and the forward step at xi + 1 = xi + Δxi. Mathematical representation of the derivative of the function y(x) can be presented as
where h is the increment in step size.
The second‐order derivative of the function at x can be derived as
In this case, we evaluate the rate of change of the function values between the current step at xi and back step at xi − 1 = xi − Δx. Mathematically, we can represent it as
and the second‐order derivative in the form
In the central difference scheme the rate of change of y(x) is considered between the step at xi − Δx and the step ahead of xi, i.e. xi + Δx. Mathematically,
and the second‐order central difference form for the derivative is given by
Similar to the FDS for ODE discussed in Section 5.2.1, FDS for Partial differential equations (PDEs) are given in Table 5.1.
Table 5.1 Finite difference schemes for PDEs.
Derivative approximation of z(x, y) | ||
Scheme | Derivative with respect to x | Derivative with respect to y |
Forward | ![]() |
![]() |
![]() |
![]() |
|
Center | ![]() |
![]() |
![]() |
![]() |
|
Backward | ![]() |
![]() |
![]() |
![]() |
To evaluate the derivative term , let us write the x‐direction as a central difference of y‐derivatives [9], and further we make use of central difference to find out the y‐derivatives. Thus, we obtain
Similarly, other difference schemes may also be written.
Explicit and implicit approaches are used to obtain the numerical approximations to the time‐dependent differential equations, as required for computer simulations [10,11].
Explicit finite difference scheme evaluates the state of a system at later time by using the known values at current time. Mathematically, the temperature at time t + Δt depends explicitly on the temperature at time t and this scheme is relatively simple and computationally fast.
Let us introduce a parabolic PDE, namely heat equation, to understand the procedure for the explicit finite difference method.
Let us consider a time‐dependent heat equation
with respect to initial condition
and boundary conditions
Let the domain from x = 0 to x = L be subdivided into N subparts so that x = 0 corresponds to i = 0 and x = L corresponds to i = N with t = 0 corresponding to j = 0. Then the initial conditions may be represented as
and the boundary conditions
The central difference scheme has been used to represent the term and a forward difference scheme for the derivative term
. By substituting the differencing schemes of the derivative terms in Eq. (5.1), one may obtain
where
Since, we know the values of ui, j, ui + 1, j , and ui − 1, j of Eq. (5.3), one may get the values of ui, j + 1.
In implicit finite difference scheme the solution of governing differential equation depends on both the current state of the system and later state. So, a general recursive computation is not specified. Implicit schemes are generally solved by using matrix inverse methods for linear problems and iterative methods in nonlinear problems [ 10 , 11 ].
Next, solving procedure has been included for a time‐dependent diffusion equation by using the implicit finite difference method.
Let us consider a time‐dependent equation
with the initial conditions
and the boundary conditions
By approximating the derivatives, Eq. (5.4) can be represented as
where .
There are different stability conditions for the above two schemes and interested readers may find the details in Refs. [ 1 , 2 , 4 , 6 , 10 , 11 ].
The next section implements numerical example results of the explicit and implicit schemes for heat equation subject to specific initial and boundary conditions.
Figure 5.2 Solution of heat equation using the explicit scheme.
Figure 5.3 Solution of heat equation using the implicit scheme.
Figure 5.4 Discretizing the temperature (T) of a square shaped domain.
3.137.173.249