CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

What is the difference between sampling and using probes ?

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 7 Post By HPE

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 20, 2021, 16:12
Default What is the difference between sampling and using probes ?
  #1
New Member
 
Doğu Can
Join Date: Nov 2020
Posts: 3
Rep Power: 5
dcan is on a distinguished road
Hello,

I am trying to learn the post-processing capabilities of OpenFoam. I have a simple pipe flow case. I want to plot velocity variation across a cross-section. For this purpose, I can use sampling utility or define probes and get the wanted data. But what is the difference between them? Is there any critical consideration I should take into account before going into the solution?

Thanks
dcan is offline   Reply With Quote

Old   February 20, 2021, 16:27
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 12
HPE is on a distinguished road
In OpenFOAM's finite-volume framework, in a given mesh, field information (e.g. U) is stored at the cell centre.

When this information is to be sampled by using "probes", cell(s) encapsulating/containing the "probe" coordinate is found - and "probe" returns the field value of the cell (stored at its centre) no matter where the probe coordinate resides inside the cell or how close/far it is to the cell centre. No effects from neighbouring cells.

When this information is to be sampled by using "sample" utility, the information at the "sample" coordinate is found by interpolation of the field value to the "sample" coordinate from cells surrounding the "sample" coordinate based on the chosen "sample" interpolation scheme.

In summary, "probe" picks the value from the cell in which the "probe" coordinate resides without any interpolation, and "sample" calculates the value from cells around the "sample" coordinate by an interpolation.

"Probe" is expected to be cheaper to compute than "sample" due to the lack of interpolation computations.

Hope this helps.
jherb, esma, alireza94 and 4 others like this.
HPE is offline   Reply With Quote

Old   May 12, 2021, 05:54
Thumbs up Your explanation helped me
  #3
New Member
 
wing
Join Date: Feb 2018
Posts: 3
Rep Power: 8
Steben is on a distinguished road
Quote:
Originally Posted by HPE View Post
In OpenFOAM's finite-volume framework, in a given mesh, field information (e.g. U) is stored at the cell centre.

When this information is to be sampled by using "probes", cell(s) encapsulating/containing the "probe" coordinate is found - and "probe" returns the field value of the cell (stored at its centre) no matter where the probe coordinate resides inside the cell or how close/far it is to the cell centre. No effects from neighbouring cells.

When this information is to be sampled by using "sample" utility, the information at the "sample" coordinate is found by interpolation of the field value to the "sample" coordinate from cells surrounding the "sample" coordinate based on the chosen "sample" interpolation scheme.

In summary, "probe" picks the value from the cell in which the "probe" coordinate resides without any interpolation, and "sample" calculates the value from cells around the "sample" coordinate by an interpolation.

"Probe" is expected to be cheaper to compute than "sample" due to the lack of interpolation computations.

Hope this helps.
thanks,I have encountered this problem before. It is not clear from the source program whether the probes extract grid center or node interpolation result. Thanks again!
Steben is offline   Reply With Quote

Old   February 27, 2024, 17:23
Default
  #4
ARG
New Member
 
Masoud Rvn
Join Date: Sep 2023
Posts: 8
Rep Power: 3
ARG is on a distinguished road
This is from OpenFOAM V11 user guide regarding the probe function differences:

https://doc.cfd.direct/openfoam/user...phs-monitoring

The functions for probing data are boundaryProbes, internalProbes and probes as listed in section 7.3.12. All functions work on the basis that the user provides some point locations and a list of fields, and the function writes out values of the fields are those locations. The differences between the functions are as follows.

probes identifies the nearest cells to the probe locations and writes out the cell values; data is written into a single file in time-value format, suitable for plotting a graph.
boundaryProbes and internalProbes interpolate field data to the probe locations, with the locations being snapped onto boundaries for boundaryProbes; data sets are written to separate files at scheduled write times (like fields). data.

Please note that these functions work with both foamRun and foamPostProcess.
ARG 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



All times are GMT -4. The time now is 15:39.