Bernoulli function for planar constant-vorticity flow (source code)

= Bernoulli function for planar constant-vorticity flow
{c}
{title2=$|\mathbf u|^2/2+\omega\psi+p/\rho=C$}

With the <streamfunction> convention $(u,v)=(\psi_y,-\psi_x)$, constant scalar <vorticity> gives $\mathbf u\times\boldsymbol\omega=-\omega\nabla\psi$. For steady inviscid constant-density flow without body force, this integrates to
$$
\tfrac12|\mathbf u|^2+\omega\psi+p/\rho=C
$$
throughout a connected fluid region. Reversing the streamfunction convention changes the sign of its term; the declared convention matters.