Stream Function

Category: Fluid Analysis (CFD) | Integrated 2026-04-06
CAE visualization for stream function theory - technical simulation diagram
Stream Function

Stream Function: Theoretical Foundations

Definition of Stream Function

🧑‍🎓

Professor, what is the meaning of the stream function? I hear the name often, but...


🎓

The stream function $\psi$ is a scalar function that, in two-dimensional incompressible flow, gives a velocity field that automatically satisfies the continuity equation. The definition is as follows.


$$ u = \frac{\partial \psi}{\partial y}, \quad v = -\frac{\partial \psi}{\partial x} $$

From this definition, you can confirm that the continuity equation $\frac{\partial u}{\partial x} + \frac{\partial v}{\partial y} = 0$ holds identically.


🧑‍🎓

"Identically" means it holds exactly regardless of mesh coarseness or anything?


🎓

Analytically, yes. In numerical computation, discretization error enters, but if formulated with the stream function, mass conservation is structurally guaranteed. This is a major advantage of the stream function method over the primitive variable ($u, v, p$) method.


Relationship with Streamlines

🧑‍🎓

What is the relationship between the stream function and streamlines?


🎓

The contour lines of the stream function coincide with streamlines. That is, fluid particles move along the curve $\psi = \text{const.}$ Furthermore, the volumetric flow rate per unit depth passing between two streamlines $\psi_1$ and $\psi_2$ is given by


$$ Q = \psi_2 - \psi_1 $$

This is the physical meaning of the stream function.


🧑‍🎓

So the difference in stream function values directly gives the flow rate. That's convenient.


🎓

A wall is one of the streamlines, so $\psi = \text{const.}$ can be used as a boundary condition on the wall. For example, for a stationary wall, it is often set as $\psi = 0$.


Poisson Equation for Stream Function

🧑‍🎓

It's used in combination with vorticity, right?


🎓

Substituting the definition of the stream function into the definition of vorticity $\omega$, $\omega = \frac{\partial v}{\partial x} - \frac{\partial u}{\partial y}$, yields a Poisson equation.


$$ \nabla^2 \psi = -\omega $$

In other words, if the vorticity distribution is known, solving this elliptic equation under boundary conditions determines the stream function (and thus the velocity field).


🧑‍🎓

What happens in inviscid, irrotational flow ($\omega = 0$)?


🎓

It becomes the Laplace equation $\nabla^2 \psi = 0$. This is the stream function for potential flow and is dual to the Laplace equation for the velocity potential $\phi$. The contour lines of $\psi$ and $\phi$ are orthogonal.


Stokes Stream Function (Axisymmetric)

🧑‍🎓

Can the stream function be used in 3D as well?


🎓

A stream function cannot be defined for general 3D flow. However, for axisymmetric flow, the Stokes stream function can be defined. In cylindrical coordinates $(r, z)$,


$$ u_z = \frac{1}{r} \frac{\partial \Psi}{\partial r}, \quad u_r = -\frac{1}{r} \frac{\partial \Psi}{\partial z} $$

Note that unlike the 2D $\psi$, the dimension of $\Psi$ becomes $[m^3/s]$. The volumetric flow rate between two stream surfaces is $Q = 2\pi(\Psi_2 - \Psi_1)$.


🧑‍🎓

Seems useful for pipe flow, nozzle flow, etc.


🎓

Exactly right, it's very useful for analyzing axisymmetric jets and pipe flows. The stream function for Hagen-Poiseuille flow can be found analytically as $\Psi = \frac{U_0}{2R^2}(R^2 r^2 - r^4/2)$, so it can be used as a verification problem.


Scope of Application and Limitations

🧑‍🎓

In what cases can the stream function method not be used?


🎓

The main constraints are as follows.


  • General 3D flow: A scalar stream function cannot be defined. Extensions using vector potential are possible but not very practical.
  • Compressible flow: Not applicable as it assumes incompressibility. A modified definition like $\rho u = \partial \psi / \partial y$ can be used for compressible flow, but it becomes complex.
  • Multiphase flow: Continuity conditions for the stream function across interfaces become complex.
  • 3D turbulence: Primitive variable methods (SIMPLE family, etc.) are mainstream in practical CFD.

🧑‍🎓

So its main field of application is for education and research in 2D incompressible flow, right?


🎓

That understanding is correct. However, its computational robustness (structural guarantee of mass conservation) is attractive, so it is still often used for verifying 2D benchmark problems.

Coffee Break Trivia

The Invention of the Stream Function—The Beautiful Description of 2D Flow Derived by Lagrange (1781)

The concept of the stream function ψ is said to have been introduced by the French mathematician Joseph-Louis Lagrange in a 1781 paper. It is an elegant mathematical device for two-dimensional incompressible flow, defining velocity components as u=∂ψ/∂y, v=-∂ψ/∂x, thereby automatically satisfying the continuity equation. Since the contour lines ψ=const. coincide with streamlines, it can be used directly for flow visualization. Combined with Bernoulli's theorem, it forms the core concept of potential flow theory (complex function of ψ and φ (velocity potential)) used for calculating lift on airfoils. In modern CFD, pressure-velocity coupling methods are mainstream, but plotting ψ contours remains one of the most intuitive visualization tools for deepening physical understanding of flow fields.

Computational Methods for Stream Function

Implementation of Vorticity-Stream Function Method

🧑‍🎓

How do I actually implement the vorticity-stream function method in code?


🎓

The algorithm flow is as follows. Repeat the following each time step.


1. Time-integrate the vorticity equation to find $\omega^{n+1}$

2. Solve the Poisson equation $\nabla^2 \psi^{n+1} = -\omega^{n+1}$ to update the stream function

3. Compute the velocity field from $u = \partial\psi/\partial y$, $v = -\partial\psi/\partial x$

4. Update wall vorticity and return to step 1


🧑‍🎓

Please teach me the specific discretization using finite difference.


🎓

On a staggered grid with uniform grid spacing $h$, the 5-point difference for the Poisson equation is


$$ \frac{\psi_{i+1,j} + \psi_{i-1,j} + \psi_{i,j+1} + \psi_{i,j-1} - 4\psi_{i,j}}{h^2} = -\omega_{i,j} $$

The central difference for velocity is


$$ u_{i,j} = \frac{\psi_{i,j+1} - \psi_{i,j-1}}{2h}, \quad v_{i,j} = -\frac{\psi_{i+1,j} - \psi_{i-1,j}}{2h} $$

🧑‍🎓

How is the advection term in the vorticity equation discretized?


🎓

With central difference, oscillations occur when the grid Reynolds number $Re_h = |u|h/\nu$ exceeds 2. Let's compare practical options.


SchemeAccuracyNumerical DiffusionStabilityRemarks
Central Difference2nd orderNone$Re_h < 2$Possibility of oscillations
1st-order Upwind1st orderLargeUnconditionalVortices disappear
QUICK3rd orderSmall$Re_h < 8/3$Good balance
Kawamura-Kuwahara3rd orderVery smallGoodCompact difference
🧑‍🎓

QUICK seems good.


🎓

Indeed, QUICK (Quadratic Upstream Interpolation for Convective Kinematics) offers a good balance for many problems. However, monotonicity is not guaranteed, so for cases with sharp discontinuities, combining it with a TVD (Total Variation Diminishing) limiter is advisable.


Iterative Solvers for Poisson Equation

🧑‍🎓

Solving the Poisson equation every step becomes a cost bottleneck, right?


🎓

That's right. Let's compare the convergence speeds of typical iterative methods. For an $N \times N$ grid.


Related Topics

Related Simulators

Experience the theory firsthand with the interactive simulator for this field

All Simulators

Related fields

Rate this article
Thank you for your feedback!
Helpful
More details
Report error
Helpful
0
More details
0
Report error
0
Written by NovaSolver Contributors
Anonymous Engineers & AI — Sitemap
SolverIteration Count ($O(\cdot)$)Operations per IterationTotal
Jacobi$O(N^2)$$O(N^2)$$O(N^4)$
Gauss-Seidel$O(N^2)$