CFD Near-Wall y⁺ Calculator Back
Fluid / CFD

CFD Near-Wall y⁺ Calculator

Calculate first-cell wall distance Δy and y⁺ for CFD near-wall mesh resolution from Reynolds number, fluid properties, and length scale. Compare wall-function and low-Re model requirements in a single chart.

Flow Conditions

10⁴10⁸
0.01 m100 m
0.1300
Required First Cell Thickness Δy vs Reynolds Number (log-log)
First Cell Thickness Δy
Friction Velocity u_τ (m/s)
Wall Shear Stress τ_w (Pa)
Recommended y⁺ Range
Key Formulas
$C_f \approx 0.058 \cdot Re^{-0.2}$
$\tau_w = C_f \cdot \rho U^2 / 2$
$u_\tau = \sqrt{\tau_w / \rho}$
$\Delta y = y^+ \cdot \nu / u_\tau$

What is the First-Cell Wall Distance (Δy)?

🙋
What exactly is this "first-cell wall distance" or Δy? Why is it so important for CFD simulations?
🎓
Basically, it's the height of the very first layer of your mesh right next to a solid surface, like a wing or a pipe wall. It's critical because it controls how accurately your simulation captures the complex, fast-changing flow in the "boundary layer." If Δy is too large, you miss crucial physics. Too small, and your simulation becomes unstable or takes forever to run. Try moving the "Target y⁺" slider above to see how Δy changes instantly.
🙋
Wait, really? So what's this "y⁺" value I'm targeting? And why does the "Turbulence Model" choice in the simulator change the recommended Δy?
🎓
Great question! y⁺ is a non-dimensional wall distance. In practice, different turbulence models are designed to work best with the flow physics captured at specific y⁺ ranges. For instance, the k-ε model often needs a y⁺ > 30, placing the first cell in the fully turbulent "log-law" region. But the k-ω SST model can resolve down to y⁺ ≈ 1, right into the viscous sublayer. That's why the chart updates when you switch models—each has a different "sweet spot."
🙋
So if I'm simulating air over a car at highway speed, how do I use the Reynolds number and this tool to get my actual mesh size?
🎓
Exactly! First, you'd estimate the Reynolds number based on car length and speed. Then, in the simulator, you'd select "Air" as the fluid and a model like "k-ω SST" for accurate aerodynamics. Set your target y⁺ (maybe 1 for high accuracy). The tool uses the physics to calculate the precise Δy in meters. For a car, this might be a fraction of a millimeter—a value you'd directly use to set the first layer height in your meshing software.

Physical Model & Key Equations

The core of this calculation is linking the dimensional wall distance Δy to the non-dimensional y⁺ through the friction velocity u_τ, which depends on the flow's wall shear stress.

$$ y^+ = \frac{\Delta y \cdot u_τ}{\nu}$$

Where:
$y^+$ = Target non-dimensional wall distance (user input).
$\Delta y$ = First-cell wall distance in meters (the output).
$u_τ$ = Friction velocity ($\sqrt{\tau_w / \rho}$).
$\nu$ = Kinematic viscosity of the fluid.

To find $u_τ$, we relate it to the bulk flow using the skin friction coefficient $C_f$, which is a function of the Reynolds number ($Re$). A common empirical correlation for a turbulent flat plate is used here.

$$ C_f \approx \frac{0.058}{Re^{0.2}}\quad \text{and}\quad u_τ = U \sqrt{\frac{C_f}{2}} $$

Where:
$Re$ = Reynolds number ($UL/\nu$), based on user input.
$U$ = Characteristic free-stream velocity.
$C_f$ = Skin friction coefficient.
This allows the tool to compute Δy from your inputs of Re, y⁺, and fluid properties.

Real-World Applications

Aerodynamic Design (Cars & Aircraft): Engineers use this calculation to create meshes for simulating drag and lift. For instance, accurately capturing the boundary layer on a wing's surface is essential for predicting stall behavior and optimizing fuel efficiency. A wrongly sized first cell can lead to a 10-20% error in drag prediction.

Turbo-machinery (Pumps & Turbines): In designing a centrifugal pump, the mesh near the impeller blades and volute walls must resolve high shear and pressure gradients. The correct Δy ensures accurate prediction of efficiency, head rise, and cavitation risks, directly impacting the pump's lifespan and performance.

Heat Exchanger Analysis: For simulating conjugate heat transfer in a finned-tube heat exchanger, the thermal boundary layer is critical. The first cell distance dictates how well the simulation captures the temperature gradient from the wall into the fluid, which is necessary for calculating the overall heat transfer coefficient and sizing the equipment.

Building & Environmental Wind Studies: When modeling wind flow around a skyscraper to assess pedestrian comfort or wind loading, the mesh near the building surfaces must be tailored to the local wind speed (Reynolds number). This tool helps set up a reliable mesh for LES (Large Eddy Simulation) models, which are often used for such unsteady flow analyses.

Common Misconceptions and Points to Note

First, it is a misconception to think of the target y⁺ value as an absolute, inviolable "magic number." While guidelines are indeed important, aiming for y⁺≈1 with a k-ω SST model, for example, can be nearly impossible to achieve on all wall surfaces for complex geometries. In practice, you should design your mesh to prioritize meeting the target y⁺ in physically critical flow regions like separation points, reattachment points, and areas of high shear stress. Deviations in other areas are often acceptable.

Next, there is the pitfall of thinking you can simply input the calculated first cell height Δy directly into the mesher. The Δy provided by this tool is the distance to the "cell center." Most mesh generation software defines "first layer thickness" as the actual thickness of the cell itself, so you typically need to input roughly twice the calculated value (if the cell center is at Δy, the cell thickness is ~2Δy). Getting this wrong can result in a y⁺ value about twice what you intended.

Finally, do not underestimate the importance of setting material properties and representative velocity/length. For instance, in external aerodynamics of a car, whether you use the "overall length" or the "wheelbase" as the representative length can drastically change the Reynolds number, leading to an order of magnitude difference in the required Δy. Also, it's easy to forget that the kinematic viscosity ν of air changes with temperature. The required mesh size can differ between summer and winter conditions, even at the same velocity.

How to Use

  1. Enter the Reynolds number (Re_L) based on characteristic length—for a flat plate, use chord length or plate span; for pipe flow, use pipe diameter.
  2. Specify the target y⁺ value matching your turbulence model: y⁺ ≤ 1 for wall-resolved LES or Spalart-Allmaras, y⁺ ≈ 1 for k-ω SST, y⁺ ≈ 30–300 for k-ε with wall functions.
  3. Input fluid properties (kinematic viscosity ν in m²/s; for air at 15°C use 1.48×10⁻⁵ m²/s, for water use 1.0×10⁻⁶ m²/s) and reference length L (meters).
  4. Results update in real time: read the first-cell height Δy in meters and wall shear stress τ_w, and adjust mesh density accordingly.

Worked Example

Wind-tunnel airfoil test: chord L=1.2 m, freestream u_∞=62 m/s, sea-level air (ρ=1.225 kg/m³, ν=1.48×10⁻⁵ m²/s). Reynolds number Re_L=(u_∞ × L)/ν ≈ 5.0×10⁶. For k-ω SST turbulence closure with target y⁺=0.8: skin-friction coefficient C_f ≈ 0.058×Re⁻⁰·² ≈ 0.0027 gives wall shear stress τ_w = C_f×ρu_∞²/2 ≈ 6.2 Pa and friction velocity u_τ = √(τ_w/ρ) ≈ 2.26 m/s. First-cell normal spacing Δy = (y⁺ × ν)/u_τ = (0.8 × 1.48×10⁻⁵)/2.26 ≈ 5.2×10⁻⁶ m ≈ 5.2 micrometers.

Standards & Assumptions

Standard / formula: Law of the wall \(y^+ = u_\tau\, y/\nu\), \(u_\tau=\sqrt{\tau_w/\rho}\). Wall shear from the flat-plate turbulent skin-friction correlation \(C_f \approx 0.058\,Re^{-0.2}\) (Schlichting / Prandtl 1/7-power family), \(\tau_w=C_f\tfrac12\rho U^2\); first-cell height \(\Delta y = y^+\nu/u_\tau\).

Assumptions: Incompressible, smooth flat-plate boundary layer, zero pressure gradient, constant properties. The reported Δy is the distance to the cell centre (most meshers treat the first-layer thickness as ≈2Δy). Per-model recommended y⁺ ranges are reference values only.

Scope & limits: Valid for turbulent flat-plate flow at \(Re=10^5\)–\(10^7\). On curved walls, strong pressure gradients, separation or rough surfaces the \(C_f\) law degrades and error grows. The 0.058 coefficient is rounded (Schlichting local value 0.0592, <3% difference). Use as an initial meshing estimate; confirm final resolution against your solver's manual.

Practical Notes

  1. For separated flow (nacelle inlets, cavities), reduce y⁺ target by 30–50% and increase normal resolution near recirculation; k-ε struggles below y⁺=30.
  2. High-Reynolds pipe flow (Re_D>100,000) with wall functions: y⁺=30–300 avoids viscous sublayer resolution but demands coarser boundary-layer mesh; Δy scales inversely with friction velocity u_τ.
  3. Hybrid RANS-LES near wake regions: maintain y⁺<1 in attached layers (k-ω SST), coarsen to y⁺≈100 in outer wake to balance cost and accuracy.
  4. Compressible effects (Mach>0.3): use ν(T) via Sutherland law; local Mach spike reduces ν by ~20%, concentrating y⁺ near shock foot.