Download OpenFOAM-dev | Ubuntu
Ubuntu Versions
The openfoam-dev pack provides a packaged installation for Ubuntu of the current development line of OpenFOAM, known as OpenFOAM-dev, that contains the source code for the next major release of OpenFOAM. The pack is updated monthly to bring cutting-edge developments to users without them needing to compile source code. Updates can conveniently be installed as part of a standard update within the apt package management tool. The openfoam-dev pack requires the standard paraview package as a dependency, which will installed automatically if it is currently not installed on the system.
The openfoam-dev pack is available for the following versions of Ubuntu Linux for x86 64bit (e.g. Intel and AMD CPUs) and ARM 64bit architectures.
- 22.04 LTS, codename
jammy - 24.04 LTS, codename
noble - 26.04 LTS, codename
resolute
The openfoam-dev pack was previously available for the following versions, but is no longer updated:
- 14.04 LTS, codename
trustyuntil April 2019. - 16.04 LTS, codename
xenial, until June 2021. - 16.10, codename
yakkety, until April 2017. - 17.04, codename
zesty, retired at early end of life following the Meltdown and Spectre vulnerabilities. - 17.10, codename
artful, until August 2018. - 18.04 LTS, codename
bionic, until December 2022. - 18.10, codename
cosmic, until July 2019. - 19.04, codename
disco, until April 2020. - 19.10, codename
eoan, until September 2020. - 20.04 LTS, codename
focal, until May 2025. - 20.10, codename
groovy, until June 2021. - 21.04, codename
hirsute, until May 2022. - 21.10, codename
impish, until May 2022. - 22.10, codename
kinetic, until July 2023. - 23.04, codename
lunar, until May 2023. - 25.04, codename
plucky, until April 2025. - 25.10, codename
questing, until June 2026.
Installation
OpenFOAM-dev 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 OpenFOAM-dev.
- Open a terminal prompt (Applications → Accessories → Terminal) and copy and paste the following commands in to the terminal prompt. Steps 2-5 should only be required once for a given system.
- Install the public key (
gpg.key) for the repository to enable package signatures to be verified. (Note: use securehttps://here.)sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
- If you have added any repository entries for existing
dl.openfoam.orgpreviously, remove them by deleting the source list file.sudo rm /etc/apt/sources.list.d/*dl_openfoam_org*list
- Add both the
mainanddevrepositories atdl.openfoam.orgto the list of software repositories foraptto search. (Note: usehttp://sincehttps://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"
- For Ubuntu 26.04 LTS (and, in future, newer versions) ONLY: After running the
add-apt-repositorycommand, 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
aptto useamd64as the architecture name, notamd64v3.sudo sed -i "s/^\(deb\).*\(http\)/\1 [arch=amd64] \2/" /etc/apt/sources.list.d/*dl_openfoam_org*list
- Update the
aptpackage list to account for the new download repository location.sudo apt update
- Install OpenFOAM-dev which also installs
paraviewas a dependency if it is not already installed.sudo apt -y install openfoam-dev
OpenFOAM-dev is now installed in the /opt directory.
Upgrading OpenFOAM-dev
Every week, OpenFOAM-dev is recompiled into a new openfoam-dev pack within the dev repository. 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 openfoam-dev only by the following option:
sudo apt update sudo apt install --only-upgrade openfoam-dev
User Configuration
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)gedit ~/.bashrc
- At the bottom of that file, add the following line (see Note 1 below) and save the file
source /opt/openfoam-dev/etc/bashrc
- Open a new terminal window (see Note 2 below) and test that the
foamRunapplication, from the OpenFOAM package, is working by typingfoamRun -help
- 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): source $HOME/.bashrc
Getting Started
Create a project directory within the $HOME/OpenFOAM directory named <USER>-dev (e.g. chris-dev for user chris) and create a directory named run within it, e.g. by typing:
mkdir -p $FOAM_RUN
Copy across the backward facing step example and generate the mesh with blockMesh. Run the case with foamRun, using the incompressibleFluid modular solver with steady-state settings, equivalent to the simpleFoam application of old.
cd $FOAM_RUN cp -r $FOAM_TUTORIALS/incompressibleFluid/pitzDailySteady . cd pitzDailySteady blockMesh foamRun 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 Issue Tracking to report bugs.
