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 . It has a large user base across most areas of engineering and science, from both commercial and academic organisations. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.

OpenFOAM
Version:2.1.1, 2.3.0
Release:May 31, 2012
Licence:GPL
Developer:The OpenFOAMĀ® Foundation
http://www.openfoam.org/download/source.php

load modules

module load gcc/4.7.0
module load mpi/mvapich2/1.9/gcc_4.7.0
module load software/openfoam/mvapich2/2.3.0

prepare Your data

setFields
decomposePar

submit a job

bsub -n <CPUs> -W <TIME_MIN> -q <QUEUE> -R 'span[ptile=<CPU_PER_NODE>]' -app Reserve<MEMORY> -e <ERROR_FILE> -o <OUTPUT_FILE> -a mvapich2 mpirun -np <CPUs> <OPENFOAM_SOLVER> -parallel

example for short queue with 64 CPU and 1800MB memory per CPU
bsub -n 64 -W 300 -q short -R 'span[ptile=64]' -app Reserve1800M -e err.txt -o out.txt -a mvapich2 mpirun -np 64 multiphaseInterFoam -parallel
example for long queue with 64 CPU and 1800MB memory per CPU
bsub -n 64 -W 7200 -q long -R 'span[ptile=64]' -app Reserve1800M -e err.txt -o out.txt -a mvapich2 mpirun -np 64 multiphaseInterFoam -parallel

postprocessing Your data

reconstructPar

modulefiles

  • gcc/4.7.0
  • mpi/openmpi/1.6.1/gcc_4.7.0

load module

  • software/openfoam/2.1.1

work space

For using OpenFOAM you need to create a work space in your home directory. By default the work space is set by the environment variable $WM_PROJECT_USER_DIR and $FOAM_RUN as /home/<user>/OpenFOAM/<user>-2.1.1 and /home/<user>/OpenFOAM/<user>-2.1.1/run. You can change these variables by your needs, but be sure to do this every time you load OpenFOAM (because it will be resetted).

list of env vars

OpenFOAM has a lot of env vars which may be useful for your work (and they are used by OpenFOAM itself).

VariableValue
FOAM_APP /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/applications
FOAM_APPBIN /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/bin
FOAM_EXT_LIBBIN /cluster/Apps/OpenFOAM/2.1.1/ThirdParty-2.1.1/platforms/linux64GccDPOpt/lib
FOAM_INST_DIR /cluster/Apps/OpenFOAM/2.1.1
FOAM_JOB_DIR /cluster/Apps/OpenFOAM/2.1.1/jobControl
FOAM_LIBBIN /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib
FOAM_MPI openmpi-1.6.1
FOAM_RUN /home/<username>/OpenFOAM/<username>-2.1.1/run
FOAM_SETTINGS
FOAM_SIGFPE
FOAM_SITE_APPBIN /cluster/Apps/OpenFOAM/2.1.1/site/2.1.1/platforms/linux64GccDPOpt/bin
FOAM_SITE_LIBBIN /cluster/Apps/OpenFOAM/2.1.1/site/2.1.1/platforms/linux64GccDPOpt/lib
FOAM_SOLVERS /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/applications/solvers
FOAM_SRC /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/src
FOAM_TUTORIALS /cluster/Apps/OpenFOAM/2.1.1/tutorials
FOAM_USER_APPBIN /home/<username>/OpenFOAM/<username>-2.1.1/platforms/linux64GccDPOpt/bin
FOAM_USER_LIBBIN /home/<username>/OpenFOAM/<username>-2.1.1/platforms/linux64GccDPOpt/lib
FOAM_UTILITIES /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/applications/utilities
WM_ARCH linux64
WM_ARCH_OPTION 64
WM_CC gcc
WM_CFLAGS -m64 -fPIC
WM_COMPILE_OPTION Opt
WM_COMPILER Gcc
WM_COMPILER_LIB_ARCH 64
WM_CXX g++
WM_CXXFLAGS -m64 -fPIC
WM_DIR /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/wmake
WM_LDFLAGS -m64
WM_LINK_LANGUAGE c++
WM_MPLIB OPENMPI
WM_OPTIONS linux64GccDPOpt
WM_OSTYPE POSIX
WM_PRECISION_OPTION DP
WM_PROJECT OpenFOAM
WM_PROJECT_DIR /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1
WM_PROJECT_INST_DIR /cluster/Apps/OpenFOAM/2.1.1
WM_PROJECT_USER_DIR /home/<username>/OpenFOAM/<username>-2.1.1
WM_PROJECT_VERSION 2.1.1
WM_THIRD_PARTY_DIR /cluster/Apps/OpenFOAM/2.1.1/ThirdParty-2.1.1
ParaView_DIR /cluster/Apps/OpenFOAM/2.1.1/ThirdParty-2.1.1/platforms/linux64Gcc/paraview-3.12.0
ParaView_MAJOR 3.12
ParaView_VERSION 3.12.0
PV_PLUGIN_PATH /cluster/Apps/OpenFOAM/2.1.1/OpenFOAM-2.1.1/platforms/linux64GccDPOpt/lib/paraview-3.12
LIBGL_ALWAYS_INDIRECT y
  • software/openfoam.txt
  • Last modified: 2016/01/29 11:14
  • by juheinri