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


cloudFunctionObjects

Function object outputs Lagrangian cloud information to a file

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

FVFunctionObjects

Tools for calculating fvcDiv, fvcGrad etc with a function object

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

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

spray

Spray and injection modelling

turbulence

Particle dispersion and Brownian motion based on turbulence

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


decompose

General mesh/field decomposition library

distributed

Tools for searching and IO on distributed surfaces

metisDecomp

Metis domain decomposition library

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


hePsiThermo

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

heRhoThermo

General thermophysical model calculation based on density ρ  \relax \special {t4ht=

pureMixture

General thermophysical model calculation for passive gas mixtures

Reaction models reactionThermophysicalModels


psiReactionThermo

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

psiuReactionThermo

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

rhoReactionThermo

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

heheupsiReactionThermo

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=

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

singleStepReactingMixture

Single step reacting mixture

Radiation models radiationModels


P1

P1 model

fvDOM

Finite volume discrete ordinate method

opaqueSolid

Radiation for solid opaque solids; does nothing to energy equation source terms (returns zeros) but creates absorptionEmissionModel and scatterModel

viewFactor

View factor radiation model

Laminar flame speed models laminarFlameSpeedModels


constant

Constant laminar flame speed

GuldersLaminarFlameSpeed

Gulder’s laminar flame speed model

GuldersEGRLaminarFlameSpeed

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

RaviPetersen

Laminar flame speed obtained from Ravi and Petersen’s correlation

Barotropic compressibility models barotropicCompressibilityModels


linear

Linear compressibility model

Chung

Chung compressibility model

Wallis

Wallis compressibility model

Thermophysical properties of gaseous species specie


adiabaticPerfectFluid

Adiabatic perfect gas equation of state

icoPolynomial

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

perfectFluid

Perfect gas equation of state

incompressiblePerfectGas

Incompressible gas equation of state using a constant reference pressure. Density only varies with temperature and composition

rhoConst

Constant density 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

hExponentialThermo

Exponential properties thermodynamics package templated into the equationOfState

SLGThermo

Thermodynamic package for solids, liquids and gases

solidChemistryModel

Thermodynamic model of solid chemsitry including pyrolysis

solidProperties

Thermophysical properties of solids

solidMixtureProperties

Thermophysical properties of solid mixtures

solidSpecie

Solid reaction rates and transport models

solidThermo

Solid energy modelling

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

kkLOmega

Low Reynolds-number k-kl-omega turbulence model for incompressible flows

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

v2f

Lien and Kalitzin’s v2-f turbulence model for incompressible flows

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

v2f

Lien and Kalitzin’s v2-f turbulence model for incompressible flows

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

homogenousDynSmagorinsky

Homogeneous dynamic Smagorinsky model

dynLagrangian

Lagrangian two equation eddy-viscosity model

scaleSimilarity

Scale similarity model

mixedSmagorinsky

Mixed Smagorinsky/scale similarity model

homogenousDynOneEqEddy

One Equation Eddy Viscosity Model for incompressible flows

laminar

Simply returns laminar properties

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

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

vanDriestDelta

Simple cube-root of cell volume delta used in incompressible LES models

Compressible LES turbulence models compressibleLESModels


Smagorinsky

Smagorinsky model

oneEqEddy

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

lowReOneEqEddy

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

homogenousDynOneEqEddy

One Equation Eddy Viscosity Model for incompressible flows

DeardorffDiffStress

Deardorff differential stress model

SpalartAllmaras

Spalart-Allmaras 1-eqn mixing-length model

vanDriestDelta

Simple cube-root of cell volume delta used in incompressible LES models

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

twoPhaseProperties

Two phase 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 .