Cubic B-Spline Collocation Method for One-Dimensional Heat and Advection-Diffusion Equations

Numerical solutions of one-dimensional heat and advection-di ﬀ usion equations are obtained by collocation method based on cubic B -spline. Usual ﬁnite di ﬀ erence 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 e ﬃ ciency of the method is illustrated by some test problems. The numerical results are found to be in good agreement with the exact solution.


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, u x, t , at a point x a ≤ x ≤ b in a one-dimensional moving fluid with a constant speed β and diffusion coefficient α in x direction at time t t ≥ 0 is given by the one-dimensional advection-diffusion equation, which is in the form u t βu x αu xx , a ≤ x ≤ b, t ≥ 0, 1.1 subject to the initial condition u x, 0 φ x , x ∈ a, b , 1.2 and the boundary conditions u a, t g 0 t , 1.3a u b, t g 1 t , t ∈ 0, T , 1.3b where g 0 and g 1 are assumed to be smooth functions.It should be noted that, when β 0, 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 B-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 C 1 -spline collocation method for the solution with fourth-order accuracy in both space and time variables, O h 4 , k 4 .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 B-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 B-spline would be applied to interpolate the solutions at time t.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.

Collocation Method
In this paper, cubic B-splines are used to construct the numerical solutions to solve the problems.Consider a partition of a, b that is equally divided by knots x i into n subinterval x i , x i 1 , where i 0, 1, . . ., n−1 such that a x 0 < x 1 < • • • < x n b.Hence, an approximation U x, t to the exact solution u x, t based on collocation approach can be expressed as 4 where C i t are time-dependent quantities to be determined and B 3,i x are third-degree Bspline functions which are defined by the relationship 5

2.2
Table 1: Values of B i , B i , and B i .
where h b − a /n.The approximation U k i at the point x i , t k over the subinterval x i , x i 1 can be simplified into where i 0, 1, . . ., n.To obtain the approximations of the solutions, the values of B 3,i x 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 t j 1 th time level can be considered by 6 : where i and the superscripts k and k 1 are successive time levels, k 0, 1, 2, . ... Now, discretizing the time derivative by a first-order accurate forward difference scheme and rearranging the equation, we obtain where Δt is the time step.Note that the system becomes an explicit scheme when θ 0, a fully implicit scheme when θ 1, and a mixed scheme of Crank-Nicolson when θ 0.5 6 .
Here, Crank-Nicolson approach is used.Hence, 2.5 takes the form for i 0, 1, . . ., n at each level of time.Therefore, a linear system of order n 1 is obtained with n 3 unknowns n−1 at the level time t t k 1 .To solve the system, two additional linear equations are needed.Thus, 2.3 is applied to the boundary conditions 1.3a -1.3b to obtain

2.7b
Equations 2.6 , 2.7a -2.7b lead to a n 3 × n 3 tridiagonal matrix system, which can be solved by the Thomas algorithm.Once the initial vector C 0 has been calculated from the initial conditions 7 , the approximation solution U k 1 i at each level of time t k 1 can be determined by the vector C k 1 which is found by solving the recurrence relation repeatedly.
The initial vector C 0 can be obtained from the initial condition and boundary values of the derivatives of the initial condition as the following expressions 6 : This yields a n 3 × n 3 matrix system where the solution can be found by Thomas algorithms.

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 i √ −1 and η is the mode number.By substituting 2.3 into 2.5 and rearranging the equation, it leads to where

3.3
Inserting the trial solution 3.1 into 3.2 and simplifying the equation give where

3.5
If the amplification factor |δ| ≤ 1, then the proposed scheme is stable, or else the approximations grow in amplitude and become unstable.As θ 0.5 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.

Problem 1
Suppose the heat equation is as follows 11 : with initial and boundary conditions The exact solution is known to be u x, t exp −π 2 t sin πx .This problem is tested by different values of h and Δt to show the capability of the presented method for solving one-dimensional heat equation.The final time is chosen as T 1.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.

Problem 2
Consider the advection-diffusion equation in 1.1 with β 1, α 0.1, as follows 2 : where the initial condition is given by

4.5
The boundary conditions at x 0 and x 1 can be obtained from the exact solution.Table 3 shows the absolute errors of the approximations at the grid points when T 2. It can be noticed that the present method is comparable with cubic C 1 -spline collocation method.The approximations of the solutions over a time period t ∈ 0, 2 along x is depicted in Figure 1.

Conclusions
A numerical method based on collocation of cubic B-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 B-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 advectiondiffusion equations accurately with a promised stability.

Table 2 :
Maximum absolute error obtained for problem 1.

Table 3 :
Absolute error obtained with Δt 2h at T 2 for problem 2.