## TIPS & TRICKS: ESTIMATING THE FIRST CELL HEIGHT FOR CORRECT Y+

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&space;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+&space;=&space;\mathcal{O}(1)$
• Must use an appropriate low-Re number turbulence model (i.e. Shear Stress Transport)

• 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&space;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&space;=&space;\frac{\rho&space;\cdot&space;U&space;\cdot&space;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+&space;=&space;\frac{rho&space;\cdot&space;U_\tau&space;\cdot&space;\Delta&space;y_1}{\mu}&space;\verb+&space;+\rightarrow&space;\Delta&space;y_1&space;=&space;\frac{y+&space;\cdot&space;\mu}{\rho&space;\cdot&space;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&space;=&space;\sqrt{\frac{\tau_w}{\rho}}$

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

$\tau_w&space;=&space;\frac{1}{2}\cdot&space;C_f&space;\cdot&space;\rho&space;\cdot&space;U^2$

The ambiguity in calculating $\Delta&space;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 Flows $C_f&space;=&space;0.079&space;\cdot&space;Re^{-0.25}$ External Flows $C_f&space;=&space;0.058&space;\cdot&space;Re^{-0.2}$

We can then input these known values into the above equations to estimate our value for  $\Delta&space;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.

59 Đường Số 10, Khu Phố 5, Phường Hiệp Bình Chánh, Quận Thủ Đức, Tp.HCM

[email protected]

+84 766 667 247