|
[Sponsors] |
July 25, 2012, 13:03 |
how to make a graph using sampleDict
|
#1 |
Senior Member
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 14 |
I am new to openfoam and I am trying to use sample utility. I have run the sampleDict. But now I do not know how to make a graph base on the sets files generated.
|
|
July 25, 2012, 19:36 |
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Depends on the format you specified to write them out. But I guess the fastest choice (once you get to know it) is gnuplot. Otherwise a lot of programs (especially those specialized in plotting) can read data from files where the numbers are separated by spaces (excel, OpenOffice, ...)
|
|
July 26, 2012, 09:00 |
|
#3 | |
Senior Member
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 14 |
Quote:
|
||
July 26, 2012, 09:40 |
|
#4 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
Code:
gnuplot -persist <<< "plot 'filename.raw'" This is something you should fit to your needs with a software of choice. It is a matter of taste and experience. Some people prefer gnuplot, some prefer grace, some prefer Excel, some prefer matlab to make graphs. I would advise gnuplot however. Start with a tutorial, and then google for the things when you need them. This most often works. |
|
July 26, 2012, 09:48 |
|
#5 | |
Senior Member
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 14 |
Quote:
|
||
July 26, 2012, 10:31 |
suface
|
#6 |
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 14 |
Hi,
would you also recommend gnuplot to visualise planes out of raw or vtk formats. To make the files I used sampleDict - surfaces. Kind regards |
|
July 26, 2012, 11:36 |
|
#7 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
For vtk-surface I would use Paraview to visualize. Alternatively you can use a tool as Tecplot, but that one is not freely available.
|
|
July 26, 2012, 13:07 |
|
#8 |
Senior Member
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 14 |
I want to sample data from a surface and then average those with the same y position. Later I want to plot a line with those averaged values. Is it possible to do that?
|
|
July 30, 2012, 11:35 |
|
#9 | |
Member
Join Date: May 2010
Posts: 74
Rep Power: 16 |
hello Berhard,
I used sampledict to get the data at one point, then in the directory of "sets",there are thousands folders in sets.and the data format is gnuplot. I use the command gnuplot -persist <<< "plot 'somePoints_U.gplt'" in the case home directory, but the result is gnuplot -persist <<< "plot 'somePoints_U.gplt'" line 0: warning: Skipping unreadable file "somePoints_U.gplt" line 0: No data in plot but after I delete the head words in the .gplt file,it can be plot in the subdirectory of folder,gnuplot works,but this is not effective. What's my problem? Thank you~ Quote:
Last edited by hewei; July 30, 2012 at 13:33. |
||
July 30, 2012, 11:40 |
|
#10 |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22 |
Well, my example was for a datafile with two column from a probe point or something similar. You mayt want to show the function object or sampling you are actually using, as well as the head of the outputfile.
|
|
July 30, 2012, 16:52 |
|
#11 |
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 14 |
Hi hewei,
I don't know what you need to "sample" data at one point for. Maybe you can also use the probeUtility to do this job (if it's data at one point over the time) and visualise the data with python - maybe there exists already a short script for python to do this. |
|
August 1, 2012, 06:04 |
|
#12 | |
Member
Join Date: May 2010
Posts: 74
Rep Power: 16 |
I wanna calculate the frequency of vibration. and I compared the results between ProbeLocation and sample, they are not the same! My friend told me that probeUtility is sensitive on the grid knot location.
Quote:
|
||
August 3, 2012, 05:47 |
|
#13 |
Senior Member
Sören
Join Date: Mar 2012
Posts: 102
Rep Power: 14 |
I don't know in whch way the probe-utility is sensitive on the grid... I hear this the first time but I'm new to OpenFoam so that doesn't mean a thing...
Maybe a more experienced user could comment this... |
|
August 3, 2012, 07:47 |
|
#14 |
Member
Join Date: May 2010
Posts: 74
Rep Power: 16 |
I just made this decision after comparing the results gotten by sampledic and probelocation. But I really know what's the reason why. as you said, waiting for experienced users.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
graph transient post data at sensor point | Micha | Siemens | 6 | March 20, 2013 05:17 |
use of Gturbo to make turbine blade | usman | FLUENT | 0 | December 31, 2007 06:47 |
How to plot different model's graph on a graph? | echo | Siemens | 1 | April 28, 2006 04:54 |
Mass flow rate graph | Lior | FLUENT | 0 | March 7, 2004 11:02 |
[Q]How to make MPEGs with CFD datas??? | Bum-Seok Hyun | Main CFD Forum | 4 | February 16, 2000 19:59 |