Why this field with non-zero curl has closed orbit? I am working on a dynamic system:
$$\dot{r}=F(r,\phi)=v \cos{\phi}$$
$$\dot{\phi}=G(r,\phi)=\frac{f(r,\phi)}{v \cos{\phi}}-\frac{v \sin{\phi}}{r}$$
where
$f(r,\phi)=0.5 r^5 (\pi/2-\phi)$
The out-of-plane component of the curl $F_{\phi}-G_r$ of this system is not generally zero.
But the numerical integrated trajectory from this is closed.　
Sample trajectory picture:

Initial condition: $r(0)=0.9, \phi(0)=\pi/2$
How is this happening? Is it because there are infinite number of singularity (though removable) at $\phi=\pi/2$.
I'd really appreciate your help!
 A: I think I see where the problem is, from your comment.
A vector field $\overrightarrow{v}$ on an open domain $U \subset \mathbb{R}^n$ is said to be conservative if there exists a potential $\varphi$ such that $\overrightarrow{v} = \overrightarrow{\nabla} \varphi$. Equivalently, on any closed curve $\gamma$,
$$\oint_\gamma \overrightarrow{v} \cdot d\overrightarrow{x} = 0.$$
It also implies (and is equivalent if $U=\mathbb{R}^n$, or more generally a simply-connected domain) that the curl vanishes: $\overrightarrow{\nabla} \wedge \overrightarrow{v} = 0$.
That tells you nothing about the orbits of the flow. Indeed, $\gamma$ is any closed curve, and not necessarily a closed orbit ; it may be transverse to the flow lines. That's about as well, because conservative flows don't have many periodic orbits (to be rigorous, they may have some : the critical points of $\varphi$, where the vector field vanishes); indeed, the flows follows $\overrightarrow{v} = \overrightarrow{\nabla} \varphi$, so $\varphi$ increases along the orbit. If you had a loop, then that means that $\varphi$ would keep increasing, and after a period would still be at its initial value, like some kind of Escher's staircase. That's impossible.
So, if you want your system to have periodic orbits, you would better avoid conservative vector fields. In a simply connected domain, that means you actually need the curl to be non-zero!
That's not surprising. Let $\gamma$ be a periodic orbit of the flow, and $C$ the disk delimited by $\gamma$. By Stoke's theorem,
$$\oint_\gamma \overrightarrow{v} \cdot d\overrightarrow{x} = \iint_C \overrightarrow{\nabla} \wedge \overrightarrow{v} d x d y.$$
But since $\gamma$ follows a flow line, $d\overrightarrow{x} = \overrightarrow{\gamma'} dt = \overrightarrow{v}dt$, so the LHS is:
$$\oint_\gamma \|\overrightarrow{v}\|^2 dt >0.$$
Hence, the RHS has to be non-zero, so the curl can't vanish everywhere.
Sanity check: consider a system whose orbits are concentric circles, for instance $r' = 0$ and $\theta' = r$. Then the curl is constant and equal to 2.
Note that there are a few subtelties if the domain isn't simply connected (you can then have vanishing curl and periodic orbits), but that doesn't concern your example.
