0% found this document useful (0 votes)
267 views2 pages

Openfoam Command Reference PDF

Uploaded by

mimi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
267 views2 pages

Openfoam Command Reference PDF

Uploaded by

mimi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

! OpenFOAM® QUICK REFERENCE GUIDE !

OpenFOAM® QUICK REFERENCE GUIDE

Important Shell-Aliases in OpenFOAM®


Important Environment Variables in OpenFOAM®
foam3rdParty cd $WM_THIRD_PARTY_DIR
$WM_PROJECT_DIR path to the OpenFOAM® installation
foamfv cd $FOAM_SRC/finiteVolume
$WM_PROJECT_USER_DIR path to OpenFOAM® user directory
lib cd $FOAM_LIBBIN
$FOAM_TUTORIALS path to OpenFOAM® tutorials
run cd $FOAM_RUN
$FOAM_SRC path to source code directory of OpenFOAM® libraries
src cd $FOAM_SRC
$FOAM_APP path to source code directory of OpenFOAM® applications
wmSET . $WM_PROJECT_DIR/etc/bashrc
$FOAM_APPBIN path to directory with the compiled OpenFOAM® applications
wmUNSET . $WM_PROJECT_DIR/etc/config/unset.sh
$FOAM_USER_APPBIN path to directory with the OpenFOAM® applications created by the user
NOTE: this list does not show all the aliases set by Openfoam®

$FOAM_LIBBIN path to directory with the compiled OpenFOAM® libraries

$FOAM_USER_LIBBIN path to directory with the OpenFOAM® libraries created b the user Basic Case Structure in OpenFOAM®

$FOAM_RUN path to directory where the user can put his/her cases (recommended) case/
+ 0/
NOTE: this list does not show all the environment variables set by Openfoam® + constant/ case directory general hierarchical structure
+ polyMesh/
+ system/

Echoing Important Environment Variables in OpenFOAM® case/0/ contains for each variable a file defining the initial and boundary conditions
will show you the path of the environment variable
Example:
echo $WM_PROJECT_DIR case/constant/ contains files specifying physical properties for the application concerned
echo environment variable
will show you $HOME/OpenFOAM/OpenFOAM-2.1.x
(if the installed version is 2.1.x and was installed in the default installation case/constant/polyMesh contains the polyhedral mesh information
directory $HOME/OpenFOAM)

for setting parameters associated with the numerics and run-time control.
It contains at least the following 3 files: controlDict where run control parameters
are set including start/end time, time step and parameters for data output;
Important Shell-Aliases in OpenFOAM® case/system/
fvSchemes where discretization schemes used in the solution may be selected;
foam cd $WM_PROJECT_DIR and, fvSolution where the equation solvers, tolerances and other algorithm
controls are set

foamApps or app cd $FOAM_APP


case/1/
foamSol or sol cd $FOAM_SOLVERS case/2/
. contains the results for each saved time-step. It stores the solution of the
. corresponding time-step to the corresponding time directory timedirectory
foamTuts or tut cd $FOAM_TUTORIALS .
case/timedirectory
foamUtils or util cd $FOAM_UTILITIES

foamsrc cd $FOAM_SRC/$WM_PROJECT

! 1 ! 2
! OpenFOAM® QUICK REFERENCE GUIDE ! OpenFOAM® QUICK REFERENCE GUIDE

Important Solvers in OpenFOAM® Important Utilities in OpenFOAM®!


simple potential flow solver which can be used to generate starting fields for full reconstructs a mesh and fields of a case that is decomposed for parallel execution
potentialFoam reconstrucPar
Navier-Stokes solvers of Openfoam®

icoFoam transient solver for incompressible laminar Newtonian flows setFields set values on a selected set of cells/patch faces through a dictionary

simpleFoam steady-state solver for incompressible turbulent/laminar flows mapFields maps volume fields from one mesh to another

pisoFoam transient solver for incompressible turbulent/laminar flows paraFoam starts paraview to visualize the results

transient density-based compressible flow solver based on central upwind NOTE: this list does not show all the solvers available in Openfoam®
rhoCentralFoam
schemes of Kurganov and Tadmor
transient solver for trans-sonic/supersonic, laminar or turbulent flow of a
sonicFoam
compressible gas
Invoking Utilities in OpenFOAM®
transient solver for 2 incompressible, isothermal immiscible fluids using VOF starts the utility directly if you are already in the case directory. Sometimes more
interFoam utility
(volume of fluid) phase fraction based interface capturing approach options/arguments are needed/accepted
solver for compressible premixed/partially-premixed combustion with turbulence
XiFoam utility -help shows a short help message for the utility
modelling
transient solver for buoyant, turbulent flow of compressible fluids for ventilation
buoyantPimpleFoam
and heat-transfer
icoUncoupledKinematicParc
transient solver for the passive transport of a single kinematic particle cloud
elFoam Structure of a Solver in OpenFOAM®
transient segregated finite-volume solver of linear-elastic, small strain deformation
solidDisplacementFoam appName/
of a solid body, with optional thermal diffusion and thermal stresses
- appName.C
NOTE: this list does not show all the solvers available in Openfoam® - createFields.H
appName directory general hierarchical structure
+ Make/
- files
- options
Invoking a Solver in OpenFOAM®
starts the solver, casedir is the path of the directory where the case files are appName/appName.C the actual solver code
solver -case casedir
located. Sometimes more options/arguments are needed/accepted
starts the solver directly if you are already in the case directory. Sometimes more appName/createFields.H declares all the field variables
solver
options/arguments are needed/accepted
names all the source files (.C), one per line. The last line should read
solver -help shows a short help message for the solver appName/Make/files EXE=$(FOAM_USER_APPBIN)/appName to specify the name and location of the
output file
specifies directories to search for include files and libraries to link the solver
appName/Make/options
against. The former are specified in the variable EXE_INC, the later in EXE_LIBS

Important Utilities in OpenFOAM®


blockMesh a multi-block mesh generator
Compiling a new solver in OpenFOAM®
snappyhexmesh automatic split hex mesher wmake to compile solver. Use this command in appName directory

checkMesh check validity of a mesh remove dependency list and compiled solver. Use this command in appName
wclean
directory
automatically decomposes a mesh and fields of a case for parallel execution of
decomposePar
Openfoam®
!

! 3 ! 4

You might also like