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

probe a line or lines as similar by sample

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By musahossein

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 27, 2012, 02:23
Default probe a line or lines as similar by sample
  #1
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
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
michael1023 is offline   Reply With Quote

Old   January 3, 2013, 11:59
Default
  #2
Member
 
Nick
Join Date: Nov 2011
Location: Tongji University,Shanghai,China
Posts: 33
Blog Entries: 6
Rep Power: 14
sunliming is on a distinguished road
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
sunliming is offline   Reply With Quote

Old   January 3, 2013, 20:29
Default
  #3
New Member
 
Qiang Zhou
Join Date: May 2010
Location: Eindhoven University of Technology
Posts: 28
Rep Power: 15
michael1023 is on a distinguished road
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.
michael1023 is offline   Reply With Quote

Old   January 3, 2013, 22:19
Default
  #4
Member
 
Nick
Join Date: Nov 2011
Location: Tongji University,Shanghai,China
Posts: 33
Blog Entries: 6
Rep Power: 14
sunliming is on a distinguished road
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
sunliming is offline   Reply With Quote

Old   July 31, 2013, 11:49
Default probe a point using sampleDict
  #5
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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 is offline   Reply With Quote

Old   August 2, 2013, 09:15
Default probe at a point
  #6
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
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.
nainavinod likes this.
musahossein is offline   Reply With Quote

Old   June 13, 2020, 21:12
Default
  #7
Senior Member
 
Arijit Saha
Join Date: Feb 2019
Location: Singapore
Posts: 132
Rep Power: 7
ari003 is on a distinguished road
Quote:
Originally Posted by michael1023 View Post
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.

But your suggestion is also constructive and convenient.
Sir, I m also trying to get a probe value at every time-step of U,p,UPrime2Mean and R field along a line. How can I use these code to get it in openfoam? Anykind of help is really acceptable.
ari003 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Gmsh] discretizer - gmshToFoam Andyjoe OpenFOAM Meshing & Mesh Conversion 13 March 14, 2012 04:35
[Gmsh] Layers in a curved surface Artex85 OpenFOAM Meshing & Mesh Conversion 1 December 18, 2011 08:51
functions on parallel sample along line tonyuprm OpenFOAM 0 May 2, 2011 07:41
errors Fahad Main CFD Forum 0 March 23, 2004 13:20
Problems of Duns Codes! Martin J Main CFD Forum 8 August 14, 2003 23:19


All times are GMT -4. The time now is 00:45.