Close

5th July 2024

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-12 and ThirdParty-12 repositories follow the instructions substituting the extension (dev12) where necessary.

To clone the repositories, execute the following:

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