CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   OpenFOAM refuses to start (http://www.cfd-online.com/Forums/openfoam-installation/119725-openfoam-refuses-start.html)

kotimari June 24, 2013 00:14

OpenFOAM refuses to start
 
Hi,

A couple of days ago, I installed OpenFOAM by following the instructions given here. I didn't have any issues in getting started. However, when I try it today, I have the following issues:

1.
Code:

mkdir -p $FOAM_RUN
throws up the error
Code:

mkdir: missing operand
2. icoFoam -help, blockmesh, icoFoam, and paraFoam commands throw up the error
Code:

command not found
.

The last line in .bashrc file is (as suggested in the aforementioned link):
Code:

source $HOME/.bashrc
Also, I am quite sure that I have taken into account the case sensitiveness of the commands.

I appreciate any help in getting me started with OF.


Thanks in advance!

Madhukar

startingWithCFD June 24, 2013 02:53

Quote:

The last line in .bashrc file is (as suggested in the aforementioned link):
source $HOME/.bashrc
In the link you provided, the last line of .bashrc is different (check "User configuration", step 2). In your version, .bashrc is sourcing itself.

billie June 24, 2013 02:58

Quote:

Originally Posted by kotimari (Post 435507)
The last line in .bashrc file is (as suggested in the aforementioned link):
Code:

source $HOME/.bashrc
Also, I am quite sure that I have taken into account the case sensitiveness of the commands.

If you take a closer look into the document you mentioned you will find that the last line should be:

Code:

source /opt/openfoam220/etc/bashrc

kotimari June 24, 2013 05:36

I like to run icoFoam in the same terminal window. So I followed the instructions in Note 2 (in the same link).
However, I tried your path too, but in vain.

startingWithCFD June 24, 2013 05:48

It is a bit confusing at first, you are right.

The following line
Quote:

source /opt/openfoam220/etc/bashrc
should be written inside the file ~/.bashrc, NOT written in the terminal!

The following line
Quote:

source $HOME/.bashrc
allows you to reload the .bashrc file. You do NOT need to do this!

All you need to do is to write the first command in the file and to restart your terminal session. Just forget about the second command!

billie June 24, 2013 05:53

Quote:

Originally Posted by kotimari (Post 435565)
I like to run icoFoam in the same terminal window. So I followed the instructions in Note 2 (in the same link).
However, I tried your path too, but in vain.

There is a misunderstanding on your side.

Add:
Code:

source /opt/openfoam220/etc/bashrc
to your users .bashrc which is normally located in your home directory thus the $HOME prefix.
$HOME/.bashrc translates to /home/<yourusernamehere>/.bashrc

then if you want to execute icoFoam in the same terminal window execute:
Code:

source $HOME/.bashrc
You can as well open a new terminal and the environment for openfoam is sourced by your .bashrc and you can execute icoFoam without sourcing it, as this is the point of putting it in your .bashrc.

If you are new to Linux it is probably a good idea to acquire some basic Linux knowledge first.

kotimari June 25, 2013 07:08

Thanks for the replies. I get your point. Will try your suggestions once I get access to my laptop during this weekend.

I am not new to Linux per se, but editing bashrc file is a new thing indeed!

Madhukar


All times are GMT -4. The time now is 21:42.