Close

1st May 2016

OpenFOAM Repo: 2. Downloading Source Code

First choose a directory location for the installation directory of OpenFOAM. If the installation is for a single user only, or if the user does not have administrative privileges (or root access) to the machine, we recommend the installation directory is $HOME/OpenFOAM  (i.e. a directory OpenFOAM in the user’s home directory). If the installer has administrator privileges and the installation is for more than one user, one of the ‘standard’ locations can be used, e.g. /usr/local/OpenFOAM, /opt/OpenFOAM, or just /opt.  If necessary, create the chosen installation directory.  Go into that directory in preparation of cloning repositories.

Cloning the Repositories

The following instructions are written for the OpenFOAM-dev and ThirdParty-dev repositories.  For the OpenFOAM-4.x and ThirdParty-4.x repositories follow the instructions substituting the extension (dev4.x) where necessary.

To clone the repositories, EITHER use the git protocol (git://) — which is very efficient, but requires port 9418 to be open in your organisation’s firewall:

git clone git://github.com/OpenFOAM/OpenFOAM-dev.git
git clone git://github.com/OpenFOAM/ThirdParty-dev.git

OR use the https protocol (https://), which is fairly inefficient but rarely blocked by a firewall

git clone https://github.com/OpenFOAM/OpenFOAM-dev.git
git clone https://github.com/OpenFOAM/ThirdParty-dev.git

Each command will create a directory (e.g. OpenFOAM-dev) containing the source code of the respective repository.

← Back: 1. Installing Software for Compilation  | Up ↑ | Next: 3. Setting the OpenFOAM Environment