Y+ Calculator — First Cell Height and Wall Distance for CFD Meshing

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 y+ calculator helps you easily compute the first layer thickness (also known as the wall distance, y) based on your desired target. By acting as a complete boundary layer calculator, this tool allows you to build a mesh that perfectly fits your wall treatment strategy. Along with this tool, you can read our blog paper What is y+ in CFD? for a better understanding of the theory.

 

How the Calculator Works (The y+ Formula)

The viscous sublayer is extremely thin, making it difficult to capture accurately with mesh resolution. Because of this, you must determine your first cell height using the y+ formula. The standard y+ equation used to calculate this dimensionless parameter is:

y+ = (y × ρ × Uτ) / μ

The wall distance, y (often called the first cell height), is the physical distance between the wall surface and the center of the first mesh cell adjacent to the wall (Fig.1).

Y+ calculator

Figure 1: Wall distance is the distance between the wall surface and the center of the first mesh cell.

To use this wall y+ calculator, you must first choose your target y⁺ in order to back-calculate the proper wall distance (y). This y+ value calculator follows a strict, step-by-step process (Fig.2) based on five main input parameters:

  1. Freestream velocity, U (m/s)
  2. Density of fluid, ρ (kg/m³)
  3. Dynamic viscosity, μ (kg/m·s)
  4. Characteristic length, L, or hydraulic diameter, Dh (m)
  5. Target dimensionless wall distance, y+

First, depending on the type of fluid flow (external or internal), the tool calculates the Reynolds number (Re). Then, using Re, the skin friction coefficient (Cf) is determined via an empirical formula. Next, the wall shear stress (τw) is computed, followed by the friction velocity (Uτ). Finally, the wall distance (y) is obtained so you can begin meshing.

Y+ calculator

Figure 2- How to calculate wall distance?

 

Step 1: Choose Your Target y⁺

Before you can calculate your first cell height, you must know your target. If you are wondering how to calculate y+ in fluent before generating your mesh, the required value depends entirely on your chosen turbulence model and wall treatment strategy (Fig.3).

Use these quick recommendations to select the correct target y⁺ for the calculator:

  • Target y⁺ ≈ 1 (Resolve the Viscous Sublayer): Required for models like Spalart-Allmaras, SST, SAS, and DES. This requires a very fine mesh near the wall. It is also the safest conventional wisdom for complex flows with separation or strong pressure gradients.
  • Target 30 < y⁺ < 300 (Wall Functions): The optimal range for the Standard Wall Function approach (often used with k-epsilon or Reynolds Stress models). It places the first cell in the log-law region, saving computational cost without requiring a massive mesh.
  • Avoid 5 < y⁺ < 30: Always avoid placing your target y⁺ in the buffer layer, as the mathematical blending behavior in this region is inaccurate.

Y+ calculator

Figure 3- Turbulence models in ANSYS Fluent and the appropriate near-wall treatment methods associated with different Y⁺ value ranges

Worked Example: Calculating First Cell Height

To show how this tool works, let’s calculate the required first layer thickness for a standard CFD problem.

The Scenario: We are simulating air flowing over a 1-meter flat plate at 10 m/s. We plan to use the k-ω SST turbulence model, so we need to resolve the viscous sublayer directly. This means our target y⁺ is 1.

  • Fluid: Air
  • Density (ρ): 1.204 kg/m³
  • Dynamic Viscosity (μ): 1.825×10−5 kg/m·s
  • Velocity (U): 10 m/s
  • Characteristic Length (L): 1 m
  • Target y⁺: 1

The Calculation Process:

  1. Reynolds Number (Re): Re=(ρ×U×L)/μ Re=(1.204×10×1)/(1.825×10−5)=659,726
  2. Skin Friction Coefficient (Cf): Using the turbulent empirical correlation for a flat plate: Cf=0.0592×Re−0.2 Cf=0.00383
  3. Wall Shear Stress (τw): τw=0.5×Cf×ρ×U2 τw=0.5×0.00383×1.204×100=0.2308 Pa
  4. Friction Velocity (): Uτ=τw/ρ Uτ=0.2308/1.204=0.4378 m/s
  5. Calculate Wall Distance (y): Finally, we rearrange the y+ formula to solve for the first cell height (y): y=(y+×μ)/(ρ×Uτ) y=(1×1.825×10−5)/(1.204×0.4378)=0.0000346 m

The Result: To achieve a target y⁺ of 1 for this simulation, your first layer thickness must be 0.0346 mm.

Now that you have your required wall distance, you can move to your meshing software to build the inflation layer (watch session 9 of our Free ANSYS Meshing Course). Later, once your simulation finishes running, you must remember how to check y+ after your run to ensure your mesh actually met the target.

Skin Friction Correlations

As seen in Step 2 of the worked example, the skin friction coefficient (Cf) is an essential factor in determining the exact wall distance. Over time, different researchers, starting with Prandtl, have proposed various mathematical approximations for this value.

These empirical correlations estimate the local skin friction coefficient based purely on the Reynolds number of the flow. Depending on whether your flow is internal (like a pipe) or external (like an airfoil), your CFD tool or calculator will use a specific formula. Below is a summary of the most well-known skin friction formulas used in modern CFD calculators:

Y+ calculator

Figure 4- Common skin friction coefficient approximation

 

Boundary Layer and Wall Function Theory

When generating a mesh, these calculations are necessary because of the boundary layer. When the Reynolds number is large, fluid flow is divided into two regions: an outer inviscid flow, and a thin inner region called the boundary layer, where viscous forces dominate due to the no-slip condition (Fig.5 & Fig.6). As fluid moves over a surface, this layer grows and its characteristics change (Fig.7).

Y+ calculator

Figure 5- Prandtl’s boundary layer concept splits the flow into an outer flow region and a thin boundary layer region (not to scale). Adapted from Cengel & Cimbala, Fluid Mechanics: Fundamentals and Applications

Y+ calculator

Figure 6- Boundary layer thickness (δ) is the distance from the wall where the fluid velocity reaches 99% of the free-stream velocity V. Adapted from Cengel & Cimbala, Fluid Mechanics: Fundamentals and Applications

Y+ calculator

Figure 7- The development of the boundary layer for flow over a flat plate

Eventually, the smooth laminar flow transitions into a chaotic turbulent boundary layer (Fig.8 & Fig.9). A fully developed turbulent boundary layer consists of distinct subregions based on the distance from the wall. The very thin layer next to the wall where viscous effects dominate is the viscous sublayer. Because the viscous sublayer and log-law region experience extremely steep velocity gradients (Fig.10), we must use special computational techniques to model them.

Y+ calculator

Figure 8- The different flow regimes for flow over a flat plate

Y+ calculator

Figure 9- The velocity profile in fully developed pipe flow is parabolic in laminar flow, but much fuller in turbulent flow.

Y+ calculator

Figure 10- 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.

To handle these steep gradients without overloading the computer with a massive mesh, engineers use two main approaches (Fig.11): resolving the entire layer with a fine mesh, or using a wall function.

Wall functions CFD models avoid directly solving the inner viscous regions. Instead, they use semi-empirical relations to link the wall directly to the logarithmic region. This saves significant simulation time. For a deeper look into the physics of these sublayers, read our full theoretical guide linked above.

Y+ calculator

Figure 11- Two CFD approaches for simulating fluid behavior in the near-wall boundary layer

 

Y Plus Formulation (The u⁺–y⁺ Graph)

To understand the mathematical foundation of these zones, we look at the y+ graph (Fig.12). This chart presents the non-dimensional velocity profile in the near-wall region of a turbulent boundary layer. The x-axis is y⁺ (dimensionless wall distance), and the y-axis is u⁺ (dimensionless velocity).

The graph divides the boundary layer into three key mathematical regions:

  1. Viscous Sublayer (y⁺ < 5): Velocity increases linearly with distance from the wall (u⁺ = y⁺).
  2. Buffer Layer (5 < y⁺ < 30): The flow transitions from laminar to turbulent behavior.
  3. Log-Law Region (30 < y⁺ < 300): Velocity follows a logarithmic relationship defined by the y+ equationu⁺ = (1/0.41) ln(y⁺) + 5.15.

Y+ calculator

Figure 12- Experimental verification of the inner, outer, and overlap layer laws relating velocity profiles in turbulent wall flow.

It is important to note that the logarithmic-law velocity profile is quite accurate for 30 < y⁺ < 300. Similarly, the linear law (u⁺ = y⁺) offers very high accuracy in the viscous sublayer (y⁺ < 5).

However, neither of these mentioned velocity profiles is accurate in the buffer layer (5 < y⁺ < 30). Because of this transitional nature, CFD solvers use mathematical blending. Around y⁺ = 11.225, there are two scenarios (Fig.13): below 11.225, the software uses u⁺ = y⁺, and above it, the software uses u⁺ = (1/0.41) ln(9.8 × y⁺), which only provides normal accuracy in this specific zone.

Y+ calculator

Figure 13- Accuracy of velocity profile approximations across y⁺ regions in a turbulent boundary layer

Frequently Asked Questions (FAQ)

  • Q: How do I calculate the first layer thickness for my mesh? To calculate the first layer thickness, you must know your target y⁺ based on your turbulence model. You can then use a first layer thickness calculator to determine the Reynolds number, estimate the skin friction coefficient, compute the wall shear stress, and finally solve the y⁺ formula for the exact wall distance (y).
  • Q: What is the exact formula for y+? The standard mathematical y+ formula is y⁺ = (y × ρ × U_τ) / μ. In this equation, y is the absolute distance from the wall to the first cell center, ρ is the fluid density, U_τ is the friction velocity, and μ is the dynamic viscosity.
  • Q: Should I aim for y⁺ = 1 or y⁺ > 30? If you are using models like k-ω SST or Spalart-Allmaras, you must fully resolve the viscous sublayer and target y⁺ ≈ 1. If you are using standard k-epsilon and want to save computational power, you should use standard wall functions and place your first cell in the log-law region with a target between 30 and 300.

 

Conclusion

Properly calculating your wall distance is the foundation of an accurate CFD simulation. By understanding your chosen turbulence model and entering your fluid properties into our calculator above, you can confidently generate a mesh that captures the physics of the boundary layer without wasting computational resources.

However, if you are dealing with highly complex geometries, separated flows, or advanced aerodynamic modeling, meshing can become a bottleneck. If you need professional assistance to ensure absolute accuracy in your project, let our team size your near-wall mesh and handle your simulation from start to finish.

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.

Y+ calculator

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).

Y+ calculator

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).

Y+ calculator

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).

Y+ calculator

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.

Y+ calculator

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).

Y+ calculator

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.

Y+ calculator

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):

  1. Using wall functions
  2. Applying a fine mesh near the wall.

Y+ calculator

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.

Y+ calculator

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).

Y+ calculator

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.

Y+ calculator

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.

Y+ calculator

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):

Y+ calculator

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.

Y+ calculator

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.
Shopping Cart
Scroll to Top