From 6c26e4a1a1632ecf4188d055970800cbb05e29ee Mon Sep 17 00:00:00 2001 From: Nathan Mannall Date: Wed, 13 Nov 2024 13:46:59 +0000 Subject: [PATCH 1/2] Add docs for extending and compiling OpenFOAM --- docs/software-packages/openfoam.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/software-packages/openfoam.md b/docs/software-packages/openfoam.md index 229da679..9e3011f3 100644 --- a/docs/software-packages/openfoam.md +++ b/docs/software-packages/openfoam.md @@ -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 From 11bc41778d2b23a877da897a0e5471175d17a9db Mon Sep 17 00:00:00 2001 From: Nathan Mannall Date: Wed, 13 Nov 2024 14:13:51 +0000 Subject: [PATCH 2/2] Add link to project shared directories to OpenFOAM docs --- docs/software-packages/openfoam.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/software-packages/openfoam.md b/docs/software-packages/openfoam.md index 9e3011f3..27f25893 100644 --- a/docs/software-packages/openfoam.md +++ b/docs/software-packages/openfoam.md @@ -47,7 +47,7 @@ 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. +[project shared directories](https://docs.cirrus.ac.uk/user-guide/resource_management/#sharing-data-with-cirrus-users-in-your-project). 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