Close

11th September 2016

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 weekly 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 works with the version of ParaView provided within the latest packaged version release of OpenFOAM — currently v4 (openfoam4) which installs the paraviewopenfoam50 pack.

The openfoam-dev pack is available for the following versions of Ubuntu Linux 64bit only:

  • 14.04 LTS, codename trusty
  • 16.04 LTS, codename xenial
  • 16.10, codename yakkety

Installation

OpenFOAM-dev 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

  1. Copy and paste the following in a terminal prompt (ApplicationsAccessoriesTerminal) to add dl.openfoam.org dev to the list of software repositories for apt to search.
    sudo add-apt-repository "http://dl.openfoam.org/ubuntu dev"

    **Note: This only needs to be done once for a given system

  2. If not already present, add (a) the public key (gpg.key) for the repository to enable package signatures to be verified and (b) the main repository at dl.openfoam.org.  The key and main repository will be present if the user has already installed openfoam4, for example.
    sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -"
    sudo add-apt-repository http://dl.openfoam.org/ubuntu

    **Note: This only needs to be done once for a given system

  3. Update the apt package list to account for the new download repository location
    sudo apt-get update
    
  4. Install OpenFOAM-dev which also installs paraviewopenfoam50 as a dependency if it is not already installed.
    sudo apt-get -y install openfoam-dev
    

OpenFOAM-dev is now installed in the /opt directory.

Installation Problems

See Installation Problems for OpenFOAM v4 for Ubuntu.

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-get update
sudo apt-get upgrade

Users can also specifically upgrade openfoam-dev only by the following option:

sudo apt-get update
sudo apt-get install --only-upgrade openfoam-dev

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
    source /opt/openfoam-dev/etc/bashrc
    
  3. Open a new terminal window (see Note 2 below) and test that the simpleFoam application, from the OpenFOAM package, is working by typing
    simpleFoam -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 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): 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, 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.