Solution (source code)

= Solution

An <irrotational flow> satisfies $\nabla\times\mathbf u=0$. On a simply connected region, or locally on any small regular region, this gives a <velocity potential> $\phi$ with $\mathbf u=\nabla\phi$. The <incompressibility condition> is $\nabla\cdot\mathbf u=0$, so
$$
\boxed{\nabla^2\phi=0.}
$$
Thus the potential is a <harmonic function>. The locality qualification matters: a curl-free circulation around an excluded vortex core need not admit a globally single-valued potential. No such circulation is needed for the sphere flow below.