StreamFunction - crowlogic/arb4j GitHub Wiki

A stream function is a scalar function used to describe fluid flow in two-dimensional, incompressible fluid dynamics. It represents the flow pattern of a fluid and can be used to simplify the equations governing fluid motion.

In the context of complex analysis, complex analytic functions can be employed to describe fluid flow in a two-dimensional space. A complex analytic function is a function of a complex variable that is differentiable at every point in its domain. When a complex function is analytic, it satisfies the Cauchy-Riemann equations, which are a set of partial differential equations that link the real and imaginary parts of the function.

Let's consider a complex function f(z) = u(x, y) + iv(x, y), where z = x + iy is the complex variable, and u(x, y) and v(x, y) are the real and imaginary parts of the function, respectively.

The Cauchy-Riemann equations are given by:

  • ∂u/∂x = ∂v/∂y
  • ∂u/∂y = -∂v/∂x

In fluid dynamics, we can relate the stream function (ψ) to the velocity potential (φ) through a complex analytic function. Suppose F(z) = φ(x, y) + iψ(x, y), where ψ(x, y) is the stream function and φ(x, y) is the velocity potential. If F(z) is analytic, then ψ and φ satisfy the Cauchy-Riemann equations:

  • ∂φ/∂x = ∂ψ/∂y
  • ∂φ/∂y = -∂ψ/∂x

These equations imply that the gradient of the velocity potential (φ) is orthogonal to the gradient of the stream function (ψ). In incompressible flow, the fluid's density remains constant, and the flow is divergence-free. In the 2D case, this means that the velocity field (u, v) satisfies the continuity equation:

∂u/∂x + ∂v/∂y = 0

For an incompressible flow, we can express the velocity components u and v in terms of the stream function:

  • u = ∂ψ/∂y
  • v = -∂ψ/∂x

The streamlines, which are the curves tangent to the velocity vector at every point, can be obtained by setting the stream function equal to a constant. Thus, the stream function allows us to visualize the flow pattern in the fluid and helps simplify the analysis of two-dimensional, incompressible fluid flows.