next up previous contents
Next: Velocity Up: The advection equation Previous: Order of Convergence of   Contents

Implementation of a naive piecewise linear reconstruction

In a Godunov method, during an update step, functions $\tilde{q}(x,t)$ are introduced to approximate the solution in the volumes $C_i$ of our volume discretization. We need to solve the Riemann initial value problem at the interfaces between cells. The functions are defined piecewise on the domain intervals and interpolated, or reconstructed, from the cell averages $\bar{q}_i^n$. They are three so called reconstruction functions.

The algorithm for this reconstruction is the first choice that comes to mind, and consists in computing the slope1 centered at the cell boundaries,

\begin{displaymath}
s = \frac{q_{i+1}-q_i}{x_{i+1}-x_i}
\end{displaymath} (6)


\begin{displaymath}
q_{Li+\frac{1}{2}} = q_i + \frac{1}{2}s\left(x_{i+\frac{1}{2}}-x_{x-\frac{1}{2}}\right)
\end{displaymath} (7)


\begin{displaymath}
q_{Ri-\frac{1}{2}} = q_i - \frac{1}{2}s\left(x_{i+\frac{1}{2}}-x_{x-\frac{1}{2}}\right)
\end{displaymath} (8)

About the performance of the naive reconstruction: The results of the evolution of the gaussian and pulse profiles are shown in the web site.

As expected, this reconstruction produces spurious oscillations at discontinuities (shocks), making the scheme unstable. Slope limiters and the use of the property of TVD provide a way to damp oscillations near discontinuities. This scheme is stable in the short term only.

Recapitulating, the piecewise linear reconstruction is stable (for long time periods) and its more dense in the sense that its complexity requires more computing power. The piecewise constant reconstruction is somewhat less stable in the long term but it demands less power, but we would loose some confidence in the results. The naive approach, finally, is the less stable and of course it does not require much resources but we would not use it for any large scale project.

The results depend dramatically on the type of reconstruction employed.


next up previous contents
Next: Velocity Up: The advection equation Previous: Order of Convergence of   Contents
Benjamin Gutierrez 2005-07-23