Stream function
From CFD-Wiki
The stream function is a scalar field variable which is constant on each streamline. It exists only in two-dimensional and axisymmetric flows.
On a streamline in two-dimensional flow
The equation of a streamline in two-dimensions is
Comparing the two equations, we have
Conversely, the stream function at any point can be obtained from the velocity field by a line integral
where is some reference point and one can assume since the stream function is determined only upto a constant.