Black FridayUpgrade your career this Black Friday. Get up to ₹60,000 Scholarship on IIT programsUp to ₹60K Black Friday Scholarship52 seats leftOffer ends Fri, 27 Nov, 11:59 pm IST.

Black Friday Scholarship – IIT Jammu & IIT Roorkee

The best Black Friday deal isn't a gadget. It's your next career move.

Get up to ₹60,000 Black Friday Scholarship on our PG programs with IIT Jammu and iHUB DivyaSampark, IIT Roorkee. IIT certification, 12 live sessions with IIT faculty and 100% placement assistance.

Only 52 seats left. Offer ends Fri, 27 Nov, 11:59 pm IST

3,905 engineers placed since 2019 · 1,276 hiring companies

By submitting you agree to our Terms and Privacy Policy.

Your free demo class is requested

Browse courses

y+ in CFD: Near-Wall Treatment, Wall Functions and First Cell Height

What y+, friction velocity and wall shear stress mean, the viscous sublayer, buffer and log-law layers, which y+ k-epsilon, k-omega SST and Spalart-Allmaras need in Fluent, OpenFOAM and STAR-CCM+, and how to size the first cell and inflation layers, with a worked example checked by script.

y+ in CFD: Near-Wall Treatment, Wall Functions and First Cell Height

y+ is the distance from a wall to the centre of the first mesh cell, measured in viscous units: . It tells you which layer of the turbulent boundary layer that cell sits in, and so which near-wall treatment is valid. Wall functions need the first cell in the log-law layer (y+ above 30). A resolved boundary layer (k-ω SST, Spalart-Allmaras, enhanced wall treatment) wants y+ near 1. Avoid the buffer layer between 5 and 30. To size the cell, estimate the wall shear stress from a skin-friction correlation, turn it into , then solve for .

In short

  • The near-wall region has three layers: the viscous sublayer (y+ below 5), the buffer layer (5 to 30) and the log-law layer (above 30). Ansys Fluent's theory guide uses exactly these limits for its low-Re and wall-function meshes (Fluent Theory Guide 4.18.3, 2026 R1).
  • Fluent: with wall functions, keep y+ above 30 everywhere; below about 15 the wall shear stress and heat transfer errors grow. For heat-transfer-critical work it recommends y+ near 1 and a y+-insensitive wall treatment. A boundary layer needs at least about 10 cells across it, and 20 is better (Fluent User's Guide 16.2.1, 2026 R1).
  • Skill-Lync worked example, checked by script: air at 20 °C and 30 m/s, 2 m from the leading edge. , , m/s. y+ = 1 needs a first cell 0.026 mm high and y+ = 50 needs 1.30 mm. The boundary layer is about 35.4 mm thick, so a growth ratio of 1.2 needs 31 layers to cover it.
  • Ansys Meshing's default inflation settings (Smooth Transition, 5 layers, growth rate 1.2) are not set from y+. Starting from 0.026 mm, five layers at 1.2 reach only 0.19 mm, which is 0.55% of that boundary layer.

This guide is for students and junior CFD engineers who have to choose a wall treatment and mesh a boundary layer, in Ansys Fluent, OpenFOAM or Simcenter STAR-CCM+. If the turbulence models themselves are new to you, read the introduction to RANS turbulence models first. Every worked number below was computed by a script, and every y+ band is quoted from solver documentation.

What is y+ in CFD?

y+ is a dimensionless wall distance: the distance from the wall to the first cell centre, divided by the viscous length scale . It is built from the wall shear stress through the friction velocity . A cell with y+ = 1 sits deep in the viscous sublayer. A cell with y+ = 100 sits in the log-law layer.

Think of as a ruler that the flow itself chooses. In the worked example below it is 13 micrometres long, so a cell centre 0.013 mm from the wall has y+ = 1. Measuring in this ruler makes near-wall velocity profiles look the same for a pipe, a wing or a ship hull. That is why one y+ guideline can work across very different problems.

Here is the wall shear stress (Pa), the density, the kinematic viscosity and the mean velocity parallel to the wall. is the matching dimensionless velocity.

Two details catch beginners out:

  • y is measured to the cell centre, not the cell top. Fluent and OpenFOAM store values at cell centroids, and Fluent defines the wall distance as the distance from the centroid of the wall-adjacent cell to the wall. On a regular prism layer the centre sits at half the height, so the first-cell height is . Forgetting this halves your y+.
  • Fluent also reports y*. Its standard wall functions use , built from the turbulent kinetic energy instead of the wall shear. In an equilibrium boundary layer the two are about equal. They differ near separation, where the wall shear tends to zero but does not.

What are the viscous sublayer, buffer layer and log-law region?

They are the three layers of the inner part of a turbulent boundary layer. In the viscous sublayer (y+ below about 5) molecular viscosity dominates and . In the log-law layer (y+ above about 30) turbulent eddies dominate and grows with . The buffer layer between them has both effects and neither simple law fits it.

The two laws are:

is the von Kármán constant and an empirical constant. Writing the log law as gives . Solvers use slightly different values:

SourceWhere the two laws cross
OpenFOAM wall functions (default)0.419.85.57y+ = 11.53
Ansys Fluent standard wall functions0.41879.7935.45y+ = 11.225
University of Iowa ME:5160 notes0.41-5.0-

The crossover is not a curiosity. OpenFOAM's nutkWallFunction switches from laminar to log-law behaviour at 11.53, a value it computes from and . Fluent applies its log law above , and its scalable wall functions clip to that same 11.225. Our script confirms that 11.225 is exactly where Fluent's two laws meet.

Law of the wall: u plus against y plus on a log axis. The linear law u+ = y+ fits DNS data below y+ = 5, the log law with kappa 0.41 and E 9.8 fits above y+ = 30, the two cross at y+ = 11.53, and Spalding's formula follows the DNS through the buffer layer.
The law of the wall with OpenFOAM's default constants, against Lee and Moser's channel-flow DNS at . In the buffer layer both simple laws overshoot the data. Drawn with code; script and data in the run folder.

The DNS points show why the buffer layer is the place to avoid. At y+ = 5 the linear law is 3.5% above the DNS velocity, and at y+ = 30 the log law is 3.0% above it. At the crossover, y+ = 11.53, both laws give while the DNS gives 9.23, an error of 25%. A wall function that assumes either law there gets the wall shear wrong.

Spalding's 1961 formula joins the two laws in one expression, so it stays close to the data at every y+:

OpenFOAM implements it as nutUSpaldingWallFunction, which gives a continuous wall treatment down to y+ = 0.

Beyond the log layer is the outer layer, where the free stream starts to matter. How far the log layer extends depends on the Reynolds number. Fluent's guide puts its upper limit at several thousand on ships and aircraft, but as low as 100 on low-Reynolds-number flows such as turbine blades. That is why "y+ below 300" is a habit, not a law.

Wall functions or a resolved boundary layer: which should you use?

Use wall functions (first cell at y+ of 30 or more) when the flow stays attached and you need pressure drop, flow split or mixing on a large industrial model. Resolve the boundary layer to the wall (y+ near 1) when the answer depends on wall shear, heat transfer, separation or transition. Today's y+-insensitive treatments make the second choice cheaper to try.

A wall function works like a lookup instead of a calculation. Rather than putting cells inside the steep near-wall profile, the solver places one cell in the log layer and uses the law of the wall to work out what the wall shear must be. That saves many thin cells on every wall face. The price is that the law of the wall assumes an equilibrium boundary layer, and separating or strongly accelerating flows break that assumption.

Wall functionsResolved boundary layer
First-cell y+30 to 300 (upper limit depends on Re)About 1, at most 5
Layers to cover the boundary layer (our example, growth 1.2)1131
Typical modelsStandard, RNG or realizable k-ε with standard or scalable wall functionsk-ω SST, Spalart-Allmaras, k-ε with EWT or Menter-Lechner, transition models
Good forAttached internal flows, HVAC ducts, large assemblies, first design loopsDrag, separation, heat transfer coefficients, airfoils, diffusers
Weak pointWrong wall shear in separation; errors grow if the mesh is refined below y+ ≈ 15Many more cells and smaller time steps

Three points about the models help explain the table:

  • Standard k-ε is a high-Reynolds-number model. Fluent's theory guide says its derivation assumes fully turbulent flow with negligible molecular viscosity, so it is "valid only for fully turbulent flows". Near the wall it needs either wall functions or a near-wall model bolted on, such as Fluent's two-layer enhanced wall treatment.
  • k-ω models can be integrated through the viscous sublayer as they are. Fluent notes that Wilcox's low-Reynolds-number terms are optional and mainly reproduce the peak of turbulent kinetic energy near the wall. They also delay the onset of turbulence, which makes them a very simple transition model, but Fluent does not recommend them for that. Use a proper transition model instead, which has stricter mesh rules (below).
  • k-ε and BSL k-ω miss separation. Fluent's guide says they fail to predict the onset and amount of separation from smooth surfaces because they overpredict eddy viscosity. Menter's SST model (1994) limits the eddy viscosity to fix this. That is one reason k-ω SST with y+ near 1 is the usual choice for airfoils and diffusers.

Fluent's current advice goes further than the old "pick one" rule. It recommends a y+-insensitive wall treatment for every model that has one. It says wall functions are "not generally recommended" because they block systematic near-wall refinement. They are especially harmful at Reynolds numbers of to , where there is no extended log layer.

What y+ should I use for k-epsilon, k-omega SST and Spalart-Allmaras?

For k-ε with standard wall functions, put the first cell at y+ 30 to 300 and never below about 15. For k-ω SST, Spalart-Allmaras and k-ε with enhanced wall treatment, aim for y+ near 1. Their y+-insensitive formulations tolerate coarser cells, but the buffer layer (5 to 30) still costs accuracy. Transition models need y+ below 1.

Model and wall treatmentSolverFirst-cell y+What the documentation says
k-ε, standard or non-equilibrium wall functionsFluentAbove 30 everywhereLower limit about 15; below it errors in wall shear and heat transfer grow without bound
k-ε, scalable wall functionsFluentAny; 30+ to use the log law properly is limited to 11.225, so finer meshes do not break it, but the sublayer is not resolved
k-ε, enhanced wall treatment (EWT-ε) or Menter-LechnerFluentAbout 1EWT is identical to the two-layer model when the first node is at y+ ≈ 1; both blend for coarser meshes
k-ω SST (default "correlation" treatment)FluentAbout 1Low-Re mesh y+ below 5, wall-function mesh above 30; blended in between with a small error in the buffer layer
Spalart-Allmaras (y+-insensitive default)FluentAbout 1 preferredBlends sublayer and log-layer values automatically, calibrated for the buffer layer too
Transition SST and other transition modelsFluentBelow 1Wall-normal expansion ratio no more than 1.1
Low-y+ / high-y+ / all-y+ wall treatmentsSTAR-CCM+Below 1 / above 30 / below 1 or above 30All-y+ is recommended for SST k-ω and Spalart-Allmaras; keep few cells between 1 and 30 (Volupe summary of the user guide)
nutkWallFunction, nutLowReWallFunctionOpenFOAMAbove 11.53 for the log law; about 1 for low-Re modelsBelow 11.53 the wall function sets turbulent viscosity to zero; the low-Re condition always does
Bars on a log y+ axis from 0.1 to 1000. Standard wall functions: target 30 to 300, invalid below 15. Scalable wall functions: target 30 to 300, finer acceptable. y+-insensitive treatments: target about 1, avoid 5 to 30. Low-Re-only and transition models: target below 1, invalid above 5.
First-cell y+ bands by wall treatment, condensed from the Fluent 2026 R1 guides, OpenFOAM-12 source and a STAR-CCM+ partner summary. Green is the target, red is outside the treatment's validity.

In practice, a y+-insensitive treatment lets you mesh to y+ = 1 on the surfaces that matter and accept y+ of 30 to 100 elsewhere. With standard wall functions, refining below y+ ≈ 15 makes results worse, not better.

Simcenter STAR-CCM+'s own user guide sits behind Siemens' support login, so we could not quote it directly. The STAR-CCM+ row uses Volupe's October 2026 summary of it. Volupe is a Siemens partner. Check the guide for your version if you have access.

How do you calculate the first cell height for a target y+?

Work out the Reynolds number, estimate the skin-friction coefficient from a flat-plate correlation, convert it to wall shear stress and friction velocity, then solve for . Double for the first-cell height in a cell-centred solver. Treat the result as a starting estimate and check the real y+ after the first solution.

We use the Prandtl-Schlichting local skin-friction formula, valid up to (Stern, University of Iowa ME:5160 notes):

To run these numbers for your own case, use the free y+ calculator: first cell height, inflation layers, and the y+ a given first layer gives along the wall.

Worked example: air at 30 m/s over a 2 m surface

Air at 20 °C and 1 atm has µPa·s and m²/s (Engineering ToolBox), so kg/m³. Take a flat surface 2 m long, such as a bus roof panel or a wind-tunnel plate, with air at 30 m/s. Size the cell at the trailing end, m.

  1. Reynolds number. .
  2. Skin friction. .
  3. Wall shear stress. Pa.
  4. Friction velocity. m/s. The same number comes straight from , so density cancels.
  5. Wall distance of the cell centre. For y+ = 1: m, or 0.013 mm.
  6. First-cell height. mm.

The same steps for other targets:

Target y+Cell-centre distance First-cell height Use
10.0130 mm0.0260 mmResolved boundary layer
50.0651 mm0.130 mmTop of the viscous sublayer
300.391 mm0.781 mmBottom of the log layer
500.651 mm1.30 mmSafe wall-function target
1001.30 mm2.60 mmWall functions
3003.91 mm7.81 mmCoarse wall functions, high Re only

The calculation fits in a few lines of Python. This is the code we ran, with its output:

from math import log10, sqrt

def first_cell_height(U, L, nu, y_plus):
    """First-cell height (m) for a target y+ on a flat-plate-like wall."""
    Re = U * L / nu
    cf = (2 * log10(Re) - 0.65) ** -2.3   # Prandtl-Schlichting, Re up to 1e9
    u_tau = U * sqrt(cf / 2)              # friction velocity
    return 2 * y_plus * nu / u_tau        # cell centre sits at half the height

for y_plus in (1, 30, 50):
    print(y_plus, f"{first_cell_height(30, 2.0, 15.06e-6, y_plus) * 1e3:.4f} mm")

# 1 0.0260 mm
# 30 0.7813 mm
# 50 1.3022 mm

How much does the choice of correlation matter?

Less than the geometry does. The same notes give two 1/7-power-law fits. gives a first cell of 0.0256 mm, 1.8% thinner. gives 0.0270 mm, 3.5% thicker. The first-cell height scales with , so even a 10% error in moves it by only about 5%.

Where you evaluate it and at what speed matter more:

  • Position. Wall shear is highest near the leading edge. Keep the 0.026 mm cell and assume the boundary layer is turbulent from the front edge, and y+ rises from 1.00 at 2 m to 1.31 at 0.1 m. In reality the first part is laminar up to roughly , which is 0.25 m here.
  • Speed. The same 0.026 mm cell gives y+ = 0.53 at 15 m/s and 1.90 at 60 m/s. If you run a speed sweep on one mesh, size the cell for the fastest case.
  • Real geometry. Stagnation points, sharp corners and accelerating flow have much higher wall shear than a flat plate. For internal flow, use the hydraulic diameter as the length and a pipe friction factor instead of a flat-plate correlation.

How many inflation layers do you need?

Enough to cover the whole boundary layer, with at least about 10 cells across it and preferably 20 (Ansys Fluent guidance). Ansys Meshing's default growth rate of 1.2 is a common choice, and transition models need 1.1 or less. With a 0.026 mm first cell and a 35 mm boundary layer, a growth rate of 1.2 needs 31 layers.

Inflation (or prism) layers are thin cells stacked against the wall, each one a growth ratio thicker than the one below. Fluent's guide asks for 10 to 20 or more such layers. It says the prism layer should be thicker than the boundary layer, so the mesh does not limit the boundary layer's growth. After layers the total thickness is a geometric series:

For the boundary-layer thickness , the 1/7-power-law estimate applies for from to . At 2 m it gives 35.4 mm (the alternative gives 36.5 mm). In wall units that is . A wall-function cell centre at y+ = 50 therefore sits at 1.8% of the boundary-layer thickness, well inside it.

Growth ratio Layers from 0.026 mm (y+ = 1)Last layerLayers from 1.30 mm (y+ = 50)Last layer
1.1523.36 mm144.50 mm
1.15395.28 mm126.06 mm
1.2316.18 mm118.06 mm
1.3238.37 mm910.6 mm
Total inflation thickness against number of layers on a log scale. From a 0.026 mm first layer, growth ratio 1.1 reaches the 35.4 mm boundary layer in 52 layers, 1.2 in 31 and 1.3 in 23. A wall-function mesh starting at 1.30 mm with growth 1.2 needs 11 layers.
Layers needed to cover a 35.4 mm boundary layer (air, 30 m/s, 2 m). A higher growth ratio saves layers but leaves coarser cells across the middle of the boundary layer.
Two to-scale columns of prism layers. Left, wall-function mesh: 11 layers starting at 1.30 mm. Right, resolved mesh: 31 layers starting at 0.026 mm, the lowest ones merging into a solid band. A 1/7-power-law velocity profile drawn over both rises steeply within the first millimetre.
The same two meshes with wall distance drawn to scale. Most of the velocity change happens in the bottom millimetre, which the wall-function mesh covers with less than one cell.

Two traps catch beginners with Ansys Meshing:

  • The defaults ignore y+. The default inflation option, Smooth Transition, sets layer heights from the local surface mesh size. The defaults are 5 maximum layers on solid bodies and a growth rate of 1.2. Switch to First Layer Thickness, enter and set the number of layers yourself.
  • Total Thickness can land you in the buffer layer. Ask for 20 layers at a growth rate of 1.2 over mm, and the first layer comes out 0.228 mm thick. Its centre sits at y+ = 8.7, in the buffer layer, which is too fine for wall functions and too coarse for a resolved mesh.

Also look at the last layer. At a growth ratio of 1.2 the 31st layer is 6.18 mm thick, and it should be close to the size of the core cells it meets. Ansys Meshing controls that jump with the Transition Ratio, which defaults to 0.272 for Fluent. For more on the controls, see how to insert inflation in Ansys Workbench and mesh sizing in Ansys Workbench.

How do you check y+ after the solve?

Plot the solver's y+ field on every wall after the solution has converged, and compare its range with the band for your wall treatment. If it is off, scale the first-cell height by target y+ divided by reported y+, remesh and re-run. Then check that the inflation layers cover the boundary layer.

  • Ansys Fluent. Wall Yplus is one of the turbulence quantities you can plot and report for every RANS model, and the k-ε and k-ω models add Wall Ystar. Draw a contour on the wall zones, then report the area-weighted average and the maximum for each zone.
  • OpenFOAM. Add #includeFunc yPlus to the functions list in system/controlDict. The yPlus function object writes a y+ field at write times and logs the minimum, maximum and average for each wall patch. On wall-function patches it reports the wall function's own y+. Elsewhere it uses .
  • STAR-CCM+. Plot wall y+ as a scalar on the wall boundaries and check it against the band for the wall treatment you picked.

Correcting the mesh is a one-line rescale, because y+ is proportional to while stays nearly the same:

If you wanted y+ = 1 and the solver reports 3.4 on a key surface, multiply the first-cell height by 0.294 and run again. Expect a second check. The from a real solution differs from the flat-plate estimate, which is exactly why you check.

Three things to read correctly in the plot:

  • Very low y+ at separation and reattachment is physics, not a mesh fault. Wall shear stress falls to zero where the flow separates, so and y+ do too.
  • Hot spots at leading edges and corners come from high local wall shear. Fix them with local inflation settings rather than refining every wall.
  • Coverage matters as much as the first cell. Fluent's guide gives a quick check: the turbulent viscosity peaks near the middle of the boundary layer, so twice that distance marks its edge. If the edge is outside the prism layers, add layers.

Near-wall meshing questions come up in almost every CFD interview. Our CFD engineer interview questions include a whiteboard version of this calculation, and the Courant number guide covers the time-step side of the same thin cells. Skill-Lync's Master's in CFD and the Ansys Fluent and OpenFOAM courses teach meshing, wall treatment and turbulence models together on real projects. For external flows, see the external aerodynamics programme, or compare options on the CFD courses page.

Frequently asked questions

Do I always need y+ = 1 for k-omega SST?

No, but it is the safest target. Fluent's default SST wall treatment blends between sublayer and log-law values, so meshes with y+ above 30 still give sensible answers. The buffer layer (5 to 30) gives small wall-shear errors. For separation, drag or heat transfer, aim for y+ near 1 on the surfaces that matter.

What y+ is too low for wall functions?

For Fluent's standard and non-equilibrium wall functions, anything below about 15. The guide says errors in wall shear and heat transfer grow without bound below that, and recommends y+ above 30 everywhere. Scalable wall functions remove the problem by treating any below 11.225 as 11.225, but they still do not resolve the sublayer.

Why does the same mesh give a different y+ when I change the inlet speed?

Because y+ depends on the flow through , not just on the mesh. In our example, a 0.026 mm first cell gives y+ = 0.53 at 15 m/s, 1.00 at 30 m/s and 1.90 at 60 m/s. Size the first cell for the highest speed you plan to run.

What is the difference between y+ and y*?

Both measure wall distance in viscous units. y+ uses the friction velocity from the wall shear stress. y* uses from the turbulent kinetic energy at the first cell. They are about equal in an attached equilibrium boundary layer. Fluent's standard wall functions use y*. Because it is built from , it does not fall to zero at a separation point the way y+ does.

Is there a y+ calculator I can use?

The six-line Python function in this guide is one, and it matches the hand calculation. Change , , and the target y+. For a real geometry, treat the answer as the first guess and correct it from the solver's y+ plot after the first converged run.

Sources and further reading

Want this on your résumé?

Talk to a counsellor.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.