Skip to main content

nutUSpaldingWallFunction

Description

The nutUSpaldingWallFunction is boundary condition that provides a wall function for the turbulent viscosity (i.e. nut) based on velocity (i.e. U). Using Spalding's law gives a continuous nut profile to the wall.

y+=u++1E[exp(κu+)1κu+0.5(κu+)216(κu+)3] y^+ = u^+ + \frac{1}{E} \left[exp(\kappa u^+) - 1 - \kappa u^+\, - 0.5 (\kappa u^+)^2 - \frac{1}{6} (\kappa u^+)^3\right]

where:

PropertyDescription
y+y^+Wall-normal height of a cell centre in wall units
u+u^+Velocity at \fy+fy^+\f in wall units
κ\kappavon Karman constant

Usage

The condition requires entries in both the boundary and field files.

Boundary file

<patchName>
{
type wall;
...
}

Field file

<patchName>
{
// Mandatory entries
type nutUSpaldingWallFunction;

// Optional entries
maxIter <label>;
tolerance <scalar>;

// Inherited entries
...
}

where:

PropertyDescriptionTypeRequiredDefault
typeType name: nutUSpaldingWallFunctionwordyes-
maxIterNumber of Newton-Raphson iterationslabelno10
toleranceConvergence tolerancescalarno0.0001

The inherited entries are elaborated in:

  • nutWallFunctionFvPatchScalarField.H
  • Suffers from non-exact restart since correctNut() (called through turbulence->validate) returns a slightly different value every time it is called. This is since the seed for the Newton-Raphson iteration uses the current value of *this (\c =nut ).
  • This can be avoided by overriding the tolerance. This also switches on a pre-detection whether the current nut already satisfies the turbulence conditions and if so does not change it at all. This means that the nut only changes if it 'has really changed'. This probably should be used with a tight tolerance, to make sure to kick every iteration, e.g.
maxIter 100;
tolerance 1e-7;

Further information

Tutorial:

Source code:

API:

History: Introduced in version 2.4.0