• Notes on OpenFOAM:

  • System settings to execute OpenFOAM on a cluster/HPC machine with central installation:



1) link the path of the OpenFOAM installation on the machine:
>> ln -s $FOAM1.7 /mylocal/directyory/OpenFOAM/
 

2) Add the following lines to your ~/.bashrc
#OPENFOAM
 
source /PATH/TO/OpenFOAM-1.7.1/etc/bashrc
export LD_LIBRARY_PATH=/PATH/TO/OpenFOAM-1.7.1/lib/linuxPPC64GccDPOpt:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/PATH/TO/OpenFOAM-1.7.1/lib/linuxPPC64GccDPOpt/mpich-gm:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/PATH/TO/OpenFOAM-1.7.1/lib/linuxPPC64GccDPOpt:/gpfs/apps/GCC/4.4.0/lib64/:/gpfs/ap\
ps/GCC/4.4.0/lib/:$LD_LIBRARY_PATH
 

3) Update your terminal by typing:
>> source ~/.bashrc

4) Test it with a tutorial:
>> cd /PATH/TO/YOUR/LOCAL/OpenFOAM/DIRECTORY
>> mkdir mytutorials
>> cp -rf /PATH/TO/OpenFOAM.1.7/tutorials/* ./mytutorials/
>> cd ./mytutorials/incompressible/icoFoam/cavity/
>> blockMesh
>> foamToVTK
>> ... ect. with all the rest of the steps to execute the code (see the documentations to run tutorials)