# How to approximate flux (with gradient) when using finite volumes?

In finite volume method one is using cell averages. In nonlinear conservation laws discontinuities can be created in the solution process. How to compute the flux when the flux contains a gradient and the Taylor approximation is not valid due to discontinuities?

• @Jed,I am trying to implement the two-point fluxes in an in-house unstructured code (FV, all hex meshes). It will be really helpful if you could suggest a paper or book, where I can find the relevant material. Thanks. – Abhishek C Jan 9 '15 at 18:24

Non-degenerate diffusion will prevent discontinuities in the true solution, but those may be poorly resolved. I will assume that your question is about how to evaluate diffusive fluxes of the form $f(u,\nabla u,p) = \kappa(u,\nabla u,p)\nabla u$ where $\kappa$ is a $d\times d$ SPD tensor and $p$ represents some spatially distributed parameters that are cell-centered and discontinuous. There are a few approaches.

### Two-point fluxes

Take the centroids $c_0$ and $c_1$ of the two cells and compute $\nabla u\cdot(c_1 - c_0) = u(c_1) - u(c_0)$. If the mesh is orthogonal (with face quadrature point on line segment connecting cell centroids and normal with aligned normal) and the coefficients are constant and isotropic, this is a consistent second order accurate flux (i.e., superconvergent at centroids and face centers). Unfortunately, it loses accuracy and has stability problems on general meshes and for variable coefficients. Two-point fluxes are often used because they are simple and compact, but it is a fragile methodology since the grids regularity and constant coefficient assumptions are so frequently violated.

• @delta5 Inviscid fluxes are computed using a Riemann solver of some sort. In general, you should not try to use the "same procedure" for the diffusive fluxes. (That is, keep the Riemann solver and the diffusive flux routines separate rather than piling them into one big jumble.) Depending on the form of $\kappa(u, \nabla u, p)$, you may need to use a limited reconstruction when computing $\kappa$ (note that typically there is only one value of $\kappa$ per cell). – Jed Brown Jan 6 '13 at 1:15
• So I propose to use a Riemann solver for the convective part and compute the diffusive flux with a two point flux and add those fluxes together? My equations are like that: $\frac{\partial d}{\partial t} = - \nabla \cdot ( \vec e(d) d - f \nabla d)$ – delta5 Jan 6 '13 at 10:42
• @delta5 Good, that is the standard approach. If $f$ is variable or tensor-valued, or if your mesh is irregular, you may want to consider replacing the two-point flux with one of the more sophisticated methods I mentioned. – Jed Brown Jan 6 '13 at 16:07