Inflation layer (boundary layer mesh)
Theory: why thin cells are stacked only near walls
Overview
Our CFD drag was 30% off the experiment. A senior colleague asked whether I'd added inflation layers. What are they?
It's a stack of thin cells laid along the wall. Near a wall the velocity rises from zero to the free-stream value within a thin boundary layer, and skin friction and heat transfer are decided there. Capturing it with tetrahedra alone would need enormous numbers of cells, but stacking prism-shaped cells that are coarse along the wall and fine only in the normal direction resolves it cheaply. For flows where friction drag matters, leaving them out throws results far off.
What y+ means
$y$ is the distance from the wall, $u_\tau$ the friction velocity and $\nu$ the kinematic viscosity. $y^+$ measures wall distance in units of the near-wall flow scale: roughly $y^+ < 5$ is the viscous sublayer and about 30–300 the log-law region.
| Wall treatment | Target first-cell y+ | Characteristics |
|---|---|---|
| Wall-resolved (low-Re models, SST k-ω, etc.) | ≈ 1 | Good for separation and heat transfer; more cells |
| Wall functions (standard k-ε, etc.) | 30–100 | Fewer cells; weak for separation and low-Re regions |
| In between (5–30) | Avoid | Fits neither assumption (except models with automatic wall treatment) |
The law of the wall came from experiments
The law of the wall — that near-wall velocity profiles collapse onto a universal shape in terms of $y^+$ — was derived in the 1930s by Prandtl, von Kármán and others from pipe and flat-plate experiments. Tests at different speeds and pipe sizes fall onto a single curve near the wall. Without that discovery there would be no wall functions that avoid resolving the wall region, nor today's practice of sizing meshes by $y^+$. CFD's wall treatment stands on laboratory insight from ninety years ago.
Worked example: first-layer height and layer count
First-layer height
Air at 20 °C flowing along a 1 m flat plate, evaluated at the trailing edge, using an approximate turbulent skin-friction correlation:
| Velocity | Reynolds number | First cell for y+ = 1 | First cell for y+ = 30 | Boundary-layer thickness |
|---|---|---|---|---|
| 20 m/s | 1.3 × 10⁶ | 0.018 mm | 0.55 mm | 22 mm |
| 60 m/s | 4.0 × 10⁶ | 0.0066 mm | 0.20 mm | 18 mm |
For y+ = 1, even at 20 m/s the first layer is about 0.02 mm — a thousandth of the boundary-layer thickness.
Exactly — which is why wall functions exist: at y+ = 30 the first layer can be thirty times thicker. But higher speeds need thinner first layers, and y+ varies a lot over one body — leading edge, trailing edge, near separation. Always plot wall y+ after the run and check it's in the intended range.
Layer count and growth ratio
$g$ is the growth ratio (how much each layer thickens) and $H_n$ the total thickness of $n$ layers. For 20 m/s and y+ = 1 (first layer 0.018 mm), covering a boundary layer about 22 mm thick requires:
| Growth ratio | Layers | Last-layer thickness |
|---|---|---|
| 1.1 | 51 | 2.1 mm |
| 1.2 | 31 | 4.3 mm |
| 1.3 | 23 | 5.8 mm |
| 1.2 (wall function, y+ = 30) | 13 | 4.9 mm |
Wall-resolved meshes need 30–50 layers, wall functions only about a dozen. Raising the growth ratio cuts layers but increases the size jump between neighbouring cells and hence error. About 1.1–1.2 is generally recommended, and 1.3 is usually treated as an upper limit.
Practical points
Meshing tips
- Blending into the core: keep the ratio of last-layer thickness to adjacent core cell size within about 2. Tetrahedral cores tend to form slivers above the last layer, so shrink the core size slightly or convert to polyhedra.
- Corners and narrow gaps: in concave corners and tight gaps layers collide, get automatically trimmed (layer collapse) or form poor cells. Display where collapse occurs and check.
- Heat transfer: thermal boundary-layer thickness depends on Prandtl number. In water or oil (high Pr) it is thinner than the velocity boundary layer, so use an even thinner first layer for heat transfer.
- Mesh independence: check that drag or heat-transfer coefficient doesn't change over two or three first-layer heights.
When too small a y+ is worse than too large
With a wall-function model, making the first layer so thin that y+ drops to about 5–10 pulls the first cell out of the log-law region the wall function assumes, and friction or heat transfer can end up further off. It's a case where the instinct that finer is always more accurate makes the result worse than a coarser mesh. Many current codes offer models that switch wall treatment automatically with y+, but always confirm which assumption your model uses.
Common mistakes
Mistakes and fixes
| Mistake | Effect | Fix |
|---|---|---|
| No inflation layers | Friction and heat transfer badly off | Add layers sized for y+ |
| Model and y+ mismatched | Wall-treatment assumptions break down | About 1 for resolved, 30+ for wall functions |
| Too few layers to cover the boundary layer | Velocity profile runs into coarse cells | Enough layers to exceed the boundary-layer thickness |
| Growth ratio too large | Errors from size jumps | Keep it around 1.1–1.2 |
| Not checking y+ after the run | Unintended y+ goes unnoticed | Plot the wall y+ distribution |
I'd like to compute the first layer for other speeds and lengths.
Use the y+ calculator for first-layer height and the turbulent boundary layer simulator for turbulent boundary-layer thickness and profile. Test mesh dependence with the mesh independence study tool. Broader meshing topics are covered in CFD mesh quality, mesh independence and polyhedral meshes.
Related Topics
Experience the theory firsthand with the interactive simulator for this field
All Simulators