Y Plus Calculator: User Guide
Choosing a turbulence model and target y+ value is just the first step. One of the main challenges in CFD is generating a mesh that satisfies the y+ condition near the wall. This User Guide helps you easily calculate the first-layer cell height, wall distance (y), based on your desired y+, so you can build a mesh that fits your wall treatment strategy. Besides of this user guide, you can read our blog paper What is y+ in CFD? for better understanding of this concept.
Figure 1- Wall distance (often called the first cell height)
Boundary Layer Approximation
A major breakthrough in fluid mechanics occurred in 1904 when Ludwig Prandtl (1875–1953) introduced the boundary layer approximation. Prandtl’s idea was to divide the flow into two regions: an outer flow region that is inviscid and/or irrotational, and an inner flow region called a boundary layer—a very thin region of flow near a solid wall where viscous forces and rotationality cannot be ignored (Fig.2).
Figure 2- Prandtl’s boundary layer concept splits the flow into an outer flow region and a thin boundary layer region (not to scale).
That is to say, the hypothetical line of u = 0.99V divides the flow over a plate into two regions: the boundary layer region, in which the viscous effects and the velocity changes are significant, and the irrotational flow region, in which the frictional effects are negligible and the velocity remains essentially constant (Fig.3).
Figure 3- Boundary layer thickness (δ) is the distance from the wall where the fluid velocity reaches 99% of the free-stream velocity V.
The Boundary Layer Approximation simplifies the complex behavior of fluid flow near solid surfaces by focusing on the thin region—called the boundary layer—where velocity changes rapidly from zero at the wall (due to the no-slip condition) to the free-stream value. As flow moves over a surface like a flat plate, the boundary layer grows in thickness, and its characteristics are influenced by the Reynolds number (Fig.4).
Figure 4- The development of the boundary layer for flow over a flat plate
To model turbulent flow near walls effectively, especially in CFD, boundary layer approximations like wall functions and y+ based methods are used to estimate shear stress and velocity gradients without fully resolving all details.
Turbulent boundary layer
The boundary layer is generally divided into three main subregions: Laminar boundary layer, Transition region, and Turbulent boundary layer (Fig.5). At the leading edge, the boundary layer thickness starts from zero and grows progressively along the surface.
Figure 5- The different flow regimes for flow over a flat plate
Initially, where the layer is thin and the flow is smooth and orderly, it is referred to as the laminar boundary layer. This region persists only as long as the flow remains laminar. Beyond this, due to increasing disturbances and fluid retardation, the flow becomes unstable, eventually transitioning into chaotic motion known as the turbulent boundary layer. The area where this shift from laminar to turbulent flow takes place is called the transition region.
Typical velocity profiles for fully developed laminar and turbulent flows are given in Fig. 5. Note that the velocity profile is parabolic in laminar flow but is much fuller in turbulent flow, with a sharp drop near the pipe wall. Turbulent flow along a wall can be considered to consist of four regions, characterized by the distance from the wall (Fig. 6).
Figure 6- The velocity profile in fully developed pipe flow is parabolic in laminar flow, but much fuller in turbulent flow.
The very thin layer next to the wall where viscous effects are dominant is the viscous (or laminar or linear or wall) sublayer. The velocity profile in this layer is very nearly linear, and the flow is streamlined. Next to the viscous sublayer is the buffer layer, in which turbulent effects are becoming significant, but the flow is still dominated by viscous effects. Above the buffer layer is the overlap (or transition) layer, also called the inertial sublayer, in which the turbulent effects are much more significant, but still not dominant. Above that is the outer (or turbulent) layer in the remaining part of the flow in which turbulent effects dominate over molecular diffusion (viscous) effects.
The y⁺ wall thickness, also known as the wall functions approach or near-wall modeling strategy, is mainly employed to estimate the behavior of fluid particles close to the wall in a turbulent boundary layer. It should be noted that this method approximates the solution by calculating the shear stress along the wall surface.
Y+ Wall Functions Approach
Due to the steep velocity gradients near the wall in turbulent boundary layers (Fig.7), capturing near-wall behavior accurately in CFD requires special treatment.
Figure 7- The velocity gradients at the wall, and thus the wall shear stress, are much larger for turbulent flow than they are for laminar flow, even though the turbulent boundary layer is thicker than the laminar one for the same value of free-stream velocity.
As mentioned earlier, due to the steep velocity gradients near the wall, accurately simulating fluid behavior in the near-wall boundary layer requires special treatment. There are two main approaches (Fig.8):
- Using wall functions
- Applying a fine mesh near the wall.
Figure 8- Two CFD approaches for simulating fluid behavior in the near-wall boundary layer
Firstly, the wall function method avoids directly solving the inner viscous regions (such as the viscous sublayer and buffer layer) and instead uses semi-empirical relations to link the wall to the logarithmic region. The second approach involves creating a fine mesh near the wall to resolve all the sublayers of the boundary layer, including the viscous sublayer. This strategy ensures higher accuracy by fully resolving the velocity and turbulence gradients close to the wall without relying on empirical wall functions.
Why Should We Use the Wall Functions Approach?
The Wall Functions Approach is widely used in CFD because it offers a practical balance between accuracy and computational efficiency, especially in high Reynolds number flows. Near the wall, fluid velocity changes rapidly, requiring extremely fine mesh to fully resolve the boundary layer, particularly the viscous sublayer. This would result in a massive number of cells and high computational cost.
Wall functions avoid this by using empirical formulas to model the near-wall region instead of resolving it directly. This allows engineers to use coarser meshes near the wall, significantly reducing simulation time and memory usage. While not as detailed as low-Reynolds models, wall functions are highly effective for industrial applications where computational resources are limited but reasonably accurate results are still required.
Y Plus Formulation
Fig.9 presents the non-dimensional velocity profile in the near-wall region of a turbulent boundary layer using wall coordinates. The x-axis is y⁺ (non-dimensional wall-normal distance), and the y-axis is u⁺ (non-dimensional velocity). It highlights the different flow zones close to the wall in turbulent flows. The graph divides the boundary layer into key regions: the viscous sublayer (y⁺ < 5), where velocity increases linearly with distance from the wall (u⁺ = y⁺); the challenging layer, buffer layer, (5 < y⁺ < 30), where the flow transitions from laminar to turbulent behavior; and the log-law region (30 < y⁺ < 300), where velocity follows a logarithmic relationship: u⁺ = (1/0.41) ln (y⁺) + 5.15.
Figure 9- Experimental verification of the inner, outer, and overlap layer laws relating velocity profiles in turbulent wall flow.
Note from the figure that the logarithmic-law velocity profile (u⁺ = (1/0.41) ln (y⁺) + 5.15) is quite accurate for 30 < y⁺ < 300. For y⁺ < 5, the linear law u⁺ = y⁺ also offers very high accuracy in the viscous sublayer. However, neither mentioned velocity profile are accurate in the buffer layer, i.e., the region 5 < y⁺ < 30. Around y⁺=11.225, there are two scenarios: below 11.225 u⁺ = y⁺ and upper that u⁺ = (1/0.41) ln (9.8*y⁺) gives only normal accuracy due to the transitional nature of this zone (Fig.10).
Figure 10- Accuracy of velocity profile approximations across y⁺ regions in a turbulent boundary layer
Y Plus Calculator
The viscous sublayer is usually extremely thin, making it difficult to capture accurately with mesh resolution. As a result, the y+ wall function approach is commonly applied. But what exactly is y+? — It is a dimensionless parameter that represents the distance from the wall and is essential for applying wall function models. The equation used to calculate y+ is:
y+ = (y × ρ × Uτ) / μ
It should be noted that the wall distance, y, (often called the first cell height) is the distance between the wall surface and the center of the first mesh cell (Fig.11) adjacent to the wall in a CFD model.
Figure 11- Wall distance is the distance between the wall surface and the center of the first mesh cell.
On the other hand, you must first choose or estimate y⁺ in order to back-calculate the proper wall distance (y). CFD tools often provide y⁺ estimates after a preliminary run, allowing you to refine your mesh if needed.
The Fig.12 shows a flowchart of the calculation process for determining the wall distance y. It starts with the input parameters: Freestream velocity U (m/s), Density of fluid ρ (kg/m3), Dynamic viscosity μ (kg/ms), characteristic length L or hydraulic diameter Dh (m), and dimensionless wall distance y+.
Then, depending the types of fluid flow (external or internal) the Reynolds number (Re) is calculated, and after that using Re, the skin friction coefficient (Cf) is determined via an empirical formula valid for Re <109. Next, the wall shear stress τw (N/m2) is computed, followed by the friction velocity Uτ (m/s). Finally, the wall distance y (m) is obtained. This systematic approach is commonly applied in computational fluid dynamics (CFD) for boundary layer analysis.
Figure 12- How to calculate wall distance?
It is worth mentioning that the skin friction coefficient is an essential factor in determining the wall distance, particularly because numerous approximation formulas have been proposed by different researchers over time, starting with Prandtl. These empirical correlations estimate the local skin friction coefficient based on the Reynolds number. Below is a summary of the most well-known formulas used in CFD tools and calculators (Fig.13):
Figure 13- Common skin friction coefficient approximation
Y Plus Setting in ANSYS Fluent
Fig.14 outlines the relationship between turbulence models in ANSYS Fluent and their corresponding near-wall treatment approaches based on Y⁺ values. It categorizes turbulence models like k-epsilon, and Reynolds Stress as suitable for the Wall Function Approach, which includes Standard (30 < Y⁺ < 300), Non-equilibrium (30 < Y⁺ < 300), Scalable (Y⁺ > 11.225), and Enhanced Wall Treatment (Y⁺ < 5). Meanwhile, models like Spalart-Allmaras, SST, SAS, and DES often require fine mesh near walls, recommending Y⁺ ≈ 1 to resolve the viscous sublayer directly. This guidance helps users select the correct mesh resolution and wall model strategy for accurate turbulence simulation.
Figure 14- Turbulence models in ANSYS Fluent and the appropriate near-wall treatment methods associated with different Y⁺ value ranges
Which Wall Function in ANSYS Fluent Should You Choose?
In ANSYS Fluent, choosing the right wall function depends on both the nature of the flow and the mesh resolution near the wall. For high Reynolds number flows where resolving the viscous sublayer with a fine mesh is not feasible, Standard Wall Functions (for simple boundary layers) or Non-equilibrium Wall Functions (for more complex flows with separation, reattachment, or pressure gradients) are commonly used. These methods work well when the first cell center from the wall lies in the log-law region, typically with y⁺ values between 30 and 300.
However, when accurate modeling of the near-wall region is critical—such as in low Reynolds number flows, flows with separation and reattachment, swirling flows, or heat transfer problems—Enhanced Wall Treatment (EWT) is preferred. EWT blends the use of wall functions and low-Re number modeling, and it requires a much finer mesh near the wall with y⁺ less than 5. Additionally, Scalable Wall Functions are designed to prevent mesh dependency by ensuring that y⁺ is always greater than a minimum threshold (usually 11.225), making them more robust for poor-quality or unrefined meshes. For high-fidelity simulations such as LES or DNS, where resolving the viscous sublayer is essential, no wall function is used, and y⁺ ≈ 1 must be targeted. Therefore, the choice of wall function should balance between accuracy needs, computational cost, and mesh quality.
What value of y⁺ should I aim for?
Recommendations:
- Always avoid placing y⁺ in the buffer layer (5 < y⁺ < 30), as the blending/switching behavior is inaccurate.
- The wall functions (y⁺ > 30) are likely to be inaccurate with strong favorable/adverse pressure gradients, separation, and curvature.
- The onset of the transition to the buffer region at y⁺ ≈ 5 is also uncertain under these conditions.
- Hence, the conventional wisdom is to have y⁺ ≈ 1 if possible.
- The best approach is always to run a 2D check or to compare against experiments (where possible).
- The optimal y⁺ range of 30–300 is ideal for standard wall functions because it places the first cell within the log-law region, ensuring accurate wall shear stress prediction without needing a very fine mesh near the wall.
Y Plus
Y Plus Calculator: User Guide
Choosing a turbulence model and target y+ value is just the first step. One of the main challenges in CFD is generating a mesh that satisfies the y+ condition near the wall. This User Guide helps you easily calculate the first-layer cell height, wall distance (y), based on your desired y+, so you can build a mesh that fits your wall treatment strategy. Besides of this user guide, you can read our blog paper What is y+ in CFD? for better understanding of this concept.
Figure 1- Wall distance (often called the first cell height)
Boundary Layer Approximation
A major breakthrough in fluid mechanics occurred in 1904 when Ludwig Prandtl (1875–1953) introduced the boundary layer approximation. Prandtl’s idea was to divide the flow into two regions: an outer flow region that is inviscid and/or irrotational, and an inner flow region called a boundary layer—a very thin region of flow near a solid wall where viscous forces and rotationality cannot be ignored (Fig.2).
Figure 2- Prandtl’s boundary layer concept splits the flow into an outer flow region and a thin boundary layer region (not to scale).
That is to say, the hypothetical line of u = 0.99V divides the flow over a plate into two regions: the boundary layer region, in which the viscous effects and the velocity changes are significant, and the irrotational flow region, in which the frictional effects are negligible and the velocity remains essentially constant (Fig.3).
Figure 3- Boundary layer thickness (δ) is the distance from the wall where the fluid velocity reaches 99% of the free-stream velocity V.
The Boundary Layer Approximation simplifies the complex behavior of fluid flow near solid surfaces by focusing on the thin region—called the boundary layer—where velocity changes rapidly from zero at the wall (due to the no-slip condition) to the free-stream value. As flow moves over a surface like a flat plate, the boundary layer grows in thickness, and its characteristics are influenced by the Reynolds number (Fig.4).
Figure 4- The development of the boundary layer for flow over a flat plate
To model turbulent flow near walls effectively, especially in CFD, boundary layer approximations like wall functions and y+ based methods are used to estimate shear stress and velocity gradients without fully resolving all details.
Turbulent boundary layer
The boundary layer is generally divided into three main subregions: Laminar boundary layer, Transition region, and Turbulent boundary layer (Fig.5). At the leading edge, the boundary layer thickness starts from zero and grows progressively along the surface.
Figure 5- The different flow regimes for flow over a flat plate
Initially, where the layer is thin and the flow is smooth and orderly, it is referred to as the laminar boundary layer. This region persists only as long as the flow remains laminar. Beyond this, due to increasing disturbances and fluid retardation, the flow becomes unstable, eventually transitioning into chaotic motion known as the turbulent boundary layer. The area where this shift from laminar to turbulent flow takes place is called the transition region.
Typical velocity profiles for fully developed laminar and turbulent flows are given in Fig. 5. Note that the velocity profile is parabolic in laminar flow but is much fuller in turbulent flow, with a sharp drop near the pipe wall. Turbulent flow along a wall can be considered to consist of four regions, characterized by the distance from the wall (Fig. 6).
Figure 6- The velocity profile in fully developed pipe flow is parabolic in laminar flow, but much fuller in turbulent flow.
The very thin layer next to the wall where viscous effects are dominant is the viscous (or laminar or linear or wall) sublayer. The velocity profile in this layer is very nearly linear, and the flow is streamlined. Next to the viscous sublayer is the buffer layer, in which turbulent effects are becoming significant, but the flow is still dominated by viscous effects. Above the buffer layer is the overlap (or transition) layer, also called the inertial sublayer, in which the turbulent effects are much more significant, but still not dominant. Above that is the outer (or turbulent) layer in the remaining part of the flow in which turbulent effects dominate over molecular diffusion (viscous) effects.
The y⁺ wall thickness, also known as the wall functions approach or near-wall modeling strategy, is mainly employed to estimate the behavior of fluid particles close to the wall in a turbulent boundary layer. It should be noted that this method approximates the solution by calculating the shear stress along the wall surface.
Y+ Wall Functions Approach
Due to the steep velocity gradients near the wall in turbulent boundary layers (Fig.7), capturing near-wall behavior accurately in CFD requires special treatment.
Figure 7- The velocity gradients at the wall, and thus the wall shear stress, are much larger for turbulent flow than they are for laminar flow, even though the turbulent boundary layer is thicker than the laminar one for the same value of free-stream velocity.
As mentioned earlier, due to the steep velocity gradients near the wall, accurately simulating fluid behavior in the near-wall boundary layer requires special treatment. There are two main approaches (Fig.8):
- Using wall functions
- Applying a fine mesh near the wall.
Figure 8- Two CFD approaches for simulating fluid behavior in the near-wall boundary layer
Firstly, the wall function method avoids directly solving the inner viscous regions (such as the viscous sublayer and buffer layer) and instead uses semi-empirical relations to link the wall to the logarithmic region. The second approach involves creating a fine mesh near the wall to resolve all the sublayers of the boundary layer, including the viscous sublayer. This strategy ensures higher accuracy by fully resolving the velocity and turbulence gradients close to the wall without relying on empirical wall functions.
Why Should We Use the Wall Functions Approach?
The Wall Functions Approach is widely used in CFD because it offers a practical balance between accuracy and computational efficiency, especially in high Reynolds number flows. Near the wall, fluid velocity changes rapidly, requiring extremely fine mesh to fully resolve the boundary layer, particularly the viscous sublayer. This would result in a massive number of cells and high computational cost.
Wall functions avoid this by using empirical formulas to model the near-wall region instead of resolving it directly. This allows engineers to use coarser meshes near the wall, significantly reducing simulation time and memory usage. While not as detailed as low-Reynolds models, wall functions are highly effective for industrial applications where computational resources are limited but reasonably accurate results are still required.
Y Plus Formulation
Fig.9 presents the non-dimensional velocity profile in the near-wall region of a turbulent boundary layer using wall coordinates. The x-axis is y⁺ (non-dimensional wall-normal distance), and the y-axis is u⁺ (non-dimensional velocity). It highlights the different flow zones close to the wall in turbulent flows. The graph divides the boundary layer into key regions: the viscous sublayer (y⁺ < 5), where velocity increases linearly with distance from the wall (u⁺ = y⁺); the challenging layer, buffer layer, (5 < y⁺ < 30), where the flow transitions from laminar to turbulent behavior; and the log-law region (30 < y⁺ < 300), where velocity follows a logarithmic relationship: u⁺ = (1/0.41) ln (y⁺) + 5.15.
Figure 9- Experimental verification of the inner, outer, and overlap layer laws relating velocity profiles in turbulent wall flow.
Note from the figure that the logarithmic-law velocity profile (u⁺ = (1/0.41) ln (y⁺) + 5.15) is quite accurate for 30 < y⁺ < 300. For y⁺ < 5, the linear law u⁺ = y⁺ also offers very high accuracy in the viscous sublayer. However, neither mentioned velocity profile are accurate in the buffer layer, i.e., the region 5 < y⁺ < 30. Around y⁺=11.225, there are two scenarios: below 11.225 u⁺ = y⁺ and upper that u⁺ = (1/0.41) ln (9.8*y⁺) gives only normal accuracy due to the transitional nature of this zone (Fig.10).
Figure 10- Accuracy of velocity profile approximations across y⁺ regions in a turbulent boundary layer
Y Plus Calculator
The viscous sublayer is usually extremely thin, making it difficult to capture accurately with mesh resolution. As a result, the y+ wall function approach is commonly applied. But what exactly is y+? — It is a dimensionless parameter that represents the distance from the wall and is essential for applying wall function models. The equation used to calculate y+ is:
y+ = (y × ρ × Uτ) / μ
It should be noted that the wall distance, y, (often called the first cell height) is the distance between the wall surface and the center of the first mesh cell (Fig.11) adjacent to the wall in a CFD model.
Figure 11- Wall distance is the distance between the wall surface and the center of the first mesh cell.
On the other hand, you must first choose or estimate y⁺ in order to back-calculate the proper wall distance (y). CFD tools often provide y⁺ estimates after a preliminary run, allowing you to refine your mesh if needed.
The Fig.12 shows a flowchart of the calculation process for determining the wall distance y. It starts with the input parameters: Freestream velocity U (m/s), Density of fluid ρ (kg/m3), Dynamic viscosity μ (kg/ms), characteristic length L or hydraulic diameter Dh (m), and dimensionless wall distance y+.
Then, depending the types of fluid flow (external or internal) the Reynolds number (Re) is calculated, and after that using Re, the skin friction coefficient (Cf) is determined via an empirical formula valid for Re <109. Next, the wall shear stress τw (N/m2) is computed, followed by the friction velocity Uτ (m/s). Finally, the wall distance y (m) is obtained. This systematic approach is commonly applied in computational fluid dynamics (CFD) for boundary layer analysis.
Figure 12- How to calculate wall distance?
It is worth mentioning that the skin friction coefficient is an essential factor in determining the wall distance, particularly because numerous approximation formulas have been proposed by different researchers over time, starting with Prandtl. These empirical correlations estimate the local skin friction coefficient based on the Reynolds number. Below is a summary of the most well-known formulas used in CFD tools and calculators (Fig.13):
Figure 13- Common skin friction coefficient approximation
Y Plus Setting in ANSYS Fluent
Fig.14 outlines the relationship between turbulence models in ANSYS Fluent and their corresponding near-wall treatment approaches based on Y⁺ values. It categorizes turbulence models like k-epsilon, and Reynolds Stress as suitable for the Wall Function Approach, which includes Standard (30 < Y⁺ < 300), Non-equilibrium (30 < Y⁺ < 300), Scalable (Y⁺ > 11.225), and Enhanced Wall Treatment (Y⁺ < 5). Meanwhile, models like Spalart-Allmaras, SST, SAS, and DES often require fine mesh near walls, recommending Y⁺ ≈ 1 to resolve the viscous sublayer directly. This guidance helps users select the correct mesh resolution and wall model strategy for accurate turbulence simulation.
Figure 14- Turbulence models in ANSYS Fluent and the appropriate near-wall treatment methods associated with different Y⁺ value ranges
Which Wall Function in ANSYS Fluent Should You Choose?
In ANSYS Fluent, choosing the right wall function depends on both the nature of the flow and the mesh resolution near the wall. For high Reynolds number flows where resolving the viscous sublayer with a fine mesh is not feasible, Standard Wall Functions (for simple boundary layers) or Non-equilibrium Wall Functions (for more complex flows with separation, reattachment, or pressure gradients) are commonly used. These methods work well when the first cell center from the wall lies in the log-law region, typically with y⁺ values between 30 and 300.
However, when accurate modeling of the near-wall region is critical—such as in low Reynolds number flows, flows with separation and reattachment, swirling flows, or heat transfer problems—Enhanced Wall Treatment (EWT) is preferred. EWT blends the use of wall functions and low-Re number modeling, and it requires a much finer mesh near the wall with y⁺ less than 5. Additionally, Scalable Wall Functions are designed to prevent mesh dependency by ensuring that y⁺ is always greater than a minimum threshold (usually 11.225), making them more robust for poor-quality or unrefined meshes. For high-fidelity simulations such as LES or DNS, where resolving the viscous sublayer is essential, no wall function is used, and y⁺ ≈ 1 must be targeted. Therefore, the choice of wall function should balance between accuracy needs, computational cost, and mesh quality.
What value of y⁺ should I aim for?
Recommendations:
- Always avoid placing y⁺ in the buffer layer (5 < y⁺ < 30), as the blending/switching behavior is inaccurate.
- The wall functions (y⁺ > 30) are likely to be inaccurate with strong favorable/adverse pressure gradients, separation, and curvature.
- The onset of the transition to the buffer region at y⁺ ≈ 5 is also uncertain under these conditions.
- Hence, the conventional wisdom is to have y⁺ ≈ 1 if possible.
- The best approach is always to run a 2D check or to compare against experiments (where possible).
- The optimal y⁺ range of 30–300 is ideal for standard wall functions because it places the first cell within the log-law region, ensuring accurate wall shear stress prediction without needing a very fine mesh near the wall.