Ideal flow

The drift was the instrument

Kelvin's theorem was checked on this site by carrying a loop and watching its circulation move by eight parts in a hundred thousand. That drift is not the flow forgetting. The exact number is a count of what is inside the loop, it does not move by anything at all, and the drift belongs entirely to the two instruments used to measure it.

Worth reading first: What survives being wound up · Circulation is vorticity, added up.

What survives being wound up tests Kelvin’s theorem the way it should be tested: a loop of marked particles is carried by an exact solution of Euler’s equations until its shape is unrecognisable, and its circulation is watched. The circulation moves by eight parts in a hundred thousand while the perimeter grows by a factor of 5.7, and that essay contains a section called the drift, and why it is quoted.

This essay is about the drift. It is not the flow forgetting anything, and the demonstration is sharper than a smaller number would have been: there is a second way of computing the same circulation which owes nothing to any quadrature, and by that route the answer does not move by anything at all — not by a tolerance, but by zero — in a run where the first route is wrong by thirty-nine per cent.

One material loop, at five stages of being drawn out. A circle of fluid particles carried by four point vortices, drawn at equal intervals over fourteen time units. Its length grows by a factor of six and its shape becomes unrecognisable; the circulation round it does not move at all.
Fig. 1 A circle of fluid particles carried by four point vortices over fourteen time units. Its length grows by a factor of six and its shape becomes unrecognisable; the circulation round it does not move at all.

The two ways of asking

The usual definition of circulation is the line integral of the velocity round the loop, and computing it means summing a velocity times a step over the loop’s points. That is a quadrature, and like every quadrature it has an order of accuracy and a resolution requirement.

The other route uses a fact about the flow rather than about the loop. In a point-vortex flow all the vorticity is at the vortices, so the circulation round any closed curve is the sum of the strengths of the vortices the curve encloses. And a vortex is a fluid particle: it cannot cross a material loop, because crossing would require it and the loop’s particles to be in the same place at the same time.

So the set of enclosed vortices is fixed for ever, and the circulation is a sum over that fixed set. Computing it needs no integral at all — only a count, obtained here from the winding number of the polygon about each vortex, which is an integer.

One of these is a measurement and the other is a statement about the topology. They should agree, and the whole content of this essay is what happens when they do not.

The exact number, and the measurement of it. The circulation round the loop over the run, two ways: the sum of the strengths of the vortices it encloses, which is what Kelvin's theorem is about, and the line integral of the velocity round the polygon, which is what a measurement is. One of them is a horizontal line and the other is not.
Fig. 2 The circulation two ways: the enclosed strengths, which is what Kelvin’s theorem is about, and the line integral round the polygon, which is what a measurement is. The first is 0.5 at the start and 0.5 at the end; the second ends 39 per cent away.

What the run shows

A circle of fifteen hundred material particles is released around four point vortices and carried for fourteen time units. Its perimeter grows by a factor of 6.0 and its shape becomes a tangle.

The enclosed sum is 0.5 at the start and 0.5 at the end. The largest change over the run, sampled sixty times, is exactly zero: no vortex ever crosses, and no arithmetic is involved beyond adding four numbers, so there is nothing for a rounding error to happen to.

The line integral over the same polygon at the same instants ends thirty-nine per cent away from 0.5. It was accurate to a part in ten thousand for the first six time units and then degraded quickly.

How far the loop was drawn out while its number did not move. The loop's perimeter over the same run, as a multiple of where it started. It grows steadily to six times its initial length — which is the deformation the invariance survived, and the reason the measurement of it eventually fails.
Fig. 3 The perimeter over the same run, as a multiple of where it started: six times. That is the deformation the invariance survived, and the reason the measurement of it eventually fails.

Why the measurement degrades and the flow does not

The line integral’s error is a resolution failure, and the mechanism is worth stating because it is general.

A trapezoid rule is accurate when the integrand is smooth on the scale of the spacing between samples. The loop begins as a circle with its 1,500 points evenly spread, in a region where the velocity varies gently, and a perimeter of 6.911. As it is stretched, two things happen at once: the points spread apart where the loop is being pulled — the perimeter reaches 41.5 by the end of the run, a growth of 6.006, so the mean spacing has grown by the same factor; and the loop is dragged into places where the velocity varies violently, close to a vortex, where the field goes as one over the distance. Six windows show what that does to the quadrature: at a window of 4 the loop has stretched by 1.89 and the line integral is wrong by 0.021 per cent; at 8, stretched 3.42, it is wrong by 0.29; at 10, by 1.91; at 12, by 0.56 — it is not monotone, because a stretched loop can be well placed at one instant and badly at the next — and at 14, stretched 6.006, by 39.3 per cent. That is a factor of 1,860 between the shortest window and the worst of the long ones, while the count of enclosed vortices holds at its initial value and no vortex crosses the loop in any window.

The product of those two is the quadrature error, and it grows faster than either. Measured across six window lengths, it rises by a factor of 1,860 between the shortest and the worst of the long ones, and it does so non-monotonically: a stretched loop is sometimes well placed and sometimes badly, so the error can fall between one window and the next while the underlying resolution failure gets steadily worse.

The error is in the instrument, and it grows with the stretching. The line integral's departure from the exact circulation, against how far the loop has been drawn out, over six windows. The exact number is unmoved in every one of them. The measurement is wrong by a factor of nearly two thousand more at the longest window than at the shortest, and not monotonically, because a stretched loop is sometimes well placed.
Fig. 4 The line integral’s departure from the exact circulation against how far the loop has been drawn out, over six windows. The exact number is unmoved in every one; the measurement is wrong by a factor of nearly two thousand by the last.

That non-monotonicity is the clearest evidence available that the drift is not physics. A conserved quantity that was genuinely leaking would leak in one direction.

Two instruments, two orders, refining separately

There are exactly two sources of error in the measurement and they are independent, which means each can be refined without touching the other. Separating them is the practical content of this essay.

The trajectory. The material points are stepped by a numerical scheme, and if they are in the wrong places the loop being integrated round is the wrong loop. That error has the scheme’s order.

The quadrature. Even with the points exactly right, the line integral over a polygon is not the line integral over a curve. That error has the trapezoid rule’s order and depends on the number of points, not on the time step.

The first version of this computation used two hundred loop points and read a drift of a third of a per cent, which looks like a violation of Kelvin’s theorem and is a coarse polygon. At 1,500 points the drift over the first three units of time never exceeds 0.8 per cent and passes through 0.013 per cent at t = 2.4, on its way from one to the other. Refining the time step by a factor of four changed it by nothing at all — which is the signature of an error in the other instrument, and is the diagnostic worth carrying.

And the rate the loop itself is lost at is the scheme's order. How far the material points have drifted from a reference run at sixteen times the resolution, against the time step, for a fourth-order scheme and a first-order one. The slopes are 4.00 and 0.98, and at the coarsest step they differ by a factor of fifty-five thousand.
Fig. 5 Drift from a reference run at sixteen times the resolution, against time step, for a fourth-order scheme and a first-order one. The measured slopes are 4.00 and 0.98 — so the loss is the scheme’s, not the flow’s.

Measured against a reference run at sixteen times the resolution, the material points’ own error falls as the 4.00 power of the time step under a fourth-order scheme and as the 0.98 power under a first-order one, and at the coarsest step the two differ by a factor of fifty-five thousand. That is the stepper’s order, cleanly, because the quantity being measured is the loop rather than an integral round it.

What a loop can be asked to do before it stops being one

The run above stops at fourteen time units, and the reason is worth stating because it is the honest boundary of the whole demonstration.

A material loop is represented by a finite list of points, and the flow does not care about that. After enough stretching the true loop has structure — folds, near-touching arms, thin filaments — below the spacing of any fixed number of points, and at that stage the polygon is no longer an approximation to the loop. It is a different curve.

Nothing warns of it. The polygon continues to close, its perimeter continues to grow, and the winding numbers continue to come out as integers. What has happened is that the object being carried has quietly changed from the loop to a polygon with the same endpoints, and every quantity computed from it is a quantity about the polygon.

The usual repair is to insert points where the spacing has grown, which keeps the resolution and destroys materiality: an inserted point is not a fluid particle that was ever there, so the loop it belongs to is no longer the loop that was released. That is a real trade rather than a technical detail, and it is why this computation refuses to insert and shortens its window instead.

The same trade appears wherever a material object is tracked: in front tracking, in level-set methods that reinitialise, and in the vortex-sheet computation of a sheet that cannot stay a sheet, where the answer after the singularity depends on how the sheet is put back.

Why the exact number is a topological one

There is a reason the second route is exact and it is not that it is cleverer. It is that it is answering a question with an integer in it.

The circulation round a material loop in this flow can only take the values obtained by summing subsets of the four vortex strengths. There are sixteen such values and they are separated by gaps of order the strengths themselves; the one this loop holds is 0.5, from first step to last, exactly. A quantity that can only take one of sixteen widely separated values cannot drift: it either stays where it is or jumps, and jumping requires a vortex to cross the loop, which requires two fluid particles to occupy one place.

This is the same species of argument as the one in the count a pattern cannot break, where the number and kinds of stagnation points in a picture obey an integer constraint that has nothing to do with the equations of motion. An integer constraint is not a tight version of a real-valued one; it is a different kind of statement, and the practical difference is exactly that it cannot degrade gracefully.

The general lesson is worth having. When a conserved quantity has an exact discrete characterisation, compute it that way and use the continuous one as the check — not the other way round. The circulation here, the winding number in the essay above, the linking number in the knot a flow cannot untie and the enclosed charge in electrostatics are all in this class.

What this says about the earlier measurement

The rung below this one quotes 8·10⁻⁵ over a perimeter growth of 5.7 and says the drift is the computation’s. This essay is the demonstration that it was, and it puts a number on how much of the budget belongs to each half.

It also says something about what a conservation check is worth as a validation. A code that reports its circulation drifting by a part in ten thousand has told the reader about its own resolution and almost nothing about its physics — because in an inviscid computation the theorem is not something the scheme has to achieve, it is something that follows from the particles being material. A scheme that loses circulation badly is a scheme that has lost the particles.

The converse is the trap, and it is worse. A scheme can conserve circulation exactly while the flow it is computing is wrong, if the conservation is built into its discretisation — which is what a vortex method does. There the circulation is a stored number attached to each element and nothing can move it, so its constancy is a property of the data structure and reports nothing at all.

Circulation with no vorticity in it. A free vortex, whose flow is irrotational everywhere except at the single point at its centre. A loop enclosing that point has a circulation of the vortex's full strength, and the vorticity anywhere on the loop, or anywhere the field is defined, is zero.
Fig. 6 A loop drawn round a vortex and the circulation it encloses, computed elsewhere in this collection. A free vortex is irrotational everywhere except one point, and a loop enclosing that point carries the vortex’s full strength while the vorticity on the loop is zero.

Where the same distinction has bitten this collection before

Three times, and they are worth putting together because the pattern is one.

The area that must not move. That essay checks that an integrator preserves phase-space area and finds a determinant of one at every step size — because the scheme was chosen to have that property, so the check is confirming an algebraic identity rather than measuring the flow. The honest reading of a perfect conservation number is always what made it perfect.

The stretching of a material line. In two strainings, and the order they came in the volume is preserved to a part in 10¹⁵ by both orderings, which is not evidence that the orderings agree about anything else — and they differ by a factor of 2.16 in the quantity that matters.

And the wake survey. Four profiles, one drag has four wakes carrying identical drag and nothing else in common: an exactly satisfied integral constraint that constrains nothing about the thing being looked at.

In all three the moral is the same. A conservation check is a statement about the quantity checked, and the quantities that are easiest to conserve are usually the ones that discriminate least.

What the solver computed, and how it was checked

What the loop is carrying is defined in circulation is vorticity, added up, and the two ways of measuring it here are exactly the two sides of that identity.

The flow is four point vortices of unequal strength, desingularised inside a small core so that a material point passing close to one does not produce an unbounded velocity. Vortices and loop points are stepped together with the same fourth-order scheme, since the vortices are fluid particles too.

Four things are checked. That no vortex ever crosses the loop, by requiring the enclosed sum to be unmoved at every sample — which is the assertion the whole essay rests on and is the one that would catch a winding-number computation failing on a badly resolved loop. That the loop really was drawn out, by requiring its perimeter to grow by at least a factor of five, so the invariance is being tested rather than merely observed on a circle. That the quadrature error grows with the stretching, by at least a factor of fifty across the sweep. And that the two schemes have their stated orders, against a reference run rather than against a closed form, since the flow has none.

One limit was found by the checks rather than by inspection. At a window of sixteen time units the winding-number computation itself fails on a loop of twelve hundred points: a vortex ends up between two adjacent loop points and the polygon no longer resolves which side of it they are on. Three thousand points fixes it. So the topological route is exact and its computation is not, and the window was shortened rather than the failure hidden.

The number a loop keeps, as computed. The enclosed circulation at the start and the end, how far the loop was stretched, what the line integral read, and the two orders of accuracy that decide how fast each half of the measurement degrades.
Fig. 7 The enclosed circulation at the start and the end — 0.5 and 0.5, unmoved — the six-fold stretch, the 39 per cent the line integral drifted, and the orders 4.00 and 0.98 that decide how fast each half of the measurement degrades.

The reading for anybody validating a code

Three practical statements come out of this, and none of them needs the point-vortex setting.

A conservation error is a resolution diagnostic, not a physics one. It should be reported beside the thing whose resolution it measures — the mesh spacing, the loop’s point count, the time step — and refined against each one separately. A single number labelled “circulation error” that is not attributed to an instrument is not usable.

Refine one thing at a time and watch what moves. The whole of the diagnosis above came from refining the time step by four and seeing the drift not move. That is a two-minute experiment and it distinguishes the two error sources completely, which no amount of staring at the number can.

And prefer the discrete invariant where one exists. Counting is exact and integrating is not, so a quantity with an integer characterisation should be computed by counting and checked by integrating. The counting version also fails differently — abruptly, when the resolution can no longer tell which side of something a point is on — which is easier to notice than a slow drift.

The harder it is pulled, the thinner it settles. The equilibrium core radius of Burgers' vortex against the strain rate that is stretching it. Viscosity spreads vorticity outwards and the strain carries it inwards, and the balance sits at √(4ν/α) — so doubling the stretching does not double the spin without limit, it thins the core by a factor of √2 and raises the peak vorticity in proportion. This is the only closed-form answer this site has to what stops the amplification.
Fig. 8 The cores the loop has to pass, computed elsewhere in this collection: Burgers’ equilibrium radius √(4ν/α), where viscosity spreading vorticity out balances the strain carrying it in — so doubling the stretching thins the core by only √2.

What the picture cannot show

The five loops drawn in the first figure are five instants out of forty-two hundred steps, and the loop between them does things the pictures do not record: it develops fine folds that the drawing resolves and the eye does not, and by the last frame adjacent parts of it are far closer together than the line width.

Nothing in the figures shows the vortices’ own paths, either, though they are moving throughout. That is a deliberate omission — the essay is about the loop — and it hides the fact that the vortices’ motion is what makes the flow unsteady in the first place.

Who found it, and when

Kelvin’s theorem is from 1869 and its proof is four lines. The observation that its numerical violation is an artefact rather than a physical statement is much more recent and belongs to the literature on structure-preserving discretisation, which spent the 1990s establishing which conserved quantities a scheme can be made to keep exactly and which it cannot.

The distinction this essay turns on — between a quantity a scheme conserves because of its construction and one it conserves by getting the physics right — is that literature’s most useful export, and it applies well outside fluid mechanics.

Limits recorded rather than smoothed over

Point vortices. The exact route works because all the vorticity is in isolated points. In a flow with distributed vorticity there is no integer count and the circulation round a material loop must be computed by integration, so the clean separation this essay depends on is not available.

The desingularisation is in both answers. The core radius smooths the velocity near a vortex, and the line integral round a loop passing inside a core is not the enclosed strength. The loop here stays outside the cores; a loop that did not would show a discrepancy that is neither instrument’s fault.

Two dimensions. In three, a material loop still keeps its circulation and the enclosed object is a flux of vorticity through a surface rather than a count of points, so the exact route becomes a surface integral and gains a quadrature of its own.

The four-vortex flow is quasi-periodic rather than chaotic, which is measured in reversible, and unusable and matters here only in that the loop’s stretching is steady rather than explosive. A chaotic flow would reach the resolution limit sooner and the conclusions would be the same.

And the thirty-nine per cent is this run’s. It depends on the window, the loop resolution and how close the loop happens to pass to a vortex. What is not run-dependent is the zero beside it.

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.

CirculationConserved quantityConvergenceKelvin's circulation theoremMaterial lineMeasurementMemory kernelModel validityNumerical errorQuadratureTopologyVortex