CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   [OpenFOAM.org] blockMesh 'command not found' on Ubuntu 16.04 (https://www.cfd-online.com/Forums/openfoam-installation/174210-blockmesh-command-not-found-ubuntu-16-04-a.html)

fredb July 7, 2016 07:39

blockMesh 'command not found' on Ubuntu 16.04
 
1 Attachment(s)
Dear all,

I am freshly new with OpenFOAM and I am going to use it for my PhD work. I recently installed it on Ubuntu 16.04 following the instructions from openfoamwiki website and just tried to run blockMesh. I faced the 'command not found' issue, so I checked online what could be the problem but I couldn't find a solution myself. I checked the log.make file but I can't find an error in it, maybe you will?

The end of my bashrc is as following:
Code:

alias of301='source $HOME/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc WM_LABEL_SIZE=64'

export PATH="$PATH:~$HOME/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc"

I've added the second line based on what I found on another thread but it didn't change anything. Do I need to add something more?

On the other hand, paraview is running fine from the bash.

Many thanks for your help.
Frederick

jherb July 10, 2016 19:13

Have you executed the command
Code:

of301
in your shell? Or added it to your .bashrc? Your second command
Code:

export PATH="$PATH:~$HOME/OpenFOAM/OpenFOAM-3.0.1/etc/bashrc"
does not make sense, because you add a file to the list of pathes, where commands for your shell are searched.

ashishmagar600 December 22, 2016 03:31

Currently, I am also encountering the same problem- blockMesh 'command not found'.

Previous to it was giving error "error while loading shared files." Then I added "source /home/magar/OpenFOAM/OpenFOAM-4.0/etc/" to ~/.bashrc.

However it made the problem worse.

Antimony December 22, 2016 04:02

Hi,

Quote:

"source /home/magar/OpenFOAM/OpenFOAM-4.0/etc/"
This should be "source /home/magar/OpenFOAM/OpenFOAM-4.0/etc/bashrc"

When you mean it made the problem worse, what were the error messages?

Cheers,
Antimony

ashishmagar600 December 22, 2016 04:37

Thank you Antimony for your quick reply...

Also I figured out I need to source the bashrc file " source ~/.bashrc " . I didnt do this step so I was getting error as "blockMesh: 'command not found'"

Thanks again.

wyldckat December 22, 2016 10:13

For future reference, this kind of issue is documented here: http://openfoamwiki.net/index.php/In...with_the_Shell ;)


All times are GMT -4. The time now is 18:46.