next up previous contents index

2.3.9 Update formula in conservation form

After computing e.g. from the fluxes in the cells

\begin{displaymath}
{\color{DEFcolor}
f(\rho_i^n)= v_{}   \rho_i^n
}
\end{displaymath} (97)
the fluxes at cell boundaries
\begin{displaymath}
f_{i+\frac{1}{2}}^n
\end{displaymath} (98)
that characterize a method, the update can be done by the formula
\begin{displaymath}
\rho_i^{n+1} = \rho_i^n - \frac{\Delta t}{\Delta x}   \left( f_{i+\frac{1}{2}}^n - f_{i-\frac{1}{2}}^n \right)
\enspace .
\end{displaymath} (99)
This is the conservation form because the density changes only due to fluxes through the boundaries and is conserved otherwise,
$\displaystyle \textstyle
\sum_{i=i_0}^{i_1} \rho_i^{n+1} \!$ $\textstyle = \!$ $\displaystyle \textstyle
\sum_{i=i_0}^{i_1} \rho_i^{n} +
\frac{\Delta t}{\Delta x}
\sum_{i=i_0}^{i_1} \left( f_{i+\frac{1}{2}}^n - f_{i-\frac{1}{2}}^n \right)$ (100)
  $\textstyle = \!$ $\displaystyle \textstyle
\sum_{i=i_0}^{i_1} \rho_i^{n}
+ \frac{\Delta t}{\Delta...
...{i+\frac{1}{2}}^n - f_{i+\frac{1}{2}}^n \right)
- f_{i_0-\frac{1}{2}}^n
\right]$ (101)
  $\textstyle = \!$ $\displaystyle \textstyle
\sum_{i=i_0}^{i_1} \rho_i^{n}
+ \frac{\Delta t}{\Delta x}
\left(
f_{i_1+\frac{1}{2}}^n
- f_{i_0-\frac{1}{2}}^n
\right)
\enspace .$ (102)