Abstract
Numerical solutions of one-dimensional heat and advection-diffusion equations are obtained by collocation method based on cubic B-spline. Usual finite difference scheme is used for time and space integrations. Cubic B-spline is applied as interpolation function. The stability analysis of the scheme is examined by the Von Neumann approach. The efficiency of the method is illustrated by some test problems. The numerical results are found to be in good agreement with the exact solution.
1. Introduction
The combination of advection and diffusion is important for mass transport in fluids. It is well known that the volumetric concentration of a pollutant, , at a point in a one-dimensional moving fluid with a constant speed and diffusion coefficient in direction at time is given by the one-dimensional advection-diffusion equation, which is in the form subject to the initial condition and the boundary conditionswhere and are assumed to be smooth functions. It should be noted that, when , the advection-diffusion equation will be reduced to the one-dimensional heat equation in the case of thermal diffusion.
Advection-diffusion equation arises very frequently in transferring mass, heat, energy, and vorticity in chemistry and engineering. Thus, it has been of interest to many authors. A third-degree -spline function has been used by Caglar et al. for solving one-dimensional heat equation with a nonlocal initial condition [1]. Mohebbi and Dehghan [2] have presented a fourth-order compact finite difference approximation and cubic -spline collocation method for the solution with fourth-order accuracy in both space and time variables, . In [3], Dag and Saka concluded that collocation scheme is easy to implement compared to other numerical methods with giving a better result.
In this paper, a combination of finite difference approach and cubic -spline method would be considered to solve the one-dimensional heat and advection-diffusion equation. Forward finite difference approach would be used for discretizing the derivative of time, while cubic -spline would be applied to interpolate the solutions at time . Von Neumann approach would be used to prove the unconditionally stable property of the method. Finally, the approximated solutions and the numerical errors would be presented to demonstrate the efficiency of the method.
2. Collocation Method
In this paper, cubic -splines are used to construct the numerical solutions to solve the problems. Consider a partition of that is equally divided by knots into subinterval , where such that . Hence, an approximation to the exact solution based on collocation approach can be expressed as [4] where are time-dependent quantities to be determined and are third-degree -spline functions which are defined by the relationship [5] where . The approximation at the point over the subinterval can be simplified into where . To obtain the approximations of the solutions, the values of and its derivatives at the knots are needed. Since the values vanish at all other knots, they are omitted from Table 1.
The approximations of the solutions of (1.1) at th time level can be considered by [6]:
where and the superscripts and are successive time levels, . Now, discretizing the time derivative by a first-order accurate forward difference scheme and rearranging the equation, we obtain where is the time step. Note that the system becomes an explicit scheme when , a fully implicit scheme when , and a mixed scheme of Crank-Nicolson when [6]. Here, Crank-Nicolson approach is used. Hence, (2.5) takes the form for at each level of time. Therefore, a linear system of order is obtained with unknowns at the level time . To solve the system, two additional linear equations are needed. Thus, (2.3) is applied to the boundary conditions (1.3a)-(1.3b) to obtainEquations (2.6), (2.7a)-(2.7b) lead to a tridiagonal matrix system, which can be solved by the Thomas algorithm. Once the initial vector has been calculated from the initial conditions [7], the approximation solution at each level of time can be determined by the vector which is found by solving the recurrence relation repeatedly.
The initial vector can be obtained from the initial condition and boundary values of the derivatives of the initial condition as the following expressions [6]:(1), ,(2), ,(3), .
This yields a matrix system where the solution can be found by Thomas algorithms.
3. Stability Analysis
Von Neumann stability method is applied for analyzing the stability of the proposed scheme. This type of stability analysis had been used by many researchers [3, 8–10]. Consider the trial solution (one Fourier mode out of the full solution) at a given point where and is the mode number. By substituting (2.3) into (2.5) and rearranging the equation, it leads to where Inserting the trial solution (3.1) into (3.2) and simplifying the equation give where If the amplification factor , then the proposed scheme is stable, or else the approximations grow in amplitude and become unstable. As is used in the proposed scheme, thus substitute the value into (3.4) and after some algebraic manipulation, it can be noticed that Thus, this had been proved that the presented numerical scheme for the advection-diffusion equation is unconditionally stable.
4. Numerical Results
4.1. Problem 1
Suppose the heat equation is as follows [11]:
with initial and boundary conditions The exact solution is known to be . This problem is tested by different values of and to show the capability of the presented method for solving one-dimensional heat equation. The final time is chosen as . The maximum absolute errors of the method are compared with those obtained by Crank-Nicolson (CN) scheme and compact boundary value method (CBVM) in [11]. The numerical errors are presented in Table 2. Although the fourth-order compact boundary value method gives a much more better solution, the present method is still well compared with the Crank-Nicolson scheme.
4.2. Problem 2
Consider the advection-diffusion equation in (1.1) with , , as follows [2]:
where the initial condition is given by
and the exact solution The boundary conditions at and can be obtained from the exact solution. Table 3 shows the absolute errors of the approximations at the grid points when . It can be noticed that the present method is comparable with cubic -spline collocation method. The approximations of the solutions over a time period along is depicted in Figure 1.
5. Conclusions
A numerical method based on collocation of cubic -spline had been described in the previous section for solving one-dimensional heat and advection-diffusion equations. A finite difference scheme had been used for discretizing time derivatives and cubic -spline for interpolating the solutions at each time level. From the test problems, the obtained results show that the presented method is capable for solving one-dimensional heat and advection-diffusion equations accurately with a promised stability.
Acknowledgment
The authors would like to acknowledge with thanks the financial support from Malaysian Government in the form of Fundamental Research Grant Scheme (FRGS) of number 203/PMATHS/6711150.