# How is central difference scheme second-order accurate?

In an arbitrarily unstructured mesh, shown in the figure below, in the context of finite volume method, I want to obtain an approximation of $$\phi_f$$, where $$N$$ and $$P$$ are cell centers of adjacent cells and $$f$$ is the face center- $$N$$,$$P$$ and $$f$$ are not aligned. CFD textbooks say: $$\phi_f=g\phi_P+(1-g) \phi_N$$ where $$g$$ is a weight factor. They also say that it is a second-order accurate approximation. But how?

Let's use Taylor expansion around $$f$$: $$\phi_P=\phi_f+(\nabla\phi)_f.(r_P-r_f)+O(2)$$ $$\phi_N=\phi_f+(\nabla\phi)_f.(r_N-r_f)+O(2)$$ Question:
How to eliminate the terms containing $$\nabla$$ and obtain the early mentioned relation?

• What's the basis function of your elements? Commented Apr 15, 2020 at 16:49
• I am all about the finite volume method, not FEM. Commented Apr 15, 2020 at 19:32
• Do you have any reference where this is explained ? How is $g$ chosen ? Commented Apr 16, 2020 at 14:18
• Dear @cfdlab, in order to know how is g chosen, you can have a look at OpenFOAM Programmer's Guide, p. 36, relation (2.17). Central difference scheme is second-order accurate is a notion that can be find in any book, e.g. An Introduction to Computational Fluid Dynamics by Versteeg and Malalasekera or The Finite Volume Method in Computational Fluid Dynamics by Moukhalled et al. Commented Apr 17, 2020 at 13:24
• Can someone fix the grammar in this question? Commented Apr 17, 2020 at 15:29

The expression with $$g=1/2$$ is second order if and only if f is the midpoint of P and N.The expression with $$g\in[0,1]$$ is second order if f is on PN and$$fN/Pf=g$$. If f is anywhere else you need to have more information. I have the impression you need to find better textbooks.

• Could you please suggest a good one? Commented Apr 17, 2020 at 13:31
• Shortly after I asked, I found the solution that you've mentioned. In order to expand your concise answer, I add my answer too. Commented Apr 17, 2020 at 13:35

Assuming $$F (not f)$$ as the face center, we have the following taylor expansions for $$\phi$$:
$$\phi_p = \phi_F + \nabla\phi_F.(r_P-r_F)+O(2)→×|r_N-r_F|$$ $$\phi_N=\phi_F + \nabla\phi_F.(r_N-r_F)+O(2)→×|r_P-r_F|$$
By producting each equation with the coefficients shown after them we have: $$\phi_p|r_N-r_F| = \phi_F|r_N-r_F| + |\nabla\phi_F||r_P-r_F||r_N-r_F|cosα+O(2)$$ $$\phi_N|r_P-r_F| = \phi_F|r_P-r_F| + |\nabla\phi_F||r_N-r_F||r_P-r_F|cosβ+O(2)$$
Since $$cosα=-cos β$$, when summing these two equations, the terms containing $$\nabla\phi_F$$ are cansled out and we end up with:
$$\phi_F=\frac{|r_N-r_F|}{|r_N-r_F|+|r_P-r_F|}\phi_p+\frac{|r_P-r_f|}{|r_N-r_F|+|r_P-r_F|}\phi_N$$
As can be seen, it is second-order accurate for $$\phi_F$$. Now assume that $$f$$ is the face center not $$F$$. Then the mesh is skewed and the approximation above should be corrected for $$\phi_f$$ if we care about accuracy; Otherwise it is first-order accurate for $$\phi_f$$.
P.S.: In the case of need for more details on how skew correction works, one can refer to The Finite Volume Method in Computational Fluid Dynamics, p. 254.
P.P.S.: Illustration is generated by GIMP and Inkscape.

There is an interesting paper of Sadiq and Viswanath, see here on arxiv, and in particular chapter 8 called "Superconvergence". These guys consider the standard case of finding the derivative coefficients via polynomial interpolation (as the OP does implicitly in the question), and pose the question when the accuracy is boosted, i.e., better than "normal".

"Normal" here basically means, that for the $$m$$-th derivative approximated on $$N$$ points, one gets an accuracy of $$\mathcal O(h^{N-m})$$. For example, the first-order derivative on two general (but distinct) points is of accuracy $$\mathcal O(h)$$, as is the second-order derivative on three arbitrary points.

However, by choosing the grid points in a clever way, this accuracy can be boosted by one order of magnitude. This is the statement of Corollary 7 of the paper, which I copy here as it answers your question:

Applied to your question that means, that when the first-order derivative at z=0 is evaluated in the middle between the two gridpoints, one gets second-order accuracy $$\mathcal O(h^2)$$.

• What do you mean by "OP"? Commented Apr 18, 2020 at 11:43
• @Alish: see here Commented Apr 18, 2020 at 16:05