Environment variable settings for OpenFOAM are contained in files in the
OpenFOAM-dev/etc directory. To compile OpenFOAM, the user must ‘source’ the environment, either the
bashrc file if they are running the
ksh shell, or the
cshrc file if they are running the
csh shell. To check the shell, type “
The user should configure their system with permanent settings to source the environment. If OpenFOAM is installed in the
$HOME/OpenFOAM directory, the user should:
- EITHER if running bash or ksh, add the following line to the end of the user’s
then type “
source $HOME/.bashrc” in the current terminal window.
- OR if running tcsh or csh, add the following line to the end of your
then type “
source $HOME/.cshrc” in the current terminal window.
When OpenFOAM is installed in an alternative directory, e.g.
/opt, the user should substitute
$HOME/OpenFOAM with the relevant installation location in the lines above.
Test this works correctly by typing “
echo $WM_PROJECT_DIR” in the terminal window, which should return the full path to your repository directory, e.g.
Also test by typing “
echo $ParaView_VERSION” which should return the version number of ParaView for the respective repository, e.g.