CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Measurement at an arbitrary point in the domain on the fly (https://www.cfd-online.com/Forums/openfoam-programming-development/125023-measurement-arbitrary-point-domain-fly.html)

HakikiCanakkaleli October 17, 2013 10:15

Measurement at an arbitrary point in the domain on the fly
 
Hi

== 1 ==

Is there any member function of a class that we can extract, say, velocity magnitudes at an arbitrary point in the computational domain?

For example at the coordinate ( 1.52 2.80 3.95 ), the function will interpolate the velocity magnitude from the neighbouring cells, so that we can use this value inside a modified solver on the fly.

== 2 ==

Probes seem do not work for this particular case whilst they extract information from the nearest cell centre.

== 3 ==

This would give a clue http://openfoamwiki.net/index.php/In..._%28by_cell%29; yet, I ponder whether I can use it for this case - and how?

== 4 ==

I have found some other forum pages which consider the similar topic in a slightly different context, e.g. http://www.cfd-online.com/Forums/ope...ocity-fly.html, http://www.cfd-online.com/Forums/ope...ary-point.html , http://www.cfd-online.com/Forums/ope...n-runtime.html. Therefore, I somehow couldn't adapt the given answers to my case.

I appreciate any help.

Many thanks in advance.

HakikiCanakkaleli October 17, 2013 13:06

== 1 ==
The solution seems to be now:

Code:

#include "interpolationCellPoint.H"
//...
const vector arbitrary_point  ( 1.52 2.80 3.95 );
interpolationCellPoint<vector> velocity_at_arbitrary_point(U);
velocity_at_arbitrary_point.interpolate(arbitrary_point, cellI);

== 2 ==
Doxygen states:
Code:

interpolate (const vector &position, const label cellI, const label faceI=-1) const
So, I guess we can store a list of celll; then, no need to scan the domain at each time step.

== 3 ==
More info, and thanks to Bruno, I assume:
http://openfoamwiki.net/index.php/In..._%28by_cell%29


All times are GMT -4. The time now is 07:44.