Dimensionless Wall Distance y+ Simulator Back
CFD Fundamentals Simulator

Dimensionless Wall Distance y+ Simulator — CFD Boundary Layer Resolution

Real-time computation of the dimensionless wall distance $y^+ = y\,u_\tau/\nu$. Vary the free-stream speed $U_\infty$, first-cell height $y$, kinematic viscosity $\nu$ and skin friction $c_f$ to read the friction velocity $u_\tau$, wall shear stress $\tau_w$ and the recommended turbulence-model region (viscous sublayer, buffer, log law). Side-by-side u+ profile and boundary-layer schematic.

Parameters
Free-stream speed U_inf
m/s
First-cell height y
μm
Kinematic viscosity nu (x10^-6)
m²/s
Skin-friction coefficient c_f (x10^-3)

Air density $\rho = 1.225$ kg/m³ is fixed. $u_\tau = U_\infty\sqrt{c_f/2}$, $y^+ = y\,u_\tau/\nu$.

Results
Wall distance y+
Friction velocity u_τ
Recommended model
Wall shear stress τ_w
Four boundary-layer regions with current y+

Schematic from the wall (left) outward. Green = viscous sublayer (y+ < 5) / orange = buffer (5 to 30) / blue = log law (30 to 300) / red = unresolved (y+ >= 300). Yellow arrow marks the current y+ location.

Velocity profile u+ vs log10(y+)

x-axis = $\log_{10}(y^+)$ from -1 to 3 / y-axis = $u^+ = U/u_\tau$ / blue = viscous sublayer law $u^+ = y^+$ / orange = log law $u^+ = (1/\kappa)\ln(y^+) + B$ with $\kappa = 0.41$, $B = 5.0$ / yellow dot = theoretical $u^+$ at the current $y^+$.

Theory & Key Formulas

Definition of the dimensionless wall distance ($y$ = wall to first cell center, $u_\tau$ = friction velocity, $\nu$ = kinematic viscosity):

$$y^+ = \frac{y\,u_\tau}{\nu}$$

For a flat-plate boundary layer the friction velocity follows from the wall shear stress $\tau_w$, density $\rho$ and skin-friction coefficient $c_f$:

$$u_\tau = \sqrt{\frac{\tau_w}{\rho}},\qquad \tau_w = \tfrac{1}{2}\,c_f\,\rho\,U_\infty^2,\qquad u_\tau = U_\infty\sqrt{\frac{c_f}{2}}$$

The near-wall dimensionless velocity $u^+ = U/u_\tau$ obeys different laws in each region:

$$u^+ = \begin{cases} y^+ & (y^+ < 5,\ \text{viscous sublayer}) \\ \dfrac{1}{\kappa}\ln(y^+) + B & (y^+ \ge 30,\ \text{log law}) \end{cases}$$

$\kappa \approx 0.41$ (von Karman constant), $B \approx 5.0$ (smooth wall). For CFD use $y^+ < 1$ with SST k-omega or Spalart-Allmaras in low-Re mode, and $30 \le y^+ < 300$ with k-epsilon plus wall functions. The buffer layer ($5 \le y^+ < 30$) violates both assumptions and is the region where a first cell must not be placed.

What is the Dimensionless Wall Distance y+

🙋
CFD tutorials keep telling me "make y+ less than 1" or "aim for y+ between 30 and 300." What exactly is y+?
🎓
It is a dimensionless number that describes how close to the wall your first cell sits. The definition is $y^+ = y\,u_\tau/\nu$, with $y$ the distance from the wall to the first cell center, $u_\tau$ the friction velocity and $\nu$ the kinematic viscosity. At this tool's defaults ($U_\infty = 10$ m/s, $y = 100$ μm, air $\nu = 1.5\times10^{-5}$ m²/s, $c_f = 5\times10^{-3}$) you get $u_\tau = 10\sqrt{0.0025} = 0.500$ m/s and $y^+ = 10^{-4}\times0.5/1.5\times10^{-5} = 3.33$, as shown in the Results card.
🙋
With y+ = 3.33 the tool says "Resolve (low-Re)". What does that mean?
🎓
The near-wall region splits into four bands: $y^+ < 5$ is the viscous sublayer, $5 \le y^+ < 30$ the buffer layer, $30 \le y^+ < 300$ the log-law layer, and $y^+ \ge 300$ is too coarse to resolve. In the viscous sublayer the velocity gradient is integrated directly, so a low-Re model such as SST k-omega or Spalart-Allmaras delivers accurate separation and heat transfer. Because your first cell is inside the viscous sublayer, that family of models is the right choice.
🙋
If I push $y$ from 100 μm to 1000 μm, y+ jumps to about 33 and the regime becomes "log law." So wall functions become usable?
🎓
Right. In the $30 \le y^+ < 300$ range the classical combination of k-epsilon and wall functions becomes appropriate. Cell counts stay low, which is why piping, large-volume flow and pedestrian wind simulations rely on it. Be aware that separation and strong adverse pressure gradients reduce accuracy, so for engine internals or turbine blades you should switch back to low-Re models.
🙋
Why must the first cell stay out of the buffer layer between y+ = 5 and 30?
🎓
Neither $u^+ = y^+$ nor the log law $u^+ = (1/\kappa)\ln y^+ + B$ holds in the buffer. Low-Re closures assume the sublayer profile, and wall functions assume the log law. A first cell inside the buffer satisfies neither assumption and wall shear stress predictions can drift by 20 to 50 %. Try setting $y = 150$ μm to land near $y^+ \approx 5$ and the tool flags the situation.

Frequently Asked Questions

On a real geometry the local velocity and pressure gradient vary, so $y^+$ varies dramatically over the surface. A car body shows $y^+ \approx 0$ near the front stagnation point and $y^+ \approx 100$ on the sides; spans of two decades are normal. If only the mean $y^+$ falls inside the target range, most of the surface may still be outside. CFD post-processing therefore inspects the minimum, maximum, mean and the field distribution, requiring stricter agreement on regions important for separation or heat transfer.
Hitting $y^+ = 1$ usually needs a first-layer thickness of 1 to 10 micrometres for air at U_inf around 30 m/s. To cover the full boundary-layer thickness ($\delta \approx 0.37 x / Re_x^{1/5}$) with a growth ratio of 1.15 to 1.25 you end up with 20 to 30 prism layers. For $x = 1$ m, $U_\infty = 30$ m/s air the boundary layer is about 17 mm, and a 1 micron first layer with ratio 1.2 reaches it in 25 layers. Commercial mesh tools (ANSYS Fluent, STAR-CCM+, OpenFOAM) automate this, but the final $y^+$ contour must still be verified.
Physically it stays accurate, but cost grows fast. Halving the first layer with a fixed growth ratio adds prism layers and increases cell count by 30 to 50 percent. Extremely thin layers become high-aspect-ratio cells that slow convergence and may cause oscillating residuals. Target $y^+ = 0.5$ to 5 with a sweet spot near 1; pushing $y^+$ much below 1 saturates the accuracy benefit while inflating runtime and cell volume ratio.
Classical wall functions assume the log law and require $30 \le y^+ < 300$. The Scalable Wall Function in ANSYS Fluent, the Two-Layer All-y+ treatment in STAR-CCM+ and OpenFOAM's nutUSpaldingWallFunction bridge the sublayer, buffer and log law continuously via Spalding's blended law or a two-layer model. They give acceptable answers from $y^+ = 1$ up to $y^+ = 100$, easing mesh generation. Even so, accuracy in the buffer is not perfect, and low-Re models with $y^+ < 1$ remain the safer choice when separation or strong pressure gradients matter.

Real-World Applications

Automotive aerodynamics: $y^+$ must be evaluated over the entire vehicle surface. The front stagnation region typically sees $y^+ \approx 1$, while high-speed flanks reach $y^+ \approx 100$. Accurate drag coefficient prediction demands a low-Re mesh with $y^+ < 5$ everywhere, and validation studies on F1 cars or production vehicles routinely use meshes exceeding 100 million cells. Setting $U_\infty = 50$ m/s and $y = 5$ μm in this tool drops $y^+$ near 1 and shows the kind of resolution needed.

Aircraft wing boundary layers: On wings at $Re \approx 10^7$, hitting $y^+ = 1$ forces a first layer of 0.5 to 2 micrometres. Separation location drives drag and lift, so SST k-omega or other high-fidelity RANS models are preferred. The local $y^+$ target is 0.1 to 0.5 at the leading edge and 1 to 3 near the trailing edge, and the field is always verified via contour plots.

Heat exchangers and pipe flow: Heat transfer depends strongly on $y^+$ and the Prandtl number. Resolving the sublayer at $y^+ < 1$ versus relying on a Kader-corrected wall function at $y^+ \approx 30$ can yield different Nusselt numbers. In chemical plant or nuclear safety analysis the choice is validated against experiments. Switching $\nu$ to $1.0\times10^{-6}$ m²/s for water in this tool shows that water meshes must be far thinner than air meshes.

Atmospheric boundary layer and pedestrian wind: At $Re \approx 10^9$ and $y^+ \approx 10^5$ the appropriate treatment is a rough-wall function tied to the roughness length $z_0$. Although these values exceed this tool's range ($y^+ \le 10^4$), the underlying concept is the same; COST Action 732 and similar guidelines codify this for building wind environments.

Common Misconceptions and Pitfalls

The most common pitfall is to "set y+ once during meshing and forget about it." Because $y^+$ scales with friction velocity, it varies with the flow itself. The same mesh might give $y^+ \approx 0.5$ at low speed and $y^+ \approx 50$ at high speed. Always inspect the final $y^+$ contour after the run and confirm that the surface stays inside the target range. Sweeping $U_\infty$ from 10 to 50 m/s in this tool multiplies $y^+$ by roughly 5.

Next is the belief that "low-Re models work no matter how small y+ becomes." Cell aspect ratios above 10000 destroy convergence and trigger oscillating residuals and chaotic iteration counts. Target $y^+ = 0.3$ to 1; pushing $y^+$ much lower wastes runtime without improving the physics, and the cell volume ratio with neighbours can become so unbalanced that the solver loses stability.

The final pitfall is to assume that "wall function models do not care about y+." Classical log-law wall functions strictly require $30 \le y^+ < 300$. A first cell inside the buffer (5 to 30) violates the log law and can drift wall shear stress by 20 to 50 %. In some cases the predicted separation point moves to the wrong location and the entire flow field becomes qualitatively wrong. y+ insensitive treatments (Scalable Wall Function, Two-Layer All-y+) ease this, but for analyses that demand accuracy the safest combination remains a low-Re model with $y^+ < 1$. Use the play button to sweep $y$ and watch the regime transitions.