# Vorticity and circulation in potential flow

There is a plenty of situations where the vorticity $\vec{\omega} = \nabla \times \vec{u}$ is zero all over the system (i.e. potential flow) and yet the circulation $\Gamma$ is nonzero (e.g. irrotational vortex, potential flow around the Joukowski profile...). For such cases this formula is obviously incorrect:

$$\oint_C \vec{u} \cdot \mathrm{d}\vec{r} = \int_S (\nabla \times \vec{u}) \cdot \mathrm{d}S$$

Why? Because the $S$ is not simply connected?

Exactly because the region is not simply connected. The stokes (or Green in 2d) theorem no longer holds. Consider for example the two dimensional vector field $$\vec F(x,y)=\frac{-y\hat i+x\hat j}{x^2+y^2},$$ which has vanishing curl and circulation $2\pi$ around a unit circle centerd at the origin. If this vector field is meant to be a flow velocity field it clearly means the fluid is rotating around the origin. However it gets slower as we go away from the origin. The circulation around an infinitesimal closed path vanishes.
The expression given by: $$\int_{S} \ dS \ \hat{\mathbf{n}} \cdot \left( \nabla \times \mathbf{A} \right) = \oint_{C} \ \mathbf{A} \cdot d\mathbf{l}$$ is just a vector calculus rule called Stokes' theorem and is valid regardless of the type of flow.
Because the $S$ is not simply connected?
The $S$ in the expression represents the closed surface with unit outward normal, $\hat{\mathbf{n}}$, and it must be connected. It is related to the closed contour, $C$, about which the right-hand side is integrated.
Whether you can define the surface, $S$, is the issue, not whether Stokes' theorem is valid.