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

[Other] CFDSupport's port for Windows: gnuplot 'command not found'

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 1 Post By mqsim
  • 2 Post By Paul Fionn
  • 4 Post By VIJAYA KUMAR
  • 1 Post By A_Payne723
  • 1 Post By kamilb
  • 1 Post By daniyalaltaf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2016, 16:53
Default CFDSupport's port for Windows: gnuplot 'command not found'
  #1
New Member
 
Paul Mannion
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Paul Fionn is on a distinguished road
Hi Guys

Apologies in advance if this question stems from my own ignorance. I am using the Windows application of OpenFOAM from CFD support. For several terminal commands (Cygwin) I receive the following 'command not found' if I attempt to implement the following commands:

mpirun
gnuplot
nano

mpiexec works fine however. I thought initially that Cygwin was not able to access gnuplot as it wasn't installed in the Cygwin directory, after reinstalling however, there was no difference. Following the guide at the link to install gnuplot on Cygwin, I found that it wasn't included in the list of install options.
http://www2.warwick.ac.uk/fac/sci/mo.../cygwin/part5/

After searching for hours online and trying various things myself I've hit a wall, has anybody else encountered a similar problem? My gut feeling tells me that its Windows related possibly.
Paul Fionn is offline   Reply With Quote

Old   March 15, 2016, 08:01
Default
  #2
New Member
 
Paul Mannion
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Paul Fionn is on a distinguished road
If anybody else has encountered similar problems with gnuplot, I get around by using the windows install of gnuplot, changing the directory to where OpenFOAM leaves its outputs, and plotting directly from there from within gnuplot, not the cygwin terminal.

I haven't managed to get nano to work, however it's not something essential as you can view/edit files using notepad++ or sublime text
Paul Fionn is offline   Reply With Quote

Old   March 21, 2016, 07:43
Default
  #3
New Member
 
Join Date: Feb 2016
Posts: 28
Rep Power: 10
mqsim is on a distinguished road
Hi Paul,

I have the same problem and so I use the gnuplot application. Have you tried to plot residuals? I can't plot residuals, it seems that some gnuplot commands are not known... I can plot Cd and Cl but not my residuals.

For mpirun you can check one allrun file from the tutorials (like the motorbike).
mqsim is offline   Reply With Quote

Old   March 21, 2016, 12:09
Default
  #4
New Member
 
Paul Mannion
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Paul Fionn is on a distinguished road
Hi mqsim

Yep residuals plot fine for me, could you post your error and method for plotting?

Regards
Paul
Paul Fionn is offline   Reply With Quote

Old   March 22, 2016, 05:17
Default
  #5
New Member
 
Join Date: Feb 2016
Posts: 28
Rep Power: 10
mqsim is on a distinguished road
Hi,

I am trying to use a script given in a topic to plot residuals. The script is the following:

set title "Convergence process"
set xlabel "Iterations"
set ylabel "Residuals"
set logscale y;
plot "< cat log.all | grep 'Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' w lines,\
"< cat log.all | grep Uy | cut -d' ' -f9 | tr -d ','" title 'Uy' w lines,\
"< cat log.all | grep Uz | cut -d' ' -f9 | tr -d ','" title 'Uz' w lines,\
"< cat log.all | grep ' p,' | cut -d' ' -f9 | tr -d ','" title 'p' w lines,\
"< cat log.all | grep ' k,' | cut -d' ' -f9 | tr -d ','" title 'k' w lines,\
"< cat log.all | grep ' omega,' | cut -d' ' -f9 | tr -d ','" title 'omega' w lines
pause mouse
reread

The error message I have is:
Skipping data file with no valid points
x range is invalid

I have tried to use foamLog too but without any success which is weird because it is similar to Cd and Cl plots.
mqsim is offline   Reply With Quote

Old   March 22, 2016, 08:46
Default
  #6
New Member
 
Join Date: Feb 2016
Posts: 28
Rep Power: 10
mqsim is on a distinguished road
I've found how to plot residuals. It was a problem with gnuplot installation. If someone is interested in the solution I can make a post to explain how to fix this issue.

Last edited by mqsim; March 22, 2016 at 10:40.
mqsim is offline   Reply With Quote

Old   March 22, 2016, 10:10
Default
  #7
New Member
 
Paul Mannion
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Paul Fionn is on a distinguished road
Hi mqsim

The above method which you tried does not work for me either due to the gnuplot problem.
My workaround is to manually open gnuplot, run <foamLog log> and simply plot the resulting residuals from the gnuplot terminal.
<set logscale y>
<plot './p_0' with lines> ..etc
after every 40 iterations or so, I run <foamLog log> again and update the graph to check its progress

If you could post your solution to the gnuplot installation it would be greatly appreciated by myself and many others

Cheers
Paul
Paul Fionn is offline   Reply With Quote

Old   March 22, 2016, 10:50
Default
  #8
New Member
 
Join Date: Feb 2016
Posts: 28
Rep Power: 10
mqsim is on a distinguished road
No worries, hopefully it would be useful for lots of users.

Step 1: Uninstall gnuplot
Step 2: Download gnuplot from this link https://sourceforge.net/projects/gnu...e=typ_redirect
Step 3: Install gnuplot ticking the box 'Add application directory to your PATH environment variable'

After you have done that, run OpenFoam case as usual and open a new OpenFoam terminal. Go to your case directory and run the following command if your file script is called Residuals: gnuplot Residuals -

Let me know if you have successfully plotted your residuals.

mqsim
Carno likes this.
mqsim is offline   Reply With Quote

Old   September 16, 2016, 02:16
Default
  #9
Member
 
carno
Join Date: Mar 2009
Posts: 70
Rep Power: 17
Carno is on a distinguished road
Quote:
Originally Posted by Paul Fionn View Post
Hi Guys

Apologies in advance if this question stems from my own ignorance. I am using the Windows application of OpenFOAM from CFD support. For several terminal commands (Cygwin) I receive the following 'command not found' if I attempt to implement the following commands:

mpirun
gnuplot
nano

mpiexec works fine however. I thought initially that Cygwin was not able to access gnuplot as it wasn't installed in the Cygwin directory, after reinstalling however, there was no difference. Following the guide at the link to install gnuplot on Cygwin, I found that it wasn't included in the list of install options.
http://www2.warwick.ac.uk/fac/sci/mo.../cygwin/part5/

After searching for hours online and trying various things myself I've hit a wall, has anybody else encountered a similar problem? My gut feeling tells me that its Windows related possibly.
Did you get the 'mpirun' command running? I am also riding the same boat.
Carno is offline   Reply With Quote

Old   September 16, 2016, 04:23
Default
  #10
New Member
 
Paul Mannion
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Paul Fionn is on a distinguished road
Hi Carno,
It was explained to be a few months ago as to why mpirun does not operate on a windows build but I can't remember the exact details. Essentially, mpiexec works for this windows build and mpirun works with any version of OpenFOAM compiled on linux.
All the best
Paul
Paul Fionn is offline   Reply With Quote

Old   September 30, 2016, 06:04
Default
  #11
New Member
 
Vijaya Kumar. G
Join Date: Jun 2016
Location: Chennai, India & Aachen, Germany
Posts: 20
Rep Power: 10
VIJAYA KUMAR is on a distinguished road
Quote:
Originally Posted by mqsim View Post
I've found how to plot residuals. It was a problem with gnuplot installation. If someone is interested in the solution I can make a post to explain how to fix this issue.
Hi can u give a step by step procedure
I am stuck
VIJAYA KUMAR is offline   Reply With Quote

Old   September 30, 2016, 06:44
Default
  #12
New Member
 
Paul Mannion
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Paul Fionn is on a distinguished road
Quote:
Originally Posted by mqsim View Post
No worries, hopefully it would be useful for lots of users.

Step 1: Uninstall gnuplot
Step 2: Download gnuplot from this link https://sourceforge.net/projects/gnu...e=typ_redirect
Step 3: Install gnuplot ticking the box 'Add application directory to your PATH environment variable'

After you have done that, run OpenFoam case as usual and open a new OpenFoam terminal. Go to your case directory and run the following command if your file script is called Residuals: gnuplot Residuals -

Let me know if you have successfully plotted your residuals.

mqsim
You will find that mqsim has already kindly provided a step by step solution to this problem
VIJAYA KUMAR and ArdorJaador like this.
Paul Fionn is offline   Reply With Quote

Old   September 30, 2016, 06:49
Default
  #13
New Member
 
Vijaya Kumar. G
Join Date: Jun 2016
Location: Chennai, India & Aachen, Germany
Posts: 20
Rep Power: 10
VIJAYA KUMAR is on a distinguished road
Quote:
Originally Posted by Paul Fionn View Post
You will find that mqsim has already kindly provided a step by step solution to this problem
I am not getting step 3
I am not from Computer Science background. Please help
VIJAYA KUMAR is offline   Reply With Quote

Old   September 30, 2016, 06:58
Default
  #14
New Member
 
Paul Mannion
Join Date: Nov 2014
Posts: 11
Rep Power: 12
Paul Fionn is on a distinguished road
Hi Vijaya,

This step is not as complicated as it might first appear. As you install gnuplot, various installation windows will pop up as per the norm of any software installation on windows. You select the install parameters that you want, some softwares let you customise the install procedures more than others. For most however, you simply click 'Next' and 'Finish' untill the software installs. If you read each popup window carefully before clicking next, you will find a check box for'Add application directory to your Path environment variable'. You simply tick this box and continue with the installation.

I hope this solves your problem
All the best
Paul
Paul Fionn is offline   Reply With Quote

Old   September 30, 2016, 07:15
Default Running gnuplot in cygwin for Openfoam for Windows
  #15
New Member
 
Vijaya Kumar. G
Join Date: Jun 2016
Location: Chennai, India & Aachen, Germany
Posts: 20
Rep Power: 10
VIJAYA KUMAR is on a distinguished road
Quote:
Originally Posted by Paul Fionn View Post
Hi Vijaya,

This step is not as complicated as it might first appear. As you install gnuplot, various installation windows will pop up as per the norm of any software installation on windows. You select the install parameters that you want, some softwares let you customise the install procedures more than others. For most however, you simply click 'Next' and 'Finish' untill the software installs. If you read each popup window carefully before clicking next, you will find a check box for'Add application directory to your Path environment variable'. You simply tick this box and continue with the installation.

I hope this solves your problem
All the best
Paul


Thanks a lot. Life saviour...
I found that option after scrolling down.

For future users.
Running gnuplot in cygwin for Openfoam for Windows

Steps
1) Uninstall gnuplot.
2) Install from https://sourceforge.net/projects/gnu...e=typ_redirect
3) Click Next Next until you appear at few check boxes, you will find 'Add application directory to your Path environment variable' after scrolling little down.
4) Complete your installation.

To use gnuplot
Step1: Create a script file called 'Residuals' (i'll attach it here).

Step2: Commands:
buoyantBossinesqSimpleFoam > log &
gnuplot Residuals -


Commands Explanation:
Running my simulation and appending it to a log file and then plotting residuals
Attached Files
File Type: txt Residuals.txt (505 Bytes, 139 views)
VIJAYA KUMAR is offline   Reply With Quote

Old   January 15, 2017, 23:20
Default
  #16
New Member
 
lynn Cheng
Join Date: Jan 2017
Posts: 3
Rep Power: 9
lynncheng is on a distinguished road
Hi Vijaya, I am just a new Openfoamer. I followed your instructions on plotting the residuals. However, I met an error saying
$ gnuplot Residuals -
"Residuals", line 0: Cannot open script file 'Residuals'
what is the possible problem for this?

Hope anybody could give me some suggestion.
thanks

lynncheng is offline   Reply With Quote

Old   September 10, 2017, 23:34
Default
  #17
New Member
 
Andrew Payne
Join Date: Apr 2014
Posts: 4
Rep Power: 12
A_Payne723 is on a distinguished road
Has anyone figured out lynncheng's most recent question? I am having the same issue after following the instructions above as well. Was just trying to get residuals on an airfoil, but also tried and failed with plotting for the motorBike tutorial as well.
zyzycomcn likes this.
A_Payne723 is offline   Reply With Quote

Old   December 13, 2017, 11:26
Default
  #18
New Member
 
Kamil Banaś
Join Date: Oct 2011
Posts: 1
Rep Power: 0
kamilb is on a distinguished road
I had similar problem.

In my case other format of text file resolved the problem.
Attached Files
File Type: zip Residuals.zip (341 Bytes, 59 views)
zyzycomcn likes this.
kamilb is offline   Reply With Quote

Old   May 15, 2021, 09:11
Default
  #19
New Member
 
Daniyal Altaf Baloch
Join Date: May 2021
Location: Milan
Posts: 2
Rep Power: 0
daniyalaltaf is on a distinguished road
Quote:
Originally Posted by lynncheng View Post
Hi Vijaya, I am just a new Openfoamer. I followed your instructions on plotting the residuals. However, I met an error saying
$ gnuplot Residuals -
"Residuals", line 0: Cannot open script file 'Residuals'
what is the possible problem for this?

Hope anybody could give me some suggestion.
thanks

Just rename the "Residual.txt" file to "Residuals" only i.e. without any extension. In case you want to edit the file later, simply use Notepad++.
zyzycomcn likes this.
daniyalaltaf is offline   Reply With Quote

Reply

Tags
gnuplot, mpirun, nano


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
[PyFoam] PyFoam 0.6.9 wrong path to gnuplot klausb OpenFOAM Community Contributions 5 March 15, 2018 15:28
Problem of compilation OF 14Allwmake command not found erik_d OpenFOAM Bugs 13 September 13, 2008 22:45
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15


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