# Non-Uniform Grids: Approximation Quality: First Order Finite Difference vs. First Order Finite Volume

Consider the advection/transport equation in 1D with constant velocity $$a(x) \equiv 1$$ $$u_t(t,x) + u_x(t,x) = 0$$ on a, say, periodic domain.

On uniform grids $$\{x_i\}_{i = 1, \dots, N}, \quad x_{i +1} - x_i = \Delta x, \forall \:i = 1, \dots N-1$$ first order Finite Difference with Upwind approximation/Backward Finite Difference and first order Finite Volume are (in terms of the update equation) exactly equivalent:

Finite Difference:

$$u_t(t, x_i) + \underbrace{\frac{u(t, x_i) - u(t, x_{i-1})}{\underbrace{x_i - x_{i-1}}_{\Delta x}}}_{\approx \partial_x u(t, x_i)} = 0$$

Finite Volume: \begin{align} & \int_{x_{i-\frac12}}^{x_{i+\frac12}} u_t(t, x) \mathrm{d} x = F_{i-\frac12} - F_{i+\frac12} \overset{\text{Godunov}}{=} U_{i-1}(t) - U_i(t) \\ \overset{\text{First Order FV: Constant Cell values}}{\Leftrightarrow}& \Big(x_{i+\frac12} - x_{i-\frac12}\Big) \partial_t U_i(t) = U_{i-1}(t) - U_i(t) \\ \overset{\text{Uniform grid}}{\Leftrightarrow}& \Delta x \partial_t U_i(t) = U_{i-1}(t) - U_i(t) \end{align}

For nonuniform grids, however, the situation is a bit different. Consider the case of a once refined grid in 1D where one part is refined by a factor of two: Clearly, the Finite Volume update equation reads for cell $$i$$

$$\partial_t U_i(t) = \frac{U_{i-1}(t) - U_i(t)}{\Delta x}$$ and for cell $$i+1$$ $$\partial_t U_{i+1}(t) = \frac{U_i(t) - U_{i+1}(t)}{\color{red}{0.5} \Delta x}$$

For the finite difference case, the update for point $$x_{i+1}$$ reads $$u_t(t, x_ {i+1}) = \frac{u(t, x_{i}) - u(t,x_{i+1})}{\color{red}{0.75} \Delta x}$$

Consider now the initial condition $$u(t=0, x) = u_0(x) = 1 + 0.5 \sin(\pi x)$$ on $$[-1, 1]$$ equipped with periodic boundaries. To highlight the phenomenon, the domain is discretized with with 4 cells in $$[-1, -0.5]$$, 16 cells in $$[-0.5, 0.5]$$ and again 4 cells in $$[0.5, 1]$$.

The FV approximation at time $$t_f = 1.5$$ is while the FD solution is In my opinion, the solution for FD looks qualitatively much better. Is this a known deficiency of first order finite volume / is there some literature on this where this is discussed?

• I would guess that for first order methods the discrete systems coincide. Jan 26 at 11:38
• What are your metrics? Is conservation part of your quality criteria? Have you checked for conservation? There is no free lunch. Jan 26 at 12:57
• @nicoguaro No, that is not the case - the cells at the coarse/fine interface are different, see the formulas I gave Jan 26 at 14:49
• @ConvexHull Hm, valid point. I should check whether the qualitatively better seeming FD scheme is conservative. Jan 26 at 14:50

The advection with constant velocity is a special (simple) case of the general advection equation in conservative (divergence) and non-conservative (non-divergent) form.

For the nonconservative case that is used for, e.g., level set methods, one requires a consistency of numerical methods that it preserves exact solution if the initial condition is a linear function and the speed is constant. This is the case for your finite difference approximation when the finite difference is exact for the linear function.

One does not have such consistency if the "finite volume" discretization is used with point values like it is in your case. Clearly, your "finite volume" method is inexact even for that simple example.

The finite volume method should be applied to cell averages, so instead of

$$u_i \approx u(t,x_i)$$

one should use

$$u_i \approx \frac{1}{\Delta x} \int_{C_i} u(x,t) dx$$

where $$C_i$$ is the control volume with $$x_i \in C_i$$.

So I would say your choice of methods should depend what kind of more complex PDE you plan to solve numerically.

• Right, but for first order finite volume, i.e., constant approximations, the cell average is the same as the value at any point in cell $C_i$. Jan 26 at 14:48
• @DanDoe No that's not the case in general. To be consistent with FV you would have to integrate the initial condition over each intervall and assign it to each element. This would already result in different values for IC. Jan 26 at 18:06
• Ah yeah, that's right. Good catch! Jan 26 at 19:40