# Non-conservative advective term in a finite volume scheme

I am interested in solving this set of nonlinear couples advection-diffusion equations using a finite volume scheme: $$\frac{\partial f(x,y)}{\partial t}=-(\boldsymbol{u}+\nabla\eta)\cdot\nabla f +\nabla\cdot(\eta\nabla f)+s_f(g),$$ $$\frac{\partial g(x,y)}{\partial t}=-\nabla\cdot(\boldsymbol{u}g)+\nabla\cdot(\eta\nabla g)+\nabla\cdot(\boldsymbol{s_g}(f))-l_g(g).$$ As you can see this set of equations lends itself well to the use of a finite volume scheme, except for the advective term in the first equation, which is non-conservative. So my question is this: I assume we must still take particular care for the discretisation of that term?

I must say that I am a bit confused. I'm reading Chapter 4 of Ferziger et al. 2002 on the finite volume method. They mention that upwind interpolation is the FVM equivalent of the FDM upwind differencing. Then they go on about linear interpolation being the simplest and most widely used interpolation method for the face values, which is equivalent to central difference. But central difference is supposed to be unstable for the advective term. I assume this is not the case here because we used Gauss' theorem to get rid of the derivatives? Then for the non-conservative advective term I have to use another approach? What would be the best second-order method for a code that will be fully explicit in time?

EDIT: Actually, there is something I forgot to mention that might be important. $$f$$ is essentially the poloidal vector potential (there is only one nonzero component) of one component of the magnetic field. The other component is $$g$$. This decomposition is possible because of symmetries. What this means, is that lines of constant $$f$$ represent the magnetic field lines of that magnetic field component. So advection only works perpendicularly to the direction given by the magnetic field lines, or: $$-(\mathbf{u}+\nabla\eta)\cdot\nabla f=-(\mathbf{u}_{\perp}+\nabla_{\perp}\eta)\cdot\nabla_{\perp} f=-\nabla_{\perp}\cdot((\mathbf{u}_{\perp}+\nabla_{\perp}\eta)f)+f\nabla_{\perp}\cdot(\mathbf{u}_{\perp}+\nabla_{\perp}\eta).$$ Not sure of much that helps though. But I have a feeling that since $$f$$ represents magnetic field lines, it should somehow be conservative...

I also rewrote the first equation more accurately.

• This advective term should be just treated as a source term in the FV formulation, there is nothing else you can do about it in the equations as written. Or, you could revisit the derivation of those ODEs and see if there was some truncation made there which resulted in that non-conservative advection term; that's quite possible, given that the fundamental laws of nature are conservative. Feb 25 at 16:12
• Ok great! Actually, the first whole equation is non-conservative. But since $\nabla\cdot(\eta\nabla f)=\eta\nabla^2 f+\nabla\eta\cdot\nabla f$, I wrote the diffusion term as conservative diffusion plus a non-conservative "advective" term that is added to the real advection. The thing, is that $f$ represents a certain component of the vector potential of a component of the magnetic field, while $g$ represents the other component of the magnetic field. This decomposition is possible because of symmetries. The total magnetic field is of course conserved, but $f$ is not under this decomposition. Feb 25 at 16:20
• is $\vec{u}$ spatially constant? If it is, you can move it inside the derivative to turn your PDE into conservation form. Feb 25 at 17:33
• No it is not constant Feb 25 at 18:09

There is a methology for non-conservative products called path-conservative schemes, which might useful for you. The method can be applied to systems of the form

\begin{align} \frac{\partial \mathbf{Q}}{\partial t} &+ \nabla \cdot \mathbf{f}(\mathbf{Q})+\mathbf{B(\mathbf{Q})}\nabla\mathbf{Q}=\mathbf{S}(\mathbf{Q}),\\ \frac{\partial \mathbf{Q}}{\partial t} &+\hspace{1cm}\mathbf{A(\mathbf{Q})}\cdot\nabla \mathbf{Q}\hspace{0.81cm} = \mathbf{S}(\mathbf{Q}) , \quad \text{quasi-linear form} \\ \text{with} &\quad\mathbf{A(\mathbf{Q})}=\frac{\partial \mathbf{f}(\mathbf{Q})}{\partial \mathbf{Q}} +\mathbf{B(\mathbf{Q})}. \end{align}

Here $$\mathbf{Q}$$ is the conservative state vector, $$\mathbf{f}$$ is the conservative flux vector and $$\mathbf{S}$$ is a source term. The third term in the first line is the non-conservative product. In case of

\begin{align} \mathbf{B}(\mathbf{Q})=0, \end{align}

you recover the well known conservation law. You may read some papers of LeFloch, Parès or Castro. ,

• I don't have access to the first paper, but I could peruse the second one. I must admit I am not particularly versed in that very mathematical language so I don't follow very well what is going on. The examples also seemed to be very "simple" expressions. In my case, $\mathbf{B}(\mathbf{Q})$ is a very complicated function of $\mathbf{Q}$. Are there any sources where the theory is presented in a general manner without all the mathematical jargon? Feb 26 at 14:46
• @BitterDecoction Just search for path-conservative schemes with google. There should be several papers available. However, I must admit that the theory behind it is not straight forward. Feb 26 at 19:43

Just convert it into conservative form plus a reaction term: $$\mathbf u \cdot \nabla f = \nabla \cdot (\mathbf u f) - (\nabla \cdot \mathbf u) f.$$

• But then I have the additional compression term. Besides, in my case, $u$ depends on $f$ and $g$ in a complicated manner. I think it's much simpler to keep the term as is. Feb 25 at 20:31
• Well, I meant part of $u$ depends on $f$ and $g$. Maybe I can write it like that for the main part of $u$, but I'll have to keep the rest as is. Feb 25 at 20:39
• This transformation does not buy you much, there is still a remainder that has to be treated as a source term. Feb 26 at 3:10
• @MaximUmansky True, but it converts a term we don't know how to deal with into two we know how to deal with. Feb 26 at 10:26
• @WolfgangBangerth But why is $(\nabla \cdot u) f$ better than $u \cdot \nabla f$? In FV formulation, they are treated the same way, just as a source term averaged over the cell volume, correct? Feb 26 at 16:01