Although in principle the stream function doesn't require the use of a particular coordinate system, for convenience the description presented here uses a right-handed Cartesian coordinate system with coordinates .
Derivation
The test surface
Consider two points and in the plane, and a curve , also in the plane, that connects them. Then every point on the curve has coordinate . Let the total length of the curve be .
Suppose a ribbon-shaped surface is created by extending the curve upward to the horizontal plane , where is the thickness of the flow. Then the surface has length , width , and area . Call this the test surface.
where is an arc-length parameter defined on the curve , with at the point and at the point .
Here is the unit vector perpendicular to the test surface, i.e.,
where is the rotation matrix corresponding to a anticlockwise rotation about the positive axis:
The integrand in the expression for is independent of , so the outer integral can be evaluated to yield
Using the expression derived above for the total volumetric flux, , this can be written as
.
In words, the stream function is the volumetric flux through the test surface per unit thickness, where thickness is measured perpendicular to the plane of flow.
The point is a reference point that defines where the stream function is identically zero. Its position is chosen more or less arbitrarily and, once chosen, typically remains fixed.
An infinitesimal shift in the position of point results in the following change of the stream function:
so the flow velocity components in relation to the stream function must be
Notice that the stream function is linear in the velocity. Consequently if two incompressible flow fields are superimposed, then the stream function of the resultant flow field is the algebraic sum of the stream functions of the two original fields.
Effect of shift in position of reference point
Consider a shift in the position of the reference point, say from to . Let denote the stream function relative to the shifted reference point :
Then the stream function is shifted by
which implies the following:
A shift in the position of the reference point effectively adds a constant (for steady flow) or a function solely of time (for nonsteady flow) to the stream function at every point .
The shift in the stream function, , is equal to the total volumetric flux, per unit thickness, through the surface that extends from point to point . Consequently if and only if and lie on the same streamline.
In terms of vector rotation
The velocity can be expressed in terms of the stream function as
where is the rotation matrix corresponding to a anticlockwise rotation about the positive axis. Solving the above equation for produces the equivalent form
From these forms it is immediately evident that the vectors and are
perpendicular:
of the same length: .
Additionally, the compactness of the rotation form facilitates manipulations (e.g., see Condition of existence).
In terms of vector potential and stream surfaces
Using the stream function, one can express the velocity in terms of the vector potential
where , and is the unit vector pointing in the positive direction. This can also be written as the vector cross product
Consider two-dimensional plane flow with two infinitesimally close points and lying in the same horizontal plane. From calculus, the corresponding infinitesimal difference between the values of the stream function at the two points is
Suppose takes the same value, say , at the two points and . Then this gives
implying that the vector is normal to the surface . Because everywhere (e.g., see In terms of vector rotation), each streamline corresponds to the intersection of a particular stream surface and a particular horizontal plane. Consequently, in three dimensions, unambiguous identification of any particular streamline requires that one specify corresponding values of both the stream function and the elevation ( coordinate).
The development here assumes the space domain is three-dimensional. The concept of stream function can also be developed in the context of a two-dimensional space domain. In that case level sets of the stream function are curves rather than surfaces, and streamlines are level curves of the stream function. Consequently, in two dimensions, unambiguous identification of any particular streamline requires that one specify the corresponding value of the stream function only.
Condition of existence
It's straightforward to show that for two-dimensional plane flow satisfies the curl-divergence equation
where is the rotation matrix corresponding to a anticlockwise rotation about the positive axis. This equation holds regardless of whether or not the flow is incompressible.
If the flow is incompressible (i.e., ), then the curl-divergence equation gives
.
Then by Stokes' theorem the line integral of over every closed loop vanishes
Hence, the line integral of is path-independent. Finally, by the converse of the gradient theorem, a scalar function exists such that
.
Here represents the stream function.
Conversely, if the stream function exists, then . Substituting this result into the curl-divergence equation yields (i.e., the flow is incompressible).
In summary, the stream function for two-dimensional plane flow exists if and only if the flow is incompressible.
The basic properties of two-dimensional stream functions can be summarized as follows:
The x- and y-components of the flow velocity at a given point are given by the partial derivatives of the stream function at that point.
The value of the stream function is constant along every streamline (streamlines represent the trajectories of particles in steady flow). That is, in two dimensions each streamline is a level curve of the stream function.
The difference between the stream function values at any two points gives the volumetric flux through the vertical surface that connects the two points.
Two-dimensional stream function for flows with time-invariant density
If the fluid density is time-invariant at all points within the flow, i.e.,
^Lagrange, J.-L. (1868), "Mémoire sur la théorie du mouvement des fluides (in: Nouveaux Mémoires de l'Académie Royale des Sciences et Belles-Lettres de Berlin, année 1781)", Oevres de Lagrange, vol. Tome IV, pp. 695–748