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

Interpolate from face centers to cell center

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By FMDenaro
  • 1 Post By mprinkey
  • 1 Post By FMDenaro

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2018, 12:45
Default Interpolate from face centers to cell center
  #1
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 8
AliE is on a distinguished road
Hello guys,

I have to perform the following operation within a finite volume framework:

Interpolate a variable form face centers (e.g. six for hexa cells) to cell center.

Do you known any alghoritm to do this job?

Thank you very much,
AliE
AliE is offline   Reply With Quote

Old   February 2, 2018, 14:12
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
I never used to interpolate the face values to get the center-cell value... However, you can use a linear interpolation.
FMDenaro is offline   Reply With Quote

Old   February 2, 2018, 14:17
Default
  #3
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 8
AliE is on a distinguished road
Hello FMDenaro and thanks for your replay. Yes and I hace always done the same, but i am implementing a smoother follwing a paper and in the procedure you have to interpolate from center to faces and form faces to center a fixed number of time. Since the point is in the cell center, take the mean of the face values would make sense for you?
AliE is offline   Reply With Quote

Old   February 2, 2018, 14:29
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Generally, the value in the center of the FV corresponds to the mean value while the value at the face is pointwise. The fluxes are based on face values and their summ gives the mean value update. On regular grid such relation is second order. Averaging and de-averaging are used, too.

Therefore, what you have to do depends on what is your method
juliom likes this.
FMDenaro is offline   Reply With Quote

Old   February 4, 2018, 05:57
Default
  #5
Senior Member
 
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25
mprinkey will become famous soon enough
I think the face values are more properly considered average values over the faces, rather than pointwise values. Of course, this is all philosophical at some point.

About the best way I can think of to move from face values to cell values in a consistent (second-order) way is to assume a Taylor expansion about the cell centroid with four free parameters (in 3D)...the value at the cell centroid and the three components of its gradient. Then build a linear system with those four unknowns using the face values and cell and face position vectors as samples. With a tet cell, this becomes a determined system and the math gives you a single result for the cell centroid value (and the gradient that you didn't need). For a cell with 5 or more faces, this system becomes overdetermined and then you need to solve it in a Least-Squares sense. Pure LS is probably fine. You may consider playing with distance-weighted LS if your cells are badly skewed.
sbaffini likes this.
mprinkey is offline   Reply With Quote

Old   February 4, 2018, 06:04
Default
  #6
Senior Member
 
Join Date: Dec 2017
Posts: 153
Rep Power: 8
AliE is on a distinguished road
Hello,
Thank you for your hint which is close to mine. At the end I think that I will calculate for each face vaule its weighted distance with respect to the center and then calculate the interpolated value using those weights. LS is better, let's see if I am not lazy thak you!
AliE is offline   Reply With Quote

Old   February 4, 2018, 06:17
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
At second order of accuracy, you can assume that averaged and pointwise value are the same, therefore the Taylor expansion gives only f_av=f both in the center cell and in the face.
Considering the use of the Taylor expansion in a simple 1D example:

f(x+h/2)=f(x) + f'(x)*h/2+...
f(x-h/2)=f(x) - f'(x)*h/2+...

f(x)= 0.5*[f(x+h/2)+f(x-h/2)] + O(h^2)

So, the problem in 3D is that you have to consider that each direction has one solution already determined. You can try to summ the three solutions and divide by 3 ...
FMDenaro is offline   Reply With Quote

Old   February 4, 2018, 10:16
Default
  #8
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 18
juliom is on a distinguished road
Send a message via Skype™ to juliom
Professor can you provide a reference for the de-averaging , please ?Also, I am wondering why the averaging yields to a second order, is that possible even using first order upwind schemes for example for the connective and viscous terms. ?
juliom is offline   Reply With Quote

Old   February 4, 2018, 12:29
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by juliom View Post
Professor can you provide a reference for the de-averaging , please ?Also, I am wondering why the averaging yields to a second order, is that possible even using first order upwind schemes for example for the connective and viscous terms. ?
Deaveraging, also called deconvolution, is a general mathematical technique and does not imply the adoption of the equation of the fluid dynamics.
That means for example that given a convolution product with the function G

f=G*h

if G^-1 exists, you look for the deconvolved function

h=G^-1*f

It is a typical tool in imaging reconstruction but is used in the signal problems and appears in the LES issues, too.
You will find a lot of references with the term "deconvolution"
juliom likes this.
FMDenaro is offline   Reply With Quote

Old   February 4, 2018, 12:30
Default
  #10
Senior Member
 
Julio Mendez
Join Date: Apr 2009
Location: Fairburn, GA. USA
Posts: 290
Rep Power: 18
juliom is on a distinguished road
Send a message via Skype™ to juliom
Thank you professor, I did not know that was treated as deconvolution. I appreciate the clarification.
juliom is offline   Reply With Quote

Old   February 5, 2018, 04:15
Default
  #11
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,151
Blog Entries: 29
Rep Power: 39
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by AliE View Post
Hello guys,

I have to perform the following operation within a finite volume framework:

Interpolate a variable form face centers (e.g. six for hexa cells) to cell center.

Do you known any alghoritm to do this job?

Thank you very much,
AliE
Dear AliE,

in addition to the suggestion from Michael, you can give a look at my thesis here:

https://www.researchgate.net/publica...dustrial_Flows

page 106, where I cite few known methods used to compute cell center pressure gradients from face centered ones.

Working on vectors is clearly different, but might give you some insight on the matter.
sbaffini is offline   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
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
Using a custom algorithm for cell center calculations Zvex OpenFOAM Programming & Development 7 June 30, 2013 05:01
[blockMesh] BlockMesh FOAM warning gaottino OpenFOAM Meshing & Mesh Conversion 7 July 19, 2010 14:11
How to determine the direction of cell face vectors on processor patches sebastian_vogl OpenFOAM Running, Solving & CFD 0 October 27, 2009 08:47
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 07:36


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