Steady Navier–Stokes, rendered live by a surrogate

Drag a slider: the 128×128 solution follows in tens of milliseconds; the full solver needs about a second. All demos

$$u\cdot\nabla\omega = \nu\,\Delta\omega + g(y,x),\qquad -\Delta\psi = \omega,\qquad u = (\partial_{x_2}\psi,\,-\partial_{x_1}\psi)\ \text{ in } (0,1)^2,\qquad \psi = \partial_n\psi = 0 \ \text{ on the boundary (no slip)},$$

$$g(y,x) = 5\sum_{j=1}^{200} y_j\, j^{-1/2}\,\psi_j(x),\qquad \psi_j(x) = \sin(k_j\pi x_1)\sin(l_j\pi x_2).$$

Parameters: \(y_1,\dots,y_6 \in [-1,1]\) (the other \(y_j\) are 0) and the viscosity \(\nu \in [0.006, 0.02]\). Grid: \(128^2\) cells.

waiting for the server…

streamfunction ψ
vorticity ω
speed |u|
full solver: speed (press compare)