Download v3.0.1 | Ubuntu
OpenFOAM and Paraview are currently available for the following versions of Ubuntu.
Note: only version 14.04LTS is still current (see Ubuntu Releases) and supports installation of the OpenFOAM package with
apt using the instructions below.
- 14.04 LTS, codename
- 15.10, codename
Note: foamyHexMesh is not available in the pack for Ubuntu 14.04 LTS, since that version of Ubuntu provides a packaged version of CGAL (v4.2) which is no longer supported. However, foamyHexMesh is available in the pack for Ubuntu 15.10 which provides CGAL v4.6.1.
Upgrade from OpenFOAM 3.0.0
OpenFOAM 3.0.1 is a patch release of OpenFOAM 3.0.0, which can be upgraded for the Ubuntu pack
openfoam30. Users with an existing installation of OpenFOAM 3.0.0 on their Ubuntu system can upgrade OpenFOAM only by typing in a terminal window:
sudo apt-get update sudo apt-get install --only-upgrade openfoam30
OpenFOAM will be upgraded from 3.0.0 to 3.0.1 also if the user does a complete upgrade of all software packages:
sudo apt-get update sudo apt-get install upgrade
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
- Copy and paste the following in a terminal prompt (Applications → Accessories → Terminal) to add
dl.openfoam.orgto the list of software repositories for
aptto search, and to add the public key (
gpg.key) for the repository to enable package signatures to be verified.
sudo add-apt-repository http://dl.openfoam.org/ubuntu sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
**Note: 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 (
30in the name refers to version
sudo apt-get -y install openfoam30
- Install Paraview (
44in the name refers to version
**Note, Ubuntu 14.04.2 users: see first note in Installation Problems below**
sudo apt-get -y install paraviewopenfoam44
OpenFOAM-3.0.1 is now installed in the /opt directory (along with and Paraview-4.4.0)
1. Users running Ubuntu 14.04.2 (released 20/02/2015) have reported a problem installing Paraview. During installation, they see a message:
... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. ...
If this occurs, replace step 4, Install Paraview, above with:
sudo apt-get download paraviewopenfoam44 --allow-unauthenticated sudo dpkg -i paraviewopenfoam44_0-1_amd64.deb sudo apt-get install qt4-dev-tools sudo dpkg -i paraviewopenfoam44_0-1_amd64.deb
2. 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:
3. A few users have encountered an error message similar to the following during installation (step 3) E: Unable to fetch some archives...
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: openfoam30 : 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
4. 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'
The user can check whether MPICH is installed by typing the following:
sudo update-alternatives --list mpi
/usr/mpich/include if MPICH is installed. This error is caused when the default
mpicc is MPICH, rather than OpenMPI. The simplest way to fix the problem is to set
mpicc to OpenMPI is by running the following command in a terminal prompt:
sudo update-alternatives --set mpi /usr/lib/openmpi/include
The .deb files for different versions of Ubuntu supplied can be downloaded directly from the OpenFOAM Download Repository.
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-3.0.1 for user
chris and OpenFOAM version 3.0.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.