Consider the following problem from fluid mechanics:
$\phi(\rho,q)$ is a function dependent on density and potential vorticity $q:=\Omega\cdot \nabla \rho$ with $\Omega=curl (v)+ f$ and $f$ being independent of $v$ and $\rho$
Now I would like to determine the first variation of a expression $H_C(\rho,v)$ involving $\phi$ , i.e. $$\delta H_C(\rho,v)=DH_C(\rho,v)\cdot(\delta \rho, \delta v)$$
The problematic term with subscribts denoting differentiation: $$(\phi_\rho+\phi_q q_\rho)\delta \rho+(\phi_qq_v) \delta v$$
My problem is to express the derivatives $q_\rho$ and $q_v$. In the one dimensional case I would use the trick $\frac{d q}{d \rho}=\frac{d q}{dx}/ \frac{d \rho}{dx}$, but as this is no "formal argumentation" i cannot apply this to the higher dimensional case.
However if I am not mistaken the result for $q_\rho$ should be $q_\rho = div ~\Omega$
(just guessing from the 1D result)