why are finite difference not necessarily conserva
Hi,
can anybody help me mathematically? I am searching a proof why finite difference methods are not necessarily conservative but finite volume methods are. This is for me the main advantage of FVschemes.... Thanks a lot 
Re: why are finite difference not necessarily cons
In a finite volume scheme, the governing equations are posed as integral equations. Thus conservation is enforced for each cell in the mesh.
In a finite difference scheme, the governing equations are cast as differential equations, and the mathematical statement is only satisfied in the limit of grid spacing going to zero. 
Re: why are finite difference not necessarily cons
but the finite volume scheme works with averaged values  so, it is not necessarily more accurate than a fdscheme.
could you post a mathematical example, please.I think this will help me to understand the difference... 
Re: why are finite difference not necessarily cons
dear philip,
what exactly do you mean by 'finite volume scheme works with averaged values?' 
Re: why are finite difference not necessarily cons
Some finite difference methods can also be rewritten as a finite volume method. See Godlweski and Raviart, "Hyperbolic systems of conservation laws" for a mathematical condition which makes a scheme "finite volume".

Re: why are finite difference not necessarily cons
the value in a cell does mot necessarily satisfies the differential equation. the value is an average in the control volume.
so, what is the difference between fd and fv if you look on the steady massequation: d(rho*c)/dx = 0 or int(rho*c)*dA this leads to FDscheme: ((rho*c)_E  (rho*c)_W)/Dx = 0 * The Index E represents the value in the EASTnode.... or FVscheme: (rho*c)_e  (rho*c)_w = 0 ** The index e = is the averaged value on the eastside of the control volume.... But why is the FDS not necessarily conservative and what exactly does that 
I frgot to say
So, for the finite volume scheme I could say that
(rho*c)_e = 0.5*((rho*c)_E + (rho*c)_P))*dA (1.1) and (rho*c)_w = 0.5*((rho*c)_W + (rho*c)_P))*dA (1.2) If you put this into the finite volume formulation, it leads to the same results as for finite differences. > ((rho*c)_E (rho*c)_W)*dA = 0 (1.3) So, where are the mathematical differences. Why is the fvformulation conservative? P.S.: if you divide equation (1.3) with the contolvolume dV, it leads to: ((rho*c)_E (rho*c)_W)*dA/dV = ((rho*c)_E (rho*c)_W)/dx = 0 (1.4) That's why FVschemes look like FD on "structured grids"!!! 
Re: why are finite difference not necessarily cons
I think you misunderstand my point. Plus, conservation and accuracy are in this discussion separate issues.
A FV scheme is written in integral form. Thus for every single cell, the sum of the fluxes across the cell faces equals the time rate of change for the cell state. Always. In this manner, the mathematical statement of conservation is strictly enforced, irrespective of cell size or averaging. Yes, accuracy depends on cell size and extrapolation from the cell center to the faces to evaluate higher order fluxes, but that is a separate matter. In a FD scheme, the mathematical statement of conservation is weakly enforced, and only holds in the limit of grid spacing going to zero. 
Re: why are finite difference not necessarily cons
"A FV scheme is written in integral form. Thus for every single cell, the sum of the fluxes across the cell faces equals the time rate of change for the cell state. Always. In this manner, the mathematical statement of conservation is strictly enforced, irrespective of cell size or averaging."
>> Ok, I think to understand what you mean. "In a FD scheme, the mathematical statement of conservation is weakly enforced, and only holds in the limit of grid spacing going to zero." >> So, can you imagine a concrete problem where FDformulation would lead to a problem (=oscillation or divergence) where FV scheme still produces a senseful result??? It would help me a lot to see that with a concrete mathematical problem.... Thanks a lot, in advance. 
Re: why are finite difference not necessarily cons
Sorry, I can't think of a specific example off the top of my head.

Re: why are finite difference not necessarily cons
It is not really a matter of oscillation or divergence, those are typically stability issues.
For an internal flow, just think of flow through a pipe. The old finite difference based codes had trouble making the massflow at the end of the pipe equal the massflow at the beginning of the pipe. The conservation of mass was only weakly enforced. If you threw enough grid at it you could reduce the mass error. The more modern FV codes have a much easier time conserving mass. 
Re: why are finite difference not necessarily cons
Hi Joe,
do you have any paper which describes this problem/case more in details? I want to understand why FD had problems with the correct massflow. Not only phenomenologically! 
Re: why are finite difference not necessarily cons
Let's have a look at d(rho*c)/dx = 0 (finite differences) and int (rho*c)*dA (finite volumes)  (structured grids).
FV:  (rho*c*A)_2  (rho*c*A)_1 = 0 lim (A_2/A_1 > 1) > (rho*c)_2*(A_2/A_1) = (rho*c)_1 FD:  ((rho*c)_(i+1)  (rho*c)_(i1))/Dx = 0 + So, first of all we can conclude that FD have no "natural" algorithm to proove conservation  in contrast to FV. The case which was announced by Joe means that with FD (rho*c)_(i+1) is different than (rho*c)_(i1)  when we use a big Dx; like three nodes....But in this case (rho*c)_(i1) is kind of a boundary condition. So we know that exact solution and with an explicit scheme we can directly compute the next value (rho*c)_(i+1). Where is the source for the error? Why does it only happen with the FDformulation?????? 
Re: why are finite difference not necessarily cons
If the area is changing, why do you not include that in the finite difference approximation as well? What you are looking for is termed the "telescoping" property of finite difference schemes, and the classic text by P. Roache contains a good description. A finite difference scheme can be just as conservative as a finite volume scheme, but requires attention to the construction of the terms. Marcel Vinokur wrote a good treatise on this a number of years ago  unfortunately the title of the paper escapes me at the moment. Try googling for Vinokur. As noted by Praveen, it is possible to construct a conservative scheme using finite differences within finite volume framework.

Re: why are finite difference not necessarily cons
Hi,
first of all thanks for your reply. 1) If you remember the name of the paper from Marcel Vinokur I would be glad, if you could post it to the forum. I found a lot googling for him.... 2) Looking for the paper of Vinokur I found this: http://www.springerlink.com/content/...2/fulltext.pdf Looking on the first page gives you the 3dEuler equation in a conservative divergence formulation. d(q)/dt + de/dx + df/dy + dg/dx = 0 (1) In the next line the author transforms the pde into a curvilinear coordinate systems d(Q)/dt + dE/d(xi) + dF/d(eta) + dG/d(zeta) = 0 (2) And now he is talking of a finite volume formulation although equation (2) has only differentials but now integrals. That confuses me ..... where is the integration? In the book of Joel H. Ferziger  computational methods for fluid dynamics  the author integrates every equation when is talking about finite volume schemes. example: int(d(rho*c*c)/dx)dx*dy = (rho*c*c)_e*dy  (rho*c*c)_w*dy 
Re: why are finite difference not necessarily cons
Marcel Vinokur, "An Analysis of FiniteDifference and FiniteVolume Formulations of Conservation Laws", Journal of Computational Physics 81, pp. 152 (1989).
The integral form is not required to generate your eq. 2. The PDE is differenced in a finitevolume sense by writing the flux derivative (e.g. dE/d(xi)) as a difference of fluxes at the differential cell faces, E(i+1/2)  E(i1/2). This is a finite difference formulation that possesses a flux telescoping property as long as certain rules are followed in constructing the face fluxes. Thus, it can represent a conservative finite difference formulation. 
Re: why are finite difference not necessarily cons
So, could you give me an argument why the two formulations are equivalent?
It confuses me a little because I thought that discontinous problems must be handled by the integral formulation. Since there is no divergence term.... 
Re: why are finite difference not necessarily cons
In general discontinuous problems do need to be handled using the integral (weak) formulations. Fortunately, by applying certain entropy conditions we can also handle discontinuous flow fields using the differential form of the equations  the entropy conditions ensure that we get the correct weak solution. I suggest that you grab a copy of Leveque's "Numerical Methods for Conservation Laws".
The differential equations can be written in a divergence form that allows us to generate the correct solution by discretizing the equations using finite difference approximations. I'm not sure what you mean by "no divergence term". The ability to cast the equations into a divergence form is what allows us to move from an integral form to a differential form. 
All times are GMT 4. The time now is 13:29. 