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

Finite Difference Vs. Finite Volume

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 1998, 14:02
Default Re: Finite Difference Vs. Finite Volume
  #21
andy
Guest
 
Posts: n/a
There is no fundamental difference between a finite volume, finite difference or finite element scheme (or spectral with a bit of work). They are simply different procedures for deriving a set of algebraic equations. It is the properties of the resulting algebraic equations that are important not the route taken to get to them. It is not unusual for equations to be expressed in a mixture of schemes (eg fe for diffusion and fv for convection) in order to extract a certain set of desired numerical properties.

It is usually straightforward to express a scheme derived via, say, the finite volume route in terms of the equivalent finite element method. In fact, it is likely that a numerical mathematician would do so because the analysis tools are better developed in this framework as mentioned by someone earlier (I think - apologies to the person concerned but the link here in Spain is mind numbingly slow at present). Moving between the frameworks is also useful in trying understand a particular numerical property which exists naturally via one route but not via another.

So the answer to the question "why not fd?" is probably historical - the original code was derived using a finite volume approach. I would be surprised if the authors of the schemes are passionate supporters of one particular method over another but are simply more familiar and comfortable with a given approach. But that may not apply to sales and marketing!

  Reply With Quote

Old   November 5, 1998, 15:50
Default Re: Finite Difference Vs. Finite Volume
  #22
John C. Chien
Guest
 
Posts: n/a
A couple of months ago, there was a nice program on the local PBS station about how a british carpenter was able to solve the modern navigation problem by creating a very accurate mechanical clock to guide a ship in the open sea. ( his invention includes temperature compensating pendulm design.) With the aid of modern high speed computers, we can't even predict the weather for 5 days. I wonder whether it would be faster and more accurate to solve CFD problems on mechanical calculator ? Or even more user -friendly by using graphic solution. Like the british carpenter's clock, the decision to use a commercial code in a big company usually is a political one because they rarely have the time to read our opinions here. So, who is saying what here has zero impact on the health conditions of the commercial codes at all. Maybe the most accurate CFD method will come from a british farmer in the future. It's something to think about.
  Reply With Quote

Old   November 6, 1998, 07:00
Default Re: Finite Difference Vs. Finite Volume
  #23
Duane Baker
Guest
 
Posts: n/a
Yes, Phil you are correct and I concur on all points except one (I think).

Diagonal dominance is in no way a result of the FV methodology, rather of the interpolation for fluxes at the integration points in FV and the difference operators for FD.

As the calssic example with FV for the SS 1-D advection diffusion equation with (CDS) linear interpolation for the advection fluxes at the integration points gives the discrete equation (uniform grid):

A_W*Phi_W + A_P*Phi_P + A_E*Phi_E = 0

A_W = 1 + Cell Peclet/2 A_P = -2 A_E = 1 - Cell Peclet/2

which is of course diagonally dominant for Pe<2 but not for large cell Peclet numbers and the resuling "non-physical" influence gives the classic wiggles and convergence problems for iterative solvers. This of course is the result of negative coeficients in Patankar's terms.

The exact same problem with diagonal dominance occurs for FD with centered differences for the advection terms!

I agree perfectly on the importance of global conservation in a method as one of the nice properties which FV has. I also agree that I do not fully understand it (and I understand far less than you!) but...A very Heuristic argument that I have for the reason is that a discrete satisfaction of global conservation is like an overall bound of the integral of the discrete solution---which may be way off locally in the domain (for both the discrete values of the conserved variable and the discrete fluxes at the integration points) but overall the discrete values of the fluxes must be conserved. Additionally, we often have problems where the fluxes at a boundary are specified and then known exactly and therfore the integral sense of conservation is not only satisfied exactly in the in-out sense where the value may be wrong but exactly in the value too. A simple 1-d example would be best:

Case 1: If we have Dirichelet BC everywhere then we never specify a flux exactly. We may have a discrete sol'n which has in=out=9.9 and the right answer is 10.0 So it is exactly conservative but at the wrong value and the distribution is wrong!

Case 2: 1 Neumann and 1 Dirichelet with the influx=10.0 then we must have outflux=10.0 and the only thing wrong is the distribution!

The flux specified BC is also really nice in the FV and when we absorb the BC into the internal node equations, we get better convergece with iterative solvers!

I also believe, and this is majorly Heuristic...that in the iterative solution of non-linear equation systems...the integral sense bound is important to not wack out an intermediate step to far that causes divergence...and it does not take too much with Non Linear systems!!!! But we will have to wait a few Centuries until the Mathematicians can come up with any general theories on non linear equations!!

I guess the overall benefit for most Engineers of FV over FD is that we feel more comfortable with it, process of derrivation, the results and most importantly, our ability to interpret the results.

Good discussion of this topic!!..........Duane
  Reply With Quote

Old   November 6, 1998, 07:16
Default Re: Has the subject changed??
  #24
Duane Baker
Guest
 
Posts: n/a
I cannot agree with your conclusion

"The conclusion is : FV is more user-friendly for average engineers, and FD is more complex for advanced professional"

Many of the people involved in the past developments and use of FV are far from average, like Spalding, Patankar, Rodi, Gosman, Raithby, Schneider, Peric, Ferziger, and on and on and on. It is interesting to note that back in the 70's when Eckert was updating his text "Analysis of Heat and Mass Transfer" he was very excitied and optimistic with the new developments of the FV method and the furture is would hold....now it is very likely he knew about FD at the time!!!

Just because a method is more starightforward and intuitive does not mean that is is just for average schmucks!!!

Duane
  Reply With Quote

Old   November 6, 1998, 09:58
Default Re: Finite Difference Vs. Finite Volume
  #25
Philip Zwart
Guest
 
Posts: n/a
Andy,

I'm not sure I agree with you completely here. Although in many cases we can show FD=FV or FV=FE or FE=FD, its far from true in general. For instance, its not too hard to show that for diffusion on a triangular mesh, a cell-vertex FV gives the same discrete equations as a Galerkin's method. (And its very interesting to use that fact to give an intuitive interpretation as to why the Delaunay triangulation is required to give an M-matrix.)

But the same can't be said for other cases. For instance, the cell-vertex FV and Galerkin methods are not the same for diffusion on a 2d rectangular mesh or on a 3d tet mesh, although they still have similar influences and stencils.

But the big differences come in elsewhere. How would you interpret a cell-centered FV method as a FE method? Or the discontinuous Galerkin method as a FV method? (Actually, if anyone can suggest a reference that explains the discontinuous Galerkin method in an understandable way at all, I'd be thrilled.)

So I don't think we always have FE=FD=FV. Its perhaps more useful to see how they're all derived from the Method of Weighted Residuals (as Duane mentioned earlier), and in some cases happen to give the same discrete equations.

Phil
  Reply With Quote

Old   November 6, 1998, 10:18
Default Re: Finite Difference Vs. Finite Volume
  #26
Philip Zwart
Guest
 
Posts: n/a
Hi Duane,

When I was referring to diagonal dominance I was thinking of a particular practice described in Patankar's book. When solving the mass/momentum equations, at a particular iteration the mass flows will not conserve mass. So when assembling the advective terms of the momentum equation, the rule that diag=sum(off-diag) may be violated. To correct this, continuity*u is subtracted from momentum, ensuring diagonal dominance and better iterative stability.

phil
  Reply With Quote

Old   November 6, 1998, 10:39
Default Re: Has the subject changed??
  #27
John C. Chien
Guest
 
Posts: n/a
No, they are not average engineers. They are considered as professional researchers and method developers. The first four represent the Imperial College school of thinking. Their books, teaching codes are very popular among college students and research student world wide. But in industry, the approaches and codes are not taken seriously in the past. This was because the serious applications of CFD were mainly in the high speed compressible flow area. From the transonic flow ( shock wave/ boundary layer interaction/ control) , supersonic fighters, to hypersonic vehicles, I don't think you can get accurate solutions from the codes based on these methods. If you don't agree, just take a commercial code based on these methods and run a Mach 25 flow over a simple supersonic ramjet inlet. ( The potential may be there, but it's not in today's code ). By the way, in turbulent flows, there exists very large variations of turbulent kinetic energy distribution, You can't just assume that it's uniform or linear across a coarse cell,even if you are able to get a solution. ( the same is true for the shock wave.) The fact is those who started with teach-type code are now using some other types of code.( combustor flows maybe is an exception.)
  Reply With Quote

Old   November 6, 1998, 12:17
Default Re: Finite Difference Vs. Finite Volume
  #28
andy
Guest
 
Posts: n/a
I am not sure I understand your example. How can the predicted diffusion be different if the two schemes have the same algebraic equations? If two approaches generate the same algebraic equations then they can only give the same answer.

In answer to your other two questions, I would write down the algebraic equations and its parameters for the particular scheme and compare it with the parameters for the desired scheme. I would then modify the parameters for the desired scheme to make the two equivalent. Starting with a 1D uniform grid and building up the complexity. By using inspection in this way one gains an insight into what different method are doing in terms (usually) of the one with which one is most familiar. It could be intractable for higher order schemes but works well for linear schemes. The result may well not be a tidy (or natural) scheme expressed in the alternative formulation but it can often be informative and generate ideas if the scheme being analysed has a desirable property.
  Reply With Quote

Old   November 6, 1998, 12:45
Default Re: Finite Difference Vs. Finite Volume
  #29
Philip Zwart
Guest
 
Posts: n/a
To clarify the example, a cell-vertex FV discretization (ie, volumes are associated with the vertices) gives the same discrete equations as a Galerkin discretization. But a cell-centered FV discretization (which uses a different volume definition) gives very different discrete equations and solutions. And the cell-centered discretization has no FE analogue (that I'm aware of, anyways.)

I guess my point is that FV, FD, and FE are frameworks within which discrete equations are generated. Just because the discrete equations may be the same for some canonical cases, its not true in general. And even within a particular framework, different choices (such as the volume definition) can lead to substantially different discrete equations.

phil
  Reply With Quote

Old   November 6, 1998, 16:58
Default Re: Finite Difference Vs. Finite Volume
  #30
John C. Chien
Guest
 
Posts: n/a
Assuming that the world is FV world, and the geometry is triangular shape, so you can derive a formulation for a 2-D triangular cell ( just one single triangular cell). And you are happy with your algebraic equations. The question I have is , " What is the FD formulation for this single triangular cell ? " And how do you link it to the FV world and FE world, if they are related at all ? What coordinates system should I use for the FD formulation ? Cartesian ?, or pick any two sides from the triangle to form the coordinate system ? I don't think you can easily derive the FD formulation from the FV or FE. Maybe I was wrong ?
  Reply With Quote

Old   November 6, 1998, 17:53
Default Re: Finite Difference Vs. Finite Volume
  #31
Duane Baker
Guest
 
Posts: n/a
A further heuristic argument on this "additional solution bound" which results from a conservative FV method is can be seen when we look at the discrete conservation of kinetic energy, which is a consequence of the discretization used for the momentum and continuity equations. It is possible to have a FV method which is mass and momentum conservative but not for KE. If care is taken, we can also preserve conservation of KE.

So, in a heirarch of "enforced conditions we have"

Level 1. Minimization of some residual.....obtained by the method of weighted residuals...which results in any of the FV, FD, FEM, CV based FEM, etc methods

Level 2. Discrete conservation of the field variables in each of the equations.....methods based on FV. + Level 1

Level 3. Discrete conservation of non-independant physical quantities such as KE. + Level 1 & 2

A wonderful discussion of this is found in Ferziger and Peric' "Computational Methods for Fluid Dynamics" Section 7.1.3 in the first edition (they have done some updating so it may be different now).

From the above: "Guaranteeing global energy conservation in a numerical method is a worthwhle goal, but not an easily attained one.....If such a method is used, the velocity at every point in the domain must remain bounded, providing an important kind of numerical stability. Indeed, energy methods (which sometimes have no connection to physics) are often used to prove stability of numerical methods."

The implications are very important for unsteady simulations and DNS/LES.

Duane
  Reply With Quote

Old   November 8, 1998, 06:24
Default Re: Finite Difference Vs. Finite Volume
  #32
Krishnakumar
Guest
 
Posts: n/a
well.. This isn`t fair. I mean nobody noticed me speakin. It might be so that u guys are fundu guys in cfd but it isn`t fair to ignore the kid completly. You could have atleast told me so if I have said or asked something too elementary or if I have been deviating totally away from the subject. Anyway, regardin chein`s last statement that it is not easy to derive the FD formulation for the triangular cell, I want to bring to ur notice my previous message about the least squares method. I believe that the least squares method of reduction of differntial error is a finite difference method. I will tell you the FD method you can use to formulate your problem in the triangular cell. You can use the Roe`s flux difference scheme for example.and calculate the flux at the interface between two points of the triangle.Note that we have used a one-d cell as our basic model. After the interfacial flucxes have been calculated for connected points, you can asuume use the least squares method to find the flux derivative at that point around which you have calculated the flux differences. Note that upwinding is automatically ensured in this type of formulation. But you might get into problems when you are usin the one-d cell to model two or three-d problems. You will get a an ill-conditioned system when you are trying to solve for the flux gradient. But as I found out, it isn`t all that difficult to get the flux derivative information out of the system. A point to note is that there is no need to worry yourself with the traditional transformation of coordinates used in FD schemes generally. This is a grid free method.

Another interesting point is that of convservation. We cannot prove that the above scheme is conservative but my guide thinks we can enforce conservation by defining the interface not 1/2 way between the first and second point, but towards the first or second point. Ofcourse, there is no necesssity that all this will work, but I just wanted to point out that many of the nice properties of the FV can be made available in FD by proper formulation of the FD scheme.
  Reply With Quote

Old   November 9, 1998, 11:52
Default Re: Finite Difference Vs. Finite Volume
  #33
John C. Chien
Guest
 
Posts: n/a
The point I was trying to make is really related to the consistency of the formulation. Does the formulation eventually converge to the governing equations ( in partial differential form ). In the FV approach, you have to compute the geometric properties of the FV cell, as well as the integration of flow properties. Is the assumption used always unique ? that is two or more solutions will end up in just one result. In the control volume approach, there are many different solutions available to satisfy the overall continuity requirement. Say, for flow in a constant diameter pipe, the overall continuity is always satisfied for the control volume formulation, but the velocity profiles change from nearly uniform to parabolic. Any combination of two of these profiles will satisfy the continuity equation in control volume sense. Including the momentum equations in the formulation will add additional constraints to the solution, but still many solutions will qualify under these constraints. How do you pick the real solution out of these many possibilities ? Even if you reduce the highly skewed cell by proportion to a very small one, you still have a highly skewed cell. Will the solution remain the same as the solution obtained with less skewed cell , because of the assumption made in the control volume formulation ? Another question is, whether the ability to obtain a solution using control volume approach with coarse cell size is related to the numerical error ( or diffusion etc..) or not. In a turbulent boundary layer region, the so-call law of the wall profile exists. That profile is not linear except in the very close to the wall region. So, if you assume the profile inside the cell is linear in the control volume formulation, the answer from the coarse mesh solution is not going to be consistent with the law of the wall. In the FD formulation, you let the solution at the nodal point to seek its value and form a smooth curve based on the total number of points used. When you use more points, you get smoother curve. This is not the case with control volume approach, because the assumed profile is always there. ( In old days, the velocity components are defined at different locations, it's difficult to find a meaningful combined velocity field at all for the staggered grid. That was another problem.) tBy the way,here is a difference between the Monthly balance of a bank account and its daily transactions. Two bank accounts with the same monthly balance does not mean that their daily transactions are the same. I am just trying to point out the difference. Apparently, many people only look at their monthly balance.
  Reply With Quote

Old   November 10, 1998, 18:53
Default Re: Has the subject changed??
  #34
Ken Elms
Guest
 
Posts: n/a
Hi guys, As an old fashioned pump tendering and design engineer [UK] who wishes to translate the old pumping technology to that of the present WORLD cfd/cad technology-techniques where does finite vol or differences now equate in pump design/modelling/manufacture.You may have seen my messages on ROTODYNAMIC PUMPING TECHNOLOGY.Apart from the well known sites displayed on the cfd resources etc can you suggest possible other sources.

You guys certainly stimulate the subject of cfd and all its complexities/criteria.

  Reply With Quote

Old   November 12, 1998, 16:53
Default Re: Finite Difference Vs. Finite Volume
  #35
Krishnakumar
Guest
 
Posts: n/a
I am not trying to say that FV and FD are equivalent. But do different formulations show different solutions when they are grid-independent.I mean, if you keep increasing the number of points in FD and keep increasing the order of accuracy in FV, won`t you get the same solution out of both formulations when the solution is nolonger affected(much) by the increase in the number of points or order of accuracy. It looks as if both might converge to the same solution under the grid-independence condition. Will they?
  Reply With Quote

Old   November 12, 1998, 17:46
Default Re: Finite Difference Vs. Finite Volume
  #36
John C. Chien
Guest
 
Posts: n/a
A very good question indeed! For uniform mesh, simple problem, sometimes the derived FD and FV algebraic equations are identical. In this case the solutions will be identical since you are solving the same set of algebraic equations. Whether two different sets of algebraic equations will give one identical set of solution is itself hard to answer. Any suggestions ? In principle, if you start with one set of solution, you can operate on it to come up with different equations using different assumptions. I hope that by reducing the mesh (or cell) size, one can eventually obtain the real solution. But I am not sure whether the solution will still remember the methods used or the shapes of the mesh (or cell) used in the precess. Will the solution at some point forget about the skewness of the triangular shape used when you make the cell smaller and smaller ? Will the solution obtained from a uniform mesh identical to the solution obtained from a highly skewed mesh, as the mesh size is reduced ? I don't have the answer to it. Will the diamond surface eventually become a smooth surface when you keep cutting it to a smaller one ? What is your answer ?
  Reply With Quote

Old   November 13, 1998, 16:53
Default Re: Finite Difference Vs. Finite Volume
  #37
Krishnakumar
Guest
 
Posts: n/a
Actually, the question is a mathematical one. It does look as if two consistent schemes will give the same solution in the grid-indepedent stage. But the definition of grid-indepedence shouldn`t be based on one parameter alone for this requirement. The whole flow field should show no variation with further addition of points. Then, since the two schemes are consistent, this should be the solution of the pde and the solutions got to be the same. Am I right? Two formulations are eqvivalent in the grid-independent stage, provided grid-independence is defined as I have done above and the formulations are consistent. This kind of study of effect of the grid on the solution given by a scheme seems to be of great practical importance. Has such study been done before? Can anybody tell me if there is any rational( not based on experience alone) part of cfd devoted to this.
  Reply With Quote

Old   November 14, 1998, 03:41
Default Re: Finite Difference Vs. Finite Volume
  #38
Dr. Don I anyanwu
Guest
 
Posts: n/a
I think, it is a matter of choice. Why no one tends to use pseudospectral method?
  Reply With Quote

Old   November 14, 1998, 06:24
Default Re: Finite Difference Vs. Finite Volume
  #39
Krishnakumar
Guest
 
Posts: n/a
No don, I don`t think it is just a matter of choice. The method you want to use depends heavily on the problem you want to solve and the type of solution you want to get. FD has some properties which make it good for some problems and so does FV. But most of the comercial codes nowadays, it seems, are using FV. It is not just simply a matter of choice, but because FV schemes are simple to impliment and you don`t need to break your head with the conventional transformations used in FD. I don`t know anything about pseudo-spectral methods, but I am sure if it is not being used nowadays it is because of some solid reason ( like the inability to handle complex geometries) and not just because of the matter of choice of the user or developer.
  Reply With Quote

Old   November 15, 1998, 16:37
Default Consistency vs. Convergence
  #40
Glenn Price
Guest
 
Posts: n/a
This excerpt is taken from a book by G. de Vahl Davis:

"The distinction between consistency and convergence should be clearly understood. Consistency ensures, in general terms, that the differential equation is being properly approximated. Convergence ensures that the solution is being properly approximated."

"The study of the convergence of a numerical scheme, and the determination of the conditions, if any, which are necessary and sufficient to achieve convergence, are in general not easy."

However, many numerical schemes for linear P.D.E's can be analyzed. Take a look at Prof. de Vahl Davis' book entitled "Numerical Methods in Engineering & Science", Allen & Unwin, London, 1986 - or any good text on numerical methods for PDE's.
  Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparison: Finite Volume Method vs. Analytic Method m-fry Main CFD Forum 1 April 20, 2010 15:40
Finite difference can be non-conservative? gregmason Main CFD Forum 2 July 8, 2009 12:53
formulation of finite element&finite volume method ravindra FLUENT 0 June 27, 2007 13:04
Fininte difference and Finite element Technique Mahendra Singh Mehra FLUENT 3 December 23, 2005 00:49
finite volume method co2 FLUENT 0 March 1, 2004 13:24


All times are GMT -4. The time now is 22:25.