software:openfoam:openfoam

OpenFOAM is a free, open source CFD software package developed by OpenCFD Ltd at ESI Group and distributed by the OpenFOAM Foundation.

OpenFOAM base installs are available to use directly to run OpenFOAM or indirectly to build your own OpenFOAM applications.

To determine the available versions of OpenFOAM installed use

$ vpkg_versions openfoam
Available versions in package (* = default version):

[/opt/shared/valet/2.0.1/etc/openfoam.vpkg_json]
openfoam OpenFOAM is a free, open source CFD software package
  2.1    alias to openfoam/2.1.1
  2.1.1  Version 2.1.1 with OpenMPI(1.8.2), boost(1.56), cgal(4.4), scotch(6.0), paraview(4.1), and  GCC(4.8) compilers
  2.2    alias to openfoam/2.2.2
  2.2.2  Version 2.2.2 with OpenMPI(1.8.2), boost(1.56), cgal(4.4), scotch(6.0), paraview(4.1), and  GCC(4.8) compilers
  2.3    alias to openfoam/2.3.0
* 2.3.0  Version 2.3.0 with OpenMPI(1.8.2), boost(1.56), cgal(4.4), scotch(6.0), paraview(4.1), and  GCC(4.8) compilers
  2.4    alias to openfoam/2.4.0
  2.4.0  Version 2.4.0 with OpenMPI(1.8.2), boost(1.56), cgal(4.4), scotch(6.0), paraview(4.1), and  GCC(4.8) compilers
  4.1    Version 4.1 with OpenMPI(2.0.2), boost(1.55), CGAL(4.8), scotch(6.0), and GCC (4.9) compilers

Each version of OpenFOAM has several “platforms” built:

  • double-precision floating point; compiler optimizations
  • double-precision floating point; debugging enabled
  • single-precision floating point; compiler optimizations
  • single-precision floating point; debugging enabled

Use vpkg_require to select the version of OpenFOAM. The specific platform can be specified by changing the following environment variables' values before sourcing $FOAM_INST_DIR/etc/bashrc.

        WM_PRECISION_OPTION=(DP|SP)
        WM_COMPILE_OPTION=(Opt|Debug)

If you do not specify these environment variables' the default is double-precision and optimized platform. For example, if you need a single precision and debug platform for OpenFOAM 2.2.2 for the Intel compiler, use the following

        WM_PRECISION_OPTION=SP
        WM_COMPILE_OPTION=Debug
        vpkg_require openfoam/2.2.2-intel
        source $FOAM_INS_DIR/etc/bashrc

The OpenFOAM Foundation tutorials can be followed by using qlogin to work directly from a compute node. You only need to copy the tutorials once. For example, for traine on Mills, this process might look like this:

[traine@mills ~]$ workgroup
[(it_css:traine)@mills ~]$ qlogin
Your job 407698 ("QLOGIN") has been submitted
waiting for interactive job to be scheduled ...
Your interactive job 407698 has been successfully scheduled.
Establishing /opt/shared/OpenGridScheduler/local/qlogin_ssh session to host n017 ...
Last login: Tue Oct 15 11:31:06 2013 from mills.mills.hpc.udel.edu
[traine@n017 ~]$ cd /archive/it_css/traine
[traine@n017 traine]$ mkdir OF
[traine@n017 traine]$ cd OF
[traine@n017 OF]$ vpkg_require openfoam
Adding package `openfoam/2.1.1-gcc` to your environment
[traine@n017 OF]$ source $FOAM_INST_DIR/etc/bashrc
[traine@n017 OF]$ echo $FOAM_RUN
/run
[traine@n017 OF]$ mkdir -p .$FOAM_RUN
[traine@n017 OF]$ cp -r $FOAM_TUTORIALS .$FOAM_RUN
Notice the dot (.) before the environment variable $FOAM_RUN in the above example. The OpenFOAM Foundation documentation doesn't show this. The . is necessary in order to specify the run directory to be created in the current directory, otherwise you will get an error since $FOAM_DIR is defined at /run.
Sample commands here demonstrate example for : (cluster mills.hpc, user traine in workgroup it_css). However, same commands are also applicable for cluster farber

Installing OpenFOAM requires extensive storage and time if it needs to be done for each application. Instead use the existing base versions of OpenFOAM to install your own OpenFOAM application.

  • software/openfoam/openfoam.txt
  • Last modified: 2018-04-26 12:14
  • by sraskar