Ideal flow

One function instead of two

A velocity field carries two numbers at every point and must satisfy two constraints. Both constraints can be solved once and for all by writing the whole flow as a single scalar function — and the two families of curves that function generates cross at right angles everywhere, for reasons that have nothing to do with fluids.

Worth reading first: The theory that solves everything.

A two-dimensional velocity field is two numbers at every point of the plane. That is a great deal of information to carry around, and most of it is not free: the two numbers have to satisfy two conditions, one saying mass is conserved and one saying the fluid is not spinning.

The trick that makes classical aerodynamics tractable is to stop carrying the two numbers and carry a single scalar instead, chosen so that one of the conditions is satisfied automatically. It can be done twice, in two different ways, and doing it both ways at once produces the picture this essay is about.

Flow net — a stream past a cylinder. Two families of curves drawn over the same flow: the streamlines, along which the streamfunction is constant, and the equipotentials, along which the velocity potential is constant. They cross at right angles at every point, because they are the two parts of a single analytic function of position.
Fig. 1 A flow net: streamlines and equipotentials over the same flow. They cross at right angles at every point, and the marked crossing is there so a reader can check it against the corner of a piece of paper.

The condition that buys the potential

Start with irrotationality. A flow with no local spin has ∂v/∂x = ∂u/∂y everywhere, and that is exactly the condition under which a vector field is the gradient of something.

So there is a function φ with

u=ϕx,v=ϕyu = \frac{\partial \phi}{\partial x}, \qquad v = \frac{\partial \phi}{\partial y}

and it is called the velocity potential. The whole two-component field is recovered by differentiating it.

The name is borrowed from mechanics and the analogy is exact but slightly misleading. A gravitational potential is an energy per unit mass and has physical meaning on its own; the velocity potential is not an energy, has no units anyone cares about, and means nothing at a point. Only its derivatives are physical. It is a bookkeeping device of extraordinary power, and it is worth being clear about that rather than looking for an interpretation it does not have.

The one interpretation it does support is geometric. Since the velocity is the gradient of φ, the flow runs squarely across the curves along which φ is constant, and it runs fastest where those curves are closest together. So a picture of equipotentials is a contour map, read exactly as a contour map of a hillside is read: steep means fast, and water runs downhill at right angles to the contours.

What it buys is immediate. Two unknown functions have become one. And the condition that bought it is the same condition that upgrades Bernoulli’s equation from a statement along each streamline to a statement about the whole field, so the two savings arrive together.

The condition that buys the streamfunction

Now do the same to the other constraint. Incompressibility says ∂u/∂x + ∂v/∂y = 0, and that is the condition under which a field is the curl of something. In two dimensions that something is a single scalar too:

u=ψy,v=ψxu = \frac{\partial \psi}{\partial y}, \qquad v = -\frac{\partial \psi}{\partial x}

This is the streamfunction, and unlike the potential it has a plain meaning. Its value is constant along a streamline — differentiate it along the flow direction and the two terms cancel — so its level curves are the streamlines. Better still, the difference in ψ between two streamlines is the volume flow rate between them. Streamlines drawn at equal intervals of ψ are therefore a picture of where the fluid is going and how much of it, together.

That second property is why a flow net drawn with equal ψ intervals crowds together where the flow is fast: the same amount of fluid is getting through a narrower gap, which is continuity made visible.

Flow net — a stream past a cylinder. Two families of curves drawn over the same flow: the streamlines, along which the streamfunction is constant, and the equipotentials, along which the velocity potential is constant. They cross at right angles at every point, because they are the two parts of a single analytic function of position.
Fig. 2 The streamfunction alone. Its level curves are the streamlines, and the gap between successive curves is inversely proportional to the local speed, because each gap carries the same flow.

Why the two families are perpendicular

Compare the two definitions. The potential’s gradient is (u, v). The streamfunction’s gradient is (−v, u). Those two vectors have zero dot product, so they are perpendicular — and a level curve of a function runs perpendicular to that function’s gradient.

The consequence is that a curve of constant φ and a curve of constant ψ cross at a right angle, everywhere, in every irrotational incompressible flow that has ever been drawn.

The pair of relations doing the work is

ϕx=ψy,ϕy=ψx\frac{\partial \phi}{\partial x} = \frac{\partial \psi}{\partial y}, \qquad \frac{\partial \phi}{\partial y} = -\frac{\partial \psi}{\partial x}

which are the Cauchy–Riemann equations. That is not a coincidence and it is the surprise this essay is built on: φ and ψ are the real and imaginary parts of a single analytic function of the complex variable x + iy. The orthogonality of a flow net is a theorem about analytic functions and has nothing whatever to do with fluids.

It also means the entire apparatus of complex analysis is available. Every analytic function is a possible ideal flow, and conformal mapping — which preserves angles, and therefore preserves flow nets — turns a flow round one shape into a flow round another. That is how the Joukowski aerofoil is built: a circle, which is easy, mapped into a wing shape, which is not.

The angle-preserving property is the part that makes it useful rather than merely clever. A flow net drawn round the circle, carried through the map, arrives round the aerofoil still orthogonal, still a flow net, still a solution. Nothing has to be re-solved; the picture is transported. And because speeds transform by the derivative of the map, the velocity anywhere round the wing is the velocity at the corresponding point of the circle divided by one complex number.

Flow net — a stream past a cylinder. Two families of curves drawn over the same flow: the streamlines, along which the streamfunction is constant, and the equipotentials, along which the velocity potential is constant. They cross at right angles at every point, because they are the two parts of a single analytic function of position.
Fig. 3 The same net drawn at a finer spacing. The two families still cross at right angles everywhere, and the reason is arithmetic rather than geometric: the gradients of the two functions are perpendicular by construction, so no spacing can produce a picture in which they are not.

The limitation is equally sharp: conformal mapping is a two-dimensional technique with no three-dimensional counterpart worth the name. That is a large part of why classical aerodynamics is so much better at wing sections than at wings.

Flow net — flow into a right-angled corner. Two families of curves drawn over the same flow: the streamlines, along which the streamfunction is constant, and the equipotentials, along which the velocity potential is constant. They cross at right angles at every point, because they are the two parts of a single analytic function of position.
Fig. 4 The same construction for flow into a right-angled corner, where the complex potential is simply the square of position. Both families are polynomials and the net is exact everywhere.

What the solver computed, and how it was checked

Both families in every panel are contours of functions evaluated from the closed-form complex potential, sampled on a grid and traced by marching squares. Nothing is drawn by hand and nothing is smoothed.

The check comes first. Before any curve is traced, the velocity field is put through two assertions: that its divergence is zero, and that its vorticity is zero. Passing both is what entitles the figure to draw a ψ and a φ at all — a field failing the first has no streamfunction and a field failing the second has no potential, and contouring functions that do not exist would produce a perfectly convincing picture of nothing.

The corner flow is the interesting case there. It is not assembled by the site’s potential machinery, so nothing about it is guaranteed by construction; both properties have to be established rather than inherited. They are, to within 10⁻⁵ on a 24 × 24 sweep.

There is also a check on the drawing itself. The velocity computed by differencing ψ, and the velocity computed by differencing φ, are both compared against the analytic velocity at a scatter of points. The worst disagreement across four different flows is 3 × 10⁻¹¹, which is the finite-difference step size doing what it should. Had a sign been dropped in either definition — and the streamfunction’s minus sign is exactly the kind of thing that gets dropped — the picture would still have looked like a flow net, and this is what would have caught it.

What Laplace’s equation buys

Substitute either function into the condition it did not solve and the same equation comes out:

2ϕ=0,2ψ=0\nabla^2 \phi = 0, \qquad \nabla^2 \psi = 0

Ideal flow is Laplace’s equation with boundary conditions. That is a remarkable reduction, and it has three consequences worth stating.

It is linear, so solutions can be added, which is what makes building flows out of elementary pieces work at all. That is not a small convenience. It means a library of a handful of elementary solutions — a uniform stream, a source, a vortex, a doublet — can be combined into an unlimited number of flows without solving anything again, and it means a complicated boundary can be met by adjusting the strengths of singularities rather than by re-deriving a field. Panel methods, which were how aircraft were designed from the 1960s until computational fluid dynamics became cheap, are that observation carried to a few thousand singularities.

Flows add. The equations of ideal flow are linear, so solutions can be added. A uniform stream and a doublet, laid on top of each other, produce a flow with a circular streamline — which is to say, a cylinder appears where none was put.
Fig. 5 Linearity in use: a uniform stream, a doublet, and their sum, which has a circular streamline in it that nobody put there. Adding solutions is legitimate only because the governing equation is linear.

It is elliptic, which means the solution at every point depends on the boundary everywhere. Ideal flow has no notion of information travelling: change the boundary at the back and the flow at the front changes instantaneously. This is a real property of the model and a real limitation of it, and it is where the model parts company with anything compressible, where disturbances travel at a finite speed.

And it is the most studied equation in mathematics, shared with electrostatics, steady heat conduction, elastic membranes and the flow of groundwater. Everything known about any of those is available here. The reason a soap film stretched over a wire loop and a potential flow look alike is that they solve the same equation.

Where the fastest fluid is, and why it is not a coincidence

Laplace’s equation has a property that the analytic-function reading makes almost trivial and that is used, silently, in half the design arguments on this site.

The complex velocity uivu - iv is the derivative of the analytic function whose parts are ϕ\phi and ψ\psi, so it is itself analytic wherever the flow is. And an analytic function’s modulus obeys the maximum modulus principle: it attains its largest value on the boundary of the region, never strictly inside it.

So in an ideal flow past a body, the fastest fluid anywhere is on the body’s own surface. Not just above the shoulder, not just nearby — the maximum of the speed over the entire field is attained on the boundary, as a theorem, with no computation and no appeal to a particular shape.

Which is why every quantity in this collection that depends on the fastest flow is read off the surface and nowhere else. The pressure at which a body cavitates is the minimum surface pressure. The Mach number at which a section first goes sonic is set by the peak surface velocity. Neither calculation ever asks whether some point out in the field might be faster, and the maximum modulus principle is why nobody has to.

The minimum behaves differently, and instructively. An analytic function’s modulus can have an interior minimum only where the function vanishes — so the slowest fluid can be inside the domain, and where it is, the velocity is exactly zero. That is a stagnation point, and this is a one-line proof that a stagnation point is the only kind of interior extremum a speed field can have.

The theorem has one hypothesis and the essay’s last figure breaks it. It requires the function to be analytic throughout the region, so a source or a vortex placed in the fluid — a point where the velocity is infinite — is excluded, and near one the speed is unbounded in the interior. That is not a counterexample; it is the statement that a singularity is not part of the flow, which is why bodies built from singularities are always careful to keep them inside the body where no fluid ever reaches them.

The net as a computing device

Before computers, the orthogonality was not a decoration — it was the method.

An engineer wanting the flow through a dam foundation or round a turbine blade would draw a flow net by hand: sketch the streamlines, sketch the equipotentials, then iterate, adjusting both until every crossing was square and every cell was as near a square as the curvature allowed. When the picture satisfied those two conditions it was the solution, because the conditions are equivalent to Laplace’s equation.

The velocities then came off the drawing with a ruler, since the speed in a cell is inversely proportional to its width. Whole civil-engineering textbooks were written around the technique, and it was accurate to a few per cent in the hands of somebody patient.

It is worth knowing this because it explains why the flow net is drawn so often in older books and so rarely in newer ones. It was never primarily a way of seeing; it was a way of calculating, and its job was taken by finite elements in about a decade.

There is something to regret in that. The hand method forced the person using it to look at the whole field at once and to keep adjusting until it was self-consistent, which builds an intuition for what flows can and cannot do that reading a colour plot does not. It also made the conditions visible: a practitioner who has spent an afternoon squaring up cells knows in their hands that orthogonality and equal-sided cells are the two constraints, and therefore knows exactly which two things a computed answer ought to be checked against.

The modern equivalent is not a drawing technique but a habit of the kind this site is built on — that a computed field should be made to demonstrate a property it was not given. The flow net’s squares were that demonstration in a form a person could see. The assertions in the section above are the same demand made of a machine.

What the picture cannot show

The equipotentials in the third figure stop, and the gap is not a rendering fault.

The velocity potential of a vortex is Γθ/2π, and θ is only defined up to a whole turn. Walking once round the centre brings the potential back Γ larger than it started. The function is multivalued, which means it is not a function at all in the ordinary sense, and any attempt to contour it must cut the plane somewhere.

Flow net — a free vortex. Two families of curves drawn over the same flow: the streamlines, along which the streamfunction is constant, and the equipotentials, along which the velocity potential is constant. They cross at right angles at every point, because they are the two parts of a single analytic function of position.
Fig. 6 A free vortex. The potential exists — the flow is irrotational — but it does not come back to itself on the way round, and the amount by which it fails is the circulation.

That failure to close is the circulation, and it is the whole reason an aerofoil can lift. A flow with a single-valued potential has zero circulation round every circuit and therefore no lift; a flow with a multivalued one has circulation and therefore has lift. The dashed line in the figure is where the bookkeeping is forced to happen, and where it is placed is arbitrary — but that it must be placed somewhere is not.

The contouring has to be told about the cut explicitly. Marching squares walking across it sees the potential jump from +Γ/2 to −Γ/2 and dutifully emits a contour for every level in between: fifteen spurious lines lying on top of one another, reading as one heavy equipotential along the negative axis. There is no such equipotential. The strip is excluded from the φ family and the cut is drawn as what it is.

d'Alembert's paradox, measured. Surface pressure round a cylinder in ideal flow, plotted against angle. The distribution is symmetric front to back, so every push on the front is matched by an equal push on the back, and the total force along the stream is exactly zero.
Fig. 7 What all this machinery buys, and what it costs. The pressure distribution is exact and closed-form, and it integrates to a drag of zero — which is the price of every simplification made above.

Where the model stops

Everything here assumes irrotational and incompressible, and each assumption removes an entire class of flows.

Inside a boundary layer the flow is strongly rotational, so no velocity potential exists there. The standard treatment splits the field in two: potential flow outside, boundary-layer equations inside, matched at the join. That split is the central approximation of twentieth-century aerodynamics and it works because the layer is thin.

In a compressible flow the streamfunction survives — mass is still conserved, with density in it — but Laplace’s equation does not, and superposition goes with it. The equation becomes nonlinear near Mach one, which is why transonic aerodynamics resisted analysis for so long.

And in three dimensions the streamfunction does not exist at all in this form. The potential does, and the whole φ machinery carries over unchanged; but the tidy pairing of the two, the orthogonal net and the connection with complex analysis are all specifically two-dimensional. That is worth knowing before generalising anything in this essay.

Who found it, and when

The velocity potential is Lagrange’s, in 1781, and the streamfunction Lagrange’s too, a few years earlier. The connection with complex analysis was made by Helmholtz and Kirchhoff in the 1860s, and exploited with enormous energy for the next fifty years.

That fifty years produced most of what this site’s inviscid essays draw. It also produced d’Alembert’s paradox as a standing embarrassment, and a widening gulf between the mathematicians, whose theory was exact and predicted no drag, and the engineers, whose aeroplanes had drag and flew anyway. The gulf closed in 1904 when Prandtl pointed out that both were right about different parts of the same flow.

The flow net as a drawing technique is later and more anonymous, coming out of civil engineering rather than mathematics — Forchheimer for seepage in the 1900s, Casagrande for dams in the 1930s. It is a rare case of a method invented by people who wanted a number rather than a theorem.

Where the ladder goes next

Next rungs on this anchor: conformal mapping proper, and how a circle becomes a wing; the complex potential as a single object, with Blasius’s theorem giving force and moment as contour integrals of it; the elementary singularities and the bodies they build; and the method of images, which is a boundary produced by symmetry rather than imposed as a condition.

Then across to what the ideal theory gets wrong, which is the price of everything that has been bought here.

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.

Conjugate functionsFlow netLaplace's equationStreamfunctionVelocity potential