Solution (source code)

= Solution

Writing the <velocity> as $(u,v)=(y,ax)$ gives
$$
\partial_xu+\partial_yv=0,
$$
so the flow is incompressible. With the convention
$$
u=\psi_y,
\qquad
v=-\psi_x,
$$
a stream <function> is
$$
\boxed{\psi(x,y)=\frac12(y^2-ax^2)}.
$$
The <streamlines> are its level sets. For $a>0$, they are the hyperbolas
$$
y^2-ax^2=\text{constant},
$$
with separatrices $y=\pm\sqrt a\,x$ and a saddle at the origin. For $a<0$, they are concentric ellipses
$$
y^2+|a|x^2=\text{constant},
$$
traversed clockwise. This is the <streamline classification of a planar linear saddle or centre>.

The <scalar> <vorticity> is
$$
\partial_xv-\partial_yu=a-1.
$$
Hence the flow is irrotational exactly when
$$
\boxed{a=1}.
$$
Then $(u,v)=(y,x)=\nabla\phi$, and a <velocity potential> is
$$
\boxed{\phi(x,y)=xy+\text{constant}}.
$$