A Survey of the Implementation of Numerical Schemes for Linear Advection Equation

The interpolation method in a semi-Lagrangian scheme is decisive to its performance. Given the number of grid points one is considering to use for the interpolation, it does not necessarily follow that maximum formal accuracy should give the best results. For the advection equation, the driving force of this method is the method of the characteristics, which accounts for the flow of information in the model equation. This leads naturally to an interpolation problem since the foot point is not in general located on a grid point. We use another interpolation scheme that will allow achieving the high order for the box initial condition.


Introduction
The classical 1D linear advection equation is given by 0 We can see that Equation ( 1) is a 1-D version (linear) of the partial differential equations [1], which describe advection of quantities such as energy, mass, heat, etc.Here, ( ) , u u x t = , x ∈  and 0 α ≠ is a nonzero con- stant velocity.We can say that Equation (1) describes the motion of a scalar u as it is advected by a known velocity field.
We know that the unique solution of Equation ( 1) is determined by an initial condition An analysis of a numerical scheme implies to study the consistency, stability and accuracy.The goal of the analysis is to get an idea about how good a difference scheme is representing the linear advection equation.In the following we will make some analysis of the approximate difference schemes to the Equation (1).
Numerical problems arising with pollutions models are discussed in [2].Textbooks that deal with advection problems are [3] and [4] The spectral-methods and finite elements for linear advection equations we refer are [5] and [6] respectively.There exists more recent bibliography on finite element methods, which can be consulted in [7].
The paper is organized as follows.In Sections 2 and 3, we consider two cases firstly ( ) and here we study the implementation of the schemes Lax-Friedrich, Lax-Wendroff and RK3-TVD-WENO5 and we derive the expected GTE (Global Truncation Error) and we verify it by producing a convergence plot (by using the 1 l , 2 l and l ∞ norm).After this, we repeat by using the box function In Section 4, we consider linear and quadratic interpolation and we study the stability and accuracy by using semi-Lagrangian approach for linear advection equation and finally we produce a convergence plot for (2) with another interpolation scheme.

Implementation of the Schemes and GTE
Initially we consider the 1-D linear advection equation We can to verify that the solution is ( ) ( ) 0 , u x t u x t = − , and therefore for ( ) ( ) . Now, we compute the global truncation error for the schemes as follows.1) Lax-Friedrich.Here, the discretization of the advection equation by using Lax-Friedrich gives ( ) and therefore we can verify so the stability condition is ( ) 2) Lax-Wendroff.Here, the discretization of the advection equation by using Lax-Wendroff gives ( ) and therefore we can verify .
and the stability condition (CFL) is ( ) 3) RK3-TVD + WENO5.For this scheme the one-step is , and the stability condition is ( ) Now, for all schemes we proceed by to build the spatial grid by letting 2π d 2 k x = , k ∈  and we define the vector which has N points.As the boundary conditions are periodic, we will have to make the following identifications, for some r satisfying the CFL (condition).Therefore we define ( ) where τ is the final time.So we going to iterate until the time but at least.Here, all times steps are the same size dt.Finally, when computing the global truncation error, the only important thing is to always compute it at the same time t  for all grid resolutions.Now, the scheme (LF, LW or RK3-WENO5) is applied until t  is reached.Then the output is app u .The grid resolution dx, calculate what the true solution is at time t  and compute the norm of the errors by using ( ) ( ) Here we iterate over the resolution by varying k in order to get a convergence plot of the various norms of the errors vs. grid size.Lax-Friedrich.This scheme can be coded very efficiently using matrices.We can see that the scheme can be rewritten as ( ) ( ) therefore taking into account the periodic boundary conditions Lax-Wendroff.Similarly this scheme can be implemented by using RK3-TVD-WENO5.For each point on the grid, we need to compute two intermediate values as follows.
( ) ( ) ( ) Therefore, the code for WENO5, when solving a conservative equation of the form ( ) ( ) acts as the speed function.Then at the interior point We can say that finally we obtain

Test Problems
Example 1.We consider the condition ( ) , then by using the schemes we have: • Lax-Friedrich.The convergence results are shows on Figure 1.(Convergence plot for ( ) ( ) x t = − in Log-Log scale, advected by using L-F scheme.

(
)  ) As above, the grid resolution was varied from    ) Therefore, since in deriving the LTE and GTE, we used the Taylor series of the function ( ) , u x t .But the box function being only 0 C , we cannot expect ( ) , u x t to equal its Taylor series point wise, and thereforethe above reasoning does not apply.It is interesting to watch the box evolve when advected with a L-F scheme.This is presented in a series of snapshots put together in Figure 5. (The true solution is plotted in red and the numerical solution is plotted in blue.)Clearly, the schemes fails to capture the discontinuities of the function, and its diffusive nature eventually leads to large errors near the discontinuities.This explains why the L ∞ norm of the error cannot converge.This also explains why the 1  L norm, which is simply the area between the true solution and the numerical solution, improves with the grid resolution.
• Lax-Wendroff.The convergence results are shown on     It is interesting to watch the box evolve when advected by a L-W scheme.This is presented in a series of snapshots put together in Figure 7 (true solution in red and numerical solution in blue).This scheme also fails to capture the discontinuities of the function, and its dispersive nature eventually leads to large errors near the discontinuities, where wild oscillations appear.However, the overall shape of the box is better preserved than when advected with L-F, which provides a simple explanation as to why the rate of convergence of the L 1 norm is slightly better.The final time was increased to 4 T = .Therefore We almost get first order convergence in the L 1 norm, which is much better than with the previous two schemes.However, convergence is slower in the L 2 norm and absent in the L ∞ norm.
Again, it is interesting to watch the box evolve when advected by an RK3-TVD-WENO5 scheme.Although this scheme also fails to capture the discontinuities of the function, the overall shape is much better preserved than when advected with the previous two linear schemes.Although the L ∞ norm cannot converge because of the large errors near the discontinuities, those errors do not spread out and pollute the solution, which explains why the rate of convergence of the L 1 norm is almost 1.

Semi-Lagrangian Approach
The idea is to use various values of 0 j u to build an interpolant ( ) an arbitrary function on  .
expected orders of convergence were already visible at those resolutions.•Lax-Wendroff.The convergence results are shown on Figure2.(Convergence plot for ( ) ( ) Log scale, advected by using L-W scheme.

1 T
≈ is plotted against ( ) log h ).As above, the grid resolution was varied from 5 d 2π 2 x = to 16 2π 2 x =.The slope for the L ∞ , since there clearly isn't convergence.
• RK3-TVD-WENO5.The convergence results are shown on Figure 8. (Convergence plot for box in log-log scale, advected by using RK3-TVD-WENO5 scheme.)As above, the grid resolution was varied from