Most of the CFD solvers use FVM. However, FDM is pretty simple to implement. I am interested to know exactly what advantages do FVM offer. And when should one go for FDM if he is planning to write a code from scratch.
Here are my two cents, there is no point or regurgarsting what professor Denaro mentioned. Positive things about FDM: it exteemly easy to get high order schemes. Good for turbulence models such as LES. Bad thing: only feasible for structured meshes, it is not conservative. Discontinuities is not a big deal since you can armed yourself with a group of Riemmans solvers.
FVM: bad thing (only one) getting high order schemes is a pain, it is extremly cumbersome. Good things (in addition to the other ones) it enforces the right mechanisms for wave propagation.
1) FVM is straightforward to implement on non uniform/unstructured grid, differently from FDM that requires a specific type of grid.
2) The most relevant issue is theoretical: the FVM discretizes the integral form of the equations. It can be shown that is equivalent to use a weak formulation, the only one that can adopted for non regular solutions. FDM cannot be used because the derivatives cannot be defined across a discontinuity
Finite Volume solves the integral form of balance equation; while Finite Difference, differential form is being solved. This gives an advantage of being conservative without special cares (mass conservative or momentum conservative) in FVM is more natural and guaranteed compared to FDM (or FEM). Also handling shocks (discontinuities in solution or space or material) in the integral form of balance equations is easier than differential form. (Basically this was said in the item 2 of Filippo Maria Denaro , I just reworded that!)
Thanks Filippo Maria Denaro and Kaveh Zamani for your detailed answers.
Yeah, FDM cannot handle discontinuities as the fundamental assumption while writing PDEs for flow field is "all variable are continuous and differentiable over the entire domain".
Can you give some examples where such discontinuities occur except the shock waves at high Mach number?
Here are my two cents, there is no point or regurgarsting what professor Denaro mentioned. Positive things about FDM: it exteemly easy to get high order schemes. Good for turbulence models such as LES. Bad thing: only feasible for structured meshes, it is not conservative. Discontinuities is not a big deal since you can armed yourself with a group of Riemmans solvers.
FVM: bad thing (only one) getting high order schemes is a pain, it is extremly cumbersome. Good things (in addition to the other ones) it enforces the right mechanisms for wave propagation.
Indeed additional care must be taken in order to get discrete conservation; however, it is possible. In terms of local conservation, it has been shown that skew-symmetric differential splittings are equivalent and can be re-written as a divergence form with special averaging (e.g., see Morinishi 1998, Drucos et al. 2000, Pirozzoli 2010, Fisher et al. 2013 etc.) and thus imply a flux rendition akin to FVM that is locally telescoping and can admit proper weak solutions via the Lax-Wendroff theorem.
I see your point but I don't agree. In my opinion we should always start from a specific PDE in continuous form and use the best discretization for it, not working conversely by looking at the discrete form and then recognizing the continuous equation it represents.
My idea of the difference between FVM and FDM is due to the original equations we want to solve. In this framework I agree with the presentation of FVM in the textbook of Peric & Ferziger, they stated also
"To obtain an algebraic equation for a particular CV, the surface and volume integrals need be approximated using quadrature formulae. Depending
on the approximations used, the resulting equations may or may not be those
Well, the question is more than a year old now. But I think I add my opinion for future reference.
Prof. Denaro point's of view is from theoretical side while Prof. Mendez's view is practical side. Dr.Edoh argues in the discrete matrix form (for th skew-symmetric schem to be really conservative, the actual matrix must be skew-symmetric).
If one wish to get to higher order
1.It would be informative if you start to look at both methods from Method of weighted residual. This is very helpful when you are going for higher order method. So study it a bit before start a whole journey of hellish coding.
2.On structure grid FD is undoubtedly faster and easier to implement. In linear problem, you'd get N+1convergence rate for FV. In NSE you just get N for N-order approximation.
3. FD and FV are equally difficult when applied to unstructured grid. General reconstruction method should work for FD as well. But it would be hard to make it conservative.
That's why DGM become so popular in the past decades. Despite it high cost.
4.Nishikawa's argument and his paper is an intersting way to relax the positioning of u. It would be fine for low-order. When analyses the local truncation error, this way would give O(h) but the method will converge at O(h^2) anyway due to the missing position reduces as well. I still can't see how this will be applicable in higher order.
the topic about DGM, compared to FDM and FVM is quite complex. What about the meaning of the resolved variable? We can demonstrate that FVM is actually a specific FEM formulation, being a weak formulation.
I think we should extend the framework of the numerical anlysis of the FVM formulation in terms of the concept of locally filtered (volume-averaging) resolved variable, as is usual in LES field.
The spectral resolution of any FVM based on the integral formulation should always represent an approximation of the top-hat filtering (ideally the function sin kh/kh in the spectral space). That does not happen in FDM. In DGM the spectral resolution depends on the shape of test function.
This topic was analysed by us since 20 years ago:
Article High order filtering for control volumes simulation
Article A deconvolution-based fourth order finite volume method for ...
You are absolutely right in that regard between FVM/FEM.
Even though, I am really not fond of the comment that FVM is an FEM with weighting function = 1. Physically, FV-form is more rigorous than the NSE.
The reason I mentioned that the people starts solving NSE should look at MWR, because several reasons. Thus I would like to elaborate a bit more here:
1.They should understand what does the difference between the physical discretization and mathematical discretization and what kind of errors they are introducing.
2.They should be open minded and know that the basis function can be anything, as well as the independent variables. For example, the basis function can be a polynomial of cell averages, pointwise values, pointwise derivatives, surface-averaged derivatives or even second-order derivative, if one will. They can be inside or outside the cells.
These two papers are good examples.
Article A Family of High Order Finite Difference Schemes with Good S...
Article A multi-moment finite volume method for incompressible Navie...
These two papers did not actually define the basis function, but the concept is there.
DGM is of course, one way of doing the above by just moving the DOF into the cells, in stead of reconstructed from neighbors or the points defining the cells, and in addition, allows the discontinuity between the connecting cells.
Nothing more, nothing less.
We can do anything we like with the weighting function. It can be 1, or the same as the basis and we have DGM if we chose that.
The basis of course, can be trigonometry, exponential, wavelets, or anything.
Once, we are opened to this concept. There are many discretizations opened to us beyond the current standard discretizations. A person wishes to code in this era, despite having many capable opensource softwares, definitely has a great determination.
Thus, they should explore the contemporary options and choose the best approach that match their specific problem, and perhaps, easy to extend to some related problems. One rarely stays in one field of research.
There is a strong point that makes FVM more appealing than FEM, in my point of vies. Even if FVM is a FEM-based weak form for step-wise test-functions, and we can recongnize the smoothed spectral resolution at each wavenumber, this is only a mathematical point. The real difference between FVM and FEM (and therefore DGM) is that the FVM is the transposition of a physical conservation law, as stated by the Reynolds transport theorem. That definitely makes me prefer the FVM.
FDM is strong solution which can easily reach its limitations (in some boundary conditions, domain and source terms), but FVM is weak solution (an approach in FEM) which solves these limitations, and at the same time conservative. For more detail take a look at
C. Grossmann, H-G Roos, Numerical treatment of PDE, section 4.5.4
@Arpiruk Hokpunna: Your point of test function is not accurate, test function should be in Sobelov space and orthogonal polynomial, e.g. Lagrange polynomial or Fourier series.
the differences between the FVM and the FDM are the following:-
1) FVM is an integral method while the FDM deals directly with the PDEs.
2) FVM preserves the overall conservation across the entire domain by maintaining the conservation of mass and momentum on each control volume cell.
3) FDM is easier to be implemented but you might face some problems ith the conservation laws so u have to paymore work on studying the boundary conditions.
you might find other ddifferences but these are the main differences between the two methods.
that issue is quite hystorical in the LES field. For long time the second order central discretization was recognized as being the exact representation of the continuous volume averaged derivative and, therefore, a global second order FD discretization was used as mimicking the application of the volume-averaged (top-hat filter) operation on the differential form of the momentum equation. Actually, that is not a real FV formulation and is not the congruent discretization of the top-hat filtered equation.
Here is a link where you will find the detailed information about the suitability of FVM for CFD along with related features (see page 4-5 at introduction part) http://www.gidropraktikum.narod.ru/Moukalled-et-al-FVM-OpenFOAM-Matlab.pdf
Each method is quite similar in that it represents a systematic numerical method for solving PDEs. One important difference is the ease of implementation. A common opinion is that the finite-difference method is the easiest to implement and the finite-element method the most difficult. One reason for this may be that the finite-element method requires quite sophisticated mathematics for its formulation.
One reason for the finite element method’s success in multi-physics analysis is that it is a very general method. Solving the resulting equation systems are the same or very similar to well-known and efficient methods used for structural and electromagnetics analysis. Another reason for the method’s success is that it makes it easy to “increase the order of the elements” so that the physics fields can be approximated very accurately. This typically corresponds to locally approximating the physics fields with polynomials of “higher order,” such as second- and third-degree polynomials, or higher. This technique is often critical, for example, in the case of accurate stress analysis.
Another advantage with the finite-element method, which is particularly important for multi-physics analysis, is that you can combine different kinds of functions that approximate the solution within each element. This is called mixed formulations. This is important, for example, in the case of electromagnetic heating. The physics and mathematics require one type of function for the electromagnetic field and another type of function for heat transfer; they both need to be tightly coupled to get an accurate solution and for the solution to converge. Mixed formulations are straightforward to handle the finite-element method, but difficult or impossible with other methods.
Interesting point Naseem Ahmad , but everything boils down to preferences! Although accuracy and fidelity are what we all go after! FVM is by far the most consistent approximation from a physical perspective. What you see is what in the discretized equations is what you see on the PDE's, once you invoque invoke Gauss theorem. I guess if I was a mathematician then I will prefer FEM over FVM, but the more I read the more I stick to FVM. FDM is easiest but the poorest as far as accuracy and fidelity.
The only way I know of deriving N-S equations at the continuum level from physical grounds leads to the integral form of the PDE, with no spatial derivatives in it, and requiring closure/modeling for the surface stresses. This equation is the transposition of the Newton's Second Law of motion, thus it is exact and valid within the exact same bounds. Notably, this doesn't even require the Reynolds transport theorem and integrals, but just conservation principles and sums. That's the exact same equation that we use in the Finite Volume method. Working in fluid dynamics as an engineer, honestly, I haven't found anything more rock solid than this. It also has a trivial programming implementation for unstructured grids and, as mentioned, it is all about conservation principles.
Any other method around has at least one of the following limitations:
- needs to introduce spatial derivatives after speculating about their existence
- doesn't have conservation embedded as first principle but as a numerical property, if any at all
- is not directly applicable to unstructured grids, especially polyhedral ones
- has a non trivial implementation
Notably, all the methods can be expressed in the same framework of the Weighted Residual Method, but that's not how you derive the starting physical equations.
Claims around the difficulty of achieving high order accuracy for the FV approach (with respect to the others) are partly misleading because:
- if there is no first derivative at all, what are we talking about? I still don't understand how pure transport of a discontinuous scalar distribution can be justified with a differential form
- FV can be applied on structured grids as well and have the same ease in constructing high order interpolants there as other methods do; FV could be applied, as well, on a DG-like grid arrangement and achieve the same advantages, but then it should make the same assumptions
What is true is that point values are required for the fluxes on the faces, but these are unknown because the methods provides evolution equations for volume averaged quantities (not point values). So, to go beyond the 2nd order, you need to evaluate the surface integrals with multiple gauss points and perform some deconvolution before interpolating to such points. But methods to do that exists and higher than 2nd order accuracy for FV methods has been shown on general unstructured grids.
It might well be that another method, different from FV, has the same advantages in other fields different from fluids, like FEM for solids, but for CFD I found that most counterarguments to the points above are largely unconvincing, especially if the end product we are talking about is a computer code that actually works in practical cases and is always up to ALL its promises.
I can address some papers published by Margolin & al. in 2019 where a framework for the derivation of the PDE governing the volume-averaged variable is deduced.
Paolo Lampitella beatiful explanation, one of the best I have read in the last years, very well articulated and very technically sound! Professor Filippo Maria Denaro I tried to find the reference but I was not able to find the appropriate, none of the reference are related to the topic. Could you please share the reference professor?
The Finite Volume Méthode ensures the conservation of the
mass and the moment and all transportable scalars on
each control volume in the calculation domain. Finite Elements are good in solid mechanics, especially where engineering construction is based on elements which retain the same recognisable vertices even after distortion.
Here is my small contribution to this discussion: the problem was discussed in a classical book of Tanehill, Anderson, Pletcher "Computational Fluid Dynamics and Heat Transfer"
Article Computational Fluid Dynamics and Heat Transfer; Second Edition