|
[Sponsors] |
February 2, 2018, 12:45 |
Interpolate from face centers to cell center
|
#1 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
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 |
|
February 2, 2018, 14:12 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71 |
I never used to interpolate the face values to get the center-cell value... However, you can use a linear interpolation.
|
|
February 2, 2018, 14:17 |
|
#3 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
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?
|
|
February 2, 2018, 14:29 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71 |
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 |
|
February 4, 2018, 05:57 |
|
#5 |
Senior Member
Michael Prinkey
Join Date: Mar 2009
Location: Pittsburgh PA
Posts: 363
Rep Power: 25 |
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. |
|
February 4, 2018, 06:04 |
|
#6 |
Senior Member
Join Date: Dec 2017
Posts: 153
Rep Power: 8 |
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! |
|
February 4, 2018, 06:17 |
|
#7 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71 |
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 ... |
|
February 4, 2018, 10:16 |
|
#8 |
Senior Member
|
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. ?
|
|
February 4, 2018, 12:29 |
|
#9 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,769
Rep Power: 71 |
Quote:
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" |
||
February 4, 2018, 12:30 |
|
#10 |
Senior Member
|
Thank you professor, I did not know that was treated as deconvolution. I appreciate the clarification.
|
|
February 5, 2018, 04:15 |
|
#11 | |
Senior Member
|
Quote:
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. |
||
|
|
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 |