Let $M$ be a smooth $n$-dimensioanl manifold. To set some notations
- $C^\infty(M)$ denote smooth functions $M \to \mathbb{R}$
- $\Omega^k(M)$ denote $k$-forms on $M$
- $\tau(M)$ denote vector fields on $M$.
I will sometimes omit $(M)$ in the following when using these symbols.
Riemannian divergence
Depending on the available structure on $M$, there are some ways to introduce the divergence $$\text{div}: \tau(M) \to C^\infty(M)$$ of a vector field $X \in \tau(M)$:
- If $M$ is oriented and $\mu \in \Omega^n(M)$ is a volume form, $$\tag{1}\mathcal{L}_X\mu = d\left( \iota_X\mu \right) = \left(\text{div}X\right) \mu$$ where $\mathcal{L}$ is the Lie derivative, $\iota$ the interior product $\iota: \tau \times \Omega^k \to \Omega^{k-1}$, and $d$ the exterior derivative $d: \Omega^k \to \Omega^{k+1}$
- If $M$ has a connection $\nabla$, $$ \tag{2} \text{div}X = C^1_1(\nabla{X})$$ where $\nabla$ is the total covariant derivative and $C$ is the contraction;
- If $M$ is Riemannian with metric $g$, $$ \tag{3}\text{div}X = *d\!* (X^{\flat}) = (\pm) \, \delta(X^{\flat})$$ where $*$ is the Hodge operator $\Omega^k \to \Omega^{n-k}$ induced by $g$; $\flat: \tau(M) \to \Omega^1(M)$ is the flat isomorpohism induced by $g$; and $\delta: \Omega^k \to \Omega^{k-1}$ is the co-differential.
Given a metric $g$, these definitions are equivalent if $\mu = \mu_g$ is the Riemannian volume form and $\nabla = \nabla_g$ is the Levi-Civita connection.
From the third definition, it is clear that a vector field $X$ has vanishing divergence if and only if its Riemannian-dual 1-form $X^{\flat}$ is co-closed, i.e. $$\text{div}X = 0 \iff \delta(X^{\flat}) = 0$$
Hamiltonian vector fields
Assume now that $M$ is endowed with a symplectic form $\omega$ (closed non-degenerate 2-form; in particular $M$ is even-dimensional). A vector field $X_H$ on $M$ is Hamiltonian iff $\iota_{X_H}\omega = dH$ is an exact 1-form, i.e. $$\iota_{X_H}\omega = dH$$ for some $H \in C^{\infty}(M)$. In particular if $X_H$ is a Hamiltonian vector field then $\iota_{X_H}\omega$ is a closed 1-form, hence by Cartan magic formula $$\mathcal{L}_{X_H}\omega = \iota_{X_H} d\omega + d \iota_{X_H}\omega = 0$$
What can we say about the divergence of Hamiltonian vector fields? To make sense of the question we need to define the divergence on a symplectic manifold
Approach 1: Volume forms
A symplectic $2n$-dimensional manifold naturally carries a volume form $$\mu_\omega = \underbrace{\omega \wedge \cdots \wedge \omega}_{n \text{ times}}$$ Assume $M$ is endowed also with a Riemannian volume form $\mu_g$; then $$\mu_\omega = f \, \mu_g$$ for some never vanishing $f \in C^{\infty}(M)$. Let $X_H$ be a Hamiltonian vector field. Since $\mathcal{L}_{X_H}\omega = 0$ then $\mathcal{L}_{X_H}\mu_\omega = 0$, so $$0 = \mathcal{L}_{X_H}\mu_{\omega} = \mathcal{L}_{X_H}(f\mu_{g}) = \left(\mathcal{L}_{X_H}f\right)\mu_g + f\left(\mathcal{L}_{X_H}\mu_g\right) = \left(\mathcal{L}_{X_H}f\right)\mu_g + f(\text{div}X_H) \, \mu_g $$ and since $\mu_g$ is never vanishing $$f \, \text{div}X_H + df(X_H) = 0$$ To say something about $f$ we need a notion of compatibility between the symplectic structure and the Riemannian structure. So, say $M$ is endowed with a compatible triple $(\omega, g, J)$ where $J$ is an almost complex structure.
- What is the relation between the Riemannian volume $\mu_g$ form and the symplectic volume form $\mu_\omega$ given such compatible triple?
Approach 2: Hodge operator and co-differential
A symplectic manifold is naturally endowed (see [1]) with a co-differential operator $$\delta_{s}: \Omega^k \to \Omega^{k-1}$$ and a Hodge-like operator $$*_s: \Omega^k \to \Omega^{2n-k}$$ such that $$\delta_s = (\pm)*_s d \, *_s$$ On an almost-Kähler manifold, the symplectic Hodge operator is equivalent (up to a sign) to the Riemannian Hodge operator; so the symplectic and Riemannian co-differentials agree.
- Can this fact be used to define a symplectic divergence analogue to equation (3), and to relate it to the Riemannian divergence?
[1] Brylinski JL (1988) A differential complex for Poisson manifolds. Journal of differential geometry 28(1):93–114.