In previous posts we have stressed the importance of using an appropriate y+ value in combination with a given turbulence modelling approach. Today we will help you calculate the correct first cell height (\Delta y_1) based on your desired y+ value. This is an important first step as the global mesh resolution parameters will also be influenced by this near-wall mesh as well as the Reynolds number.

Let's review the two main choices we have in choosing a near-wall modelling strategy:

Resolving the Viscous Sublayer

  • Involves the full resolution of the boundary layer and is required where wall-bounded effects are of high priority (adverse pressure gradients, aerodynamic drag, pressure drop, heat transfer, etc.)
  • Wall adjacent grid height must be order y+ = \mathcal{O}(1)
  • Must use an appropriate low-Re number turbulence model (i.e. Shear Stress Transport)

Adopting a Wall Function Grid

  • Involves modelling the boundary layer using a log-law wall function. This approach is suitable for cases where wall-bounded effects are secondary, or the flow undergoes geometry-induced separation (such as many bluff bodies and in modern automotive vehicle design).
  • Wall adjacent grid height should ideally reside in the log-law region where y+>11
  • All turbulence models are applicable (e.g. Shear Stress Transport or k-epsilon with scalable wall functions)

During the pre-processing stage, we need to estimate the first cell height ( \Delta y_1) so that our y+ falls within the desired range. The computed flow-field will dictate the actual y+ value which in reality will vary along the wall.  In some cases, we may need to locally refine our mesh to achieve the desired y+ value in all regions.


So how to calculate the First Cell Height for a desired Y+ value?


Firstly, we should calculate the Reynolds number for our model based on the characteristic scales of our geometry such that:

Re = \frac{\rho \cdot U \cdot L}{\mu},

where \rho and \mu are the fluid density and viscosity respectively, U is the freestream velocity, and L is the characteristic length (e.g. pipe diameter, body length, etc.).

The definition of the y+ value is such that:

y+ = \frac{rho \cdot U_\tau \cdot \Delta y_1}{\mu} \verb+ +\rightarrow \Delta y_1 = \frac{y+ \cdot \mu}{\rho \cdot U_\tau}

The target y+ value and fluid properties are known a priori, so we need to calculate the frictional velocity U_\tau, which is defined as:

U_\tau = \sqrt{\frac{\tau_w}{\rho}}

The wall shear stress, \tau_w can be calculated from skin friction coefficient, C_f, such that:

\tau_w = \frac{1}{2}\cdot C_f \cdot \rho \cdot U^2

The ambiguity in calculating \Delta y_1 surrounds the value for C_f. Empirical results have been used to provide an estimate to this value:

 Flow Type  Empirical Estimate
Internal FlowsC_f = 0.079 \cdot Re^{-0.25}
External FlowsC_f = 0.058 \cdot Re^{-0.2}


We can then input these known values into the above equations to estimate our value for  \Delta y_1.

When considering simple flows and simple geometry, we might find this correlation is highly accurate.  However, when considering complex geometry, refinement in the boundary layer may be required to ensure the desired y+ value is achieved.  In these cases, you can choose to re-mesh in ANSYS Meshing or use anisotropic mesh adaption (ie. adaption of local cells only in the wall-normal direction) to achieve your desired Y+ value across the entire model.  Please leave a comment below or contact our support line if you have any questions.

For the lazy CFD-ers out there, we have written an applet for you to estimate the cell height quickly.