Openfoam Command Reference PDF
Openfoam Command Reference PDF
$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
foamsrc cd $FOAM_SRC/$WM_PROJECT
! 1 ! 2
! OpenFOAM® QUICK REFERENCE GUIDE ! OpenFOAM® QUICK REFERENCE GUIDE
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
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