Flows and fields

Every flow is two flows

Any velocity field splits into a part carrying all of the divergence and a part carrying all of the vorticity. The theorem says so and does not say which split — the two halves can be moved between each other by anything harmonic, and on a bounded region that is an infinite family.

Worth reading first: Mass has nowhere to go · Spin is not the same as going round.

There is a theorem that gets quoted in the first week of every course in this subject and worked in none of them. Any smooth vector field can be written

u=ϕ+×A,\mathbf u = \nabla\phi + \nabla\times\mathbf A,

with the first term carrying every scrap of the divergence and the second every scrap of the curl. In the plane, with A=ψz^\mathbf A = \psi\hat{\mathbf z}, it reads

u=(ϕx+ψy, ϕyψx),2ϕ=u,2ψ=ω.\mathbf u = (\phi_x + \psi_y,\ \phi_y - \psi_x),\qquad \nabla^2\phi = \nabla\cdot\mathbf u,\qquad \nabla^2\psi = -\omega.

Two Poisson problems. Everything this collection’s vocabulary is built from follows: ϕ\phi is the velocity potential, ψ\psi is the stream function, and the two are the same object seen from either side of the same tensor.

One field, and the two parts the theorem splits it into. A velocity field made of a smooth source, a smooth vortex and a uniform stream, and the two fields the Helmholtz decomposition returns for it. The first carries the whole divergence and has no curl anywhere; the second carries the whole curl and has no divergence. They are computed by solving two Poisson problems on a grid, with the divergence and the vorticity differenced from the field rather than taken from the expressions that built it. Adding the two back together does not recover the field.
Fig. 1 A field made of a smooth source, a smooth vortex and a uniform stream, and the two fields the decomposition returns. The first has no curl anywhere; the second has no divergence. Adding them back together does not recover the field, and the rest of this essay is about why not.

What the theorem does not say

The sentence usually left off is this. Add to ϕ\nabla\phi any field that is both divergence-free and curl-free, and subtract the same field from ×A\nabla\times\mathbf A. The sum is unchanged. Both terms still satisfy the equations that define them. And nothing in the statement of the theorem distinguishes the two answers.

Such a field is the gradient of a harmonic function, and on a bounded region the space of harmonic functions is infinite-dimensional. So the theorem does not decide a split; it decides a split up to an infinite family, and something else has to choose.

That something is a boundary condition, and the object of this essay is to make it a measurement rather than a caveat.

The sharpest case, in closed form

Take pure straining flow, u=(αx,αy)\mathbf u = (\alpha x, -\alpha y). Its divergence is zero and so is its vorticity. It is therefore the entire potential part of itself and the entire solenoidal part of itself, and both statements can be written down:

ϕ=12α(x2y2)  ϕ=(αx,αy),\phi = \tfrac12\alpha(x^2-y^2)\ \Rightarrow\ \nabla\phi = (\alpha x, -\alpha y),

ψ=αxy  (ψy,ψx)=(αx,αy).\psi = \alpha xy\ \Rightarrow\ (\psi_y, -\psi_x) = (\alpha x, -\alpha y).

Both reproduce the field to ten significant figures. They share no term. One says the flow is a pure potential flow with no stream function needed; the other says it is a pure solenoidal flow with no potential needed. The equations cannot tell them apart, and both are correct.

One field, decomposed twice, with nothing in common. Pure straining flow has neither divergence nor vorticity, so it is entirely the potential part of itself and entirely the solenoidal part of itself. On the left its level sets are those of a velocity potential; on the right those of a stream function; and the arrows are the same field in both panels. Both statements are exact to ten significant figures. Nothing in the decomposition theorem distinguishes them, and only a boundary condition can.
Fig. 2 One field, decomposed twice. On the left the level sets of a velocity potential; on the right those of a stream function; the arrows are identical in both panels.

This is not a pathological example. Pure strain is the flow near any saddle-type stagnation point, which is to say near the majority of the interesting points in any two-dimensional flow.

Doing the split on a real field

Quoting a theorem is cheap; the useful thing is to run it. Take a field with a compact source in it, a compact vortex somewhere else, and a uniform stream, and sample it on a grid. Difference the divergence and the vorticity out of the samples — not out of the expressions that built the field, which would make the exercise a tautology — and solve the two Poisson problems with ϕ\phi and ψ\psi pinned to zero on the edge of the box.

The two right-hand sides, and the stream that is in neither. The divergence and the vorticity of the field, differenced from it on the grid the Poisson problems are solved on. Each is compact and sits where its blob is. The uniform stream appears in neither picture, because it has no divergence and no curl anywhere, and that is exactly why the two solves cannot recover it. Every field that is invisible here is a field the interior cannot determine.
Fig. 3 The two right-hand sides, differenced from the sampled field before either solve. Each is compact and sits where its blob is. The uniform stream is in neither picture.

The blobs are smooth on purpose. A point source and a point vortex are the natural things to reach for and both are infinite at a point a grid can land exactly on, which turns the whole calculation into NaN and looks, on the way past, like a solver bug rather than a modelling one.

Both solves converge. The potential part has no curl and the solenoidal part no divergence, to 101610^{-16} — though that particular number says nothing, because the central-difference curl of a central-difference gradient is identically zero whatever ϕ\phi is. What does say something is that the divergence recovered from ϕ\nabla\phi matches the field’s own to within eight parts in a thousand of the peak.

What is left over

Subtract both parts and something remains. That remainder is not an error and it does not go away.

Its mean magnitude is 0.500018 on a grid of ninety-seven points a side, converging to 0.500004 at a hundred and ninety-three. The uniform stream the field was built with has a speed of exactly 0.5. Neither Poisson solve was told it existed, and neither could have found it: a uniform stream has no divergence and no vorticity anywhere, so it contributes nothing to either right-hand side.

What is left over, and why neither Poisson solve could see it. The field remaining after both parts are subtracted. It is uniform to the eye and to the arithmetic: its mean magnitude converges to the free-stream speed of the field it came from, to five decimal places, as the grid is refined. A uniform stream has no divergence and no vorticity anywhere, so it contributes nothing to either right-hand side, and no amount of solving in the interior can produce it. It is supplied by the boundary, and the boundary is the piece of information the theorem does not contain.
Fig. 4 The leftover field. It is uniform to the eye and to the arithmetic, and its magnitude is the free-stream speed of the field it came from. It is supplied by the boundary, and the boundary is the piece of information the theorem does not contain.

The remainder carries sixty-four per cent of the field’s mean speed. It is not a correction.

Telling arithmetic from physics

There is an obvious objection: the remainder has a divergence of about two-tenths and a curl of about a half on that grid, so is it really harmonic, or is the whole story an artefact?

A single grid cannot answer that, and refining does. The five-point Laplacian the Poisson solve inverts and the wide central difference the divergence is measured with are not the same operator, and their difference is second order in the spacing. So:

  • if the remainder’s divergence and curl fall as h2h^2, they are the mismatch between two discrete operators and the field is harmonic in the limit;
  • if they stay flat, the remainder genuinely is not harmonic and the calculation is wrong somewhere.

Measured across grids from sixty-five to a hundred and ninety-three points a side, the fitted orders are 1.96 and 1.91. The magnitude, meanwhile, does not fall at all.

The remainder's divergence and curl are arithmetic; its size is not. Three quantities against the grid spacing, on logarithmic axes. The divergence and the curl of the leftover field fall at second order — the fitted slopes are 1.96 and 1.91 — which is the difference between the five-point Laplacian the Poisson solve inverts and the wide central difference the divergence is measured with. The magnitude of the remainder does not fall at all. One of these three curves is a numerical artefact vanishing under refinement and two of them are, and the third is the answer.
Fig. 5 Three quantities against the grid spacing. Two of them are numerical and vanish under refinement; the third is the answer and does not.

That refinement study is the whole argument. Two of these curves are arithmetic and one is physics, and the only way to tell is to change the grid. It is the same discipline as asserting that a solved field is a solution rather than trusting that it looks like one.

The consequence: vorticity does not determine a flow

Now the result this essay exists for, because it is repeated wrongly across the whole subject.

Take a Rankine vortex — solid-body rotation inside a core, a free vortex outside. Take the same vortex with a uniform stream added. Their vorticity fields are equal at every point, to eleven decimal places, because a uniform stream has no vorticity. Their velocity fields differ by six-tenths of the core’s peak speed.

Two flows with identical vorticity everywhere. A Rankine vortex, and the same vortex with a uniform stream added. The vorticity fields are equal at every point to eleven decimal places — the stream contributes none — and the velocity fields differ by six-tenths of the core's peak speed. Every local measurement of vorticity, rate of strain and divergence is the same in both panels. The vorticity distribution does not determine the flow; it determines the flow up to a field that carries neither, and which of those the fluid is doing is decided at the boundary.
Fig. 6 Two flows with identical vorticity everywhere. Every local measurement of vorticity, rate of strain and divergence is the same in both panels, and they are not the same flow.

So the sentence “the vorticity determines the flow” — which is how vortex methods, the Biot–Savart law and half the intuition about where vorticity comes from get introduced — is false as stated. What is true is that the vorticity determines the flow up to a harmonic field, and the harmonic field is set at the boundary.

That is why a vortex-lattice or panel calculation needs a condition at every surface as well as a vorticity distribution, and why the circulation round a body is not fixed by anything local: the circulation is the harmonic part, on a domain with a hole in it.

The two right-hand sides, and the stream that is in neither. The divergence and the vorticity of the field, differenced from it on the grid the Poisson problems are solved on. Each is compact and sits where its blob is. The uniform stream appears in neither picture, because it has no divergence and no curl anywhere, and that is exactly why the two solves cannot recover it. Every field that is invisible here is a field the interior cannot determine.
Fig. 7 The two right-hand sides for the same case. Both are identical to the previous field’s, because a uniform stream contributes to neither, which is the whole of why the remainder exists.

The two questions the boundary answers

The infinite family the theorem leaves open collapses as soon as two things are said, and both of them are about the edge rather than the interior.

What the field does at infinity. On the whole plane, with a field decaying fast enough, the harmonic part must be zero — a harmonic function bounded on the whole plane is constant, and a constant gradient is not decaying. So the decomposition is unique on an unbounded domain with a stated decay, which is exactly the case every textbook proof takes and never says it is taking.

What the field does on each boundary of a bounded domain. Fixing the normal component of the solenoidal part on every boundary, or the value of ϕ\phi on every boundary, picks one member of the family. Different conditions pick different members, all of them exact.

And on a domain with a hole there is a third thing: the circulation round each hole, which is a number, not a function. That number is the whole of the harmonic freedom for a simply-punctured domain, and this collection has spent a field’s worth of essays on which value of it nature picks — the answer being the one that makes the flow leave the trailing edge smoothly, which is a piece of viscous physics wearing a kinematic hat.

The projection every incompressible solver performs

There is a place where this theorem is not a piece of theory but a subroutine called once per timestep, and it is worth naming because it is where the ambiguity above becomes an argument between practitioners.

An incompressible solver advances the momentum equation without the pressure, producing an intermediate velocity field that has a divergence it should not have. It then removes that divergence by solving 2ϕ=u\nabla^2\phi = \nabla\cdot\mathbf u^* and subtracting ϕ\nabla\phi. That is the Helmholtz decomposition, run once per step, with the potential part discarded and the solenoidal part kept — and ϕ\phi turns out to be the pressure, up to a factor.

The boundary condition for that Poisson problem is exactly the freedom this essay is about. There is no physical boundary condition on the pressure; what is physical is the velocity at the wall. Different choices — a zero normal derivative, an extrapolated one, a condition derived from the momentum equation at the wall — produce different ϕ\phi, different pressure fields near the boundary, and the same velocity field to the order of the scheme. Whole papers exist about which to use, and the reason they exist is the sentence the theorem leaves off.

One field, and the two parts the theorem splits it into. A velocity field made of a smooth source, a smooth vortex and a uniform stream, and the two fields the Helmholtz decomposition returns for it. The first carries the whole divergence and has no curl anywhere; the second carries the whole curl and has no divergence. They are computed by solving two Poisson problems on a grid, with the divergence and the vorticity differenced from the field rather than taken from the expressions that built it. Adding the two back together does not recover the field.
Fig. 8 The same decomposition with a stronger stream. The two parts are unchanged — neither can see a uniform field — and only the remainder has moved, which is the projection’s whole behaviour in one picture.

The property that makes it worth having

There is a reason the decomposition is used rather than merely admired, and it is a fact about energy rather than about velocity. Under the right conditions the two parts are orthogonal, and the kinetic energy splits with no cross term.

The identity is two lines. Since the curl of a vector potential is divergence-free,

Vϕ(×A)dV=V ⁣(ϕ×A)dV=Sϕ(×A)ndS,\int_V \nabla\phi\cdot(\nabla\times\mathbf A)\,\mathrm dV = \int_V \nabla\cdot\!\left(\phi\,\nabla\times\mathbf A\right)\mathrm dV = \oint_S \phi\,(\nabla\times\mathbf A)\cdot\mathbf n\,\mathrm dS,

so the two parts are orthogonal exactly when that surface integral vanishes — which it does on an unbounded domain with adequate decay, and which it does on a bounded one only if ϕ\phi vanishes on the boundary, or if the solenoidal part has no flow through it. When it vanishes,

u2=ϕ2+×A2,\|\mathbf u\|^2 = \|\nabla\phi\|^2 + \|\nabla\times\mathbf A\|^2,

and the energy in the compressive motion and the energy in the vortical motion are separately meaningful quantities that add up. That is what makes the split into solenoidal and dilatational parts a standard measurement in compressible turbulence rather than a convention: the two energies are not merely definable, they are a partition.

Orthogonality is also what turns the solver’s projection step into the right thing to do rather than merely a thing that works. Removing ϕ\nabla\phi from an intermediate field is an orthogonal projection onto the space of divergence-free fields, so the result is the nearest divergence-free field to the one the momentum step produced, measured in energy. A non-orthogonal removal of the divergence would also produce a divergence-free field, and it would be a different one, further away.

And the condition for all of that is precisely the condition this essay has been about. The boundary term is the same object as the harmonic freedom: where the theorem is unique, the split is orthogonal and the energies add; where the boundary is doing the deciding, the split is neither. The decomposition performed above, in a box with both scalars pinned to zero on its edge, has a remainder carrying a majority of the field’s speed and no clean energy statement to make about it at all.

So the theorem is worth its reputation on the whole plane and is a different and weaker object on a bounded region — and the version everybody was taught is the first one, while every calculation anybody performs is on the second.

Where the harmonic part is doing all the work

Once the harmonic field is named it turns out to be the answer to several questions this collection has already asked.

The circulation round a body. On a domain with a hole, the harmonic freedom is one number per hole, and that number is the circulation. So how much circulation a wing has is not a question the interior physics answers, which is why an extra condition was needed and why the extra condition came from viscosity.

Added mass. The force of getting going comes from a purely harmonic field — the potential of an accelerating body in fluid at rest has neither divergence nor vorticity — so it is invisible to both Poisson solves and is entirely boundary data. That is why the added mass depends on the body’s shape and on nothing about the fluid except its density.

The far field. What the far field remembers of a body is a short list of multipole coefficients, and those are the harmonic part’s expansion. The interior can be as complicated as it likes; only the harmonic completion reaches infinity.

And the uniform stream itself. The most-used field in the subject is harmonic, which is why it can be added to any solution without disturbing anything — the observation superposition is built on, seen from the side that explains it.

What is not in the velocity field

The rule the essays around this one are written to asks each to name the thing its answer needs that the flow does not supply. Here it is the edge.

Everything in the interior — every source, every vortex, every scrap of divergence and curl — enters through the two right-hand sides, and the two Poisson solves find all of it. What they cannot find is anything that satisfies both homogeneous equations, and the space of such fields is as large as the boundary is. Measured on the field in these figures, the boundary supplies sixty-four per cent of the mean speed.

That is the honest reading of a result which sounds like a completeness theorem and is not one. The decomposition is complete in the sense that nothing is left over that has a divergence or a curl. It is not complete in the sense a reader expects, which is that the two parts add back up to the field.

Why the site’s two scalars are one theorem

One tidying-up, which is more than bookkeeping.

This collection introduced the velocity potential as what exists when a flow is irrotational, and the stream function as what exists when it is incompressible, and treated them as two separate pieces of good fortune. They are one theorem: the decomposition always exists, and each of those two hypotheses is the statement that one of the two parts is absent.

A flow that is both — ideal flow, the subject of this collection’s largest field — has 2ϕ=0\nabla^2\phi = 0 and 2ψ=0\nabla^2\psi = 0, so both scalars are harmonic and both are pure boundary data. The entire content of ideal flow theory is the harmonic part that this essay’s Poisson solves cannot see. That is why superposition works there and nowhere else, why flows add up, and why the whole apparatus is a boundary-value problem rather than an evolution.

The model limit

Three, and the first two are about smoothness.

The decomposition needs a field with a divergence and a curl that exist. A vortex sheet has neither in the ordinary sense, and the whole of thin-aerofoil theory is written in terms of one; the decomposition of a distribution is a different theorem with the same name and it needs its own statement of what is being differentiated.

The numerical version here is second-order accurate at best, which is why the refinement study is part of the result rather than a footnote to it. A single grid would have given the same headline number and no way to know whether it meant anything — and, worse, the same headline number is what a first-order scheme would have given while its remainder’s divergence sat flat under refinement.

And the whole calculation is two-dimensional. In three dimensions the vector potential A\mathbf A has three components where the plane has one, and it carries a gauge freedom of its own on top of the harmonic one: A\mathbf A and A+χ\mathbf A + \nabla\chi give the same field. That freedom is usually removed by demanding A=0\nabla\cdot\mathbf A = 0, which is a choice made for convenience and not by the physics — one more place where a condition that decides the answer is imposed from outside and then stops being mentioned. What one scalar can and cannot do in three dimensions is the next essay in this field.

What links here

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

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.

Boundary conditionConvergenceDivergenceHelmholtz decompositionIrrotationalLaplace's equationModel limitNull spaceStreamfunctionSuperpositionVelocity potentialVorticity