7.5 Wall functions
CFD simulations may be used to calculate the forces on solid bodies exerted by the ﬂuid, e.g. in aerodynamics. The wall shear stress is then calculated according to . With turbulent boundary layers, the calculation requires cells with very small lengths normal to the wall to be accurate. The resulting mesh is inevitably large, which carries a high computational cost. The problem for CFD is how to calculate with suﬃcient accuracy, but at an aﬀordable cost.
Wall functions provide a solution to this problem by exploiting the universal character of the velocity distribution described in Sec. 7.4 . They use the law of the wall Eq. (7.13 ) as a model to provide a reasonable prediction of from a relatively inaccurate calculation at the wall.
Wall functions use the nearwall cell centre height , i.e. the distance to the wall from the centre P of each nearwall cell. Typically when using wall functions, should correspond to a within the typical range of applicability of the log law Eq. (7.13 ), i.e. .
With such a mesh, the calculated is then signiﬁcantly lower than its true value. Wall function models compensate for the resulting error in the prediction of by increasing viscosity at the wall. The increase is applied to at the wall patch faces, which would otherwise be , corresponding to .
Standard wall function
The standard wall function for a “smooth” wall calculates for each patch face based on the nearwall . No adjustment is made to when corresponds to the viscous sublayer. When corresponds to the inertial sublayer, is calculated by

(7.17) 

(7.18) 

(7.19) 
The wall function Eq. (7.17) is derived from the notion that is calculated numerically (assuming a stationary wall) by:

(7.20) 

(7.21) 