CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Main CFD Forum

why are finite difference not necessarily conserva

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   December 31, 2007, 12:48
Default why are finite difference not necessarily conserva
  #1
philipp
Guest
 
Posts: n/a
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 FV-schemes....

Thanks a lot
  Reply With Quote

Old   December 31, 2007, 13:34
Default Re: why are finite difference not necessarily cons
  #2
pc
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   January 1, 2008, 01:22
Default Re: why are finite difference not necessarily cons
  #3
philipp
Guest
 
Posts: n/a
but the finite volume scheme works with averaged values - so, it is not necessarily more accurate than a fd-scheme.

could you post a mathematical example, please.I think this will help me to understand the difference...
  Reply With Quote

Old   January 1, 2008, 03:06
Default Re: why are finite difference not necessarily cons
  #4
sudhakar
Guest
 
Posts: n/a
dear philip,

what exactly do you mean by 'finite volume scheme works with averaged values?'
  Reply With Quote

Old   January 1, 2008, 07:52
Default Re: why are finite difference not necessarily cons
  #5
Praveen. C
Guest
 
Posts: n/a
Some finite difference methods can also be re-written as a finite volume method. See Godlweski and Raviart, "Hyperbolic systems of conservation laws" for a mathematical condition which makes a scheme "finite volume".
  Reply With Quote

Old   January 1, 2008, 11:39
Default Re: why are finite difference not necessarily cons
  #6
philipp
Guest
 
Posts: n/a
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 mass-equation:

d(rho*c)/dx = 0

or

int(rho*c)*dA

this leads to FD-scheme:

((rho*c)_E - (rho*c)_W)/Dx = 0

* The Index E represents the value in the EAST-node....

or FV-scheme:

(rho*c)_e - (rho*c)_w = 0

** The index e = is the averaged value on the east-side of the control volume....

But why is the FDS not necessarily conservative and what exactly does that
  Reply With Quote

Old   January 1, 2008, 13:38
Default I frgot to say
  #7
philipp
Guest
 
Posts: n/a
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 fv-formulation conservative?

P.S.: if you divide equation (1.3) with the contol-volume 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 FV-schemes look like FD on "structured grids"!!!
  Reply With Quote

Old   January 2, 2008, 09:29
Default Re: why are finite difference not necessarily cons
  #8
pc
Guest
 
Posts: n/a
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.

  Reply With Quote

Old   January 2, 2008, 10:55
Default Re: why are finite difference not necessarily cons
  #9
philipp
Guest
 
Posts: n/a
"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 FD-formulation 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.
  Reply With Quote

Old   January 2, 2008, 12:41
Default Re: why are finite difference not necessarily cons
  #10
pc
Guest
 
Posts: n/a
Sorry, I can't think of a specific example off the top of my head.
  Reply With Quote

Old   January 2, 2008, 15:38
Default Re: why are finite difference not necessarily cons
  #11
Joe
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   January 3, 2008, 10:13
Default Re: why are finite difference not necessarily cons
  #12
philipp
Guest
 
Posts: n/a
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!

  Reply With Quote

Old   January 3, 2008, 10:31
Default Re: why are finite difference not necessarily cons
  #13
philipp
Guest
 
Posts: n/a
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)_(i-1))/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)_(i-1) - when we use a big Dx; like three nodes....But in this case (rho*c)_(i-1) 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 FD-formulation??????
  Reply With Quote

Old   January 3, 2008, 17:41
Default Re: why are finite difference not necessarily cons
  #14
ag
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   January 4, 2008, 04:12
Default Re: why are finite difference not necessarily cons
  #15
philipp
Guest
 
Posts: n/a
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 3d-Euler 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
  Reply With Quote

Old   January 4, 2008, 10:03
Default Re: why are finite difference not necessarily cons
  #16
ag
Guest
 
Posts: n/a
Marcel Vinokur, "An Analysis of Finite-Difference and Finite-Volume Formulations of Conservation Laws", Journal of Computational Physics 81, pp. 1-52 (1989).

The integral form is not required to generate your eq. 2. The PDE is differenced in a finite-volume 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(i-1/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.
  Reply With Quote

Old   January 10, 2008, 12:45
Default Re: why are finite difference not necessarily cons
  #17
philipp
Guest
 
Posts: n/a
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....
  Reply With Quote

Old   January 10, 2008, 13:45
Default Re: why are finite difference not necessarily cons
  #18
ag
Guest
 
Posts: n/a
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.
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finite element vs. finite difference Francisco Saldarriaga Main CFD Forum 23 December 17, 2014 09:21
Finite difference can be non-conservative? gregmason Main CFD Forum 2 July 8, 2009 11:53
Fininte difference and Finite element Technique Mahendra Singh Mehra FLUENT 3 December 23, 2005 00:49
finite difference method for navier-stokes problem dallybird Main CFD Forum 5 February 17, 2003 23:00
Oldroyd-B model using Finite Difference Luciane Grossi Main CFD Forum 1 July 27, 2000 23:28


All times are GMT -4. The time now is 01:04.