Y+ Calculator - First Cell Height for CFD Boundary Layers
Use this y+ calculator to work out the dimensionless wall distance and the first-cell height your boundary-layer mesh needs from freestream conditions, density, viscosity, and a target y+.
Y+ Calculator
Results
Reynolds number (Re_x)
—
Skin-friction coefficient (Cf)
—
Friction velocity (u_tau)
—m/s
First cell height (y)
—m
Resulting y+ at this height
—
What Is the Y+ Calculator?
A y+ calculator works out the dimensionless wall distance y+ that the first cell of a computational fluid dynamics (CFD) mesh sits at, from the freestream velocity, fluid density, dynamic viscosity, and boundary-layer length you give it. y+ is the local Reynolds number of the near-wall cell, and it decides whether your turbulence model can trust the mesh next to the wall. Engineers use it before generating a boundary-layer mesh so the first node lands in the right flow region.
You typically reach for this tool when you are building a structured or unstructured boundary-layer mesh and need the first-cell height, not the y+ itself. Give it a target y+ (for example 30 for wall functions or 1 for a resolved near-wall layer) and it returns the physical wall distance y to set in your mesher. It pairs naturally with a Reynolds Number Calculator to check the regime and with a Friction Factor Calculator when the same wall laws move to internal pipe flow.
The result is only as good as the skin-friction estimate behind it. This calculator uses Prandtl's flat-plate law Cf = 0.074 / Re_x^0.2 to link freestream conditions to the friction velocity u_tau, which is the quantity y+ really depends on. Keep that in mind if your geometry is far from a flat plate.
A y+ calculator is most useful when you iterate on the mesh before the solve, not after. Pick the wall treatment you plan to use, choose the matching target y+, read the first-cell height, and then set your boundary-layer growth rate so the second and third cells stay in the resolved region. Doing this up front saves the re-meshing loop that a failed near-wall assumption usually forces later.
How the Y+ Calculator Works
- rho - fluid density in kg/m³ (1.225 for sea-level air).
- u_tau - friction velocity in m/s, derived from the freestream via the skin-friction coefficient.
- y - first-cell wall distance in m, the output this calculator sizes.
- mu - dynamic viscosity in Pa*s (1.81e-5 for air at 20 C).
Take sea-level air at U_inf = 20 m/s over a 1 m plate: Re_x = 1.225 * 20 * 1 / 1.81e-5 = 1.35e6, Cf = 0.074 * (1.35e6)^-0.2 = 0.0044, u_tau = 20 * sqrt(0.0044 / 2) = 0.94 m/s. For a target y+ of 30 the first-cell height is y = 30 * 1.81e-5 / (1.225 * 0.94) = 4.7e-4 m, or about 0.5 mm. The friction velocity relation used here is the standard wall-shear definition described in the friction velocity reference: Wikipedia - Friction velocity.
CFD Online's Y+ reference collects the same near-wall definitions and the wall-function ranges this calculator targets, which is a useful cross-check before you commit a mesh: CFD Online - Y plus.
Key Concepts Explained
Dimensionless wall distance
y+ normalizes the first cell's distance by the viscous length scale mu/(rho*u_tau). A value near 1 means the cell sits inside the viscous sublayer; values around 30-300 sit in the log-law region where wall functions are valid.
Friction velocity
u_tau = sqrt(tau_w / rho) is the velocity scale of the near-wall shear layer. It collapses the near-wall mean velocity profile across many flows, which is why y+ is built on it rather than on the freestream speed.
Skin-friction coefficient
Cf links the freestream to the wall shear. Prandtl's flat-plate law Cf = 0.074 * Re_x^-0.2 holds for turbulent boundary layers roughly between Re_x = 5e5 and 1e7; outside that band treat the result as an estimate.
Near-wall treatment
Wall functions resolve only the log layer and want y+ ~ 30-300; enhanced or low-Reynolds treatments resolve down to y+ ~ 1. Matching your mesh to the model avoids over- or under-predicting wall heat and momentum transfer.
Viscous length scale
The ratio mu/(rho*u_tau) sets the thickness of the near-wall region. Dividing the physical distance y by this scale is exactly what produces the dimensionless y+, so any change in viscosity or friction velocity rescales the whole near-wall mesh.
For thermal problems the same boundary layer also defines the temperature profile; a Prandtl Number Calculator shows where the thermal and velocity layers part ways.
The five ideas above are not independent; they chain directly into one another. The Reynolds number sets the skin-friction coefficient, the coefficient sets the friction velocity, and that velocity sets the viscous length scale that y+ measures. When you change a fluid or a speed you are really moving along that chain, which is why the calculator prints every link instead of only the final number.
How to Use This Calculator
- 1 Enter freestream velocity: the flow speed U_inf in m/s.
- 2 Enter fluid density rho: 1.225 kg/m³ for sea-level air or 998 kg/m³ for water at 20 C.
- 3 Enter dynamic viscosity mu: 1.81e-5 Pa*s for air, 1.002e-3 Pa*s for water.
- 4 Enter boundary-layer length L: the plate or chord length over which the flow develops.
- 5 Set the target y+: the value you want the first cell to achieve.
- 6 Read the outputs: Reynolds number, skin-friction coefficient, friction velocity, and first-cell height y.
For a 1 m airfoil chord at 15 m/s targeting a resolved near-wall layer (y+ = 1), the calculator returns a first-cell height near 2.0e-5 m. Feed that spacing into your boundary-layer growth rate and check it against a Drag Equation estimate of the same flow.
A practical shortcut when you only need a rough first guess: hold the target y+ fixed and sweep the freestream in the tool to see how the spacing shrinks as speed rises. Because the friction velocity grows with the square root of the skin-friction coefficient, the first-cell height falls gently with speed rather than linearly, which is a common surprise the first time you mesh a high-speed case.
Benefits of Using This Calculator
- • Physics-based spacing: sets the first-cell height from physics instead of guesswork, so wall-function or near-wall models stay in their valid range.
- • Full trace: shows every intermediate (Re_x, Cf, u_tau) so you can spot when Prandtl's flat-plate law no longer applies.
- • Quick fluid swaps: switches fluid and speed in seconds, letting you compare air and water meshes before committing to a mesh size.
- • Concrete output: ties the target y+ to a wall distance, the number your mesher actually needs.
- • Model match: flags the near-wall treatment that matches your y+ range, reducing post-processing surprises.
- • Reynolds insight: the printed Reynolds number tells you immediately whether Prandtl's flat-plate law is even in range, so you catch an invalid assumption before it quietly corrupts the mesh.
Used early, these benefits compound: a first-cell height that respects the chosen model means the solver spends its iterations correcting the flow field rather than fighting a mesh that sits in the wrong part of the boundary layer. That is the difference between a mesh that converges in minutes and one that needs a second pass. For a student, the same tool makes the otherwise abstract near-wall theory concrete: you can see how doubling the speed or switching from air to water moves the required spacing by an order of magnitude, which textbooks rarely show with numbers.
Factors That Affect Your Results
Reynolds number range
Prandtl's Cf law is a turbulent flat-plate correlation. Below Re_x ~ 5e5 the flow may still be laminar or transitional, so the friction velocity and y will be rough. The empirical skin-friction line this correlation belongs to is summarized on Wikipedia's skin friction line page: Wikipedia - Skin friction line.
Pressure gradient and curvature
Real airfoils and ducts have pressure gradients that change Cf locally. An adverse gradient thickens the boundary layer and lowers the wall shear, so the true u_tau is smaller than the flat-plate estimate and the real first cell ends up at a higher y+ than planned. Curvature and three-dimensional turning do the same. The flat-plate estimate is a leading-edge approximation, not a pointwise value, so treat it as a starting spacing and refine where the pressure field is steepest.
Fluid property accuracy
Density and viscosity set both Re_x and the viscous length scale. Wrong temperature or composition shifts y+ by tens of percent.
Before you read the spacing as final, confirm the flow is subsonic and the flat-plate assumption holds; a Mach Number Calculator and a Bernoulli Equation Calculator help you size those conditions first.
Two practical limits to keep in mind: Prandtl's law is only valid for turbulent, zero-pressure-gradient flow in roughly 5e5 < Re_x < 1e7, so treat results outside that band as estimates; and the calculator uses a single representative length and speed, so separated or strongly accelerating flows need a local iterative treatment instead.
Temperature sensitivity is worth a separate note. Viscosity of air falls roughly 5 percent per 15 C of warming, while density barely moves, so the same flight condition at a higher temperature gives a larger Reynolds number, a slightly lower Cf, and a thinner first cell. If your operating envelope spans a wide temperature band, run the y+ calculator at both ends rather than trusting the midpoint, because the wall distance scales with viscosity directly.
Frequently Asked Questions
Q: What is y+ in CFD?
A: y+ is the dimensionless wall distance of the first mesh cell next to a wall. It equals the physical distance y multiplied by the friction velocity and density and divided by the dynamic viscosity. It tells you which part of the near-wall boundary layer your first node sits in.
Q: What is a good y+ value for wall functions?
A: Wall-function methods assume the first cell sits in the log-law region, so a y+ between about 30 and 300 is the usual target. If you resolve the viscous sublayer with an enhanced or low-Reynolds treatment instead, aim for y+ around 1.
Q: How is friction velocity related to y+?
A: y+ is built on the friction velocity u_tau, the velocity scale of the wall shear layer. u_tau comes from the wall shear stress, which this calculator derives from the freestream through the skin-friction coefficient. A larger u_tau means the same physical distance y produces a larger y+.
Q: How do I size the first cell height from a target y+?
A: Invert the definition: y = (y_target * mu) / (rho * u_tau). The calculator works out u_tau from your freestream inputs and returns the wall distance to use as your first-cell height.
Q: Why does y+ matter for turbulence modeling?
A: Turbulence models approximate the near-wall region differently depending on y+. If the first cell falls outside the range the chosen model assumes, wall shear, heat transfer, and separation can be predicted poorly, which propagates into lift, drag, and pressure-loss results.
Q: Which near-wall treatment matches my y+ range?
A: Use wall functions for y+ roughly 30 to 300 and resolve the sublayer (enhanced wall treatment or low-Reynolds model) for y+ near 1. This calculator reports the target y+ so you can pick the matching model before meshing.