Standard libraries

A.3 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. The library source code is typically located in the $FOAM_SRC directory, easily reached by typing src in the command line. Other libraries devoted to specific physical models for specific solvers may be located separately with the solver source code. For ease of presentation, the libraries are separated into two types:

General libraries
those that provide general classes and associated functions listed in Table A.3;
Model libraries
those that specify models used in computational continuum mechanics, listed in Table A.4, Table A.5 and Table A.6.

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


sampling

Tools for sampling point, line and surface field data

fieldFunctionObjects

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

forces

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

runTimePostProcessing

Image generation and manipulation using function objects

lagrangianFunctionObjects

Lagrangian cloud-based function objects

solverFunctionObjects

Solver-based function objects, e.g. adding scalar transport

utilityFunctionObjects

Utility function objects

Solution and mesh manipulation libraries


snappyMesh

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


basic

Basic Lagrangian, or particle-tracking, solution scheme

coalCombustion

Coal dust combustion modelling

distributionModels

Particle distribution function modelling

dsmc

Direct simulation Monte Carlo method modelling

intermediate

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

molecule

Molecule classes for molecular dynamics

molecularMeasurements

For making measurements in molecular dynamics

potential

Intermolecular potentials for molecular dynamics

solidParticle

Solid particle implementation

spray

Liquid spray and injection modelling

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 A.3: Shared object libraries for general use.

Basic thermophysical models basicThermophysicalModels


hePsiThermo

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

heRhoThermo

General thermophysical model calculation based on enthalpy h  \relax \special {t4ht= or internal energy e  \relax \special {t4ht=, and density ρ  \relax \special {t4ht=

pureMixture

General thermophysical model calculation for passive gas mixtures

Reaction models reactionThermophysicalModels


hePsiMixtureThermo

Calculates enthalpy for combustion mixture based on enthalpy h  \relax \special {t4ht= or internal energy e  \relax \special {t4ht=, and ψ  \relax \special {t4ht=

heRhoMixtureThermo

Calculates enthalpy for combustion mixture based on enthalpy h  \relax \special {t4ht= or internal energy e  \relax \special {t4ht=, and ρ  \relax \special {t4ht=

heheuMixtureThermo

Calculates enthalpy h  \relax \special {t4ht= or internal energy e  \relax \special {t4ht= for unburnt u  \relax \special {t4ht= 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


fvDOM

Finite volume discrete ordinate method

P1

P1 model

solarLoad

Solar load radiation model

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 c
 p  \relax \special {t4ht= model with evaluation of enthalpy h  \relax \special {t4ht= and entropy s  \relax \special {t4ht=

hPolynomialThermo

cp  \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 A.4: Libraries of thermophysical models.

RAS turbulence models RASModels


laminar

Dummy turbulence model for laminar flow

kEpsilon

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

kOmega

k - ω  \relax \special {t4ht= model

kOmegaSST

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

kOmegaSSTLM

Langtry-Menter 4-equation transitional SST model

kOmegaSSTSAS

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

LaunderSharmaKE

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

LRR

Launder-Reece-Rodi RSTM

realizableKE

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

RNGkEpsilon

RN  G - k - ε  \relax \special {t4ht= model

SpalartAllmaras

Spalart-Allmaras 1-eqn mixing-length model

SSG

Speziale, Sarkar and Gatski Reynolds-stress model

v2f

v2 - f  \relax \special {t4ht= 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

LES turbulence models LESModels


DeardorffDiffStress

Differential SGS Stress model

dynamicKEqn

Dynamic one equation eddy-viscosity

dynamicLagrangian

Dynamic SGS model with Lagrangian averaging

kEqn

One equation eddy-viscosity model

Smagorinsky

Smagorinsky SGS model

WALE

Wall-adapting local eddy-viscosity (WALE) model

DES turbulence models DESModels


kOmegaSSTDES

k - omega  - SST  \relax \special {t4ht= delayed eddy simulation (DES) model

kOmegaSSTDDES

k - omega  - SST  \relax \special {t4ht= delayed detached eddy simulation (DDES) model

kOmegaSSTIDDES

k - omega  - SST  \relax \special {t4ht= improved delayed detached eddy simulation (DDES) model

SpalartAllmarasDES

Spalart-Allmaras delayed eddy simulation (DES) model

SpalartAllmarasDDES

Spalart-Allmaras delayed detached eddy simulation (DDES) model

SpalartAllmarasIDDES

Spalart-Allmaras improved delayed detached eddy simulation (DDES) model

Table A.5: Libraries of RAS, DES 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 A.6: Shared object libraries of transport models.