Solution (source code)

= Solution

<Kelvin's circulation theorem> states that a smooth inviscid barotropic fluid subject to a conservative body force preserves <circulation> around every closed <material curve>. Write the <pressure> term as $\nabla w$ with $dw=dp/\rho$, and the body force per mass as $-\nabla\Phi$. Then the <Euler equations> give $D\mathbf u/Dt=-\nabla(w+\Phi)$. For a moving parametrization $\mathbf x(s,t)$ with $\partial_t\mathbf x=\mathbf u$,
$$
\begin{aligned}
\frac d{dt}\oint_{C(t)}\mathbf u\cdot d\mathbf x
&=\oint_{C(t)}\frac{D\mathbf u}{Dt}\cdot d\mathbf x
+\oint_{C(t)}\mathbf u\cdot d\mathbf u\\
&=\oint_{C(t)}\nabla\left(\frac12u^2-w-\Phi\right)\cdot d\mathbf x=0.
\end{aligned}
$$
The last integral is the increment of a single-valued scalar around a closed curve. Consequently
$$
\boxed{\Gamma(C(t))=\Gamma(C(0))}.
$$
Constant density is a special barotropic case with $w=p/\rho$. Viscosity, nonconservative forcing or baroclinic <pressure> gradients can invalidate this conservation law; the exterior-cylinder conclusions use the smooth inviscid hypotheses.