# construct divergence free vector field manifold

I have a smooth compact oriented manifold without boundary, $M$, with the volume form $\Omega$ and a Riemannian metric $g$.

Given a function $\phi$ is there any canonical way to obtain a divergence-free smooth vector field $V$ which is orthogonal to $\nabla _{g} \, \phi$?

Optimally, I would like $V$ to be globally defined and orthogonal to $\nabla _g \, \phi$, but eventually even locally could do it,

• Are you modelling yourself on the situation of $\mathbb{R}^2$ with the standard metric where given any function $\phi$, the vector field $(\partial_2 \phi, - \partial_1\phi)$ is orthogonal to $\phi$ and divergence free? This generalizes to any two dimensional Riemannian manifold if you take $V = *\mathrm{d}\phi$ where $*$ is the Hodge star and we freely raise/lower indices with $g$. In higher dimensions the analogue are not vector fields. Nov 16 '16 at 15:35
• Alternatively, a higher dimensional structure that better captures what you want in this case is that of a symplectic structure. If you are given a even-dimensional manifold $M^{2n}$ with a symplectic form $\omega$ and associated volume form $\omega^n$, then a direct computation shows that the Hamiltonian vector field of $\phi$ is tangent to the level sets of $\phi$ (so "orthogonal to the gradient") and is divergence free. Nov 16 '16 at 15:50
Your problem is perhaps better stated as asking, given a manifold $M$ with a volume form $\Omega$, and a smooth function $\phi$, if there is a vector field $X$ whose flow preserves $\Omega$ and for which $\phi$ is constant along the flow lines of $X$. This problem has no Riemannian metric. Locally, near a point where $d\phi \ne 0$, we can find coordinates in which $\Omega$ is the Euclidean volume form, and in which $\phi$ is the first coordinate function. Why? Use the Moser homotopy lemma to arrange coordinates $x^1, \dots, x^n$ in which $\Omega$ is the Euclidean volume form. Then find a function $f$ so that $\partial f/\partial x^2 \partial \phi/\partial x^1-\partial f/\partial x^1 \partial \phi/\partial x^2=1$, locally, and then replace $x^1$ with $\phi$ and $x^2$ with $f$. Now your vector field can be any divergence free vector field in $x^2,\dots,x^n$, and it gives a vector field tangent to level sets of $\phi$, since it doesn't involve $x^1$.