CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Interpolate from cell value to point value (https://www.cfd-online.com/Forums/openfoam/137845-interpolate-cell-value-point-value.html)

samiam1000 June 24, 2014 02:39

Interpolate from cell value to point value
 
1 Attachment(s)
Dear All,

I am writing since I am facing a challenging issue: I have computed a certain function, i.e. Gw, on the walls of my channel and they are computed in the Gw attached file. Now I am going to move the patch "backWall" in the y direction accordingly to the data contained in this file.
The point is that the motion tool requires the value of Gw on the points, not on the cells. This means that I should interpolate from cell values to point values.

Can anyone help, please?

Thanks a lot,
Samuele

bigphil June 25, 2014 06:45

Hi,

You can use volPointInterpolation class to interpolate a volField to a pointField.

The standard volPointInterpolation class uses inverse distance weighted interpolation that can be inaccurate depending on the mesh.

The leastSquaresVolPointInterpolation in foam-extend is more accurate in general.

Philip

samiam1000 June 25, 2014 06:59

Thanks for answering..

If I share the solver, could you help in using properly the class?

THanks a lot,
Samuele.

bigphil June 26, 2014 05:37

Sure, I can have a look.

Philip

samiam1000 June 26, 2014 08:50

Dear Philip,

if you send me an emai ( samuele.zampini@gmail.com ), I share the source with you.

Nevertheless, I solved this issue using the "sample" tool and it works very well.

Thanks foy helping,
Samuele


All times are GMT -4. The time now is 14:36.