2 2

Next: Model setting without an Up: Alternative formulation Previous: Alternative formulation   Contents   Index

System variables and aliases

  • The following table shows selected system variables and aliases in OpenFOAM.
DirectoryVariableAliasDescription
OpenFOAM-2.x.xWM_PROJECT_DIRfoamJumps to directory of version 2.x.x
img256 1 applicationsFOAM_APPappJumps to directory application
     img256 1 solversFOAM_SOLVERSsolJumps to directory application/solvers
     img256 1 utilitiesFOAM_UTILITIESutilJumps to directory application/utilities
img256 1 platforms   
     img256 1 platformName   
         img256 1 libFOAM_LIBBINlibJumps to directory with compiled libraries
img256 1 srcFOAM_SRCsrcJumps to directory src
img256 1 tutorialsFOAM_TUTORIALStutJumps to directory tutorials
  • System variable (environment variable)
    definition:
    # export variable=value (bash)
    # setenv variable value (csh, tcsh)
    usage:
    # $variable
    example:
    # export WM_PROJECT_DIR=$HOME/OpenFOAM/OpenFOAM-2.x.x
    # defines system variable WM_PROJECT_DIR, which contains the path to directory OpenFOAM-2.x.x
    # cd $WM_PROJECT_DIR
    # jump to directory OpenFOAM-2.x.x
  • alias (user defined one-word command substitution for another command)
    definition:
    # alias name=`commands`
    usage:
    # name
    example:
    # alias foam=`cd $WM_PROJECT_DIR`
    # alias definition foam for jumping to directory OpenFOAM-2.x.x
    # foam
    # jumps to directory OpenFOAM-2.x.x