Abstract

The purpose of this paper is to develop a high-order compact finite difference method for solving one-dimensional (1D) heat conduction equation with Dirichlet and Neumann boundary conditions, respectively. A parameter is used for the direct implementation of Dirichlet and Neumann boundary conditions. The introduced parameter adjusts the position of the neighboring nodes very next to the boundary. In the case of Dirichlet boundary condition, we developed eighth-order compact finite difference method for the entire domain and fourth-order accurate proposal is presented for the Neumann boundary conditions. In the case of Dirichlet boundary conditions, the introduced parameter behaves like a free parameter and could take any value from its defined domain but for the Neumann boundary condition we obtained a particular value of the parameter. In both proposed compact finite difference methods, the order of accuracy is the same for all nodes. The time discretization is performed by using Crank-Nicholson finite difference method. The unconditional convergence of the proposed methods is presented. Finally, a set of 1D heat conduction equations is solved to show the validity and accuracy of our proposed methods.

1. Introduction

Heat conduction problems with suitable boundary conditions exist in many areas of engineering applications [17]. Historically, highly accurate compact finite difference schemes are developed in the work by Lele [8]. But these higher-order compact finite difference schemes only offer good accuracy at the interior nodes or for periodic boundary conditions. Usually, compact finite difference schemes have first- or second-order accuracy [9, 10]. The low-order of accuracy near boundary grid points affects the whole numerical results and it reduces the accuracy of overall numerical solution [11]. Some authors offer one-side finite difference approximations for the Dirichlet boundary condition [8, 12] but they cannot offer unconditional stability for the whole finite difference scheme. Recently, Dai et al. [11, 1316] proposed a new idea to achieve higher-order accuracy with unconditional stability. Actually, authors introduced a new parameter that adjusts the location of nodes near the boundaries in symmetric way.

2. Higher-Order Compact Finite Difference Method

The 1D heat conduction equation can be written as Dirichlet boundary conditions are as follows:Neumann boundary conditions are as follows:

Han and Dai [17] have proposed a compact finite difference method for the spatial discretization of (1a) that has eighth-order accuracy at interior nodes and sixth-order accuracy for boundary nodes. Actually, they use eighth-order accurate approximation for the second-order derivative developed in [8] and given as where double dash always means derivative with respect to spatial variable and , , , and . The implicit compact finite difference scheme (4) without the contribution of boundary nodes in matrix form is given byHere,

The governing equation of implicit compact finite difference approximation of second-order derivative isNote that (4) can be obtained from (7).

We can observe that matrix is strictly diagonally dominant and matrix is diagonally dominant. In [17], authors constructed finite difference scheme at boundary nodes in such a way that they conserve the diagonal dominance of matrixes and to attain higher order of accuracy. The achieved order of accuracy at boundary nodes in [17] is six. The essence of article [17] is hidden in the calculation of a parameter that they use to obtain higher-order approximation near boundary nodes. The parameter makes the point distribution unequal near boundary but offer higher order of accuracy and diagonal dominance for matrices and . The diagonally dominance of and is the key to prove stability of whole compact finite difference scheme when they use Crank-Nicholson method for time integration.

We construct a new finite difference scheme for boundary nodes to achieve eighth order of accuracy that exactly matches the order of accuracy at the interior nodes. The inclusion of two parameters and ’s will be introduced in our newly developed finite difference scheme for boundary nodes. The diagonally dominance will be conserved and the whole eighth-order scheme becomes stable.

The stencil of eighth-order implicit finite difference scheme to approximate the second-order derivative for the interior nodes isIt means that if we are at location , then we need two grid nodes to the left of and two grid points to the right of it. It is noticeable that mutual distance between nodes is equal to and points divide the interval with , , , , and for . Figure 1 shows the location of interior and boundary nodes.

In the case of Dirichlet boundary conditions, we construct the eighth-order accurate implicit finite difference approximations of second-order derivatives for the nodes , , , and , whereas, in the case of Neumann boundary conditions, we establish stable fourth-order compact finite difference scheme for the entire grid.

3. Compact Implicit Finite Difference Scheme for Boundary Nodes in the Case of Dirichlet Boundary Conditions

In the case of Dirichlet boundary condition, we construct the following compact implicit finite difference scheme at point :where , (≠0), and for are unknowns and we are interested to find them in such a way that we can get(i)eighth-order accurate approximation of second-order derivative at ,(ii)diagonal dominance, that is, and .

By expanding (9) around the node and equating the coefficients of the same-order derivatives, we get the following system of equations:

By solving (10), we get the solution as follows:We define the error equation asAfter substituting the solution (11) into (12), we getwhere Similarly, at the node , we have the following construction of the implicit compact finite difference scheme:where , (≠0), (≠0), and for are unknowns and we are interested to find them in such a way that we can get(i)eighth-order accurate approximation of second-order derivative at ,(ii)diagonal dominance, that is, and .By expanding (15) around the node and equating the coefficients of the same-order derivative, we get the system of the following:By solving (16), we get the following solution:

The error equation at the node is given byBy substituting (17) into (18), we getwhere In a similar way to that for the nodes and , the implicit compact finite difference approximation of second-order derivatives at nodes and is constructed.

4. Implicit Compact Finite Difference Scheme for Boundary Nodes in the Case of Neumann Boundary Conditions

For the construction of fourth-order implicit compact finite difference approximation for second-order derivatives at node , , we consider the following model: The stencil in (21) isand its length is three. It means that we have to construct a fourth-order approximation of second-order derivative at nodes and . Due to symmetry, we will only present the construction for the node in the case of Neumann boundary conditions. By expanding (21) around the node and comparing the coefficients of the same-order derivative of at , we find the following values: and (21) becomeswhere . Equation (24) can be written asThe error equation for (24) is given byNext, we consider the following model for the construction of implicit compact finite difference approximation of the second-order derivative at node :After expanding (27) around and simplifying it, we get the values of the parameters:where . The error equation for the stencil (27) is given by

5. Stability

Consider a partition of . We define and . The implicit compact finite difference scheme for the second-order derivative can be written as The vector form of 1D heat conduction equation (1a) can be written asFor time integration, we adopt Crank-Nicholson method for (31):where , , and . For stability analysis, we assume two different solutions and of (32). Equation (32) can be written asBy subtracting (34) from (33), we getIf we assume that is the eigenvalue of , then is the eigenvalue of . By definition of as positive and for stability of the algorithm, we have to show thatwhere . It means that we have to show that the real part of the eigenvalues of is positive. According to Taussky theorem [18], an irreducible diagonally dominant matrix is positive definite if every main diagonal entry of the matrix is real and positive; then, every eigenvalue of the matrix has positive real part; that is, the matrix is positive definite. It can be seen that matrices (47), (48), (49), and (50) are positive definite (positive definite in the sense that the eigenvalues have positive real part) according to Taussky theorem. In fact, matrices (47), (48), (49), and (50) (i)are irreducible,(ii)are diagonally dominant with at least one strict diagonal dominance,(iii)have real diagonal entries that are positive.

Theorem 1. Prove that if matrices and are positive definite, then matrix is also positive definite in the sense that its eigenvalues have positive real parts.

Proof. Let be the eigenvalue of with corresponding eigenvector . Then, we have   × (38)    × (38)    × (39) + × (40)    × (42) + × (41) The quadratic forms , , , and are positive, because matrixes and are positive definite. From (43) and (44), we have Suppose that the eigenvalues of are real; that is, ; then, (45) and (46) imply that . But if the eigenvalues of are not real, then we have the required positivity of from the fact that the signs of , , and are arbitrary for arbitrary and . The arbitrariness of signs does not affect inequalities (45) and (46); hence, we conclude that which completes the proof.

6. Numerical Simulations

To observe the validity and accuracy of our proposed finite difference schemes, we solve the following two test problems, one with Dirichlet boundary conditions and the other one with Neumann boundary conditions:The analytical solution to the above Dirichlet problem is . AndThe analytical solution to the above Neumann problem is .

In Table 1, we computed the spatial rate of convergence of our proposed implicit compact finite difference scheme for the Dirichlet problem. In all cases, Table 1 shows that the spatial rate of convergence is at least eight. In Table 2, we measure the temporal rate of convergence of Crank-Nicholson method which is at least two and it is according to the theoretical rate of convergence. Similarly, in Tables 3 and 4, we computed the spatial and temporal rates, respectively, for Neumann problem and found them according to theoretical values. In the case of Dirichlet problem, the variation of does not affect error in temporal dimension but does affect the error in spatial dimension and that is why Table 2 shows the same values of error with respect to different values of and . We also observe that as we decrease either , , or both, we get reduction in the error . Decreasing of means that we increase the number of grid points in the spatial domain and this is also valid in temporal dimension. The temporal domain for the Dirichlet and Neumann problems is chosen to as the solution decays rapidly when the time passes . The maximum error in the numerical solution occurs around in temporal dimension; this is the reason why we just integrate the Dirichlet problem in the temporal domain (see Table 1).

7. Conclusions

The implicit compact finite difference methods provide a more accurate way to approximate the spatial derivatives compared to explicit finite difference methods. The construction of compact finite difference operators for the interior nodes provides diagonal dominance and positivity of the diagonal entries which is in fact a very nice property which finally appears in the form of positive deftness of the compact operator. We have observed that the positive deftness helps us to prove the stability of numerical algorithm to solve 1D heat conduction equations. However, the diagonal dominance and positivity of diagonal entries for the interior nodes are not enough, because we also have to deal with the boundary conditions and usually one-sided compact finite difference schemes do not respect the nice property of positive definiteness with high order of convergence rate. In this project, the designing of the high-order accurate boundary conditions is established in such a way that we can maintain the positive definiteness of compact operator for the numerical scheme.

Competing Interests

The authors declare that there are no competing interests regarding the publication of this paper.