CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/187582-openfoam.html)

npatricia May 10, 2017 08:11

OpenFOAM
 
Greetings,

I am a new OpenFOAM user, using OpenFOAM 2.4.0,
When I try to execute the command fluentMeshToFoam elbow.msh, i get feedback that command not found.
How can I rectify this?

Also, everytime I open a new terminal, there's "bash: /home/tflows/ .bashrc: line 119: syntax error: unexpected end of file"
What does it mean and how can I rectify it?
Thank you

PATRICIA

Tobi May 10, 2017 08:21

Hi Patricia,

the problem is that you FOAM environment is not setup correctly. Therefore I think you installed FOAM and not compiled it. Therefore you have to load the bashrc from the /opt/openfoam.../etc/bashrc into your shell. However, you problem is not related to openfoam directly. It is more Linux/Unix stuff. The error you got if you open a terminal let you know that you made some mistakes in you local .bashrc. Open it and resolve the problem and put the correct path to the openfoam environment.

To make things clear:

Code:

cd $HOME
vim .bashrc

Check out the line 119 and remove your mistake. Then add an alias for loading your environment (or correct it) -- see also the openfoamwiki here: http://openfoamwiki.net/index.php/In...nFOAM_versions

Code:

echo "alias fo240=\"/opt/OpenFOAM-2.4.0/etc/bashrc\" >> $HOME/.bashrc
Check if this line appears correctly in your .bashrc file and be sure that the path is correct. Then reload the terminal or open a new one and type in
Code:

fo240
After that, the FOAM environment should be loaded and you can work with the FOAM applications. To check that, just type any FOAM command:

Code:

checkMesh
After typing fo240 there should be no error. Keep in mind that I was explaining it for the bash shell.


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