First Cell Height to y+ Calculator
First Cell Height to y+ Calculator
You have already built the mesh. This says what y+ it actually reaches, whether that suits the near-wall model you intend to run, and — if you have landed in the buffer layer — exactly how much of the wall shear stress you are losing and which way to move.
First cell height to achieved y+
A 1 m chord in air at 20 °C and 30 m/s with a first cell 0.3 mm tall, meshed for wall functions on a cell-centred solver
From a cell height to a y+, with the factor of two in the open
- Δy₁
- the first cell height you meshed — the input here. The first layer thickness a mesher reports, not the distance to the cell centre
- y⁺
- the answer: the wall distance of the evaluation point in wall units. This is a result on this page and an input on its inverse, and the two must never be confused
- u*
- friction velocity √(τ_w/ρ), from a LOCAL skin-friction correlation. It is what converts a length into a wall unit
- κ, B
- log-law constants, 0.41 and 5.0 here. Fluent uses κ = 0.4187 with E = 9.793, which is B = 5.45; the two sets move the linear/log crossing from 10.80 to 11.22, so treat the crossing as approximate
- 0.1δ⁺
- the top of the log layer in wall units. The real upper bound on a wall-function y+, and often well below 300
Worked example
A 1 m chord in air at 20 °C and 30 m/s with a first cell 0.3 mm tall, meshed for wall functions on a cell-centred solver
The flow first, because y+ is a length divided by a length scale the flow owns. Air at 20 °C gives ν = 1.5060e-05 m²/s, so Rex = 30 × 1/ν = 1,992,004, turbulent
Local skin friction from the Schlichting log-law fit: Cf = 0.003328, so τw = 1.8032 Pa and u* = 1.2237 m/s. The viscous length scale ν/u* is 12.3066 μm, and that is the ruler y+ is measured with
Now the factor of two, and it goes the other way on this page. The cell is 0.3 mm tall, so on a cell-centred solver the y+ evaluation point is at its centroid, 0.15 mm from the wall. Use 0.3 mm here and you get twice the answer — on this mesh that is y+ = 24 instead of 12, which is still in the buffer layer, but at a different mesh it would be the difference between a pass and a fail
y+ = y u*/ν = 1.5×10−4 × 1.2237 / 1.5060e-05 = 12.19
And that is the answer this page exists for: 12.19 is in the buffer layer. Not marginally — squarely. The viscous law says u+ = 12.19 at this y+, the log law says 11.10, and Spalding's formula for the real profile says 9.23. Both laws are high, by 32 and 20 per cent
What that costs, in numbers rather than adjectives. Solve for the friction velocity a pure log-law wall function would infer from the same cell velocity and you get 74 per cent of the true wall shear stress; a pure viscous treatment gives 76 per cent. Call it a fifth to a quarter of your skin-friction drag, biased in one direction, with nothing in the residuals to tell you
Which way to move. The page gives both factors. Multiply the first cell height by 0.0820 and y+ lands at 1, which means a wall-resolved model and a first cell of 24.613 μm. Multiply it by 2.461 and y+ lands at 30, which means wall functions and a first cell of 0.738 mm. Either is defensible; where the mesh is now is not
One more check before you commit to wall functions. The log layer here ends at about 0.1δ, which is y+ = 164 — so the usable wall-function window at this station is roughly 30 to 164, not 30 to 300. And the same mesh reads y+ = 13.77 just downstream of transition and 8.15 at ten per cent of the chord, so the verdict is not uniform along the surface
What the buffer layer actually costs, computed rather than quoted
| y+ at the first cell | true u+ (Spalding) | viscous law u+ = y+ | log law u+ | τw a viscous treatment recovers | τw a pure log-law wall function recovers |
|---|---|---|---|---|---|
| 1 | 1.000 | 1.000 | 5.000 | 100% | 14% |
| 3 | 2.984 | 3.000 | 7.680 | 99% | 25% |
| 5 | 4.866 | 5.000 | 8.925 | 97% | 39% |
| 8 | 7.173 | 8.000 | 10.072 | 90% | 58% |
| 10.8 | 8.666 | 10.800 | 10.804 | 80% | 70% |
| 15 | 10.127 | 15.000 | 11.605 | 68% | 80% |
| 20 | 11.246 | 20.000 | 12.307 | 56% | 86% |
| 30 | 12.634 | 30.000 | 13.296 | 42% | 92% |
| 50 | 14.179 | 50.000 | 14.542 | 28% | 96% |
| 100 | 16.077 | 100.000 | 16.232 | 16% | 98% |
| 300 | 18.879 | 300.000 | 18.912 | 6% | 100% |
The verdict table: what each y+ band means for each near-wall treatment
| y+ at the first cell | Wall-resolved / low-Re model | Wall functions | What to do |
|---|---|---|---|
| below 0.3 | correct, but paying for cells you do not need | badly wrong — the log law recovers well under half the wall shear here | relax the first layer, or keep it and use a low-Re model |
| 0.3 to 1 | the target | wrong — the log law does not hold here | keep it and run a low-Re model |
| 1 to 5 | good; heat transfer and transition want the finer end | wrong, unless the code uses a scalable wall function | keep it and run a low-Re model |
| 5 to 30 | biased low, by 3 to 58 per cent | biased low, by 8 to 61 per cent | MOVE. Refine to y+ = 1 or coarsen to y+ = 30. Do not compromise |
| 30 to 300 | wrong — the sublayer is not resolved | the target, provided 300 is below 0.1δ in wall units | keep it and run wall functions |
| above 300 | wrong | wrong — the first cell is outside the inner layer | refine, and check the first cell against δ as well as against y+ |
Why the buffer layer is the mistake worth catching, and what it costs in wall shear stress
This is the page you want after the mesh exists. Its inverse turns a target y+ into a cell height; this one takes the cell height you actually meshed and says what y+ it reaches and whether that suits the model you are about to run. The two questions look symmetric and are not: the inverse is a design question with a free choice of target, and this one is a verdict on a mesh that already costs money. The verdict is what the page is for, so it is stated in bands rather than left to the reader.
The buffer layer is not a grey area, it is a hole. The near-wall profile has a linear region where u+ = y+, a logarithmic region where u+ = (1/κ)ln y+ + B, and between them a band, roughly 5 < y+ < 30, described by neither. Every wall treatment in every solver is built on one of those two laws or on a blend of them, so a first cell in the buffer layer forces the code to answer a question the physics has not given it. The size of the error is computable and it is on this page: a pure log-law wall function recovers 39 per cent of the true wall shear at y+ = 5, 71 per cent at y+ = 11 and 86 per cent at y+ = 20. A pure viscous treatment goes the other way — 97 per cent at y+ = 5, 80 per cent at y+ = 11, 42 per cent at y+ = 30. Nowhere in the band is either law better than about 90 per cent right.
The crossing point is the trap inside the trap. The two laws are equal at y+ = 10.8 for κ = 0.41 and B = 5.0, and it is tempting to read that as a safe middle. It is the opposite: at the crossing they agree with each other and are both about 25 per cent above the true profile. Agreement between two wrong models is not evidence. This is also why the exact edges of the forbidden band are soft — with Fluent’s constants the crossing moves to 11.22 — and why the sensible advice is to stay well clear rather than to tune up against 5 or 30.
What the error looks like in a run. It does not look like anything. Residuals converge, the mass balance closes, no warning is printed, and the flow field is plausible. What is wrong is the wall shear stress, and everything derived from it: skin-friction drag, the split between pressure and friction drag, wall heat transfer, and the near-wall production of turbulence that then feeds the rest of the domain. A biased, quiet, 20-per-cent error in skin friction is the single commonest reason a clean CFD result disagrees with a measurement, and it survives every mesh-independence study that refines the mesh everywhere EXCEPT the wall-normal direction — because refining the core while holding the first layer leaves y+ exactly where it was.
Wall-function validity is not a separate question, so it is not a separate page. Whether a wall function is valid is exactly the question of where the first cell sits, and the answer has three parts, all of them here. The lower bound: y+ above 30, or above about 11 if the code uses a scalable wall function that clamps y* at 11.225. The upper bound: NOT 300, but 0.1δ expressed in wall units, which this page computes — at low Reynolds number it can be well under 100, and on a small slow geometry there is effectively no log layer to sit in. And the third part, which is the one people miss: the first cell must also be small compared with the boundary layer, because a cell spanning a tenth of δ contains the whole inner layer and resolves none of it, whatever its y+ happens to be.
And y+ is not one number. It varies along every surface, because the wall shear does. A mesh at y+ = 40 at the trailing edge is well above that near the leading edge, and the worst station on a naturally transitioning surface is just downstream of transition, where the skin friction peaks. This page reports what the same mesh reads at that station and at ten per cent of the reference length, which is a real check rather than a restatement of the input. A correlation still cannot see a stagnation point, a separation line, a strong pressure gradient or a curved wall, and any of those will move y+ further than the differences between the correlations offered here — so once the run exists, look at the y+ field the solver reports, and look at the maximum and minimum over each wall rather than the area average.
Frequently asked questions
I have landed at y+ = 12. How bad is that, in numbers?
Bad enough to explain a 20 per cent error in skin-friction drag. At y+ = 12 the true u+ is 9.16, the viscous law says 12 and the log law says 11.06, so the two laws are 31 and 21 per cent high. Turning that into wall shear: a pure log-law wall function recovers 73 per cent of the true τ_w and a pure viscous treatment 76 per cent. The error is a bias, not scatter, so it does not average out over a surface and it does not shrink as the run converges. A blended or automatic wall treatment will do better than either pure law, but it cannot manufacture information the first cell does not carry.
My solver reports a different y+ from this page. Which is wrong?
Probably neither, and the size of the difference tells you which explanation applies. A factor of almost exactly two is the cell-centroid convention — check the select on this page against what your solver reports. A difference of 5 to 15 per cent is the skin-friction correlation, which is a flat-plate or fully developed-pipe fit and knows nothing about your geometry. A difference of a factor of two or more, in the other direction, usually means the real flow has a stagnation point, a separation, a strong pressure gradient or wall curvature at the place you are looking — and then the solver is right and the correlation is not. This page is for sizing and for sanity-checking a mesh before you run it; the solver’s own y+ field is the authority afterwards.
Is y+ = 300 really the upper limit for wall functions?
No. 300 is a rule of thumb that assumes a wide log layer, and the log layer only extends to about 0.1δ. This page computes 0.1δ in wall units and shows it, and at modest Reynolds numbers it comes out below 300 — sometimes far below. A 50 mm duct at 1 m/s of water has almost no log layer at all, so there is no y+ at which a wall function is comfortable and a wall-resolved mesh is the only honest choice. The companion check is the first cell height as a fraction of δ: above about ten per cent, the cell is too big regardless of y+.
Can I fix a buffer-layer mesh by changing the turbulence model?
Sometimes, and it is often the cheaper fix. If y+ is at the low end — say 5 to 8 — you already have a nearly wall-resolved mesh, and switching from wall functions to a low-Re formulation recovers most of the accuracy for free; the viscous law is only 3 per cent off at y+ = 5. If y+ is at the high end, 20 to 30, switching to wall functions does the same thing from the other side. What does not work is staying in the middle and hoping the model sorts it out. Codes with automatic or blended wall treatment — Menter’s formulation in CFX and Fluent, and the scalable wall functions that clamp y* at 11.225 — make the failure graceful rather than absent.
Why does refining my mesh not change y+?
Because y+ depends only on the wall-normal size of the first cell and on the wall shear stress. Refining in the streamwise or spanwise direction, or in the core, does not touch it. This is why a mesh-independence study can look convincing and leave a 20 per cent bias in the drag: every mesh in the family has the same first layer, so every mesh in the family has the same y+ and the same wall-treatment error, and the answers agree with each other beautifully. A wall-normal refinement study — halving the first layer thickness and re-running — is a different and more revealing test.
Does this work for internal flow, and what about the entry length?
Yes, and internal flow is the easier case because fully developed flow has the same wall shear at every station, so there is no y+ variation along the duct. Enter the hydraulic diameter D_h = 4A/P as the reference length. The caveat is the entry region: the flow is not fully developed for roughly 10 to 60 diameters, the wall shear there is higher than the developed value, and so is y+ — so if your domain is short, this page under-reports y+ near the inlet. The other caveat is roughness: these are smooth-wall correlations, and a rough duct has a higher wall shear and a higher y+ than reported here.
Related calculators
References
- D. B. Spalding (1961), A single formula for the law of the wall, Journal of Applied Mechanics 28(3), 455. The source of the true near-wall profile used to build the buffer-layer table on this page: y⁺ = u⁺ + e−κB[eκu⁺ − 1 − κu⁺ − (κu⁺)²/2 − (κu⁺)³/6]. It is explicit in u⁺ and implicit in y⁺, so it cannot be evaluated in this site’s expression language, which is numeric and non-iterative by design. The table was therefore computed offline, by inverting Spalding numerically at each y⁺, and printed rather than made a live output. Recorded here so the limitation is visible instead of looking like an omission.
- H. M. Nagib, K. A. Chauhan and P. A. Monkewitz (2007), Approach to an asymptotic state for zero pressure gradient turbulent boundary layers, Phil. Trans. R. Soc. A 365, 755. The Coles–Fernholz relation Cf = 2[(1/κ)ln Reθ + C]−2 with κ = 0.384 and C = 4.127, used as the independent check on the skin-friction correlations offered here rather than as one of them. The comparison was made in Reθ space, not Rex space, because the Rex mapping depends on the virtual origin and so cannot separate a bad correlation from a bad starting assumption.
- H. Schlichting and K. Gersten, Boundary-Layer Theory. Cited by number for the local log-law skin-friction fit Cf = (2 log10Rex − 0.65)−2.3, valid to Rex = 109, and for the classical log-law constants. Nothing is reproduced from its tables.
- F. M. White, Fluid Mechanics. Cited by number for Cf = 0.027 Rex−1/7 and δ/x = 0.16 Rex−1/7. Verified by the identity a one-seventh profile must satisfy, θ = 7δ/72 and Cf = 2 dθ/dx, which reproduces 0.0267 — White’s 0.027 to two figures.
- B. S. Petukhov (1970), Heat transfer and friction in turbulent pipe flow with variable physical properties, Advances in Heat Transfer vol. 6, 503. The explicit smooth-pipe friction factor f = (0.790 ln Re − 1.64)−2 for 3000 ≤ Re ≤ 5 × 106, checked here against the implicit Prandtl–von Kármán law solved numerically: within 0.7 per cent from Re = 3 × 104 to 5 × 106.
- ANSYS Fluent Theory Guide, Wall functions and Scalable wall functions. Cited by number for the standard constants κ = 0.4187 and E = 9.793, for the y* = 11.225 crossing that scalable wall functions use as a floor, and for the existence of the enhanced and blended treatments this page keeps naming. The crossing was recomputed rather than taken on trust: y⁺ = (1/κ)ln(E y⁺) with those constants gives 11.2247, and with the textbook κ = 0.41, B = 5.0 it gives 10.805, so the edge of the forbidden band is constant-dependent to about 4 per cent.
- NIST Chemistry WebBook, Thermophysical Properties of Fluid Systems, isobaric table for water at 0.101325 MPa. A US Government work, so the water presets are reproduced here. The retrieved table was checked against three values that must hold — 999.84 kg/m³ at 0 °C, the density maximum near 4 °C, and 1.002 mPa·s at 20 °C — before any of it was used, because a shifted column in a retrieved table is the failure this project has caught most often.
- US Standard Atmosphere 1976 (NOAA / NASA / USAF). A US Government work, and the source for Sutherland’s formula with β = 1.458×10−6 and S = 110.4 K from which the air presets are computed. The verifying identity is the sea-level value: 1.7894×10−5 Pa·s with ρ = 1.2250 kg/m³ gives ν = 1.4607×10−5 m²/s, the published figure to five digits.
- NASA Turbulence Modeling Resource, 2D zero pressure gradient flat plate verification case (NASA Langley Research Center). A US Government work and the right place to check a solver’s own skin friction and y+ behaviour against grid-converged CFD, which is a stronger test of a mesh than any correlation on this page.
Setup guidance, not validation. Correlations have ranges of validity and cell-count estimates are order-of-magnitude. A converged simulation is not a correct one. Full disclaimer at calcengines.com/disclaimer/
