Skip to content
Snippets Groups Projects
Commit 945453a4 authored by Jan Siwiec's avatar Jan Siwiec
Browse files

Update openfoam.md

parent d9fb55c6
No related branches found
No related tags found
4 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section
...@@ -10,20 +10,18 @@ A free, open source CFD software package. ...@@ -10,20 +10,18 @@ A free, open source CFD software package.
Currently, several versions compiled by GCC/ICC compilers in single/double precision with several versions of OpenMPI are available on Anselm. Currently, several versions compiled by GCC/ICC compilers in single/double precision with several versions of OpenMPI are available on Anselm.
For example, syntax of the available OpenFOAM module is: The naming convention of the installed versions is:
\<openfoam\/2.2.1-icc-openmpi1.6.5-DP\> `openfoam/<VERSION>-<COMPILER>-<openmpiVERSION>-<PRECISION>`
This means OpenFOAM version 2.2.1 compiled by the ICC compiler with openmpi1.6.5 in double precision. * `VERSION` - version of openfoam
* `COMPILER` - version of used compiler
The naming convention of the installed versions is following: * `openmpiVERSION` - version of used openmpi/impi
* `PRECISION` - DP/SP – double/single precision
openfoam\<VERSION\>-\<COMPILER\>\<openmpiVERSION\>-\<PRECISION\> Example of the available OpenFOAM modules syntax is `openfoam/2.2.1-icc-openmpi1.6.5-DP`
* \<VERSION\> - version of openfoam This means OpenFOAM version 2.2.1 compiled by the ICC compiler with openmpi1.6.5 in double precision.
* \<COMPILER\> - version of used compiler
* \<openmpiVERSION\> - version of used openmpi/impi
* \<PRECISION\> - DP/SP – double/single precision
### Available OpenFOAM Modules ### Available OpenFOAM Modules
...@@ -47,7 +45,7 @@ For information on how to use modules, look [here][1]. ...@@ -47,7 +45,7 @@ For information on how to use modules, look [here][1].
## Getting Started ## Getting Started
To create OpenFOAM environment on ANSELM give the commands: To create OpenFOAM environment on ANSELM, use the commands:
```console ```console
$ ml openfoam/2.2.1-icc-openmpi1.6.5-DP $ ml openfoam/2.2.1-icc-openmpi1.6.5-DP
...@@ -57,7 +55,7 @@ $ source $FOAM_BASHRC ...@@ -57,7 +55,7 @@ $ source $FOAM_BASHRC
!!! note !!! note
Load the correct module with your requirements “compiler - GCC/ICC, precision - DP/SP”. Load the correct module with your requirements “compiler - GCC/ICC, precision - DP/SP”.
Create a project directory within the $HOME/OpenFOAM directory named \<USER\>-\<OFversion\> and create a directory named run within it: Create a project directory within the $HOME/OpenFOAM directory named `<USER>-<OFversion>` and create a directory named `run` within it:
```console ```console
$ mkdir -p $FOAM_RUN $ mkdir -p $FOAM_RUN
...@@ -87,7 +85,7 @@ Now you can run the first case, for example incompressible laminar flow in a cav ...@@ -87,7 +85,7 @@ Now you can run the first case, for example incompressible laminar flow in a cav
## Running Serial Applications ## Running Serial Applications
Create a Bash script test.sh: Create a test.sh Bash script:
```bash ```bash
#!/bin/bash #!/bin/bash
...@@ -119,7 +117,7 @@ Run the second case, for example external incompressible turbulent flow - case - ...@@ -119,7 +117,7 @@ Run the second case, for example external incompressible turbulent flow - case -
First we must run the serial application bockMesh and decomposePar for preparation of parallel computation. First we must run the serial application bockMesh and decomposePar for preparation of parallel computation.
!!! note !!! note
Create a Bash scrip test.sh: Create a test.sh Bash scrip:
```bash ```bash
#!/bin/bash #!/bin/bash
...@@ -145,7 +143,7 @@ $ qsub -A OPEN-0-0 -q qprod -l select=1:ncpus=16,walltime=03:00:00 test.sh ...@@ -145,7 +143,7 @@ $ qsub -A OPEN-0-0 -q qprod -l select=1:ncpus=16,walltime=03:00:00 test.sh
This job creates a simple block mesh and domain decomposition. Check your decomposition and submit parallel computation: This job creates a simple block mesh and domain decomposition. Check your decomposition and submit parallel computation:
!!! note !!! note
Create a PBS script testParallel.pbs: Create a testParallel.pbs PBS script:
```bash ```bash
#!/bin/bash #!/bin/bash
...@@ -169,7 +167,7 @@ mpirun -hostfile ${PBS_NODEFILE} -np $nproc potentialFoam -noFunctionObject-writ ...@@ -169,7 +167,7 @@ mpirun -hostfile ${PBS_NODEFILE} -np $nproc potentialFoam -noFunctionObject-writ
mpirun -hostfile ${PBS_NODEFILE} -np $nproc simpleFoam -parallel | tee simpleFoam.log mpirun -hostfile ${PBS_NODEFILE} -np $nproc simpleFoam -parallel | tee simpleFoam.log
``` ```
nproc – number of subdomains `nproc`the number of subdomains
Job submission Job submission
...@@ -221,7 +219,7 @@ and change to: ...@@ -221,7 +219,7 @@ and change to:
EXE = $(FOAM_USER_APPBIN)/My_icoFoam EXE = $(FOAM_USER_APPBIN)/My_icoFoam
``` ```
In the My_icoFoam directory, give the compilation command: In the My_icoFoam directory, use the compilation command:
```console ```console
$ wmake $ wmake
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment