# OpenFOAM guide/Programmer's Guide Errata

Community created Errata for the OpenFOAM Programmer's Guide:

• Online version: OpenFOAM Programmer's Guide at SF.net
• The local version in your installation can be found by running one of the respective commands:
• On OpenFOAM 3.0 and older, as well as foam-extend and all OpenFOAM+ versions:
echo \$WM_PROJECT_DIR/doc/Guides-a4/ProgrammersGuide.pdf
• As of OpenFOAM 4, there is no Programmer's Guide. This is now maintained by the OpenFOAM+ project.

Notes to contributors: Please include the chapter number of the printed version to avoid confusion (the Wiki might give different chapter numbers)

# 1 Chapter 1: Tensor mathematics

## 1.1 Section 1.2: Tensors

As reported in the bug report #1068, there are a couple of references to OpenFOAM 1.x, which is likely an old reference to the original FOAM 2.x version. Feel free to compare to the old documentation at Nabla: the old Programmer's Guide, section 1.2 Tensors.

Either way, feel free to disregard the 1.x reference, since its objective is reflect that tensors as a mathematical entity, are only partially implemented in OpenFOAM.

## 1.2 Section 1.4: OpenFOAM tensor classes

### 1.2.1 Subsection 1.4.1: Algebraic tensor operations in OpenFOAM

In Table 1.2: Algebraic tensor operations in OpenFOAM, the following entries need fixing:

Operation Description in OpenFOAM
(wrong)
Description in OpenFOAM
(correct)
Component maximum max(a) cmptMax(a)
Component minimum min(a) cmptMin(a)
Scale scale(a,b) cmptMultiply(a,b)

# 2 Chapter 2: Discretisation procedures

## 2.1 Section 2.1: Differential operators

### 2.1.1 Subsection 2.1.2: Divergence

(Note: Already fixed in )

The documented divergence operator for tensors is incorrect: $\nabla \bullet T = \partial_i T_{ij}=\left( \begin{matrix} \frac{\partial T_{11}}{\partial x_1} + \frac{\partial T_{12}}{\partial x_1} + \frac{\partial T_{13}}{\partial x_1}\\ \frac{\partial T_{21}}{\partial x_2} + \frac{\partial T_{22}}{\partial x_2} + \frac{\partial T_{23}}{\partial x_2}\\ \frac{\partial T_{31}}{\partial x_3} + \frac{\partial T_{32}}{\partial x_3} + \frac{\partial T_{33}}{\partial x_3} \end{matrix} \right)$

It should be: $\nabla \bullet T = \left( \begin{matrix} \frac{\partial }{\partial x_1}, & \frac{\partial }{\partial x_2}, & \frac{\partial}{\partial x_3} \end{matrix} \right) \bullet \left( \begin{matrix} T_{11} & T_{12} & T_{13} \\ T_{21} & T_{22} & T_{33} \\ T_{31} & T_{32} & T_{33} \\ \end{matrix} \right) =\partial_j T_{ji}=\left( \begin{matrix} \frac{\partial T_{11}}{\partial x_1} + \frac{\partial T_{21}}{\partial x_2} + \frac{\partial T_{31}}{\partial x_3}\\ \frac{\partial T_{12}}{\partial x_1} + \frac{\partial T_{22}}{\partial x_2} + \frac{\partial T_{33}}{\partial x_3}\\ \frac{\partial T_{13}}{\partial x_1} + \frac{\partial T_{32}}{\partial x_2} + \frac{\partial T_{33}}{\partial x_3} \end{matrix} \right)$

## 2.2 Section 2.4: Equation discretisation

• All references to timeScheme should be either gradSchemes or snGradSchemes .
• The indication of [Check**] implies that this subsection needs to be revised.

### 2.2.2 Subsection 2.6.1: Physical boundary conditions

• The indication of [Check**] implies that this subsection needs to be revised.

# 5 Known forum threads on this topic

This is a unordered list of links to threads about typos and errors in the Programmer's Guide that have been found by the community: