# FVM solution interpolation

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

 December 20, 2013, 13:09 FVM solution interpolation #1 New Member   Иван Сташко Join Date: Dec 2013 Posts: 28 Rep Power: 4 I have some significant experience with COMSOL. COMSOL is FEM-based. After it has solved a problem using a gross mesh, I can ask for a field value at a given point. This is not a problem and is performed using the basis functions chosen for that particular element. I am working with some colleagues who are using two different CFD packages. Both of them tell me, that using their packages, they can only evaluate the solution at the centroids. Evaluation elsewhere is not done by interpolation, but by some kind of filtering function which actually does not really represent the solution. What are your thoughts on this matter? It seems rather odd, coming from the FEM world.

December 20, 2013, 14:06
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,596
Rep Power: 32
Quote:
 Originally Posted by ivan-s I have some significant experience with COMSOL. COMSOL is FEM-based. After it has solved a problem using a gross mesh, I can ask for a field value at a given point. This is not a problem and is performed using the basis functions chosen for that particular element. I am working with some colleagues who are using two different CFD packages. Both of them tell me, that using their packages, they can only evaluate the solution at the centroids. Evaluation elsewhere is not done by interpolation, but by some kind of filtering function which actually does not really represent the solution. What are your thoughts on this matter? It seems rather odd, coming from the FEM world.
FD or FV methods imply that a local interpolation exists... for example, developing FD formulas from Taylor expansion is exactly as same as deriving the coefficients of Lagrangian polynomials. That is, second order schemes have a linear polynomial, third order schemes a quadratic polynomial and so on.
Spectral methods are based on global interpolation by trigonometric basis polynomials.
Therefore, any discrete method has a proper "shape function" like in FEM.

 December 20, 2013, 16:44 Yup #3 New Member   Иван Сташко Join Date: Dec 2013 Posts: 28 Rep Power: 4 Yup, I read that there have to be these interpolation functions to perform the calculations at the volume boundaries... However, I am told that those two particular packages (Fluent and something else which I don't want to mention here) are unable to give you solution results at any point other than the centroid. So the question is not whether the interpolation functions exist internally to the package for the purpose of finding the solution, but rather, whether it is possible to obtain a value at a given point which is not the centroid, from, let's say, the Fluent package. It seems ludicrous to me that this would be the case.

 December 20, 2013, 18:05 #4 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 2,596 Rep Power: 32 Speaking about fluent, consider that the value in a centroid is volume averaged and represents a constant over the finite volume at second order of accuracy. Higher order representation of averaged values is not possible. That is somehow linked to filtered top-hat function

 December 20, 2013, 18:15 Hunh #5 New Member   Иван Сташко Join Date: Dec 2013 Posts: 28 Rep Power: 4 OK, so I do see an least one advantage of using FEM methods, now... Or at least, of staying away from Fluent. Thank you for the help!

December 20, 2013, 18:30
#6
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,596
Rep Power: 32
Quote:
 Originally Posted by ivan-s OK, so I do see an least one advantage of using FEM methods, now... Or at least, of staying away from Fluent. Thank you for the help!
However, this is not a limit of fluent, it is the second order FV formulation that leads to value at the centroid be equal to the volume averaged value.

 December 21, 2013, 10:02 Understood. #7 New Member   Иван Сташко Join Date: Dec 2013 Posts: 28 Rep Power: 4 OK, I understand that. But is it really true that these various FVM packages don't have post-processors to give the use a value at any other location?

December 21, 2013, 10:23
#8
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,596
Rep Power: 32
Quote:
 Originally Posted by ivan-s OK, I understand that. But is it really true that these various FVM packages don't have post-processors to give the use a value at any other location?
To tell the true I don't care, if you write a Tecplot-formatted file then you can do better post-processing ...

 December 21, 2013, 11:42 Thanks! #9 New Member   Иван Сташко Join Date: Dec 2013 Posts: 28 Rep Power: 4 Interesting tip, thanks! To tell the truth, this other company is using a proprietary soft which doesn't have a manual on the web; I can hardly say if they will write a Tecplot file for me.

 December 21, 2013, 13:26 #10 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 598 Blog Entries: 17 Rep Power: 19 I don't know the other package you are referring to but, OF COURSE, Fluent can give you the value of some variable wherever you want; that is, Fluent has integrated post-processing capabilities. Now, the question is: what do you need this value for? If you want a solver consistent value for some variable, you can't have nodal values in Fluent in the same way you can't have volume averaged values in FEM. I mean, you can only obtain volume averaged values in FVM as only nodal values in FEM, the variables the two codes solve for. Anything else requires some additional approximation. In FEM the approximation is on the local basis function; in FV it is based on the local interpolant used to compute the fluxes on the faces of the volume. If, instead, given a computed solution, you want some approximate value in a place whre it is not stored, then this is just interpolation and Fluent can do it as any other code. In this case, however, the consistency with the solver is not anymore required and you can go with any interpolant you want, just as in FEM. Going specifically to Fluent, given a certain point, you locate the cell it belongs to and do some of the following (according to your needs): - use the cell value (1st order) - use the cell value + a correction based on the local gradient, limited or not (2nd order) - split the located cell in tetrahedra. These tetrahedra have a vertex in the centroid (known value), one on the centroid of the faces (known value, because used to compute face fluxes) and on the nodes of the cell (values internally stored by Fluent and computed by an inverse weighted distance interpolation over the cells sharing the node). Locate the tetrahedra containing your point and use linear interpolation within the tetrahedra These methods are just if you want to do it by yourself via user provided subroutines (which, nonetheless are very easy to program). Otherwise, you can specify a plane, a line, an isosurface of anything, and export the values on it, which are linearly interpolated (you will not notice any jump between cells).

 December 22, 2013, 04:17 #11 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 255 Blog Entries: 6 Rep Power: 10 The FEM solution is a "function" which you can evaluate anywhere you like. You can also compute cell average from the FE solution. FVM gives you only cell average value. To approximate the solution at some particular point using the cell averages, you need to do some additional steps which may have nothing to do with FVM itself. __________________ http://twitter.com/cfdlab

December 22, 2013, 04:59
#12
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,596
Rep Power: 32
Quote:
 Originally Posted by praveen The FEM solution is a "function" which you can evaluate anywhere you like. You can also compute cell average from the FE solution. FVM gives you only cell average value. To approximate the solution at some particular point using the cell averages, you need to do some additional steps which may have nothing to do with FVM itself.
Well, the issue is even more complex...despite the FEM implies a functional approximation, that does not define the meaning of the nodal values. As FEM is based on projection along suitable shape function, the nodal solution is not necessarily a point-wise one but can be determined also in terms of some weighted form. For example, FEM can be used to solve for implicitly filtered LES.

On the other other hand, FVM can be formulated by means a built-in functional reconstrunction of cell-average value, for example think about ENO/WENO reconstruction or Barth's polynomial appromixation

December 22, 2013, 08:39
#13
Senior Member

cfdnewbie
Join Date: Mar 2010
Posts: 557
Rep Power: 12
Quote:
 Originally Posted by FMDenaro Well, the issue is even more complex...despite the FEM implies a functional approximation, that does not define the meaning of the nodal values.
First of all, very interesting discussion of all of you here. Filippo, could you clarify your statement above a little bit? I'm confused about the following:
FEM is a projection onto a given functional space, so it is indeed a "best" functional representation (in some norm) to the problem. This functional representation can now be evaluated at any given point on the compact support, so the nodal values (at any point in space) ARE defined by the projection.

What am I missing here?
Thank you!

December 22, 2013, 09:05
#14
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,596
Rep Power: 32
Quote:
 Originally Posted by cfdnewbie First of all, very interesting discussion of all of you here. Filippo, could you clarify your statement above a little bit? I'm confused about the following: FEM is a projection onto a given functional space, so it is indeed a "best" functional representation (in some norm) to the problem. This functional representation can now be evaluated at any given point on the compact support, so the nodal values (at any point in space) ARE defined by the projection. What am I missing here? Thank you!
you are correct, but just think about the case in which, when you project using the 1/|V| shape function (compact support), FEM becomes a FVM . That mathematically defines a weak solution and an Integral formulation in physical space (see a clear paragraph in the LeVeque book on FVM).
Therefore, the FEM solution is in expressed in terms of averaged values like in FVM. The functional representation gives you values at any point but they referred as to a continuous representation of the averaged function.
For example, consider the Burgers equation and project it along 1/|V| in a FEM manner. You see that the time derivative applies on the averaged function. If you use other shape functions, the time derivative works on a transformed velocity function

Last edited by FMDenaro; December 22, 2013 at 13:58.

 December 22, 2013, 09:10 #15 Senior Member   cfdnewbie Join Date: Mar 2010 Posts: 557 Rep Power: 12 allright, I get what you are saying. thank you. a very interesting point! I never thought of FEM in that way!

 December 23, 2013, 06:16 #17 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 255 Blog Entries: 6 Rep Power: 10 Suppose you have a weak formulation In the FEM, we approximation the function space by a finite dimensional function space . We usually take to be made of piecewise polynomials. The FEM is The solution is a function which is completely determined by the FEM. To represent you may use a nodal basis or a modal basis, but they represent the same function. Now once is found you can take averages of that. But you lose information in that process. If you only have cell averages, there is no unique way to get back the original function. The Discontinuous Galerkin method is essentially a finite element method and is a higher order version of the finite volume method. In DGFEM the solution is a piecewise polynomial which is completely determined by the scheme. In this approach you obtain a function unlike in FVM. __________________ http://twitter.com/cfdlab

December 23, 2013, 06:30
#18
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 2,596
Rep Power: 32
Quote:
 Originally Posted by praveen Suppose you have a weak formulation In the FEM, we approximation the function space by a finite dimensional function space . We usually take to be made of piecewise polynomials. The FEM is The solution is a function which is completely determined by the FEM. To represent you may use a nodal basis or a modal basis, but they represent the same function. Now once is found you can take averages of that. But you lose information in that process. If you only have cell averages, there is no unique way to get back the original function. The Discontinuous Galerkin method is essentially a finite element method and is a higher order version of the finite volume method. In DGFEM the solution is a piecewise polynomial which is completely determined by the scheme. In this approach you obtain a function unlike in FVM.

yes, the above description is general and is correct... but just try to apply the FEM to

du/dt + d/dx(u^2/2-ni*du/dx) = 0

what after you project along some test function?

On the other hand, in FVM the "interpolation" appears in somehow obscure way, but the functional representation of the flux function is the key to understand that shape functions are implied also in FVM.
Considering the above equation in integral form (u_bar is the average function):

du_bar/dt + [(u^2/2-ni*du/dx)|est - (u^2/2-ni*du/dx)|west]/h = 0

Then, the FVM implies you use a functional representation u_bar=u_bar[u]. Defined that, you can use such representation to compute everywhere the values

In conclusion, my opinion is the FVM is just a special case of FEM

 December 23, 2013, 10:32 #20 Super Moderator     Praveen. C Join Date: Mar 2009 Location: Bangalore Posts: 255 Blog Entries: 6 Rep Power: 10 Going back to the original question about evaluating solution at some arbitrary point in the domain. Galerkin, petrov-galerkin and DGFEM all give us a function as a solution, so in this case it is very clear. You can reinterpret some Godunov FVMs as a special type of petrov-galerkin DG method for hyperbolic problems. This is done in some papers of Barth. This involves a reconstruction process and one can say to the original question that you use the reconstruction to evaluate the solution at some desired point. It may not be possible to do this in general, e.g., say for Navier-Stokes. One usually constructs schemes for inviscid and viscous terms using different ideas, and I dont think it is possible to give a proper re-intepretation as an FEM. Remember that the purpose of this re-interpretation is to give us a function that can be evaluated at a desired point. In many other FVM, the FV method itself tells you how to reconstruct the face values but may not tell you what is the reconstructed function inside the cells. In this case you have to use some reconstruction process of sufficient accuracy which may have nothing to do with the FVM. __________________ http://twitter.com/cfdlab

 Tags fvm, interpolation, numerical

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post gueynard a. Main CFD Forum 19 June 27, 2014 21:22 santiagomarquezd OpenFOAM Running, Solving & CFD 0 March 26, 2010 08:52 john FLUENT 5 December 13, 2005 03:10 kenn Main CFD Forum 2 July 18, 2004 18:28 Abhijit Tilak Main CFD Forum 6 February 5, 1999 02:16

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