CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Finite Difference Vs. Finite Volume (https://www.cfd-online.com/Forums/main/287-finite-difference-vs-finite-volume.html)

elankov November 2, 1998 04:19

Finite Difference Vs. Finite Volume
 
Hello,

I m a beginer in CFD. From the five commercially available softwares for CFD which i know four of it uses finite volume methods such as PHOENICS, FLUENT, STAR-CD and FLOW3D. Can anyone explain why finite difference method is not prefered?

elankov

John C. Chien November 2, 1998 12:44

Re: Finite Difference Vs. Finite Volume
 
It is a good question. In uniform mesh, they are identical in many cases. In a way, the finite volume approach gives an impression that the overall mass, momentum etc. are conserved over a volume. It is also related to how people formulate the equations, that is the form of the equation before discretization. In the divergence form, the integration may seem to be easier to do. Anyway, I think it is easier to hide the assumptions under the finite volume method without mathematical justification. In the finite difference approach, you have to cover every terms generated from the coordinate transformation for general 3-D problems. In many cases, the evaluation of these terms are sensitive to the quality of the mesh used. As a result, a good finite difference solution is always more accurate than the finite volume solution because you have to pay attention to many more detail areas. The other reason is the influence from the finite element method which is more flexible for complex geometry. So, if you are looking for more accurate solutions, you may want to use finite difference methods. Otherwise, finite volume method will give you a solution, which may not be accurate enough, and you will be forced to refine the mesh ( volume or cells ) on and on . ( but at least that is the users problem. )

Duane Baker November 2, 1998 14:44

Re: Finite Difference Vs. Finite Volume
 
I think that we sould not mislead the poor beginner here by saying anything like: "As a result, a good finite difference solution is always more accurate than the finite volume solution because you have to pay attention to many more detail areas." The fact is that if the same level of attention is paid for both of the methods then the roughly the same accuracy is obtained.

First of all it is useful to look at the "method of weighted residuals" as the Mother of all methods. We can then look at all of the methods as decendents and relate the differences in a logical fashon rather than broad, unfounded, and often inacurate statements. In this manner the discrete equations for each method are obtained from the differential equations and the methods only differ in the weight function used.

1.FD is seen to be a weighted residual method with the Dirac Delta as weight function at the node point and zero everywhere else.

2.FV is seen to be a uniform weight function over the cell and zero everywhere else.

3. FEM is seen to be the weight function is the same as the shape function (Galerkin or Bubnov-Galerkin) or some variant of the shape functions as in Petrov-Galerkin.

Now, anybody who says that a technique using nodal Dirac-Delta is ALWAYS MORE ACCURATE than the other methods had better rethink their basic understanding of the methods.

For the poor beginner here are the fundamental advantages of the FV method:

1. Engineers like it because the Integral conservation equations (unity weight function over discrete volume) when expressed in conservation form (divergence of fluxes) can be convert the volume integrals to surface integrals using Gauss Divergence Theorem. This is a direct extension of the control volume analysis that Engineers are used to in Thermo, Heat Transfer, etc and can then be easily interpreted and troubleshooted.

2. If care is taken to obtain a conservative discrete FV method, exact global conservation is ensured for all grids, not only in the limit of grid refinement. Most industrial geometries and and boundary conditions are such that the grid-independant asymptote is a long ways away with practical grid size (remember 100 X 100 X 100 is a Million nodes)! It is hard to convince a turbine manufacturer that you can improve the efficiency from 95% using CFD to 96% when you have a mass or momentum loss of 5% in your simulation! This is not to neglect the importance of grid refinement studies but just being practial! And I will bet that the coarse grid strongly conservative FV solution is a better design tool than the FD. It is obvious from the vendors that the preferend method is FV. You can also add to that list CFX-TASCflow as a strongly conservative control volume based finite element method....probably the most accurate commercial code available.

Duane

John C. Chien November 2, 1998 17:19

Re: Finite Difference Vs. Finite Volume
 
Yes, you are right about it. But the seemingly good results with coarse mesh used can also be misleading. The other point you are trying to make is the so-call "weighted residual " procedure. I think, you can fit the three different methods into one formulation, but in reality, FD method is normally derived from the partial differential equations and no additional assumptions are made on the solution behavior. On the other hand, whether the "weighted residual " procedure of FE will produce real solution to the Navier-Stokes equations is, I think, still an open ended question. In many cases, the solution is of exponential funtion type, therefore, by assuming ahead of time that the solution distribution is either linear or parabolic is simply an approximation at best. Whether it is related to the real solution or not is questionable. For real 3-D problems, it is really hard to address the code accuracy without solving a real problem. Only the solution accuracy is meanful in this case. For FV method, since the overall conservation is satisfied, the flow variable will be off. The accuracy of flow variable has to be sacrificed.

Andy Thompson November 3, 1998 09:10

Re: Finite Difference Vs. Finite Volume
 
Duane A very well thought out and logically justified argument, leading to a sensible conclusion - right up to the point where you CLAIM CFX-TASCflow is "probably the most accurate commercial code available"!! If you are going to use this DISCUSSION FORUM for blatant commercialism, then maybe another well thought out and logically justifiable argument for your conclusions would help?!?!?!

John C. Chien November 3, 1998 09:53

Re: Finite Difference Vs. Finite Volume
 
I think, it is a common sense that FD is more accurate than FV based on my experience. Mybe a John Chien's conjesture is more appropriate for this occasion :" On a smooth, non-uniform 3-D curvilinear mesh, FD solution is always more accurate than FV solution."Nov.3,1998. A concept which is based on the control volume approach (1-D) is not going to be more accurate than traditional finite difference approach. I have never mentioned any commercial code in the Internet by name, therefore, I am not going to touch the issue of which code is using what method or which code is more accurate. As I said before, it is the code developer's responsibility to provide benchmark test results to the users. I would like to see the benchmark results published here. It's not going to take another 300 years to solve John Chien' conjecture. I am not claiming that I am always right. Maybe 300 years from now, everyone will be using the unified FE method. And everyone over 77 will have to live in the space station. And everyone will ask: " John Chien's conjesture ? What ?." The Internet is so big that my feeling simply don't exist at all. After all, a common sense is a common sense. And John Chien's conjesture shouldn't take 300 years to solve.

Andy Thompson November 3, 1998 10:11

Re: Finite Difference Vs. Finite Volume
 
John,

I am not in a position (intelectually) to argue with you over your conjecture!! I have read many of your inputs to this forum and they have always been informative and unbiased - attributes which I am sure are appreciated by contributors from both research and commercial areas. I do agree with you when you say it is the code developers responsibility to provide benchmark results, something which is all too often forgotten.

Keep up the interesting contributions!!


Philip Zwart November 3, 1998 10:58

Re: Finite Difference Vs. Finite Volume
 
Well, let me throw my hat into the fray and try to answer your question about why the finite volume method is preferred by commercial codes. John has said that FD is usually more accurate, and Duane has said perhaps not. Resolving this question is highly complex because, within both the FD and FV methodologies there are many choices which must be made for the discretizations of the various terms, and these choices are probably more important than choosing FD or FV.

Apart from what has been discussed, I think it is worth mentioning a few points which have not yet come up. First, for hyperbolic systems, the differential equations do not hold at discontinuities, whereas the integral conservation laws do... this is a point in favour of FV.

Second, FV is more easily extended to unstructured meshes, but I haven't seen any serious effort at FD on unstructured meshes... perhaps someone can correct me on this. The trend in commercial codes is definitely toward unstructured technology capable of handling complex 3D geometries.

Third, accuracy in the limit of fine meshes is not the only factor commercial codes must consider. More important from their perspective is robustness for a wide variety of general problems and meshes. Here, FV appears to win out over FD, because it enforces strong conservation at all times. Why is this important? Well, I'm not sure I completely know the answer to that, but one important factor is that the algebraic equations that come out of the discretization have nice properties (eg. diagonal dominance). Mass conservation is particularly important... see Patankar's book for more discussion of this.

A related issue is that commercial codes want their solutions to be physically reasonable even on coarse meshes. This is a different issue than accuracy in the limit of very fine meshes.

I hope this is a helpful addition to the discussion.

phil

John C. Chien November 3, 1998 13:08

Re: Finite Difference Vs. Finite Volume
 
I agree with you on everything you said. The global conservation and the complex 3-d geometry are two main driving force behind the FV method. But one has to realize that turbulent flows are the main focus today. In this case, the velocity gradient field is more important than the mass and momentum conservation. In the turbine cooling area, cooling holes are used everywhere. People have been using just one cell to represent the jet in the FV calculation. There's no problem in getting a solution. But in reality, even with one hundred thousand cells, the jet-in-a-cross-flow problem is still far from solved. Last year, when I was calculating 3-D combustor flow using an in-house FV code, I had only one cell to cover the jet port. I think, I was just kidding myself. Being able to present a solution does not mean that the solution is right. If people of CFD in early days were able to say that it did not make any sense to represent the jet with just one cell, the progress in this area would be far more advanced today. The important area of loss prediction in turbomachinery is a strong function of the pressure and velocity gradients, not a direction function of mass conservation. The secondary flow loss ( requires accurate 3-D flow field), the tip-clearance loss ( flow through very small gap ), the wake loss ( accurate description of the wake generation and development ), the disk cavity heat transfer, etc...all depends on the accurate 3-D flow field gradients to provide the loss calculation. Just overall correct 3-D flow field is not going to do the job. The same is true for the pump design, where the CFD is used to improve the efficiency. The ability to compute the 3-D flow field is one thing, the ability to improve the efficiency is another story. ( you may want to ask Professor Patankar or Dr. Rodi about how many cells are required to predict accurately the jet-in-a-cross-flow problem. So, what I am trying to say is that the FV code I used last year should gave me an error message saying : John, you can't do that, you need to define the jet port with a minimum of ..... cells in order to get a reasonable answer.) By the way, I support anyone working in CFD field; good, bad or ugly.

Duane Baker November 3, 1998 14:59

Re: Finite Difference Vs. Finite Volume
 
Andy,

firstly, thank you for your comments on the majority of my posting. Now, for the commercialism accusations:

commercial - Having financial gain as an object. blatant - obvious or obrusive

......from Funk and Wagnalls standard desk dictionary

I neither work for nor profit in any way from AEA Advanced Scientific Computing!

WHO DO YOU WORK FOR? (from your email address it is BLATANTLY OBVIOUS)

CAN YOU POSSIBLY PROFIT FROM THE DOGMATIC SUPPRESSION OF INDEPENDANT OPINIONS, WHICH ARE NOT IN AGREEMENT WITH YOUR EMPLOYER'S ADVERTS?

I work for the Alberta Research Council and have used several commercial codes, including CFX-TASCflow, Fluent, PHOENICS, etc. I have also studied and written my own CFD codes and I am fairly well versed in the literature on CFD developments. As a result of this, I have come to the independant conclusion that CFX-TASCflow IS PROBABLY THE MOST ACCURATE commercial code available from the general purpose CFD codes which I have used. My comments also reflect the opinions of other users which I have gathered through various discussions, particulary discussions with some German Enginners (Probably the best Engineers in the world!...this is meerly my opinion and not a request for all dogmatic suppressors to now post their accusations). Further supporting evidience is the fact that two years ago AEA purchased ASC when they already had a CFD code....why do you think that was???

On a technical basis, the coupled momentum and continuity solver approach of CFX-TASCflow combined with the algebraic multi-grid linear slover is the fastest and most robust solver that I have ever used. What does Fluent (or any of the other codes for that matter) offer in this respect? The last time I used Fluent, the number of interequation relaxation parameters which required tuning resulted in more of a black-art than a scientific approach to getting a converged solution. As for discretization, the Linear Profile Skew Upstream Differencing Scheme (LP-SUDS) with Physical Advection Correction (PAC) provides the most accurate and robust second-order treatment of advection that I have ever used. The Mass Weighted SUDS provides an extremly accurate first order scheme for those tough industrial problems on coarse grids that require a very robust scheme. What does Fluent offer in these respects Quick and UDS?? If I recall, Fluent was still using the staggered grid in the early 90's when ASC has a colocated non-orthogonal boundary fitted grid with the control-volume finite element method since about 1986! That has of course been rectified by implementing the Rhie and Chow technique, somewhat like following what ASC had done a long time before!

In my posting, I was meerly adding my experience and the CFX-TASCflow code to the list of 4 which was originally posted so that the beginner can broaden his scope of codes. I believe this is consistient with the purpose of this DISCUSSION FORUM and would encourage you to to be CONSTRUCTIVE by adding some valuable discussion of the details of what your company can provide (some of my knowledge may be out of date)!

Duane Baker P.Eng., B.Sc.(Mec E), M.A.Sc.(Chem E), M.A.Sc.(Mech E) CFD Research Engineer Alberta Research Council Email: baker@arc.ab.caane Baker


John C. Chien November 3, 1998 17:09

Re: Finite Difference Vs. Finite Volume
 
I am very happy to hear that there is a satisfied customer of a commercial CFD code. The goal of a commercial product is not to kill other similar products but to satisfy the need of a customer. The performance is secondary . This is very true in car business. In TV ads of new cars, you rarely see two cars racing against each other. Because it does not make sense to do that. And no one will be happy when there is only one commercial code to choose from. I think every code developer should receive a medal because they are the ones who took the risk to develop the codes.

James Bond November 4, 1998 05:11

Re: Finite Difference Vs. Finite Volume
 
'Further supporting evidience is the fact that two years ago AEA purchased ASC when they already had a CFD code....why do you think that was??? '

This is easy as most in the industry know. CFX 5 had just been released ... and bombed. Yep it was being eaten alive by STAR CD and FLUENT/UNS. To stay with the game AEAT had to do something. That something was the purchase of ASC.

Andy Thompson November 4, 1998 05:56

Re: Finite Difference Vs. Finite Volume
 
Duane, With apologies for my earlier tone, and in the most conciliatory manner I can muster - I was obviously unaware of your allegiance (i.e. NOt to a commercial CFD code vendor), and I over reacted to what I maintain was an unsubstantiated statement in your first posting. If you had stated that your conclusions had come from your (obviously impressive) experience of the various commercial codes available, I am (almost) certain I would have reacted differently. Anyway - apologies again.


John C. Chien November 4, 1998 09:40

Re: Finite Difference Vs. Finite Volume
 
When a CFD code becomes a commercial code , it becomes a black box by definition in order to survive in the marketplace. When a black box meets a black box they can't see each other, they have to wear colorful masks. You can't ask CoKe to reveal its secret formula. The same is true that you can't ask an Olympic figure skater to post nude when competing in the game. But in order to see the underside of a black box, sometimes the user must ask questions to provoke discussions with negative questions. I don't feel bad at all because it is part of my intention to help bring out feeling from inside the black box. We as users also have to learn how to survive through the next century. By the way,in the traditional Chinese opera, female characters are always male actors. What's inside the black box really is not important at all. Audience's satisfaction perhaps is the most important issue.? Or is it ? How do you know he really understand the Chinese opera ? But there is no question that the use of FV in commercial code is today's FASHION. It is an interesting subject of discussions.

Andy Thompson November 4, 1998 10:30

Has the subject changed??
 
Considering my position within the CFD industry is in a Consultancy capacity, my experience lies in application of the techniques to industrial problems, often for engineers with little/no CFD knowledge. I have only a limited knowledge of the "inside of the black box" - just enough to be able to choose the most appropriate models/techniques for the particular problem in hand. This comes as much from experience as from knowing HOW the model works! As far as the audience (industrial client) is concerned, there is often no need for them to know what we do to achieve a solution (unless they ask for specifics). Their main aim is to solve an engineering problem, CFD is just another tool being used to help them find the solution. As with all tools, the result depends as much on the expertise of the user as the quality of the tool. Obviously the tool is being continually refined and updated, and the methods of use are constantly under review, but surely the fact that engineers are being provided with more insight and better understanding is more important than giving them an answer to 5 decimal places!?!?!

John C. Chien November 4, 1998 11:54

Re: Has the subject changed??
 
You do bring up an interesting point, maybe the FV formulation in a commercial code provides a perfect match for the average engineers who are mainly concern about the ability to obtain a solution to their problems. The average engineers are not equipped to deal with the complex coordinates transformation factors associated with FD mesh. It does make sense to think in this way. The conclusion is : FV is more user-friendly for average engineers, and FD is more complex for advanced professional. So, the FV used in the commercial code is purely a business consideration. And if the advanced professionals are not satisfied with FV approach, they are free to write their own code in FD. ( I think they have been doing this for a long time already.) By the way, the subject has not changed. I am just wondering why the FE fashion of 70's simply evaporated in late 90's.

Andy Thompson November 4, 1998 12:09

Back to FD vs. FV
 
I really wish I could answer the question about the change in fashion - maybe it is something to do with ease of implementation, or maybe it is just that all us AVERAGE ENGINEERS can't deal with the complexities which all you ADVANCED PROFESSIONALS eat up for breakfast. I can state however, that some of the problems that are solved on a day to day basis by "average engineers" using commercial CFD codes would make many an "advanced professional" sit up and take notice!!

John C. Chien November 4, 1998 13:03

Re: Back to FD vs. FV
 
I am quite amazed by today's commercial CFD codes' capabilities to handle complex geometry. In this area, you got an A+. But if you remove the supporting staff and service from the day-to-day CFD activities, the average engineers would be left in the cold alone. So it is important to have experienced CFD engineers to provide the service to the average engineers to solve their daily problems. And if an average engineer received his (or her ) training at school in FD form ( numerical methods, partial differential equations , etc..), he is likely to ask questions about the commercial use of the FV methods. Unless the exact FV method used in the code is explained in detail,the question of " FD vs FV " will remain largely un-answered. For this reason, benchmark test cases and samples are the only way to guide you in the selection of commercial CFD codes. In this area, experienced CFD engineers will play a key role in saving users ( and companies) a great deal of money and time.( until a smart FV code can be developed to warn the users automatically in regard to the solution accuracy and coarse mesh issues.) I think, the accuracy issue and the coarse mesh solution problem are still important to smart users .

krishnakumar November 4, 1998 15:08

Re: Finite Difference Vs. Finite Volume
 
I am a beginner in CFD and I was surprised to find that I was able to follow quite a lot of ur discussion. But I still do have some doubts. From ur last message (chein), I think ur trying to say that FD is better than FV for solving turbulent flows. How are FD schemes better for turbulent flows? And as for the minimum discretisation question, I think FD and FV stand equal. Neither can u directly decide on the number of cells(FV), nor for the number of nodes(FD) for getting reasonable answers.Please correct me if I am wrong. I also want to point out something interesting. I am doing a project on a least squares scheme at present. It is actually an FD scheme, based on the least squares method of reducing the differntial error to find the spatial derivatives(flux derivatives). A very robust scheme, very similar to this one, called LSKUM(least squares kinetic upwind method) can handle very complex geometries indeed.( I cant remember the exact ref for this now, but I will find it out and post it here as soon as possible.) Infact, this scheme works on a cloud of points and can work out the solution given just the connectivity relation between these points. The scheme (using differnce spliting rather than vector splitting) I am involved with is the same as FV(mathematically) in a uniform mesh, and the diff comes in a non-uniform mesh. We haven`t yet found whether this diff is for the better or for the worse, but the intresting point here is the similarity. I think future schemes will use the techniques of FV,FD,FE,Lsq(least squares or other statistical estimators) and it will be pretty tough to characterise schemes as purely FD or FV. Please correct me if I am wrong here.

(reference to LSKUM will soon follow..)


Krishnakumar November 5, 1998 03:07

Ref for LSKUM
 
Reference for LSKUM :

AIAA(1995) - A.K.ghosh & S.M.deshpande - AIAA-95-1735.

andy November 5, 1998 13:02

Re: Finite Difference Vs. Finite Volume
 
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!


John C. Chien November 5, 1998 14:50

Re: Finite Difference Vs. Finite Volume
 
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.

Duane Baker November 6, 1998 06:00

Re: Finite Difference Vs. Finite Volume
 
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

Duane Baker November 6, 1998 06:16

Re: Has the subject changed??
 
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

Philip Zwart November 6, 1998 08:58

Re: Finite Difference Vs. Finite Volume
 
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

Philip Zwart November 6, 1998 09:18

Re: Finite Difference Vs. Finite Volume
 
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

John C. Chien November 6, 1998 09:39

Re: Has the subject changed??
 
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.)

andy November 6, 1998 11:17

Re: Finite Difference Vs. Finite Volume
 
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.

Philip Zwart November 6, 1998 11:45

Re: Finite Difference Vs. Finite Volume
 
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

John C. Chien November 6, 1998 15:58

Re: Finite Difference Vs. Finite Volume
 
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 ?

Duane Baker November 6, 1998 16:53

Re: Finite Difference Vs. Finite Volume
 
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

Krishnakumar November 8, 1998 05:24

Re: Finite Difference Vs. Finite Volume
 
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.

John C. Chien November 9, 1998 10:52

Re: Finite Difference Vs. Finite Volume
 
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.

Ken Elms November 10, 1998 17:53

Re: Has the subject changed??
 
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.


Krishnakumar November 12, 1998 15:53

Re: Finite Difference Vs. Finite Volume
 
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?

John C. Chien November 12, 1998 16:46

Re: Finite Difference Vs. Finite Volume
 
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 ?

Krishnakumar November 13, 1998 15:53

Re: Finite Difference Vs. Finite Volume
 
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.

Dr. Don I anyanwu November 14, 1998 02:41

Re: Finite Difference Vs. Finite Volume
 
I think, it is a matter of choice. Why no one tends to use pseudospectral method?

Krishnakumar November 14, 1998 05:24

Re: Finite Difference Vs. Finite Volume
 
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.

Glenn Price November 15, 1998 15:37

Consistency vs. Convergence
 
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.


All times are GMT -4. The time now is 16:36.