finite volume methods: what do I have to do with the cell averages after each step?

278 Views Asked by At

I'm having a hard time understanding finite volume methods.

If I take for example the scalar advection equation $$\partial{u}_{t}+a\partial{u}_{x}=0, a>0$$ with suitable initial and bondary conditions, and use cell averages with $x_{i}=i\triangle x$ and $t_{n}=n\triangle t$ $$U_{i}^{n}=\frac{1}{\triangle x}\int_{x_{i-\frac{1}{2}}}^{x_{i+\frac{1}{2}}} u(x,t) dx $$ and integrate over cells and use forward euler, I obtain the following method by Enquist-Osher $$U_{i}^{n+1}=U_{i}^{n}- \frac{\triangle t}{\triangle x}(U_{i}^{n}-U_{i-1}^{n})$$ which is stable for $\frac{\triangle t}{\triangle x}\leq 1$

I understand the derivation of this method but my question is, if I start with my initial condition $u(x,0)$ to get the initial cell averages $U_{i}^{0}$ and calculate with the method by Enquist-Osher the $U_{i}^{1}$, then can I just use them to calculate the $U_{i}^{2}$ or do I have to do something with the calculated $U_{i}^{1}$ before using the method again?

For finite differences it's clear that I can use the values for the next step but since it's a finite volume method, these are cell averages and I'm not sure if they need to be handled differently.

1

There are 1 best solutions below

1
On

Think of it this way. In finite difference, as you commented, one is advancing pointwise values at grid points.

On the other hand, a finite volume scheme advances cell averages $U_{i}$.

The only time you need to consider your primary variables $u_{i}$ is to incorporate the boundary conditions. There you have to do some work to obtain cell averages at the first and last mesh point.

Usually this can be done by introducing what are called ghost points, extending your mesh in such a way that the appropriate BC's are satisfied.