Standard libraries

3.7 Standard libraries

The libraries with the OpenFOAM distribution are in the $FOAM_LIB/$WM_OPTIONS directory, reached quickly by typing lib at the command line. Again, the names are prefixed by lib and reasonably descriptive, e.g. incompressibleTransportModels contains the library of incompressible transport models. For ease of presentation, the libraries are separated into two types:

General libraries
those that provide general classes and associated functions listed in Table 3.7;
Model libraries
those that specify models used in computational continuum mechanics, listed in Table 3.8, Table 3.9 and Table 3.10.

Library of basic OpenFOAM tools OpenFOAM


algorithms

Algorithms

containers

Container classes

db

Database classes

dimensionedTypes

dimensioned<Type> class and derivatives

dimensionSet

dimensionSet class

fields

Field classes

global

Global settings

graph

graph class

interpolations

Interpolation schemes

matrices

Matrix classes

memory

Memory management tools

meshes

Mesh classes

primitives

Primitive classes

Finite volume method library finiteVolume


cfdTools

CFD tools

fields

Volume, surface and patch field classes; includes boundary conditions

finiteVolume

Finite volume discretisation

fvMatrices

Matrices for finite volume solution

fvMesh

Meshes for finite volume discretisation

interpolation

Field interpolation and mapping

surfaceMesh

Mesh surface data for finite volume discretisation

volMesh

Mesh volume (cell) data for finite volume discretisation

Post-processing libraries


fieldFunctionObjects

Field function objects including field averaging, min/max, etc.

foamCalcFunctions

Functions for the foamCalc utility

forces

Tools for post-processing force/lift/drag data with function objects

jobControl

Tools for controlling job running with a function object

postCalc

For using functionality of a function object as a post-processing activity

sampling

Tools for sampling field data at prescribed locations in a domain

systemCall

General function object for making system calls while running a case

utilityFunctionObjects

Utility function objects

Solution and mesh manipulation libraries


autoMesh

Library of functionality for the snappyHexMesh utility

blockMesh

Library of functionality for the blockMesh utility

dynamicMesh

For solving systems with moving meshes

dynamicFvMesh

Library for a finite volume mesh that can move and undergo topological changes

edgeMesh

For handling edge-based mesh descriptions

fvMotionSolvers

Finite volume mesh motion solvers

ODE

Solvers for ordinary differential equations

meshTools

Tools for handling a OpenFOAM mesh

surfMesh

Library for handling surface meshes of different formats

triSurface

For handling standard triangulated surface-based mesh descriptions

topoChangerFvMesh

Topological changes functionality (largely redundant)

Lagrangian particle tracking libraries


coalCombustion

Coal dust combustion modelling

dieselSpray

Diesel spray and injection modelling

distributionModels

Particle distribution function modelling

dsmc

Direct simulation Monte Carlo method modelling

lagrangian

Basic Lagrangian, or particle-tracking, solution scheme

lagrangianIntermediate

Particle-tracking kinematics, thermodynamics, multispecies reactions, particle forces, etc.

potential

Intermolecular potentials for molecular dynamics

molecule

Molecule classes for molecular dynamics

molecularMeasurements

For making measurements in molecular dynamics

solidParticle

Solid particle implementation

Miscellaneous libraries


conversion

Tools for mesh and data conversions

decompositionMethods

Tools for domain decomposition

engine

Tools for engine calculations

fileFormats

Core routines for reading/writing data in some third-party formats

genericFvPatchField

A generic patch field

MGridGenGAMGAgglomeration

Library for cell agglomeration using the MGridGen algorithm

pairPatchAgglomeration

Primitive pair patch agglomeration method

OSspecific

Operating system specific functions

randomProcesses

Tools for analysing and generating random processes

Parallel libraries


distributed

Tools for searching and IO on distributed surfaces

reconstruct

Mesh/field reconstruction library

scotchDecomp

Scotch domain decomposition library

ptsotchDecomp

PTScotch domain decomposition library

Table 3.7: Shared object libraries for general use.

Basic thermophysical models basicThermophysicalModels


hPsiThermo

General thermophysical model calculation based on enthalpy h  \relax \special {t4ht= and compressibility ψ  \relax \special {t4ht=

hsPsiThermo

General thermophysical model calculation based on sensible enthalpy hs  \relax \special {t4ht= and compressibility ψ  \relax \special {t4ht=

ePsiThermo

General thermophysical model calculation based on internal energy e  \relax \special {t4ht= and compressibility ψ  \relax \special {t4ht=

hRhoThermo

General thermophysical model calculation based on enthalpy h  \relax \special {t4ht=

hsRhoThermo

General thermophysical model calculation based on sensible enthalpy hs  \relax \special {t4ht=

pureMixture

General thermophysical model calculation for passive gas mixtures

Reaction models reactionThermophysicalModels


hPsiMixtureThermo

Calculates enthalpy for combustion mixture based on enthalpy h  \relax \special {t4ht= and ψ  \relax \special {t4ht=

hsPsiMixtureThermo

Calculates enthalpy for combustion mixture based on sensible enthalpy h
 s  \relax \special {t4ht= and ψ  \relax \special {t4ht=

hRhoMixtureThermo

Calculates enthalpy for combustion mixture based on enthalpy h  \relax \special {t4ht= and ρ  \relax \special {t4ht=

hsRhoMixtureThermo

Calculates enthalpy for combustion mixture based on sensible enthalpy hs  \relax \special {t4ht= and ρ  \relax \special {t4ht=

hhuMixtureThermo

Calculates enthalpy for unburnt gas and combustion mixture

homogeneousMixture

Combustion mixture based on normalised fuel mass fraction b  \relax \special {t4ht=

inhomogeneousMixture

Combustion mixture based on b  \relax \special {t4ht= and total fuel mass fraction ft  \relax \special {t4ht=

veryInhomogeneousMixture

Combustion mixture based on b  \relax \special {t4ht=, ft  \relax \special {t4ht= and unburnt fuel mass fraction fu  \relax \special {t4ht=

dieselMixture

Combustion mixture based on ft  \relax \special {t4ht= and fu  \relax \special {t4ht=

basicMultiComponentMixture

Basic mixture based on multiple components

multiComponentMixture

Derived mixture based on multiple components

reactingMixture

Combustion mixture using thermodynamics and reaction schemes

egrMixture

Exhaust gas recirculation mixture

Radiation models radiationModels


P1

P1 model

fvDOM

Finite volume discrete ordinate method

viewFactor

View factor radiation model

Laminar flame speed models laminarFlameSpeedModels


constLaminarFlameSpeed

Constant laminar flame speed

GuldersLaminarFlameSpeed

Gulder’s laminar flame speed model

GuldersEGRLaminarFlameSpeed

Gulder’s laminar flame speed model with exhaust gas recirculation modelling

Barotropic compressibility models barotropicCompressibilityModels


linear

Linear compressibility model

Chung

Chung compressibility model

Wallis

Wallis compressibility model

Thermophysical properties of gaseous species specie


icoPolynomial

Incompressible polynomial equation of state, e.g. for liquids

perfectGas

Perfect gas equation of state

eConstThermo

Constant specific heat cp  \relax \special {t4ht= model with evaluation of internal energy e  \relax \special {t4ht= and entropy s  \relax \special {t4ht=

hConstThermo

Constant specific heat cp  \relax \special {t4ht= model with evaluation of enthalpy h  \relax \special {t4ht= and entropy s  \relax \special {t4ht=

hPolynomialThermo

c
 p  \relax \special {t4ht= evaluated by a function with coefficients from polynomials, from which h  \relax \special {t4ht=, s  \relax \special {t4ht= are evaluated

janafThermo

cp  \relax \special {t4ht= evaluated by a function with coefficients from JANAF thermodynamic tables, from which h  \relax \special {t4ht=, s  \relax \special {t4ht= are evaluated

specieThermo

Thermophysical properties of species, derived from cp  \relax \special {t4ht=, h  \relax \special {t4ht= and/or s  \relax \special {t4ht=

constTransport

Constant transport properties

polynomialTransport

Polynomial based temperature-dependent transport properties

sutherlandTransport

Sutherland’s formula for temperature-dependent transport properties

Functions/tables of thermophysical properties thermophysicalFunctions


NSRDSfunctions

National Standard Reference Data System (NSRDS) - American Institute of Chemical Engineers (AICHE) data compilation tables

APIfunctions

American Petroleum Institute (API) function for vapour mass diffusivity

Chemistry model chemistryModel


chemistryModel

Chemical reaction model

chemistrySolver

Chemical reaction solver

Other libraries


liquidProperties

Thermophysical properties of liquids

liquidMixtureProperties

Thermophysical properties of liquid mixtures

basicSolidThermo

Thermophysical models of solids

solid

Thermodynamics of solid species

SLGThermo

Thermodynamic package for solids, liquids and gases

solidProperties

Thermophysical properties of solids

solidMixtureProperties

Thermophysical properties of solid mixtures

thermalPorousZone

Porous zone definition based on cell zones that includes terms for energy equations

Table 3.8: Libraries of thermophysical models.

RAS turbulence models for incompressible fluids incompressibleRASModels


laminar

Dummy turbulence model for laminar flow

kEpsilon

Standard high-Re  \relax \special {t4ht= k − ε  \relax \special {t4ht= model

kOmega

Standard high-Re  \relax \special {t4ht= k − ω  \relax \special {t4ht= model

kOmegaSST

k − ω  \relax \special {t4ht=-SST model

RNGkEpsilon

RNG k − ε  \relax \special {t4ht= model

NonlinearKEShih

Non-linear Shih k − ε  \relax \special {t4ht= model

LienCubicKE

Lien cubic k − ε  \relax \special {t4ht= model

qZeta

q − ζ  \relax \special {t4ht= model

LaunderSharmaKE

Launder-Sharma low-Re  \relax \special {t4ht= k − ε  \relax \special {t4ht= model

LamBremhorstKE

Lam-Bremhorst low-Re  \relax \special {t4ht= k − ε  \relax \special {t4ht= model

LienCubicKELowRe

Lien cubic low-Re  \relax \special {t4ht= k − ε  \relax \special {t4ht= model

LienLeschzinerLowRe

Lien-Leschziner low-Re  \relax \special {t4ht= k − ε  \relax \special {t4ht= model

LRR

Launder-Reece-Rodi RSTM

LaunderGibsonRSTM

Launder-Gibson RSTM with wall-reflection terms

realizableKE

Realizable k −  ε  \relax \special {t4ht= model

SpalartAllmaras

Spalart-Allmaras 1-eqn mixing-length model

RAS turbulence models for compressible fluids compressibleRASModels


laminar

Dummy turbulence model for laminar flow

kEpsilon

Standard k −  ε  \relax \special {t4ht= model

kOmegaSST

k − ω − SST  \relax \special {t4ht= model

RNGkEpsilon

RNG k − ε  \relax \special {t4ht= model

LaunderSharmaKE

Launder-Sharma low-Re  \relax \special {t4ht= k − ε  \relax \special {t4ht= model

LRR

Launder-Reece-Rodi RSTM

LaunderGibsonRSTM

Launder-Gibson RSTM

realizableKE

Realizable k −  ε  \relax \special {t4ht= model

SpalartAllmaras

Spalart-Allmaras 1-eqn mixing-length model

Large-eddy simulation (LES) filters LESfilters


laplaceFilter

Laplace filters

simpleFilter

Simple filter

anisotropicFilter

Anisotropic filter

Large-eddy simulation deltas LESdeltas


PrandtlDelta

Prandtl delta

cubeRootVolDelta

Cube root of cell volume delta

maxDeltaxyz

Maximum of x, y and z; for structured hex cells only

smoothDelta

Smoothing of delta

Incompressible LES turbulence models incompressibleLESModels


Smagorinsky

Smagorinsky model

Smagorinsky2

Smagorinsky model with 3-D filter

dynSmagorinsky

Dynamic Smagorinsky

homogenousDynSmagorinsky

Homogeneous dynamic Smagorinsky model

dynLagrangian

Lagrangian two equation eddy-viscosity model

scaleSimilarity

Scale similarity model

mixedSmagorinsky

Mixed Smagorinsky/scale similarity model

dynMixedSmagorinsky

Dynamic mixed Smagorinsky/scale similarity model

kOmegaSSTSAS

k − ω  \relax \special {t4ht=-SST scale adaptive simulation (SAS) model

oneEqEddy

k  \relax \special {t4ht=-equation eddy-viscosity model

dynOneEqEddy

Dynamic k  \relax \special {t4ht=-equation eddy-viscosity model

locDynOneEqEddy

Localised dynamic k  \relax \special {t4ht=-equation eddy-viscosity model

spectEddyVisc

Spectral eddy viscosity model

LRDDiffStress

LRR differential stress model

DeardorffDiffStress

Deardorff differential stress model

SpalartAllmaras

Spalart-Allmaras model

SpalartAllmarasDDES

Spalart-Allmaras delayed detached eddy simulation (DDES) model

SpalartAllmarasIDDES

Spalart-Allmaras improved DDES (IDDES) model

Compressible LES turbulence models compressibleLESModels


Smagorinsky

Smagorinsky model

oneEqEddy

k  \relax \special {t4ht=-equation eddy-viscosity model

dynOneEqEddy

Dynamic k  \relax \special {t4ht=-equation eddy-viscosity model

lowReOneEqEddy

Low-Re  \relax \special {t4ht= k  \relax \special {t4ht=-equation eddy-viscosity model

DeardorffDiffStress

Deardorff differential stress model

SpalartAllmaras

Spalart-Allmaras 1-eqn mixing-length model

Table 3.9: Libraries of RAS and LES turbulence models.

Transport models for incompressible fluids incompressibleTransportModels


Newtonian

Linear viscous fluid model

CrossPowerLaw

Cross Power law nonlinear viscous model

BirdCarreau

Bird-Carreau nonlinear viscous model

HerschelBulkley

Herschel-Bulkley nonlinear viscous model

powerLaw

Power-law nonlinear viscous model

interfaceProperties

Models for the interface, e.g. contact angle, in multiphase simulations

Miscellaneous transport modelling libraries


interfaceProperties

Calculation of interface properties

twoPhaseInterfaceProperties

Two phase interface properties models, including boundary conditions

surfaceFilmModels

Surface film models

Table 3.10: Shared object libraries of transport models.


Creative Commons License
This User Guide is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License .