Solution (source code)

= Solution

Use the material forms of the <ideal magnetohydrodynamic induction equation> and momentum equation:
$$
\frac{D\mathbf B}{Dt}
=(\mathbf B\mathbin\cdot\nabla)\mathbf u
-\mathbf B\nabla\mathbin\cdot\mathbf u,
$$
$$
\frac{D\mathbf u}{Dt}
=-\nabla(h+\Phi)+T\nabla s
+\frac{(\nabla\times\mathbf B)\times\mathbf B}{4\pi\rho}.
$$
The magnetic force is perpendicular to $\mathbf B$. For $h_c=\mathbf u\cdot\mathbf B$, the two equations therefore give
$$
\frac{Dh_c}{Dt}
=-\mathbf B\mathbin\cdot\nabla
\left(h+\Phi-\frac{u^2}{2}\right)
+T\mathbf B\mathbin\cdot\nabla s
-h_c\nabla\mathbin\cdot\mathbf u.
$$
Since $\nabla\cdot\mathbf B=0$, this is the <cross-helicity conservation law>
$$
\boxed{
\frac{\partial h_c}{\partial t}+\nabla\mathbin\cdot\mathbf F_c=S_c},
$$
with
$$
\boxed{
\mathbf F_c=\mathbf u h_c
+\mathbf B\left(h+\Phi-\frac{u^2}{2}\right),
\qquad
S_c=T\mathbf B\mathbin\cdot\nabla s}.
$$
For a <homentropic flow>, $\nabla s=0$, so the source vanishes.