Solution (source code)

= Solution

Choose the planar <streamfunction> convention $u=\psi_y$, $v=-\psi_x$. For an <irrotational flow>, a <velocity potential> gives $\mathbf u=\nabla\phi$. Thus
$$
\boxed{u=\phi_x=\psi_y,\qquad v=\phi_y=-\psi_x.}
$$
The <streamfunction> enforces <incompressibility>, since $u_x+v_y=\psi_{yx}-\psi_{xy}=0$. Conversely, <incompressibility> permits a local <streamfunction>, while zero <curl> permits a local <velocity potential>. These are the <Cauchy-Riemann equations> for the <complex potential of a two-dimensional potential flow> $w=\phi+i\psi$.

The <gradients> of the two functions satisfy
$$
\nabla\phi\cdot\nabla\psi=(u,v)\cdot(-v,u)=0.
$$
Each <gradient> is normal to its regular level curves. Therefore \b[regular curves of constant <velocity potential> and constant <streamfunction> meet orthogonally]. At a <stagnation point>, both gradients vanish and this tangent-direction argument needs a limiting interpretation. The conclusion concerns regular portions of the two families of curves.