The website of James Shaw, a PhD student researching numerical methods for the atmosphere at University of Reading

OpenFOAM on Ubuntu 16.04

27 April 2016

If you want to use the OpenFOAM 3 on Ubuntu 16.04 Xenial Xerus, there is no binary package in the OpenFOAM repository at the time of writing.

The source build takes many hours to complete, so you might prefer to workaround the issue as I did:

  1. Install the dependencies:
    sudo apt-get install libopenmpi1.10 csh libscotch-5.1 binutils-dev libscotch-dev libptscotch-5.1
  2. Assuming you have a 64-bit architecture, download the binary package for Ubuntu 15.10 Wily Werewolf:
    wget -O openfoam30_1-1_amd64.deb https://sourceforge.net/projects/foam/files/foam/ubuntu/dists/wily/main/binary-amd64/openfoam30_1-1_amd64.deb/download
  3. This package depends upon libopenmpi1.6 which no longer exists in Ubuntu 16.04, so we must coax OpenFOAM into using the new version. Install the downloaded binary with
    sudo dpkg --ignore-depends=libopenmpi1.6 -i openfoam30_1-1_amd64.deb
  4. Finally, ensure that libmpi is in the expected place:
    sudo ln -s /usr/lib/libmpi.so /usr/lib/libmpi.so.1
I haven't tested that this installation works with parallel execution, but it's enough to get OpenFOAM running.