## Site news

### User Configuration of OpenFoam

User Configuration of OpenFoam

Dear Students17

In order to use the installed OpenFOAM package, complete the following

1] Open the .bashrc file in the user’s home directory in an editor, e.g. by typing in a terminal window (note the dot)

gedit ~/.bashrc

2] At the bottom of that file, add the following line (see Note 1 below) and save the file

source /opt/openfoam4/etc/bashrc

3] Open a new terminal window (see Note 2 below) and test that the simpleFoam application, from the OpenFOAM package, is working by typing

simpleFoam -help

4] A “Usage” message should appear. Your installation and user configuration is complete.

Note 1: If a similar line has already been added to the user’s .bashrc file, e.g. for a previous version of OpenFOAM, then the line should be deleted or, alternatively, commented out by inserting a # at the beginning of the line.

Note 2: If a user wishes to execute simpleFoam in the same terminal window, they must first register the change to the .bashrc file by typing at the terminal prompt (note the dots): source $HOME/.bashrc Getting Started: - Create a project directory within the$HOME/OpenFOAM directory named <USER>-4.0 (e.g. chris-4.0 for user chris and OpenFOAM version 4.0) and create a directory named run within it, e.g. by typing:

mkdir -p $FOAM_RUN - Copy across the backward facing step example, generate the mesh with blockMesh and run the steady flow, incompressible solver simpleFoam cd$FOAM_RUN

cp -r \$FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .

cd pitzDaily

blockMesh

simpleFoam

paraFoam

- A graphical interface should appear. Your user configuration is complete.