Definition of stream function
The stream function gives you a single scalar function that encodes all the velocity information in a 2D incompressible flow. Instead of solving for two velocity components separately, you solve for one function and derive both components from it. The continuity equation is satisfied automatically, which removes an entire equation from your system.
- Denoted by the Greek letter (psi), the stream function is a scalar field that can vary in both space and time.
- It's most powerful for incompressible flows, where it guarantees mass conservation by construction.
- For irrotational flows, also satisfies Laplace's equation, opening up a large toolkit of analytical solution methods.
Stream function in two-dimensional flow
Relationship between stream function and velocity components
In 2D flow, the velocity components (in the -direction) and (in the -direction) are defined through partial derivatives of :
Why does this work? Substitute these into the 2D incompressible continuity equation:
The mixed partial derivatives cancel identically (assuming is smooth), so continuity is satisfied no matter what form takes. That's the whole point: you've built mass conservation directly into the formulation.
Constant value of stream function along streamlines
A streamline is a curve that is everywhere tangent to the local velocity vector at a given instant. Along any streamline, is constant. Here's why: the total differential of is
On a streamline, the direction of travel is parallel to the velocity, so , which means . Therefore along a streamline.
This has a direct physical payoff: the volumetric flow rate per unit depth between two streamlines equals the difference in their values. If streamline 1 has and streamline 2 has , the volume flow rate per unit depth between them is . Where streamlines are packed closely together, the flow is faster.
Stream function in three-dimensional flow
Relationship between stream function and velocity components
In 3D incompressible flow, the stream function becomes a vector quantity , and the velocity is recovered through its curl:
Writing this out in Cartesian components:
Because the divergence of any curl is identically zero, , so the incompressible continuity equation is again satisfied automatically.
In practice, the full 3D vector stream function is rarely used because it introduces three unknown components instead of one. It's most useful in axisymmetric flows, where a single scalar Stokes stream function can describe the entire flow field.
Constant value of stream function along stream surfaces
In 3D flow, the analog of a streamline is a stream surface: a surface formed by all the streamlines passing through a given closed curve. The stream function remains constant on each stream surface, and the volumetric flow rate between two stream surfaces equals the difference in their stream function values.
Properties of stream function

Orthogonality of stream function and velocity potential
For flows that are both incompressible and irrotational (), you can also define a velocity potential such that . In this case:
- Lines of constant (equipotential lines) and lines of constant (streamlines) intersect at right angles everywhere.
- Together, and form an orthogonal net that completely describes the flow.
This orthogonality is not a coincidence. The gradient of points in the flow direction, while the gradient of points perpendicular to the flow (across streamlines). Their dot product is zero:
Laplace's equation for stream function
When a 2D flow is both incompressible and irrotational, satisfies Laplace's equation:
This follows from the irrotationality condition (zero vorticity). Laplace's equation is one of the most well-studied PDEs in mathematics, so a huge library of analytical techniques (separation of variables, conformal mapping, Green's functions) and numerical methods become available.
Determination of stream function
Calculation of stream function from velocity field
If you already know the velocity field, you can find by integration. The procedure for 2D flow:
-
Start with one of the defining relations, say . Integrate with respect to : where is an unknown function of only (it acts like a "constant" of integration that can still depend on the other variable).
-
Differentiate this result with respect to and set it equal to :
-
Solve for and integrate to find .
-
Combine to get the full expression for . The result is unique up to an additive constant (you're free to set on any convenient streamline).
Boundary conditions for stream function
To solve for when the velocity field is not already known, you need boundary conditions:
- Solid walls: A stationary solid boundary is itself a streamline, so along it. Typically you set on one wall for convenience.
- Inflow/outflow boundaries: Specify the value of (or its normal derivative) consistent with the known velocity profile at that boundary.
- Free-stream conditions: Far from an object, should match the undisturbed uniform flow. For a uniform flow of speed in the -direction, .
The choice of boundary conditions depends on the geometry and what information you have about the flow.
Applications of stream function
Visualization of flow patterns
Plotting contours of constant directly gives you the streamlines of the flow. This is one of the most intuitive ways to visualize a velocity field:
- Closely spaced streamlines indicate high-speed regions.
- Widely spaced streamlines indicate low-speed regions.
- Closed streamline loops reveal recirculation zones.
- Points where streamlines appear to cross (they don't literally cross for steady flow) indicate stagnation points.

Calculation of mass flow rate
Because the volume flow rate per unit depth between two streamlines equals , the mass flow rate per unit depth between two points is:
where is the (constant) fluid density. This works regardless of the path you choose between the two points, which makes it very convenient for computing flow rates through channels or around bodies.
Determination of stagnation points
Stagnation points are locations where the velocity is zero ( and ). In terms of , this means:
Geometrically, stagnation points appear where streamlines meet or diverge. The stream function has a saddle point at these locations. Identifying stagnation points is critical for understanding pressure distributions (via Bernoulli's equation) and forces on immersed bodies.
Relationship between stream function and other flow properties
Stream function and vorticity
Vorticity in 2D flow measures the local spinning motion of fluid elements. It's related to by:
This is a Poisson equation: given a vorticity distribution, you can solve for , and vice versa. For irrotational flow (), this reduces to Laplace's equation as discussed above. For rotational flows, the vorticity acts as a source term driving the stream function field.
Stream function and circulation
Circulation is the line integral of velocity around a closed curve :
For a closed curve that doesn't enclose any singularities in an irrotational flow, . But when singularities (like point vortices) are enclosed, circulation is nonzero and directly connects to lift through the Kutta-Joukowski theorem: , where is lift per unit span and is the free-stream velocity.
Note that the relationship stated in some references applies only along specific paths (not arbitrary closed curves). For a closed curve, the start and end points coincide, so this difference would be zero unless the stream function is multi-valued (as it is around a body with circulation).
Advantages and limitations of stream function approach
Simplification of flow analysis
The stream function reduces the number of unknowns. In 2D incompressible flow, instead of solving for two velocity components plus the continuity equation, you solve for a single scalar . The continuity equation is eliminated entirely. If the flow is also irrotational, satisfies Laplace's equation, and you have a single linear PDE to solve.
This approach is especially powerful when combined with the velocity potential in potential flow theory, where superposition of elementary solutions (uniform flow, sources, sinks, vortices, doublets) lets you build up complex flow fields analytically.
Limitations in compressible and unsteady flows
- Compressible flows: The standard stream function definition only guarantees . In compressible flow, the continuity equation is for steady flow, so the density variation breaks the simple relationship. You can define a compressible stream function using and , but this is less commonly used and the resulting equations are nonlinear.
- Unsteady flows: The stream function can still be defined for unsteady incompressible flows (continuity doesn't involve time derivatives of density for incompressible flow). However, the streamlines you get from at a given instant are instantaneous streamlines, not pathlines or streaklines. The flow visualization becomes less straightforward because the streamline pattern changes with time.
- Three dimensions: As noted earlier, the 3D vector stream function introduces three components, which doesn't simplify the problem much. The stream function approach is most valuable in 2D and axisymmetric geometries.