Note: the version of Ubuntu, relating to this OpenFOAM installation package, is beyond its end of life — see Ubuntu Releases for details. Packages cannot be installed using the instructions below, which are for archive purposes only.
OpenFOAM and Paraview are currently available for the following versions of Ubuntu:
- 10.04 LTS, codename
- 10.10, codename
OpenFOAM and Paraview can be simply installed using the
apt package management tool. The user will need to provide superuser password authentication when executing the following commands with
- In a terminal window, add OpenFOAM to the list of repository locations for
aptto search, by copying and pasting the following in a terminal prompt (Applications → Accessories → Terminal).
VERS=$(lsb_release -cs) sudo sh -c "echo deb http://dl.openfoam.org/ubuntu $VERS main > /etc/apt/sources.list.d/openfoam.list"
Note 1: Line 1 stores the version name of your Ubuntu distribution (e.g.
$VERS, which is used in line 2
Note 2: This only needs to be done once for a given system
- Update the
aptpackage list to account for the new download repository location
sudo apt-get update
- Install OpenFOAM (
171in the name refers to version
sudo apt-get install openfoam171
- Install Paraview (
381in the name refers to version
sudo apt-get install paraviewopenfoam381
OpenFOAM-1.7.1 is now installed in the /opt directory (along with and Paraview-3.8.1)
In order to use the installed OpenFOAM package, complete the following
- Open the
.bashrcfile in the user’s home directory in an editor, e.g. by typing in a terminal window (note the dot)
- At the bottom of that file, add the following line (see Note 1) and save the file
- Open a new terminal window (see Note 2) and test that the
simpleFoamapplication, from the OpenFOAM package, is working by typing
- 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):
Create a project directory within the
$HOME/OpenFOAM directory named
chris-1.7.1 for user
chris and OpenFOAM version 1.7.1) 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
Refer to the OpenFOAM User Guide to get started.
Reporting Bugs in OpenFOAM
We appreciate that bugs in OpenFOAM are reported so we can fix them. Please refer to the OpenFOAM bugs pages to report bugs.