Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 46 ยท Ideal and Potential Flow

Stream Function and Velocity Potential

Learn the stream function and velocity potential for 2D flow, how to get velocities from them, why they are orthogonal and how psi gives flow rate.

A 2D flow has two velocity components, u and v, plus the pressure to worry about. Two clever scalar functions replace these. The stream function ฯˆ automatically satisfies mass conservation, so it removes one unknown at once. The velocity potential ฯ† automatically satisfies zero vorticity. When a flow is both incompressible and irrotational, each one obeys Laplace's equation, and the curves ฯˆ = const and ฯ† = const form a perfect crisscross grid. This is the key tool of classical aerodynamics.

Corner flow drawn as streamlines of psi equals xy crossing equipotential lines of phi at right angles
Streamlines (solid) and equipotential lines (dashed) cross at right angles; the text lists the velocity formulas.

What you will learn

  • How to define ฯˆ and ฯ† and recover the velocity from each.
  • The conditions under which each exists.
  • Why the two families of curves are orthogonal.
  • How the difference of ฯˆ between two streamlines gives a volume flow rate.

Key terms

Stream function ฯˆ(x, y): defined by u = โˆ‚ฯˆ/โˆ‚y, v = โˆ’โˆ‚ฯˆ/โˆ‚x; exists for 2D incompressible flow.

Velocity potential ฯ†(x, y): defined by u = โˆ‚ฯ†/โˆ‚x, v = โˆ‚ฯ†/โˆ‚y; exists for irrotational flow.

Equipotential line: a curve of constant ฯ†.

Laplace's equation: โˆ‡ยฒฯˆ = 0 and โˆ‡ยฒฯ† = 0 for flow that is both incompressible and irrotational.

The stream function

For 2D incompressible flow, โˆ‚u/โˆ‚x + โˆ‚v/โˆ‚y = 0. This is exactly the condition that u dy โˆ’ v dx is the differential of some function ฯˆ: dฯˆ = u dy โˆ’ v dx. Hence

u = โˆ‚ฯˆ/โˆ‚y, v = โˆ’โˆ‚ฯˆ/โˆ‚x.

Substituting into continuity: โˆ‚ยฒฯˆ/โˆ‚xโˆ‚y โˆ’ โˆ‚ยฒฯˆ/โˆ‚yโˆ‚x = 0 for any smooth ฯˆ. Mass conservation is satisfied automatically.

Three facts make ฯˆ useful:

  1. Lines of constant ฯˆ are streamlines. Along a curve with ฯˆ = const, dฯˆ = 0 gives dy/dx = v/u: exactly the streamline equation.
  2. Differences give flow rate. The volume flow rate per unit depth between two streamlines ฯˆโ‚ and ฯˆโ‚‚ is Q' = ฯˆโ‚‚ โˆ’ ฯˆโ‚ (mยฒ/s). Closely spaced streamlines mean fast flow.
  3. Vorticity connects to โˆ‡ยฒฯˆ: ฯ‰_z = โˆ‚v/โˆ‚x โˆ’ โˆ‚u/โˆ‚y = โˆ’โˆ‡ยฒฯˆ. If the flow is irrotational, ฯˆ satisfies Laplace's equation.

In polar coordinates: u_r = (1/r) โˆ‚ฯˆ/โˆ‚ฮธ, u_ฮธ = โˆ’โˆ‚ฯˆ/โˆ‚r.

The velocity potential

If the flow is irrotational, โˆ‚v/โˆ‚x โˆ’ โˆ‚u/โˆ‚y = 0, which is the condition that u dx + v dy is the differential of a function ฯ†: u = โˆ‚ฯ†/โˆ‚x, v = โˆ‚ฯ†/โˆ‚y, or u = โˆ‡ฯ†. Then incompressibility โˆ‡ยทu = 0 gives โˆ‡ยฒฯ† = 0. The potential exists in 3D as well; the stream function does not (in 3D one needs vector potentials, or axisymmetry restricts it again). In polar coordinates: u_r = โˆ‚ฯ†/โˆ‚r, u_ฮธ = (1/r) โˆ‚ฯ†/โˆ‚ฮธ.

Orthogonality

When both functions exist, โˆ‡ฯˆ = (โˆ’v, u) and โˆ‡ฯ† = (u, v). Their dot product is โˆ’vu + uv = 0. The gradients are perpendicular, so the curves ฯˆ = const and ฯ† = const cross at right angles. Together they form an orthogonal grid called a flow net, a method used by engineers before computers to estimate seepage under dams.

There is an elegant bridge to complex numbers. Writing z = x + iy, any analytic function w(z) = ฯ† + iฯˆ (the complex potential) gives a possible potential flow, because the Cauchy-Riemann equations are exactly the relations above. For example, w = zยฒ/2 = (xยฒ โˆ’ yยฒ)/2 + i xy gives ฯ† = (xยฒ โˆ’ yยฒ)/2 and ฯˆ = xy. We study this flow next.

Worked example 1: corner flow ฯˆ = xy

u = โˆ‚ฯˆ/โˆ‚y = x, v = โˆ’โˆ‚ฯˆ/โˆ‚x = โˆ’y. Check continuity: 1 โˆ’ 1 = 0 โœ“. Vorticity: โˆ‚v/โˆ‚x โˆ’ โˆ‚u/โˆ‚y = 0 โˆ’ 0 = 0 โœ“ irrotational. Potential: โˆ‚ฯ†/โˆ‚x = x gives ฯ† = xยฒ/2 + g(y), and โˆ‚ฯ†/โˆ‚y = โˆ’y gives g = โˆ’yยฒ/2: ฯ† = (xยฒ โˆ’ yยฒ)/2. Streamlines xy = c are hyperbolas, and the lines x = 0, y = 0 are streamlines too (ฯˆ = 0), so the axes can be treated as walls: fluid coming down along the y axis spreads out along the x axis. This is the flow of a stagnation point on a wall.

Flow rate between the streamlines ฯˆ = 2 and ฯˆ = 5: Q' = 3 mยฒ/s per metre of depth.

Worked example 2: a rotated corner

Take ฯˆ = xยฒ โˆ’ yยฒ. Then u = โˆ’2y, v = โˆ’2x. Continuity: 0 + 0 = 0 โœ“. Vorticity: โˆ’2 โˆ’ (โˆ’2) = 0 โœ“. Potential: โˆ‚ฯ†/โˆ‚x = โˆ’2y so ฯ† = โˆ’2xy + g(y), and โˆ‚ฯ†/โˆ‚y = โˆ’2x forces g' = 0: ฯ† = โˆ’2xy. This is the same stagnation-point flow as before, just rotated by 45ยฐ and scaled. Note how the roles of ฯˆ and ฯ† swap: the family xยฒ โˆ’ yยฒ = const is streamlines here and equipotentials there.

Worked example 3: when ฯˆ is not harmonic

The solid-body rotation u = โˆ’ฮฉy, v = ฮฉx has โˆ‚u/โˆ‚x + โˆ‚v/โˆ‚y = 0, so it has a stream function: ฯˆ = โˆ’ฮฉ(xยฒ + yยฒ)/2. But โˆ‡ยฒฯˆ = โˆ’2ฮฉ = โˆ’ฯ‰_z, not zero: the flow is rotational and has no velocity potential. Always check which functions exist.

Common misconceptions

"A flow with a stream function is irrotational." The stream function exists for any 2D incompressible flow, rotational or not. Only if โˆ‡ยฒฯˆ = 0 is the flow irrotational.

"The potential ฯ† is a pressure." It is not. ฯ† is a mathematical device whose gradient is the velocity. Pressure follows afterwards from Bernoulli's equation.

"Streamlines and equipotentials always cross at right angles." Only when both exist, i.e. in a flow that is both incompressible and irrotational.

Try it

First let sympy do the algebra for a few flows: compute u and v from ฯˆ, check continuity and vorticity, and test whether ฯˆ is harmonic.

Python From psi to velocity with sympy

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Second, draw the flow net for ฯˆ = xy, ฯ† = (xยฒ โˆ’ yยฒ)/2. Each cell of the net is nearly a square, a sign of a good flow net.

Python A flow net

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Third, the speed and flow rate from ฯˆ in the console. The numbers confirm that crowded streamlines carry fast flow.

JS Speed from psi

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. The stream function is defined by

    u = d psi / d y and v = - d psi / d x; this automatically satisfies the incompressible continuity equation.
  2. 2. For psi = 4xy, the velocity components are

    u = dpsi/dy = 4x and v = -dpsi/dx = -4y.
  3. 3. The volume flow rate per unit depth between streamlines psi = 3 and psi = 7 is

    The difference psi_2 - psi_1 = 4 m^2/s.
  4. 4. Streamlines and equipotential lines are perpendicular because

    grad psi = (-v, u) and grad phi = (u, v), whose dot product is zero.
  5. 5. A flow has a stream function but no velocity potential. It must be

    psi exists for any 2D incompressible flow; phi exists only if the flow is also irrotational.

Summary

  • ฯˆ (u = ฯˆ_y, v = โˆ’ฯˆ_x) exists for 2D incompressible flow; its level curves are streamlines and its differences are flow rates.
  • ฯ† (u = โˆ‡ฯ†) exists for irrotational flow; both satisfy Laplace's equation when both exist.
  • Streamlines and equipotentials form an orthogonal net; w = ฯ† + iฯˆ is an analytic function of z.
  • Always check continuity and vorticity before assuming either function exists.

Next: Elementary Flows and Superposition