_{1}

^{*}

In this paper, we describe a comparison of two spatial discretization schemes for the advection equation, namely the first finite difference method and the method of lines. The stability of the methods has been studied by Von Neumann method and with the matrix analysis. The methods are applied to a number of test problems to compare the accuracy and computational efficiency. We show that both discretization techniques approximate correctly solution of advection equation and compare their accuracy and performance.

A currently active area of research is the numerical solution of nonlinear partial differential equations and nonlinear integral equations [

The nonlinear advection equation arises in various branches of physics, engineering and applied sciences. The importance of obtaining the exact or approximate solution of this equation is still a significant problem that needs new methods to discover exact or approximate solution.

The linear advection equation is simple in form and yet it is one of the most difficult equations to solve accurately by numerical means [

In this paper, the advection equation is solved by finite difference method [

Let us consider the equation

and v is a nonzero constant velocity, where

The using of some of the finite difference schemes on advection equations can cause unstable solutions. To add stability, upstream (backward or forward) could be used for spatial discretization for the first-order differences. However, for a given spatial accuracy, these differences need to use extra grid points than centered difference. An artificial dissipation (or viscosity) term is normally introduced to a central differencing scheme for stability reasons but it is not easy to determine the magnitude of this term required for the stability and effect of this term on the solutions.

The aim of new method is to develop a good formula with high accuracy for the numerical solution of the advection equation using the spatial discretization presented by Sharaf and Bakodah, [

Adopting a forward temporal difference scheme, this yields

There are two standard methods of the finite-difference equation. In the first method, a finite Fourier series is used. In the other method, the equation is expressed in matrix form, and the eigenvalues of the associated matrix are examined. In order to investigate the stability of this scheme by the first method (Von Neumann stability analysis), it is considered

Replacing

where

The stability condition

That is, the method (2) is stable.

In the Numerical Method of Lines (NMOL), the partial differential equation (PDE), to be solved, is transformed into a system of ordinary differential equations (ODEs) by discretizing all the independent variables but one [

The technique consists of converting the PDE into ODEs either by finite difference spline or by weighted-res- idual technique, then integrating the resulting ODEs [

Such facilities can be improved for hyperbolic equations by incorporating an upwind weighted residual technique. This technique is similar and superior to the use of an artificial viscosity term, and it could be implement easily in any software package. Previous considerations of the (NMOL) to solve PDEs have been geared to parabolic equation and generally used centered, second-order differences. Using these differences on hyperbolic equations can lead to unstable solution. To add stability, upstream (backward or forward) first-order differences could be used for the spatial discretization. But these differences require the use of more grid points than central differences for a given spatial accord. An artificial dissipation (or viscosity) term is often added to a central differencing scheme to add stability but it is difficult to determine the magnitude of this term required for the stability and the effect of this term on the solutions. Other stabilizing techniques that have been employed in the explicit finite difference procedures are generally not applicable to the method of lines approach because they involve manipulation of terms in both the time and space discretization.

In this paper, a modified method of lines using a new three-point difference [

It leads to stable schemes with good accuracy. In this section the second method shall be used. The analysis of eigenvalues of the system gives the necessary conditions for the stability of discretization of the problem [

By considering equation (1) with the centered difference scheme of order two, then we get

where

and

Mathematically the difference scheme is stable if there exists a real positive eigenvalues. However, where

where

which are pure imaginary values.

So, we consider the non-centered formula approximation

with the matrix formula

Thus the eigenvalues are given by

These values are real and negative, so the difference scheme is stable.

We apply the Finite Difference Method with a good spatial discretization to solve linear advection equation to demonstrate the validity of this method.

Consider the equation

with the conditions

With the analytic solution

Using equation (3) we find

let

We apply the Modified of the Method of lines to solve linear advection equation to demonstrate the validity of this method.

Consider the following advection equation

with the conditions

t i | |||||
---|---|---|---|---|---|

0.05 | 0.04 | 0.03 | 0.02 | 0.01 | |

0.000811146 | 0.00051992 | 0.000277333 | 0.000098253 | 4.675 × 10^{−7 } | 10 |

0.00357781 | 0.00221805 | 0.00114473 | 0.00039252 | 1.93417 × 10^{−6 } | 20 |

0.00831948 | 0.00510019 | 0.00260313 | 0.000882787 | 4.40083 × 10^{−6 } | 30 |

0.0150361 | 0.00916632 | 0.00465253 | 0.00156905 | 7.8675 × 10^{−6 } | 40 |

0.0237278 | 0.0144165 | 0.00729293 | 0.00245132 | 0.0000123342 | 50 |

0.0343945 | 0.0208506 | 0.0105243 | 0.00352959 | 0.0000178008 | 60 |

0.0470361 | 0.0284687 | 0.0143467 | 0.00480385 | 0.0000242675 | 70 |

0.0616528 | 0.0372709 | 0.0187601 | 0.00627412 | 0.0000317342 | 80 |

0.0782445 | 0.047257 | 0.0237645 | 0.00794039 | 0.0000402008 | 90 |

0.0968111 | 0.0584271 | 0.0293599 | 0.00980265 | 0.0000496675 | 100 |

and the analytic solution

Substituting in equation (9) we find

and the condition are

Hence, we can write

So, to confirm the accuracy and efficiency of the method, the absolute error

Consider the equation

and

with the analytic solution

t | |
---|---|

0.00101545 | 0.01 |

0.00233093 | 0.02 |

0.00397634 | 0.03 |

0.00598185 | 0.04 |

0.00837779 | 0.05 |

0.01119470 | 0.06 |

0.01446333 | 0.07 |

0.01821444 | 0.08 |

0.02247890 | 0.09 |

0.02728780 | 0.10 |

In this example we apply the Modified of the Method of lines and the finite difference method to solve linear advection equation to demonstrate the validity of them and compare between them.

Consider the advection equation

with the condition

and the exact solution

This problem is solved for

The method of lines | Finite difference method | |
---|---|---|

0.0003747 | 0.02067970 | 0.1 |

0.0016946 | 0.01054830 | 0.2 |

0.00400098 | 0.00921847 | 0.3 |

0.00709063 | 0.00851550 | 0.4 |

0.0106622 | 0.00790683 | 0.5 |

0.0144267 | 0.00863854 | 0.6 |

0.0181591 | 0.00712179 | 0.7 |

0.0217072 | 0.06114460 | 0.8 |

0.0249812 | 0.07981530 | 0.9 |

0.0279372 | 0.11121000 | 1.1 |

The method of lines | Finite difference method | |
---|---|---|

0.00196377 | 0.1 | |

0.00392755 | 0.2 | |

0.00589132 | 0.3 | |

0.00785510 | 0.4 | |

0.00981887 | 0.5 | |

0.01283950 | 0.6 | |

0.00119615 | 0.7 | |

0.08608410 | 0.8 | |

0.09607220 | 0.9 | |

0.12879500 | 1.0 |

From the studied test examples, it has been found that, the modified method of lines gives better results than the finite difference method. Although the modified method of lines is used to approximate the first order hyperbolic differential equation. Thus equations are one of the most difficult classes of PDEs to integrate numerically. To overcome this, a modified MOL scheme is suggested. The results are in good agreement with the exact solution as shown in

The methods introduced in this paper for solving the linear and nonlinear advection equation are based on finite difference method. The best choice of the numerical method for a given problem depends on the stability condition.

Huda O.Bakodah, (2016) A Comparative Study of Two Spatial Discretization Schemes for Advection Equation. International Journal of Modern Nonlinear Theory and Application,05,59-66. doi: 10.4236/ijmnta.2016.51006