|
[Sponsors] |
How to plot the sampled line over time under sets/ |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 6, 2013, 05:20 |
How to plot the sampled line over time under sets/
|
#1 |
Member
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 16 |
Hi OFers,
The pressure over a line has been sampled in the sets directory distributed in many time directories. I would like to plot the changes of the pressure over time on the fixed line. Is there any tool to do this? Thanks a lot.
__________________
Kind regards, Albert |
|
February 6, 2013, 19:49 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Actually. It doesn't plot. It only generates the commands for gnuplot. But that is not a problem as you've only got to pipe the output into gnuplot ("pyFoamSamplePlot.py .... | gnuplot") to get a bunch of pictures. These you can animate with "animate" or encode them into a video
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
February 6, 2013, 21:46 |
|
#3 |
Member
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 16 |
Thanks Bernhard, for your quick reply and tips on how to use gnuplot. As I want to plot a 2D picture with x being time, y being the line and pressure in the 2D area, so I am trying to combine all the files in sets/ together.
__________________
Kind regards, Albert |
|
February 7, 2013, 05:51 |
|
#4 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Ah. I thought you were going for an animation of the line. So you want a surface plot with the pressure going in z-direction, right? That is something the utility can't do yet
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
February 7, 2013, 06:33 |
|
#5 | |
Member
Albert Tong
Join Date: Dec 2010
Location: Perth, WA, Australia
Posts: 76
Blog Entries: 1
Rep Power: 16 |
Quote:
Yes, Bernhard, I want to plot the temporal evolution of the pressure over a line. I have just solved the problem by combining all the files together, then use tecplot. Thanks for your attention.
__________________
Kind regards, Albert |
||
February 27, 2013, 10:15 |
pyFoamSamplePlot.py
|
#6 | |
Member
Jamal
Join Date: May 2012
Location: Freiburg
Posts: 54
Rep Power: 13 |
Dear
The temperatur over a line has been sampled in the sets directory distributed in many time directories. I would like to plot the changes of the temperature over time on the fixed line. Quote:
I am using this command pyFoamSamplePlot.py sets/timeDirectory/lineX1_.gplt and in result it gives following lines Traceback (most recent call last): File "/opt/OpenFOAM/adin-2.1.0/lib/PyFoam-0.5.7/bin/pyFoamSamplePlot.py", line 5, in <module> SamplePlot() File "/opt/OpenFOAM/adin-2.1.0/lib/PyFoam-0.5.7/lib/python2.6/site-packages/PyFoam/Applications/SamplePlot.py", line 31, in __init__ interspersed=True) File "/opt/OpenFOAM/adin-2.1.0/lib/PyFoam-0.5.7/lib/python2.6/site-packages/PyFoam/Applications/PyFoamApplication.py", line 213, in __init__ result=self.run() File "/opt/OpenFOAM/adin-2.1.0/lib/PyFoam-0.5.7/lib/python2.6/site-packages/PyFoam/Applications/SamplePlot.py", line 288, in run prefixes=self.opts.fieldPrefix) File "/opt/OpenFOAM/adin-2.1.0/lib/PyFoam-0.5.7/lib/python2.6/site-packages/PyFoam/RunDictionary/SampleDirectory.py", line 32, in __init__ for d in listdir(self.dir): OSError: [Errno 20] Not a directory: 'sets/4320/lineX1_T.gplt/samples' Thanks |
||
February 27, 2013, 10:51 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Anyway. Like all other pyFoam-utilities the option --help gives you the basic usage and the options. In your case something like pyFoamSamplePlot.py . --dir=sets --field=T should work
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 03:09 |
[Gmsh] boundaries with gmshToFoam | ouafa | OpenFOAM Meshing & Mesh Conversion | 7 | May 21, 2010 13:43 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |