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

Gnuplot from sampledict output

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2013, 04:46
Default Gnuplot from sampledict output
  #1
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 12
Sujatha is on a distinguished road
Hi all,
I am trying to get plot of pressure along a line from sampledict output directly in gnuplot. But when I type the "sample" keyword after running the problem, I get a set folder in the postprocessing folder. These contains files with ".gplt" extension. I tried to call these to the gnuplot using "plot" command in the terminal as per usersguide, I got a message saying the file cannot be read and no graph is created.
I have seen similar issues in other threads but no answers that helps me.

Any hint will be a privilege and is greatly appreciated.

Thanks in advance.
regards,
Sujatha
Sujatha is offline   Reply With Quote

Old   November 9, 2013, 03:43
Default
  #2
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi Sujatha,

You can use the files directly as input for gnuplot:
Code:
$ gnuplot the_file_name.gplt
which will directly create an image file

Cheers,

L
Lieven is offline   Reply With Quote

Old   November 9, 2013, 23:43
Default
  #3
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 12
Sujatha is on a distinguished road
Thank You sir, Lieven for your kind response.

I tried the command and I am getting the message as
gnuplot the_run/pressgnu2/sampobs/postProcessing/sets/0.1_lineX1_p.gplt
Cannot open load file 'the_run/pressgnu2/sampobs/postProcessin/sets/0.1_lineX1_p.gplt'
line 0: util.c: No such file or directory

I have tried the command for different cases and couldn't get the plot.
I will be grateful if you could suggest me some possible solution.

Thanks again.
Regards
Sujatha
Sujatha is offline   Reply With Quote

Old   November 10, 2013, 17:23
Default
  #4
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Are you sure you entered the fileName correctly? Cause in your error message you say "postProcessin" instead of "postProcessing"

Cheers,

L
Lieven is offline   Reply With Quote

Old   November 11, 2013, 10:01
Default
  #5
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 12
Sujatha is on a distinguished road
Thank You Sir, Lieven,for the response. It's 'postProcessing', I have left the 'g' while I was copy -pasting it.
I have tried for more than one simulation, but couldn't get the plot. Will that be any other sort of error? While entering the file name i guess we need to write the entire path , excuse me if I am wrong.

Thanks again.
Regards,
Sujatha
Sujatha is offline   Reply With Quote

Old   November 11, 2013, 10:10
Default
  #6
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi Sujatha,

What does
Code:
cd the_run/pressgnu2/sampobs/postProcessing/sets/
gnuplot 01_lineX1_p.gplt
give you? Do you get the same error? Which version of gnuplot are you using (gnuplot -h)

Cheers,

L
Lieven is offline   Reply With Quote

Old   November 11, 2013, 13:19
Default
  #7
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 12
Sujatha is on a distinguished road
Sir,Lieven,
I'm grateful for your kind response.
Now I get an error message as "the_run undefined" and when I removed it from the code I got the error message as "invalid command".

I'm using Gnuplot 4.4, I could plot functions, etc using this, except for plotting with a data file directly obtained from sampleDict.

Thanking You,
Regards
Sujatha
Sujatha is offline   Reply With Quote

Old   November 11, 2013, 14:48
Default
  #8
Senior Member
 
Lieven
Join Date: Dec 2011
Location: Leuven, Belgium
Posts: 299
Rep Power: 22
Lieven will become famous soon enough
Hi Sujatha,

Let me rephrase it to English instead of bash-coding: you should navigate in a terminal to the folder where the 01_...gplt-file is stored. Once in that folder you should open the gplt file with gnuplot.

The 'the_run/...' is simply the path that I copied from your previous post. It's impossible for me to verify if this really is the correct path. But it's probably not since it returns an error.


Cheers,

L
Lieven is offline   Reply With Quote

Old   November 11, 2013, 23:33
Default
  #9
New Member
 
Join Date: Jul 2013
Posts: 27
Rep Power: 12
Sujatha is on a distinguished road
Sir, Lieven, Thanks a million. I tried with the path name and then called the file with the command gnuplot as: run/pressgnu2/sampobs/postProcessing/sets/0.1$ gnuplot lineX1_p.gplt .
I got the graph. Thanks again sir.

Regards,
Sujatha
Sujatha 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
[swak4Foam] outputTime in Swak function immortality OpenFOAM Community Contributions 20 October 6, 2022 12:08
writing execFlowFunctionObjects immortality OpenFOAM Post-Processing 30 September 15, 2013 06:16
sampleDict output needs to be fixed! musahossein OpenFOAM Post-Processing 17 September 13, 2013 21:51
RNG diverged during the analysis the flow over a multi element airfoil, why? s.m OpenFOAM Running, Solving & CFD 0 August 5, 2013 08:39
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34


All times are GMT -4. The time now is 11:27.