OpenFOAM and Paraview are currently available for the following versions of Ubuntu:
- 14.04 LTS, codename trusty
- 14.10, codename utopic
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 sudo
- In a terminal window, add OpenFOAM to the list of repository
locations for apt to search, by copying and pasting the following in a
terminal prompt (Applications -> Accessories -> Terminal).
sudo sh -c "echo deb http://www.openfoam.org/download/ubuntu $VERS main > /etc/apt/sources.list.d/openfoam.list"
- Note 1: Line 1 stores the version name of your Ubuntu distribution (e.g. raring) under $VERS, which is used in line 2
- Note 2: This only needs to be done once for a given system
- Update the apt package list to account for the new download repository
location sudo apt-get update
- Install OpenFOAM (231 in the name refers to version 2.3.1): sudo apt-get install openfoam231
- Install Paraview (410 in the name refers to version 4.1.0): sudo apt-get install paraviewopenfoam410
OpenFOAM-2.3.1 is now installed in the /opt directory (along with and Paraview-4.1.0)
- Networking must be enabled in order to be able to install software packages
in Ubuntu. Installation failure due to networking problems usually results in
an error message that reports failures in fetching archives and ends with a
line like the following: E: Unable to fetch some archives...
- A few users have encountered an error message similar to the following
during installation (step 3) Some packages could not be installed. This may mean that you
have requested an impossible situation...
The following information may help to resolve the situation:
The following packages have unmet dependencies: openfoam231 :
Depends: csh but it is not installable
Depends: libopenmpi1.3 but it is not installable...
The most likely cause of this error message is that the universe repositories are not enabled. To enable them, type the following in a terminal window:sudo apt-add-repository universe
sudo apt-get update
- If MPICH is installed on the system, then during user configuration (below),
the following error message might occur when sourcing the etc/bashrc file in
the OpenFOAM installation: gcc: error: unrecognized command line option '--showme:link'sudo update-alternatives --list mpisudo update-alternatives --set mpi /usr/lib/openmpi/include
- The .deb files for different versions of Ubuntu supplied can be downloaded
directly from the following locations:
In order to use the installed OpenFOAM package, complete the following
- 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
- At the bottom of that file, add the following line (see Note 1) and save the
file source /opt/openfoam231/etc/bashrc
- Open a new terminal window (see Note 2) and test that the icoFoam
application, 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
Note 2: If a user wishes to execute icoFoam 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
Create a project directory within the $HOME/OpenFOAM directory named <USER>-2.3.1 (e.g. chris-2.3.1 for user chris and OpenFOAM version 2.3.1) and create a directory named run within it, e.g. by typing:
We appreciate that bugs in OpenFOAM are reported so we can fix them. Please refer to the OpenFOAM bugs pages to report bugs.