Close

8th July 2025

Download v13 | Ubuntu

Ubuntu Versions

OpenFOAM 13 is a major new release of OpenFOAM provided by the openfoam13 pack.  It is accompanied by ParaView using the standard paraview package.  OpenFOAM 13 is available for the following versions of Ubuntu:

  • 22.04 LTS, codename jammy
  • 24.04 LTS, codename noble
  • 25.04, codename plucky
  • 25.10, codename quantal (from April 2026)
  • 26.04 LTS codename resolute (from June 2026)

Installation

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.  To simplify setting up the package repositories, the following instructions add the repositories both to install version releases, e.g. version 13, and to install the development version (dev).

  1. Open a terminal prompt (ApplicationsAccessoriesTerminal) and copy and paste the following commands in to the terminal prompt.  Steps 2-5 should only be required once for a given system.
  2. Install the public key (gpg.key) for the repository to enable package signatures to be verified.  (Note: use secure https:// here.)
    sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
  3. If you have added any repository entries for existing dl.openfoam.org previously, remove them by deleting the source list file.
    sudo rm /etc/apt/sources.list.d/*dl_openfoam_org*list
  4. Add both the main and dev repositories at dl.openfoam.org to the list of software repositories for apt to search.  (Note: use http:// since https:// may not be supported and is not required since the key provides secure authentication of the package files.)
    sudo add-apt-repository "http://dl.openfoam.org/ubuntu main dev"
  5. For Ubuntu 26.04 LTS (and, in future, newer versions) ONLY: After running the add-apt-repository command, check if a warning is reported which includes:
    Warning: Skipping acquire of configured file 'main/binary-amd64v3/Packages'...

    If this warning is present, apply the following command to force apt to use amd64 as the architecture name, not amd64v3.

    sudo sed -i "s/^\(deb\).*\(http\)/\1 [arch=amd64] \2/" /etc/apt/sources.list.d/*dl_openfoam_org*list
  6. Update the apt package list to account for the new download repository location.
    sudo apt update
    
  7. Install OpenFOAM 13 which also installs paraview as a dependency if it is not already installed.
    sudo apt -y install openfoam13

OpenFOAM 13 and ParaView are now installed in the /opt directory.  If any problems are encountered during the installation, see the Installation Problems section below.

Patching OpenFOAM 13

OpenFOAM-13 is periodically recompiled into a new openfoam13 pack. The package will be upgraded automatically whenever repository package files are updated and the software is upgraded, e.g. by typing

sudo apt update
sudo apt upgrade

Users can also specifically upgrade openfoam13 only by the following option:

sudo apt update
sudo apt install --only-upgrade openfoam13

User Configuration

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 (note the leading dot):
    . /opt/openfoam13/etc/bashrc
    
  3. Open a new terminal window (see Note 2 below) and test that the foamRun application, from the OpenFOAM package, is working by typing
    foamRun -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 foamRun in the same terminal window, they must first register the change to the .bashrc file by typing at the terminal prompt (note the dots): . $HOME/.bashrc

Getting Started

Create a project directory within the $HOME/OpenFOAM directory named <USER>-13 (e.g. chris-13 for user chris and OpenFOAM version 13) and create a directory named run within it, e.g. by typing:

mkdir -p $FOAM_RUN

Copy across the steady-state backward facing step example, generate the mesh with blockMesh and run foamRun with the incompressibleFluid solver module

cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressibleFluid/pitzDailySteady .
cd pitzDailySteady
blockMesh
foamRun
paraFoam

Refer to the OpenFOAM User Guide to get started.

Installation Problems

1. 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...

2. 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: openfoam13...

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 update

3. 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

which returns /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

Reporting Bugs in OpenFOAM

We appreciate that bugs in OpenFOAM are reported so we can fix them. Please refer to the OpenFOAM Issue Tracking to report bugs.