CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (http://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   probe a line or lines as similar by sample (http://www.cfd-online.com/Forums/openfoam-post-processing/111093-probe-line-lines-similar-sample.html)

michael1023 December 27, 2012 03:23

probe a line or lines as similar by sample
 
Hi foamers,

I am wondering is it possible to probe a line (or lines) with setting the start point and end point as similar that in sample.

Any ideas and advice would be highly appreciated!

Zhou Qiang

sunliming January 3, 2013 12:59

Hi,
It's convenient to use #include "fliename":
[probes]
Quote:

probes
{
type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 25;

fields
(
U
UPrime
);
/*
probeLocations
(
( 1 0.15 0.5 )
( 3 0.15 0.5 )
( 1 0.65 0.5 )
( 3 0.65 0.5 )
( 1 0.15 1.5 )
( 3 0.15 1.5 )
( 1 0.65 1.5 )
( 3 0.65 1.5 )
);
*/
probeLocations
(
#include "probeLocations"
);
}
Then in "system" folder, create a new file named probeLocations where you can put your points there, any point within the domain is ok. For efficiency, you can use Excel or ultraEdit to generate your points and paste them into the probeLocations file.

Write in probeLocations like this:

Quote:

(1.7 0.086 1.8)
(1.7 0.090 1.8)
(1.7 0.095 1.8)
(1.7 0.100 1.8)
(1.7 0.105 1.8)
(1.7 0.110 1.8)
(1.7 0.120 1.8)
(1.7 0.140 1.8)
(1.7 0.160 1.8)
(1.7 0.180 1.8)
(1.7 0.200 1.8)
(1.7 0.220 1.8)
(1.7 0.240 1.8)
(1.7 0.260 1.8)
(1.7 0.280 1.8)
(1.7 0.300 1.8)
(1.7 0.320 1.8)
(1.7 0.340 1.8)
(1.7 0.360 1.8)
Good luck!

Nick

michael1023 January 3, 2013 21:29

Hi, Sun.

Thank you for your advice. In fact, I wanna know how we can probe a line as sample a line as shown below.
Quote:

start (0 0 0);
end (0 0 4);
nPoints 100;
But your suggestion is also constructive and convenient.

sunliming January 3, 2013 23:19

Hi, Zhou

As far as I know, there is no such function available. If there is any, please let me know!

I think "probe on a line" is less flexible than providing points directly, since the latter can probe at any place you like, while the former can only get limited locations like 4/100*n as mentioned in your probe line. If I wanna probe more densely near the wall, this would fail me.

So in my opinion, providing probe location is the most versatile and straightforward way!

Best regards!

Nick

musahossein July 31, 2013 11:49

probe a point using sampleDict
 
Dear all:

Is it possible to probe a point to obtain pressure values as postprocessing? I have included the following in my sampleDict to probe the pressure, but when I run sample, I do not get any results.

functions
{
probes1
{

type probes;
functionObjectLibs ("libsampling.so");
region region1;
probeLocations
(
(0 0.5 -0.3)
);

fields (p);

}
}

musahossein August 2, 2013 09:15

probe at a point
 
Apparently there is a dictionary called "probesDict". And the code for that is as follows:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object probesDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// Fields to be probed. runTime modifiable!
// To run this file, type "probeLocations" in the solver directory

fields
(
p
);

// Locations to be probed. runTime modifiable!
probeLocations
(
(0.0 0.45 -0.3)

);

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

This is a variation of the one available at this URL:

https://github.com/OpenFOAM/OpenFOAM...tem/probesDict

The dict file I have included here was modified from the one in the URL above so that I could probe a sloshingtank2d problem. The problem I have is that OpenFOAM cannot find the probe location (0 0.49 -0.3) during the postprocessing. Apparently as I am using moving mesh, the point is not always there. Does anyone know of a work around?

Thanks.


All times are GMT -4. The time now is 03:37.