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

plot probe data

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By ehsanshams
  • 1 Post By fs82
  • 2 Post By fs82
  • 1 Post By fs82
  • 1 Post By fs82

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2011, 15:15
Default plot probe data
  #1
New Member
 
Ehsan
Join Date: Jan 2010
Posts: 7
Rep Power: 16
ehsanshams is on a distinguished road
hi,

I have probe data from my simulation. Does anyone know what application opens the vector data (U)? or any application that can convert it to tecplot format?
here is the format of the data:

# x -3.5 -2 -1
# y 0.0333 0.0333 0.0333
# z 0 0 0
# Time
1000.1 (0.0346853 0.00264113 -0.00438583) (0.045667 -0.0254756 -0.00883625) (0.0479257 -0.00194718 -0.00995854)
1000.2 (0.0346853 0.002646 -0.00437969) (0.0461788 -0.0248685 -0.00900286) (0.0482703 -0.00188878 -0.0105974)
...


Thank you
Luttappy likes this.
ehsanshams is offline   Reply With Quote

Old   November 25, 2011, 08:33
Default
  #2
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
You found a solution for your problem? If not I wrote a pyhton script which reformats the probes of openfoam and write a tecplot file. It is not very handy and fast, because it was my first experience with pyhton but it works. So if you need it, I could provide it to you.

kind regards,
Fabian
owayz likes this.
fs82 is offline   Reply With Quote

Old   January 9, 2012, 20:37
Default
  #3
Senior Member
 
Awais Ali
Join Date: Feb 2010
Location: Germany
Posts: 128
Rep Power: 17
owayz is on a distinguished road
Send a message via MSN to owayz
Hi Fabian,
Can you send me that code.
Would I be able to extract the data over time for specified point from the techplot file? (I have no previous experince with techplot file thats why I ask it)

Regards,
Awais
owayz is offline   Reply With Quote

Old   January 10, 2012, 02:57
Default
  #4
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Hi Awais,

no problem, here it is
Attached Files
File Type: zip foamProbeToTecplot.zip (3.1 KB, 243 views)
fs82 is offline   Reply With Quote

Old   April 5, 2012, 07:38
Default
  #5
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
I found a big bug in my python script. I don't no if you experience it but if you have time values twice in your probe data the script fails. I tried to fix the bug, but the source code of the script was to creepy. I decided to wrote it completely new.

kind regards,
Fabian
Attached Files
File Type: gz newFoamProbeToTecplot.gz (1.9 KB, 255 views)
waynezoon and Luttappy like this.
fs82 is offline   Reply With Quote

Old   April 5, 2012, 14:12
Default
  #6
New Member
 
Ehsan
Join Date: Jan 2010
Posts: 7
Rep Power: 16
ehsanshams is on a distinguished road
hey Fabian
thanks for updating the file, I'll check it out
ehsanshams is offline   Reply With Quote

Old   February 17, 2014, 21:33
Default
  #7
Member
 
Peter
Join Date: Nov 2011
Posts: 46
Rep Power: 14
palmerlee is on a distinguished road
Hi, Fabian!

Could you please give more details about how to use this script? That'll be very helpful for learners like me.

Quote:
hpc@node12:~/OpenFOAM/lyp/rD5Re4400_7h$ python newFoamProbeToTecplot
Traceback (most recent call last):
File "newFoamProbeToTecplot", line 7, in <module>
import numpy
ImportError: No module named numpy
kind regards,
Peter
palmerlee is offline   Reply With Quote

Old   July 18, 2017, 21:56
Default
  #8
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Quote:
Originally Posted by palmerlee View Post
Hi, Fabian!

Could you please give more details about how to use this script? That'll be very helpful for learners like me.



kind regards,
Peter
Hi Peter,

I wonder have you figured this code out, I'm also curious about the utilization of this code but find hard time understand this.

Best,
Linyan
linyanx is offline   Reply With Quote

Old   July 20, 2017, 06:21
Default
  #9
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
To be honest I do not use this script anymore, since I discovered, that it is possible to use gnuplot to plot the probes
Code:
plot <file> u 1:2 " %lf (%*lf %*lf %*lf)" w l title 'your title'
Nevertheless, a word on this question
Quote:
hpc@node12:~/OpenFOAM/lyp/rD5Re4400_7h$ python newFoamProbeToTecplot
Traceback (most recent call last):
File "newFoamProbeToTecplot", line 7, in <module>
import numpy
ImportError: No module named numpy
This is very simple. You have to install a add-on for python called numpy http://www.numpy.org which includes various functionality for scientific usage. If you are using ubuntu it is just "apt-get install python-numpy" and your done.

Best regards
Fabian
Luttappy likes this.
fs82 is offline   Reply With Quote

Old   July 20, 2017, 09:28
Smile postProcess -func probes problem
  #10
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Quote:
Originally Posted by fs82 View Post
To be honest I do not use this script anymore, since I discovered, that it is possible to use gnuplot to plot the probes
Code:
plot <file> u 1:2 " %lf (%*lf %*lf %*lf)" w l title 'your title'
Nevertheless, a word on this question

This is very simple. You have to install a add-on for python called numpy http://www.numpy.org which includes various functionality for scientific usage. If you are using ubuntu it is just "apt-get install python-numpy" and your done.

Best regards
Fabian
Hi Fabian,

Thanks for your information, it works!

However, I have a confusing question about the function of the probe in the postProcess package. How to specify the probeLocations while using 'postProcess -func probes' command?

I want to probe a specific point after simulation. The problem is the system/probesDict which contains specified location and fields information cannot be recognized by the system while I command 'postProcess -func probes'. Instead, it just probes out the point (0,0,0) and field p and U which is by default. I know it must be some tiny points that I've ignored. I haven't either found by google or by the forum post about the specific procedures regarding using the 'postProcess -func probes'.

Could you see what's wrong with the way I did with the probe function?

Best,
Linyan
linyanx is offline   Reply With Quote

Old   July 20, 2017, 09:44
Default
  #11
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
I tried it and it worked well. Just add a probe to your controlDict
Code:
functions
{
    probes
    {
        type            probes;
        libs ("libsampling.so");
        writeControl    timeStep;
        probeLocations
        (
            (x y z)
        );
        fields
        (
            U
        );
    }
}
and execute
Code:
postProcess -func probes
.
Works perfectly and gives you the result in postProcessing/probes/<time>.
Luttappy likes this.
fs82 is offline   Reply With Quote

Old   July 20, 2017, 09:50
Default
  #12
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
Ok sorry it is not working. I was too fast. However, check the information on the CFDDirect Homepage https://cfd.direct/openfoam/user-gui...hs-monitoring/ this works fine.
fs82 is offline   Reply With Quote

Old   July 20, 2017, 10:05
Default
  #13
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Quote:
Originally Posted by fs82 View Post
Ok sorry it is not working. I was too fast. However, check the information on the CFDDirect Homepage https://cfd.direct/openfoam/user-gui...hs-monitoring/ this works fine.
Fabian,

You made my day! It works. This link illustrates the exact way to probe at the specific location.

Thanks,
Linyan
linyanx is offline   Reply With Quote

Old   August 9, 2017, 07:00
Default
  #14
Member
 
Join Date: Sep 2016
Posts: 63
Rep Power: 9
sitajeje is on a distinguished road
Hi Fabian,

Perhaps I made some basic mistakes. I followed the link you posted by copying the "probes" file into "system" folder, and add functions {#includeFunc probes} into "controlDict". After I ran the postProcess -func probes, one "postProcessing/probes" folder was created. However the data was not saved in one single file, but different time folders were created, where the "U" file with one single data for the corresponding time was saved. I ran also pimpleDyMFoam -postProcess, but nothing happened, the #includeFunc seemed to be absent.

I would appreciate if you could give me some suggestions, thank you very much in advance!

Best regards,

sitajeje
sitajeje is offline   Reply With Quote

Old   August 10, 2017, 03:01
Default
  #15
Senior Member
 
Dr. Fabian Schlegel
Join Date: Apr 2009
Location: Dresden, Germany
Posts: 222
Rep Power: 18
fs82 is on a distinguished road
The instruction at this page https://cfd.direct/openfoam/user-gui...hs-monitoring/ are really good and work perfectly, as long as you are using the Foundation Release (no + and no extend) greater than 4.0.

Best regards
Fabian
fs82 is offline   Reply With Quote

Old   August 10, 2017, 06:00
Default
  #16
Member
 
Join Date: Sep 2016
Posts: 63
Rep Power: 9
sitajeje is on a distinguished road
Dear Fabian,

I tried with tutorial cases, and found that the "probes" works as the user guide describes for "cavity" and "pitzDaily". For "mixerVesselAMI2D" it functioned as in my case. This problem might be related to the *DyM* solver.

sitajeje
sitajeje 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
How to plot the data made by java? jelon STAR-CCM+ 2 April 11, 2010 06:00
How to save 2-D data in contour plot mssound FLUENT 0 February 15, 2010 14:01
[OpenFOAM] How to create an contour plot for arbitrary plane with interpolated data navaladi ParaView 0 June 4, 2008 07:57
xy data from graph plot to excel Radhika Siemens 5 February 23, 2007 07:23
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27


All times are GMT -4. The time now is 09:50.