CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Interpolate from face centers to cell center (https://www.cfd-online.com/Forums/main/198332-interpolate-face-centers-cell-center.html)

AliE February 2, 2018 12:45

Interpolate from face centers to cell center
 
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

FMDenaro February 2, 2018 14:12

I never used to interpolate the face values to get the center-cell value... However, you can use a linear interpolation.

AliE February 2, 2018 14:17

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?

FMDenaro February 2, 2018 14:29

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

mprinkey February 4, 2018 05:57

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.

AliE February 4, 2018 06:04

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!

FMDenaro February 4, 2018 06:17

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 ...

juliom February 4, 2018 10:16

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. ?

FMDenaro February 4, 2018 12:29

Quote:

Originally Posted by juliom (Post 680413)
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 February 4, 2018 12:30

Thank you professor, I did not know that was treated as deconvolution. I appreciate the clarification.

sbaffini February 5, 2018 04:15

Quote:

Originally Posted by AliE (Post 680293)
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.


All times are GMT -4. The time now is 20:31.