Skip to content

Commit

Permalink
Add docs for extending and compiling OpenFOAM
Browse files Browse the repository at this point in the history
  • Loading branch information
NMannall committed Nov 13, 2024
1 parent 34978bf commit 6c26e4a
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/software-packages/openfoam.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ example, for OpenFOAM v8:

You should then be able to use OpenFOAM in the usual way.

### Extensions to OpenFOAM

Many packages extend the central OpenFOAM functionality in some way. However,
there is no completely standardised way in which this works. Some packages
assume they have write access to the main OpenFOAM installation. If this is
the case, you must install your own version before continuing. This
can be done on an individual basis, or a per-project basis using the
project shared directories.

Some packages are installed in the OpenFOAM user directory, by default this is
set to `$HOME/OpenFOAM/$USER-[openfoam-version]`. This can be changed (e.g. to
the work filesystem) by adding `WM_PROJECT_USER_DIR=/work/a01/a01/auser/OpenFOAM/auser-[openfoam-version]`
as an argument to `source ${FOAM_INSTALL_DIR}/etc/bashrc`. For example:

```bash
source ${FOAM_INSTALL_DIR}/etc/bashrc WM_PROJECT_USER_DIR=/work/a01/a01/auser/OpenFOAM/auser-v2106
```

### Compiling OpenFOAM

If you want to compile your own version of OpenFOAM, instructions are
available for Cirrus at:

- [Build instructions for OpenFOAM on GitHub](https://github.com/hpc-uk/build-instructions/tree/main/apps/OpenFOAM)

## Example Batch Submisison

The following example batch submission script would run OpenFOAM on two
Expand Down

0 comments on commit 6c26e4a

Please sign in to comment.