# Approximation of derivatives in the finite volume method

I am looking into the finite volume method and I have come to a problem with discritisation. Suppose I am looking at a particular cell(I'm dealing) with cartesian grid. at the points $$(X_{i},Y_{j}),(X_{i+1},Y_{j}),(X_{i+1},Y_{j+1}),(X_{i},Y_{j+1})$$. Call the edges of the call $$e,n,w,s$$ using the usual notation for FVM. Suppose I need to find out $$\frac{\partial\varphi}{\partial X}\Bigg|_{n}.$$ How do I find the approximation from the cell centres?

• Are you rather interested in parabolic flux approximations? Nov 10, 2023 at 6:06

The main idea behind the finite volume method is rather based on approximating the conservation laws in integral weak form (Divergence theorem) $$$$\frac{d}{dt}\int_{x_L}^{x_R} u(x,t) dx = f(u(x_L,t)) - f(u(x_R,t)),$$$$ rather than in differential form $$$$u_t + f(u)_x =0,$$$$ where spatial derivatives never occure. The goal is more in finding accurate numerial flux functions.

One way to improve the approximation is based on a reconstruction procedure, which at least needs derivatives in the cell centers.

• Here, the function is $f(u,u_{x})$. Nov 10, 2023 at 16:56
• @MatthewHunt Green-Gauss or Least-Squares maybe an option. Nov 17, 2023 at 20:34

The fluxes for this problem are evaluated on the cell boundaries rather than the cell centres. So for cells small enough, you can use a simple arithmetic average: $$\frac{\partial \varphi}{\partial X}\Bigg|_{n}=\frac{1}{2}\left(\frac{\partial \varphi}{\partial X}\Bigg|_{Y+\delta Y/2}+\frac{\partial \varphi}{\partial X}\Bigg|_{Y-\delta Y/2}\right)$$ That is the average of the value at the cell centres above and below. Then I simply use central differencing to find the value of $$\partial_{X}\varphi$$ at the cell centres. Does this seem reasonable?

• I think your main confusion are the tangential gradients on the cell faces. These are generally approximated including cell values from diagonal elements. With this you can calculate mean values on the cell corners. Nov 23, 2023 at 17:56
• They're just derivatives. So I have the LHS evaluated at the point $(X+\delta X/2,Y)$, and I need to approximate this. Nov 27, 2023 at 11:26
• Your replies are extremly careless. Can you please stick to the formula above or give more details? Actually you want to calculate a gradient in x-direction on a face parallel to the x-axis. This is not possible using cell averages from direct neighbor elements only. Nov 27, 2023 at 13:13
• I think that you're not understanding the question. I've figured out the issue. Nov 27, 2023 at 14:53

In a normal finite volue method you interpolate your profile by piecewise constant functions, so that in every cell you assume a constant value of amplitude for all points lying in that region. This makes it very easy to integrate the volume of that cell! The downside is, that at the borders between your cells you introduce a discontinuity of your amplitude and consequently of your derivative. Naively you would have to assume that the derivatives are zero within your cells, and infinite or null exactly at your border.

Now, no one is stopping you to model the derivative at your cell boundaries in a plausible way, and that is exactly what is being done. You define the derivative at your cell boundary as the difference in amplitude of your two cells divided by the distance of their centerpoints. This has the advantage, that any consequent flux you calculate through that border is identical when evaluated from both sides. The mass flowing out of one cell is exactly the mass flowing into the other. That leads to the nice conservation properties of finite volume methods.

• I can compute the derivatives of $\partial_{X}\varphi$ on the east and west sides, but I don't know how to do it on the north and south faces. I've seen how it's done for finite differences, I wondered if there was an equivalent way of doing it for finite volume. Nov 9, 2023 at 10:13