Skip to content
Snippets Groups Projects
Forked from SCS / docs.it4i.cz
1567 commits behind, 803 commits ahead of the upstream repository.
openfoam.md 6.30 KiB

OpenFOAM

##A free, open source CFD software package

Introduction

OpenFOAM is a free, open source CFD software package developed by OpenCFD Ltd at ESI Group and distributed by the **OpenFOAM Foundation **. It has a large user base across most areas of engineering and science, from both commercial and academic organisations.

Homepage: http://www.openfoam.com/

###Installed version

Currently, several version compiled by GCC/ICC compilers in single/double precision with several version of openmpi are available on Anselm.

For example syntax of available OpenFOAM module is:

< openfoam/2.2.1-icc-openmpi1.6.5-DP >

this means openfoam version 2.2.1 compiled by ICC compiler with openmpi1.6.5 in double precision.

Naming convection of the installed versions is following:

openfoam/<>VERSION>>-<>COMPILER>-<openmpiVERSION>-<PRECISION>

  • <VERSION>> - version of openfoam
  • <COMPILER> - version of used compiler
  • <openmpiVERSION> - version of used openmpi/impi
  • <PRECISION> - DP/SP – double/single precision

###Available OpenFOAM modules

To check available modules use

    $ module avail

In /opt/modules/modulefiles/engineering you can see installed engineering softwares:

    ------------------------------------ /opt/modules/modulefiles/engineering -------------------------------------------------------------
    ansys/14.5.x               matlab/R2013a-COM                                openfoam/2.2.1-icc-impi4.1.1.036-DP
    comsol/43b-COM             matlab/R2013a-EDU                                openfoam/2.2.1-icc-openmpi1.6.5-DP
    comsol/43b-EDU             openfoam/2.2.1-gcc481-openmpi1.6.5-DP            paraview/4.0.1-gcc481-bullxmpi1.2.4.1-osmesa10.0
    lsdyna/7.x.x               openfoam/2.2.1-gcc481-openmpi1.6.5-SP

For information how to use modules please look here.

Getting Started

To create OpenFOAM environment on ANSELM give the commands:

    $ module load openfoam/2.2.1-icc-openmpi1.6.5-DP

    $ source $FOAM_BASHRC

!!! Note "Note" Please load 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, e.g. by typing:

    $ mkdir -p $FOAM_RUN

Project directory is now available by typing:

    $ cd /home/<USER>/OpenFOAM/<USER>-<OFversion>/run

<OFversion> - for example <2.2.1>

or

    $ cd $FOAM_RUN