Transition and turbulence

What a code says to a wall

A calculation that cannot afford to resolve the viscous sublayer has to tell the wall something else instead, and what it tells it is the law of the wall — an asymptotic result, applied at one grid point, on the assumption that the point lies in a region the calculation has not checked exists. Where it does, the answer is exact. Where it does not, the friction is out by tens of per cent, and refining the grid makes it worse.

Worth reading first: The layer with no length in it · A guess with a constant in it.

Every calculation of a turbulent flow over a surface faces the same arithmetic. The viscous sublayer is a few microns thick on an aeroplane wing; the wing is tens of metres long; and resolving the first with cells small enough to see it, over the whole of the second, costs more cells than the calculation can carry. Something has to be assumed about what happens between the wall and the first grid point, and what is assumed is almost always a wall function.

A wall function is the law of the wall, used backwards. It takes the velocity at one point, assumes that point lies in the logarithmic region, and solves for the friction velocity that would put it there. This essay measures what that assumption costs, and the answer has a shape nobody would choose: it is a valley.

Where the first grid point may go. The error in the friction a wall treatment infers, against the height of the first grid point, at Re_τ = 20,000. The velocity fed to each treatment is the closure's own, so what is plotted is the modelling of the boundary condition with nothing else in it. The log-law function is exact between y⁺ 30 and 10261 and is 64 per cent wrong at y⁺ = 1; the sublayer treatment is exact below y⁺ = 5 and hopeless above it; and the blend that most codes ship is within a few per cent everywhere and exact nowhere.
Fig. 1 The error in the friction inferred by three wall treatments, against the height of the first grid point in wall units. The velocity handed to each is the closure’s own, so what is plotted is the modelling of the boundary condition and nothing else.

What the calculation actually knows

A finite-volume code storing velocity at cell centres knows u1u_1, the velocity at height y1y_1, and needs τw\tau_w, the stress the wall exerts. The two are related by the profile between them, and the profile between them is the thing the calculation cannot afford to compute.

The log-law route closes the gap in one line:

u1=uτ[1κlny1uτν+B].u_1 = u_\tau\left[\frac{1}{\kappa}\ln\frac{y_1 u_\tau}{\nu} + B\right].

Everything in it is known except uτu_\tau, which appears on both sides and inside a logarithm, so it is found by iteration — half a dozen bisections, once per wall cell, once per time step. That is the whole of a standard wall function, and its cost is nothing at all. What it buys is the ability to put the first cell four decades further from the wall than a resolved calculation needs, which is a saving measured in orders of magnitude.

The assumption is not that the flow is turbulent. It is that y1y_1 lies in the overlap layer — the band where neither the viscous length nor the layer thickness is felt. That band exists, has a measurable width, and moves with the Reynolds number, none of which the calculation checks.

The part of the flow a wall function does not have. The first twenty-six wall units of the profile, with the two things a wall treatment can assume drawn against it. Below y⁺ ≈ 5 the flow is the straight line u⁺ = y⁺; above y⁺ ≈ 30 it is the logarithm; and between them is the buffer layer, which is neither and which is where the peak turbulent production actually happens. A first cell placed at y⁺ = 12 infers a friction -14.06 per cent wrong, and a code that halves its cell size to be safe moves the point further into the region where its own assumption is false.
Fig. 2 The first twenty-six wall units, with the two things a treatment can assume and the region where neither holds. A cell centre at y+=12y^+ = 12 sits squarely in the buffer layer, where the flow is neither linear nor logarithmic and where the peak turbulent production actually happens.

The measurement, with the closure on both sides

The comparison made here is deliberately narrow. The velocity fed to each wall treatment is the one the mixing-length closure gives at that height, and the friction the treatment infers is compared against the friction that same closure has. So the closure’s own shortcomings — and they are substantial — appear on both sides of the comparison and cancel. What is left is the error of the boundary condition, on its own.

Three treatments are measured. The log-law function above; the sublayer treatment, which assumes instead that y1y_1 is inside the viscous region where u+=y+u^+ = y^+, which is what a resolved calculation does; and the blended treatment that most production codes ship, which joins the two with a weight that is a function of y+y^+.

first cell at y+y^+ log-law function sublayer treatment blended
1 −64% 0.0% +0.1%
3 −51% −0.1% +1.7%
10 −18% −5.6% +3.8%
30 −2.0% −24% −0.4%
100 +0.5% −45% +0.5%
1,000 +0.1% +0.1%

The log-law column is the one to read first. It is accurate to a few tenths of a per cent from y+=30y^+ = 30 up to about half the channel width, and it degrades catastrophically below that: at y+=1y^+ = 1, which is where a careful analyst puts the first cell of a resolved calculation, the inferred friction is a third of the true value.

That column runs the wrong way. Every other numerical error in a calculation falls as the grid is refined; this one grows. A practitioner who has been told that finer is safer, and who halves the near-wall spacing to be certain, has made the answer worse by a factor that no grid-convergence study will diagnose, because the sequence of grids does not converge to anything.

The plateau that is the log law. y⁺ du⁺/dy⁺ across a channel, at five Reynolds numbers. Millikan's argument says this quantity must be constant wherever neither the viscous length nor the channel width may appear, and its value there is 1/κ. At Re_τ = 180 there is no flat part at all; at Re_τ = 50,000 it is flat over 1.87 decades and gives κ = 0.4129. The log law is a statement about a limit, and this is the picture of the flow approaching it.
Fig. 3 Why the valley has the width it has. The wall function is exact wherever the diagnostic function is flat, and the flat region’s lower end sits at y+30y^+ \approx 30 at every Reynolds number while its upper end moves out with Reτ\mathrm{Re}_\tau. The band a code may use is bounded below by physics and above by the flow’s own size.

The band that is quoted, and the band that exists

Textbooks and code manuals give the guidance as 30<y+<30030 < y^+ < 300, and the lower bound is right. The upper one is not a property of wall functions at all: it is a property of the flows those manuals were written about.

Measured against the closure at Reτ=20,000\mathrm{Re}_\tau = 20{,}000, the log-law function stays within two per cent up to y+10,000y^+ \approx 10{,}000 — half the channel. At Reτ=2,000\mathrm{Re}_\tau = 2{,}000 the same treatment is out by two per cent by y+1,000y^+ \approx 1{,}000, because the overlap has ended by then. The upper limit is not a number; it is a fraction of the layer thickness, and expressing it in wall units disguises the fact that it moves.

Where the first grid point may go. The error in the friction a wall treatment infers, against the height of the first grid point, at Re_τ = 2,000. The velocity fed to each treatment is the closure's own, so what is plotted is the modelling of the boundary condition with nothing else in it. The log-law function is exact between y⁺ 31 and 816 and is 64 per cent wrong at y⁺ = 1; the sublayer treatment is exact below y⁺ = 5 and hopeless above it; and the blend that most codes ship is within a few per cent everywhere and exact nowhere.
Fig. 4 The same sweep at a tenth of the Reynolds number. The valley’s floor is the same and its right-hand wall has moved in by a decade, because the overlap that the treatment assumes is a decade narrower. The lower bound is physics and the upper bound is geometry.

The practical difficulty is that y+y^+ is not known when the grid is made. It contains uτu_\tau, which is an output of the calculation; a grid is built on an estimate, and the estimate is often wrong by a factor of two, which moves the first cell across half the valley. On a body where the friction varies by an order of magnitude between the leading edge and the rear — which is every body — no single grid puts every wall cell in the band, and the parts of the surface that fall outside it are the parts where the flow is doing something interesting.

Where the assumption is not merely inaccurate but false

The valley above is measured in an equilibrium channel, which is the flow the law of the wall was derived for, and which is the least demanding case a calculation ever meets. Three common situations violate its assumptions outright, and in each the error is not a number on a curve but a missing effect.

A separating flow has no friction velocity to scale with. At the point of separation the wall stress is zero, so uτ=0u_\tau = 0, the wall unit is infinite, and every cell is at y+=0y^+ = 0. The logarithm is not slightly wrong there; it is undefined. Codes patch this with a velocity scale built from the turbulent kinetic energy instead, which is a different assumption with its own range of validity and no derivation of the kind the log law has.

A layer under a strong pressure gradient is not in equilibrium. The overlap argument assumes the stress is nearly constant across the matched region. Under a rising pressure it is not — the total stress varies by tens of per cent across the very band where the wall function is being applied — and the profile acquires a term the log law has no room for.

A transitional layer is not turbulent at all. A calculation using wall functions has assumed turbulence everywhere, so it has assumed that transition happened upstream of everything, which on a wing at flight Reynolds number is wrong for the first several per cent of the chord and matters because that is where the friction is highest. Whether a layer has become turbulent by a given station is a question this collection treats as the hard one it is, and no wall treatment asks it.

The blended treatment, and what it costs to be never wrong

The third curve in the hero figure is the compromise every commercial code now ships: a blend that tends to the sublayer solution at small y+y^+, to the log law at large y+y^+, and to something in between in the buffer layer. Its error stays within a few per cent everywhere across four decades of placement.

That is genuinely valuable — it removes the trap of a grid that is accidentally refined into the buffer layer — and it should be read for what it is. The blend is exact nowhere. In the sublayer the resolved treatment is exact and the blend is a few per cent out; in the log layer the wall function is exact to a tenth of a per cent and the blend is half a per cent out. It converts a large error that occurs sometimes into a small error that occurs always, which is the right trade for industrial work and the wrong one for a calculation intended to establish a number.

Where the assumption actually is. Prandtl's mixing length against distance from the wall, with and without van Driest's damping. The undamped line ℓ = κy is the whole of the model: it says an eddy near a wall can only be as big as its distance from it. Everything the law of the wall claims is a consequence of that one line, and it is an assumption rather than a derivation.
Fig. 5 The closure underneath all of it. The mixing length is what supplies both the profile the treatments are tested against and the log law they assume; a wall function inherits every one of its limitations, and adds the assumption that the first cell is in the right place.
The part of the flow a wall function does not have. The first twenty-six wall units of the profile, with the two things a wall treatment can assume drawn against it. Below y⁺ ≈ 5 the flow is the straight line u⁺ = y⁺; above y⁺ ≈ 30 it is the logarithm; and between them is the buffer layer, which is neither and which is where the peak turbulent production actually happens. A first cell placed at y⁺ = 100 infers a friction 0.46 per cent wrong, and a code that halves its cell size to be safe moves the point further into the region where its own assumption is false.
Fig. 6 The same first cell placed at y+=100y^+ = 100 instead of 12. It is now above the buffer layer entirely, so the logarithm the treatment assumes is the right function there — and the cell has swallowed the region where the turbulent production peaks, which the calculation therefore never resolves and never misses.

The honest summary of what a wall function is

It is a modelled boundary condition — the same species of object as the effective slip length that stands in for a porous wall, or the surface roughness that stands in for a distribution of grains. In each case a structure too fine or too expensive to resolve is replaced by a relation between quantities the calculation does carry, and in each case the replacement is exact in a limit and approximate outside it.

Roughness is the third member of the family and the most familiar: a wall covered in grains is replaced by one number, and the additive constant BB in the log law absorbs it. That substitution has the same structure and the same limitation — it is exact once the grains are much smaller than the layer, and the wall stops being able to feel them once they are smaller than the sublayer, which is a condition on the flow rather than on the surface.

The difference is that the porous-wall condition has a small parameter and an error estimate, and the wall function has neither. Its accuracy depends on where a grid point happens to be relative to a layer whose thickness is an output, in a flow whose equilibrium is assumed rather than checked. That is not a criticism of anybody’s code — the alternative is not computing the flow at all — but it is the reason a friction coefficient from a wall-function calculation carries an uncertainty that no residual plot displays. On an aircraft that uncertainty is not academic: friction is roughly half of what a transport aeroplane spends its fuel on, and the split between the two drags is decided by exactly this number.

The velocity is not the only thing the wall is told

The measurement above is of one quantity — the friction inferred from one velocity — and a calculation needs more than that at a wall. A two-equation model carries a turbulent kinetic energy and a dissipation rate as well, and both of those need boundary conditions at the same first cell, supplied by the same treatment and resting on the same assumption.

They are set by local equilibrium: assume that turbulence production equals dissipation in the first cell, which in the overlap layer is very nearly true, and the two conditions follow — k=uτ2/Cμk = u_\tau^2/\sqrt{C_\mu} and a dissipation set by uτ3/κy1u_\tau^3/\kappa y_1. Both inherit whatever error the friction has, and both then inherit a second one of their own, because local equilibrium is a stronger assumption than the log law is. A layer can be logarithmic in the mean while its turbulence is transporting energy across the region rather than dissipating it where it is made, and under a pressure gradient it routinely is. So the boundary condition on the mean velocity and the boundary condition on the turbulence fail at different rates, and the second is not measured by any figure in this essay.

Where the first grid point may go. The error in the friction a wall treatment infers, against the height of the first grid point, at Re_τ = 200,000. The velocity fed to each treatment is the closure's own, so what is plotted is the modelling of the boundary condition with nothing else in it. The log-law function is exact between y⁺ 30 and 112715 and is 64 per cent wrong at y⁺ = 1; the sublayer treatment is exact below y⁺ = 5 and hopeless above it; and the blend that most codes ship is within a few per cent everywhere and exact nowhere.
Fig. 7 The same error curve an order of magnitude further up in Reynolds number. The log-law region is now exact from y+=30y^+ = 30 to over a hundred thousand, so the window in which a first grid point may be placed is enormous — and the practical constraint on where it goes has stopped being physics and become the aspect ratio of the cell.

The same point, asked for a heat flux

The harder version of all of this is thermal, and it is the version most industrial calculations actually want, because a heat exchanger, a turbine blade and an electronics enclosure are all asking for a wall heat flux rather than a wall stress.

A thermal wall function has the same shape as the momentum one —

T+=Prtκlny++P(Pr)T^+ = \frac{Pr_t}{\kappa}\ln y^+ + P(Pr)

— and the difference between the two is entirely in that additive term. For a gas, where the Prandtl number is near one, the conductive and viscous sublayers have the same thickness, PP is small, and the thermal function is the momentum function with a constant of the same size: this is the Reynolds analogy holding, and heat transfer in air is about as reliable as friction is.

For a liquid it is not. The conductive sublayer is thinner than the viscous one by roughly Pr1/3Pr^{-1/3}, so in water it is half the thickness and in an oil a fifth, and the additive term that accounts for the extra resistance grows steeply with the Prandtl number — from nearly nothing for air to tens of wall units for oils. That term is a correlation. It has no derivation of the kind the log law has, it was fitted to measurements in the 1960s, and every liquid-side heat-transfer coefficient a wall-function calculation produces has it as a multiplier.

The practical position is worth stating in one sentence, because it is not the one a residual plot suggests. A calculation whose friction is good to two per cent can be out by tens of per cent in its wall heat flux, in the same cells, at the same grid spacing — because the two treatments have different sublayers, different sensitivities to placement and different provenance, and only one of them is asymptotic. And the turbulent Prandtl number in that formula, quoted as 0.85 in the middle of a layer, is not 0.85 next to a wall: it rises towards the surface in every measurement that has resolved it, in a way the models represent with another correlation.

None of which shows up in the valley plot. A wall treatment is a set of modelled conditions rather than one, they fail independently, and the one this essay can measure is the one with the best derivation behind it.

What the picture cannot show

The comparison is against a closure and not against a flow. Both the wall function and the profile it is tested on came from Prandtl’s mixing length, and the agreement in the middle of the valley is therefore a statement about internal consistency. What it establishes is the shape of the error against placement, which is the thing being argued about; it does not establish that the absolute friction from either is right, and a direct simulation would give a different valley floor.

The channel is in equilibrium and the surface is smooth. Both are assumptions the essay has already said a real application violates, and no figure here shows the size of the resulting error, because computing it needs the flow that is not available. The same limitation applies to the laminar comparison: where a real layer separates, the friction goes to zero and the whole scaling collapses, and the error of a wall treatment there is not a percentage but a category error.

And no error bar accompanies a wall-function result in practice. Everything in the table above required knowing the answer in advance. In a calculation of a new configuration the same numbers are unavailable by construction, which is the position every practitioner is actually in.

Who found it, and when

Wall functions in this form date from Launder and Spalding’s work of the early 1970s, arriving with the two-equation turbulence models they were built to serve, and the 30<y+<30030 < y^+ < 300 guidance is about as old. Blended treatments came later: Kader’s composite profile of 1981 is the ancestor of most of them, and the automatic wall treatments in current codes descend from work in the 1990s that made the switch continuous rather than a user’s choice.

The surprising connection is with the singular-perturbation model problem that this collection uses to introduce boundary layers. There, an equation of higher order takes an extra condition and pays for it with a thin layer, and the outer solution is recovered by matching rather than by resolving. A wall function is that procedure carried out numerically: the outer problem is solved on a coarse grid, the inner problem is not solved at all, and a matching condition is applied at one point. The whole of the technique is an asymptotic method implemented as a boundary condition — and its failure mode is the classical one, which is that a matching applied where the layers do not overlap gives an answer with no error estimate and no warning.

Where the ladder goes next

Beside this rung sits the question of what else a wall may be told when its structure is not resolved: an averaged wall condition, where the small parameter is explicit and the error can be established. Above it lies the same problem in a flow that is not in equilibrium, which needs a description of the layer’s history and is the frontier of the subject rather than a settled rung.

The three thicknesses of a layer that has no edge. The Blasius profile with its three integral thicknesses marked. Each weights the same velocity deficit differently: the displacement thickness by how much fluid is missing, the momentum thickness by how much momentum is, and the energy thickness by how much kinetic energy is. They are 1.7208, 0.6641 and 1.0444 in similarity units and the ordering is not a coincidence — the energy weight is the momentum weight times a factor that is largest where the fluid is fastest.
Fig. 8 And the quantity underneath all of it, in the laminar case where everything is computable: the three thicknesses of a boundary layer, of which the calculation above resolves none.

What links here

Computed from the collection rather than written here: the essays that point at this one.

Reads more easily once this is understood

Essays that name this one as worth reading first.

Shares its objects with

Essays naming at least two of the same things, that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

Adverse pressure gradientBoundary conditionBoundary layerClosureFriction velocityThe law of the wallMeasurementOverlap layerSeparationTurbulenceWall shearWall units