y+ to First Cell Height Calculator
y+ to First Cell Height Calculator
Turn a target y+ into the first cell height you actually have to mesh — with the cell-centroid factor of two made explicit, one consistently LOCAL skin-friction law named on the page, and the regime label and the correlation switching at the same Reynolds number.
y+ to first cell height
A 1 m chord in air at 20 °C and 30 m/s, asking for y+ = 1 at the first cell centroid of a cell-centred solver, with transition at Re = 5 × 10⁵ and the Schlichting log-law fit
From a target y+ to a cell height, and nothing circular in between
- y⁺
- the dimensionless wall distance you are targeting. An INPUT on this page. A y+ that comes back out of a calculator that was given it is not a result
- y
- the physical distance from the wall to the point where y+ takes that value — the cell centroid in a cell-centred code, the first node in a node-centred one
- u*
- friction velocity, √(τ_w/ρ). Not a flow speed: it is the velocity scale of the near-wall turbulence, and in air at 30 m/s it is about 1.2 m/s
- C_f
- LOCAL skin friction coefficient at the station named, τ_w/(½ρU²). Never a plate average: the average is about a sixth higher, and since the cell height goes as C_f^(−1/2) that makes the cell about 8 per cent too short
- ν
- kinematic viscosity μ/ρ. ν/u* is the viscous length scale, which is exactly the wall distance at which y+ = 1
- Re
- Re_x = Ux/ν for external flow at the station x, or Re_D = UD_h/ν for internal flow. The same number decides the regime label and which correlation is applied
Worked example
A 1 m chord in air at 20 °C and 30 m/s, asking for y+ = 1 at the first cell centroid of a cell-centred solver, with transition at Re = 5 × 10⁵ and the Schlichting log-law fit
Fluid first, because everything scales with ν. Air at 20 °C and 101.325 kPa: ρ = 1.2041 kg/m³ from the ideal-gas law and μ = 1.8134×10−5 Pa·s from Sutherland's formula, so ν = 1.5060e-05 m²/s
Reynolds number at the station: Rex = UL/ν = 30 × 1/1.5060e-05 = 1,992,004. That is above the 5 × 105 transition value selected, so the flow is turbulent here AND the turbulent correlation is the one applied. One number decides both
Local skin friction, from the Schlichting log-law fit: Cf = (2 log10Rex − 0.65)−2.3 = (2 × 6.29929 − 0.65)−2.3 = 0.003328. Local, not the plate average — the Prandtl–Schlichting plate average at this Reynolds number is 0.003943, which is 1.185 times the local value, and because the cell height goes as Cf−1/2 using it would give a cell 8.1 per cent too SHORT
Wall shear and friction velocity: τw = Cf ½ρU² = 0.003328 × 0.5 × 1.2041 × 30² = 1.8032 Pa, and u* = √(τw/ρ) = 1.2237 m/s. Note what u* is: 4 per cent of the free-stream speed, and it is the only velocity that matters to the near-wall mesh
The viscous length scale is ν/u* = 12.3066 μm, and that IS the wall distance at which y+ = 1. For the target y+ = 1 the evaluation point therefore has to sit at 12.3066 μm
Now the factor of two, which is where this calculation is usually lost. A cell-centred solver evaluates y+ at the centroid of the wall-adjacent cell, and the centroid of a cell of height Δy₁ sits at Δy₁/2. So the CELL has to be twice the distance above: Δy₁ = 24.61 µm. Ask a mesher for a first layer of 12.3066 μm and your centroid lands at 6.1533 μm, which is y+ = 0.5 — finer than you asked for, and twice the cell count you needed
And the check the old page did not do. Asking what y+ this cell reaches is only a real question if you ask it somewhere else. At the station just downstream of transition, where Cf peaks at 0.004246, the same cell reads y+ = 1.130; at 10 per cent of the chord, where the flow is still laminar and Cf = 0.001488, it reads y+ = 0.669. Asking it at the same station would simply return the 1 you typed in, which is what the page this one replaces did, tick mark and all
Finally, the mesh this implies. The boundary layer here is δ = 20.15 mm, the first cell is 0.1222 per cent of it, and at a growth rate of 1.2 it takes about 28 prism layers to cross δ — which is the number to take to the prism layer stack calculator
The three local correlations, and how little the disagreement costs
| Rex | Schlichting log-law | White 0.027 Re−1/7 | 1/7 power 0.0592 Re−1/5 | Spread in Cf | Spread in Δy₁ |
|---|---|---|---|---|---|
| 500000 | 0.004246 | 0.004142 | 0.004291 | 3.6% | 1.8% |
| 1e+06 | 0.003745 | 0.003752 | 0.003735 | 0.4% | 0.2% |
| 3e+06 | 0.003111 | 0.003207 | 0.002998 | 6.9% | 3.4% |
| 1e+07 | 0.002579 | 0.002700 | 0.002357 | 14.6% | 7.0% |
| 3e+07 | 0.002200 | 0.002308 | 0.001892 | 22.0% | 10.4% |
| 1e+08 | 0.001870 | 0.001943 | 0.001487 | 30.7% | 14.3% |
| 1e+09 | 0.001411 | 0.001398 | 0.000938 | 50.4% | 22.6% |
y+ regimes, what each one is for, and what goes wrong outside it
| y+ at the evaluation point | Layer | Near-wall treatment this suits | What happens if you land here by mistake |
|---|---|---|---|
| below 1 | viscous sublayer, linear region | wall-resolved (low-Re) models: SA, k–ω SST low-Re, RSM to the wall, wall-resolved LES | Nothing, except cost. u+ = y+ holds to better than 1 per cent below y+ = 3, so the model is on solid ground; you are simply paying for cells |
| 1 to 5 | viscous sublayer, upper part | wall-resolved models, and the usual practical target | Still fine. At y+ = 5 the linear law is 2.8 per cent above the true profile. This is where most wall-resolved meshes actually sit |
| 5 to 30 | BUFFER LAYER | none. There is no treatment that is valid here | The worst case on this page. The viscous law and the log law cross at y+ = 10.8 and are both about 25 per cent high there. A pure log-law wall function recovers 39 per cent of the true wall shear at y+ = 5, 58 per cent at y+ = 8 and 71 per cent at y+ = 11 |
| 30 to 300 | log layer | wall functions: standard, scalable, non-equilibrium, and the log-law branch of any blended treatment | Nothing, provided 300 is still inside the log layer — which at low Reynolds number it is not. Check the first cell height against δ |
| 300 upwards | wake region, or outside the boundary layer | none | The wall function is handed a velocity from outside the inner layer. The wall shear it returns is not wrong by a percentage, it is unrelated |
Fluid presets: where each number comes from
| Preset | ρ (kg/m³) | μ (Pa·s) | ν = μ/ρ (m²/s) |
|---|---|---|---|
| Air, 15 °C, 101.325 kPa | 1.2250 | 1.7894e-05 | 1.4607e-05 |
| Air, 20 °C, 101.325 kPa | 1.2041 | 1.8134e-05 | 1.5060e-05 |
| Air, 25 °C, 101.325 kPa | 1.1839 | 1.8372e-05 | 1.5518e-05 |
| Water, 15 °C | 999.1000 | 1.1373e-03 | 1.1383e-06 |
| Water, 20 °C | 998.2100 | 1.0014e-03 | 1.0032e-06 |
| Water, 25 °C | 997.0500 | 8.8982e-04 | 8.9245e-07 |
| Water, 60 °C | 983.2000 | 4.6604e-04 | 4.7400e-07 |
What the target y+ is for, why the cell is twice the distance, and why one local correlation is the whole answer
y+ is not a mesh quality metric. It is a statement about which equation the solver is allowed to use at the wall. The near-wall velocity profile has three regions: a viscous sublayer where u+ = y+, a log layer where u+ = (1/κ)ln y+ + B, and a buffer layer between them where neither holds. A wall-resolved model integrates through the sublayer and needs the first cell inside it. A wall function skips the sublayer and needs the first cell in the log layer. Both are legitimate; what neither can do is start in the buffer layer, because there the solver has to guess which law applies. That is the entire reason 5 < y+ < 30 is forbidden, and it is worth knowing that the two laws CROSS at y+ = 10.8 and are both about 25 per cent above the true profile there. The crossing point looks like a compromise and is in fact the worst place on the curve.
The factor of two is the error this page exists to stop. A cell-centred finite-volume code — Fluent, CFX, STAR-CCM+, OpenFOAM, almost everything in industrial use — stores the velocity at the cell centroid and evaluates y+ there. So the wall-adjacent CELL is twice as tall as the y+ distance. Meshing tools ask for the first LAYER THICKNESS, which is the cell height, and y+ calculators overwhelmingly report the y+ DISTANCE. Feed one into the other and you are out by two, every time, in the direction that halves your y+ and doubles your cell count. The select above makes you say which convention your solver uses and the page reports both numbers, so the mistake cannot be made silently.
Local skin friction, not a plate average. This is where the page this one replaces went wrong, and it is worth being precise about why. 0.664 Rex−1/2 and 0.027 Rex−1/7 are LOCAL values: the skin friction at one station. 1.328 ReL−1/2, 0.074 ReL−1/5 − 1742/ReL and 0.455/(log10ReL)2.58 are AVERAGES over a plate from the leading edge to L. The two families are related by integration — the average of 0.0592 Re−1/5 is exactly 0.074 Re−1/5, five quarters of it, and the average of 0.027 Re−1/7 is 0.0315 Re−1/7, seven sixths of it — and that ratio is exactly the size of the error you make by confusing them. A wall distance is a local quantity: it belongs with a local Cf. Averages belong in a drag calculation. Switching between the two families as the Reynolds number changes puts a step in Cf that is an artefact of the author’s bookkeeping, not of the flow.
The step at transition, on the other hand, is real. At Rex = 5 × 105 the laminar value 0.664/√Re is 0.000939 and the turbulent value is about 0.00425: a jump of four and a half times in skin friction, which is a factor of 2.1 in friction velocity and therefore a factor of 2.1 in the cell height needed. Boundary layers really do that when they transition. What must not happen is for the LABEL and the ARITHMETIC to jump at different Reynolds numbers, which is what the old page did — calling the flow turbulent above 4 × 106 while the correlation waited until 107. Here one input sets the transition Reynolds number and both follow it.
One station is not the whole surface. A local correlation gives you the cell height for the station you named, and Cf falls monotonically along a turbulent boundary layer, so a mesh sized at the trailing edge reads a higher y+ everywhere upstream of it. The worst point on a naturally transitioning plate is immediately downstream of transition, where Cf peaks; the page reports the y+ your cell would reach there and at ten per cent of the reference length. If you need the target met everywhere, size on the peak. If you are meshing an aerofoil, remember that the leading-edge region has its own much shorter effective run length and will want a finer first layer than the chord Reynolds number suggests. And if you are meshing a pipe, none of this applies: fully developed internal flow has the same wall shear at every station, which is why the internal branch of this page is the simpler one.
What to do with the answer. The first cell height is the start of a stack, not the whole mesh. A single thin cell with a jump behind it resolves nothing: you need the stack to reach across the boundary layer with a growth rate around 1.1 to 1.25, and the last prism to be about the size of the core cell next to it. The figures above give δ at this station and the number of layers a growth rate of 1.2 needs to cross it; the prism layer stack calculator does the rest. Once the mesh exists, check it the other way round with the first cell height to y+ calculator — and then check the y+ the solver actually reports, because a correlation cannot see stagnation points, separation, curvature or a pressure gradient, and all four move y+ by more than any of the choices on this page.
Frequently asked questions
Is the first cell height the same as the y+ distance?
Not in a cell-centred solver, and that is the commonest error on this calculation. Fluent, CFX, STAR-CCM+ and OpenFOAM evaluate y+ at the centroid of the wall-adjacent cell, which sits at half the cell height, so the CELL must be twice the y+ distance. A node-centred solver, or a y+ you measured to the first grid point off the wall, uses the distance directly. The select on this page makes you say which, and the result panel gives both numbers as well as the other convention’s answer, so the factor of two is visible rather than assumed.
Which skin-friction correlation should I use, and does it matter?
Use a LOCAL one, and beyond that it matters less than people think. The three offered here agree to within half a per cent at Re_x = 10⁶ and disagree by 31 per cent at 10⁸ — but the cell height goes as C_f to the power minus a half, so 31 per cent in C_f is 14 per cent in cell height. The Schlichting log-law fit is the default because it stays valid to Re_x = 10⁹ and so never quietly runs out of range; the one-seventh power law is fitted only to 10⁷ and falls away badly above it. What genuinely matters is not substituting a plate AVERAGE for a local value, which is a systematic error of about a sixth in C_f in the same direction every time.
Why does the page ask me for the transition Reynolds number?
Because the regime label and the correlation must switch at the same place, and on the page this one replaces they did not — the text called the flow turbulent above Re = 4 × 10⁶ while the arithmetic waited until 10⁷, so there was a range where the page said turbulent and computed laminar. Here one input drives both. It is also a real physical choice: transition on a smooth flat plate is usually taken at 5 × 10⁵ but the honest range is 3 × 10⁵ to 3 × 10⁶ depending on free-stream turbulence, surface roughness and pressure gradient, and a tripped or fully turbulent CFD run is turbulent from the leading edge.
My target y+ is 15. What is actually wrong with that?
At y+ = 15 the solver has to choose between two laws that are both wrong. The viscous law u+ = y+ gives 15 where the real profile gives about 10.1, and the log law gives 11.6 — so a pure log-law wall function recovers about 80 per cent of the true wall shear there and a pure viscous treatment about 68 per cent. The consequence is a 20 to 30 per cent error in skin-friction drag and a comparable error in wall heat transfer, and it is not a random error: it is biased, and it will not converge away. Blended wall treatments reduce it but none removes it. Move the target below about 3 or above 30.
Does this work for internal flow?
Yes, and it is the simpler case. Select internal flow and enter the hydraulic diameter D_h = 4A/P as the reference length — not the pipe length. Fully developed internal flow has the same wall shear at every station, so there is no station to choose and no transition to straddle along the surface. The page uses the exact Hagen–Poiseuille result f = 64/Re below Re_D = 2300 and Petukhov’s explicit smooth-pipe correlation above it. Two warnings: the 2300 to 4000 band is genuinely unpredictable and no correlation covers it, and the correlation is a SMOOTH-wall one, so a rough duct will have a higher wall shear and a higher y+ than reported here.
Why does the answer not depend on the turbulence model?
Because the first cell height is set by the wall shear stress, which is a property of the flow rather than of the model. What the model choice decides is which y+ you should be TARGETING — below about 1 for a wall-resolved model, 30 to 300 for wall functions — and that is an input here rather than a menu. The page this one replaces offered five named turbulence models, which read as though the model changed the arithmetic; it did not, and the list mostly duplicated the y+ target. Saying what y+ each treatment wants, and refusing to let you sit in the buffer layer, is the part that carries information.
The first cell height I get is smaller than my mesher will make. What now?
That is the normal outcome at high Reynolds number and it is a design answer, not a failure. Look at the first-cell-height-as-a-fraction-of-δ figure: if y+ = 1 needs a cell that is 0.001 per cent of the boundary layer, a wall-resolved mesh will want fifty or more prism layers and cell aspect ratios in the thousands, and you should be using wall functions instead. Re-run with a target of 50 and compare. The other honest option is to reduce the Reynolds number of the model, which is what a wind tunnel does and what a scaled CFD study can do deliberately, provided you say so.
Should I size the mesh on the trailing edge or the leading edge?
On the place where the wall shear is highest, which is where y+ is highest for a given cell. For a naturally transitioning plate that is immediately downstream of transition, and this page reports the y+ your cell would reach there. For a fully turbulent surface it is the leading edge, where the local run length is short — strictly C_f is unbounded as x tends to zero, so in practice you size on the most upstream station you care about and accept that the first few per cent of chord is under-resolved. Sizing on the trailing edge alone is the common mistake: it gives the largest permissible cell and leaves y+ above target over most of the surface.
Related calculators
References
- H. Blasius (1908), Grenzschichten in Flüssigkeiten mit kleiner Reibung. The laminar branch of this page is not quoted from a table: the Blasius equation f + ½ff″ = 0 was integrated numerically for this build to f″(0) = 0.3320573, giving the LOCAL Cf = 2f″(0)Rex−1/2 = 0.664114 Rex−1/2, δ99 = 4.9100 x/√Rex, δ* = 1.72079 x/√Rex and θ = 0.664114 x/√Rex. The identity Cf = 2 dθ/dx holds on those numbers exactly, which is the check that they are consistent. Note that δ99 is 4.910 and not the 5.0 that is often printed.
- H. Schlichting and K. Gersten, Boundary-Layer Theory. Cited by number for the local log-law fit Cf = (2 log10Rex − 0.65)−2.3, stated valid to Rex = 109, and for the Prandtl–Schlichting plate average 0.455/(log10ReL)2.58. The pair was checked against each other rather than taken on trust: at Re = 107 the average is 1.166 times the local value and at 108 it is 1.137 times — close to the 7/6 that a power-law family gives exactly, which is what confirms one is the average of the other family and not a second local law.
- F. M. White, Fluid Mechanics and Viscous Fluid Flow. Cited by number for the turbulent LOCAL power law Cf = 0.027 Rex−1/7, its companion thickness δ/x = 0.16 Rex−1/7 and its plate average 0.031 ReL−1/7. Verified by the identity that must hold: a one-seventh profile has θ = 7δ/72, so θ/x = 0.015556 Rex−1/7 and Cf = 2 dθ/dx = 0.02667 Rex−1/7, and the average is 7/6 of the local value = 0.0311. Both reproduce the printed constants.
- CFD-Online wiki, Skin friction coefficient. The source for the two constants in circulation for the one-seventh power law — 0.0576 and 0.0592 Rex−1/5, both printed there, both stated for 5 × 105 < Rex < 107. Which is which was settled by an identity rather than by preference: 0.0576 is the value self-consistent with θ/x = 0.036 Rex−1/5 (2 dθ/dx = 0.0576), and 0.074 — the average everyone quotes — is exactly 5/4 of 0.0592, so 0.0592 is the one the standard average belongs to. This page offers 0.0592 and names the 2.8 per cent alternative.
- 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. Used here as the INDEPENDENT check rather than as the page’s correlation: the Coles–Fernholz relation Cf = 2[(1/κ)ln Reθ + C]−2 with κ = 0.384 and C = 4.127 was compared against each power law in Reθ space, which removes the virtual-origin ambiguity that makes an Rex comparison unreliable. White’s law runs +3 per cent at Reθ = 1000 and +14 per cent at 104; the one-seventh law runs +9 per cent at 1000, −1 per cent at 104 and −12 per cent at 5 × 104. Those are the numbers quoted on this page, and they are the reason it says the choice of correlation is a small error and the local-versus-average confusion is a large one.
- B. S. Petukhov (1970), Heat transfer and friction in turbulent pipe flow with variable physical properties, Advances in Heat Transfer vol. 6, 503. The source for the explicit smooth-pipe friction factor f = (0.790 ln Re − 1.64)−2 over 3000 ≤ Re ≤ 5 × 106, as reproduced in standard heat-transfer texts. Checked against the implicit Prandtl–von Kármán smooth-wall law 1/√f = 2 log10(Re√f) − 0.8, solved numerically for this build: Petukhov is within 0.7 per cent from Re = 3 × 104 to 5 × 106 (0.011626 against 0.011647 at 106), +1.9 per cent at 104 and +4.7 per cent at 3000. The Blasius pipe form 0.3164 Re−1/4 was checked on the same basis and is −1.1 per cent at Re = 105, −14.1 per cent at 106 and −25.5 per cent at 5 × 106 — it collapses above its stated 2 × 105 limit, which is why Petukhov is the one used here.
- NIST Chemistry WebBook, Thermophysical Properties of Fluid Systems, isobaric table for water at 0.101325 MPa (NIST Standard Reference Database 69). A US Government work, so the values are reproduced here rather than cited: ρ = 999.10, 998.21, 997.05 and 983.20 kg/m³ and μ = 1.1373, 1.0014, 0.88982 and 0.46604 mPa·s at 15, 20, 25 and 60 °C. The column order 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 — because a shifted column in a retrieved table is the failure mode this project has caught most often.
- US Standard Atmosphere 1976 (NOAA / NASA / USAF). A US Government work. The source for Sutherland’s formula as this page applies it, μ = βT3/2/(T + S) with β = 1.458×10−6 kg/(m·s·K½) and S = 110.4 K, and for the sea-level identity that verifies it: 288.15 K gives μ = 1.7894×10−5 Pa·s, which with ρ = 1.2250 kg/m³ from the ideal-gas law gives ν = 1.4607×10−5 m²/s — the published standard value to five digits. Air properties are therefore computed on this page, not copied from ISO 2533.
- D. B. Spalding (1961), A single formula for the law of the wall, J. Appl. Mech. 28, 455. Used to compute the true near-wall profile against which the buffer-layer error figures on this page were derived. Spalding’s formula is explicit in u+ and implicit in y+, so it cannot be evaluated inside this site’s expression language, which is numeric and non-iterative by design; the figures it produced were computed offline and printed in the table above rather than being made a live output. That is a deliberate limit, recorded here so nobody looks for the missing feature.
- ANSYS Fluent Theory Guide, Wall functions. Cited by number for the standard wall-function constants κ = 0.4187 and E = 9.793 and for the value y* = 11.225 at which the linear and logarithmic laws intersect, which scalable wall functions use as a floor. Reproduced here as a check rather than as data: solving y+ = (1/κ)ln(E y+) with those constants gives 11.2247, and the same equation with the textbook κ = 0.41, B = 5.0 gives 10.805 — so the crossing point is constant-dependent to about 4 per cent, which is worth knowing before treating 11.225 as a physical boundary.
- NASA Turbulence Modeling Resource, 2D zero pressure gradient flat plate verification case (NASA Langley Research Center). A US Government work, and the reference case any flat-plate skin-friction correlation should be checked against before it is used to size a mesh. Cited here as the place to verify a solver’s own Cf against grid-converged CFD rather than against a correlation.
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/
