Solution (source code)

= Solution

Let the constant <mass density> be $\rho>0$ and put $\mathbf v_a=\mathbf B/\sqrt{\mu_0\rho}$, the <Alfvén velocity>. Since both the <velocity> and the <magnetic field> have zero <divergence>, the <magnetic tension> and <magnetic pressure> decomposition of the <Lorentz force> gives
$$
\partial_t\mathbf u+(\mathbf u\cdot\nabla)\mathbf u=-\nabla\psi+(\mathbf v_a\cdot\nabla)\mathbf v_a,\qquad
\partial_t\mathbf v_a+(\mathbf u\cdot\nabla)\mathbf v_a=(\mathbf v_a\cdot\nabla)\mathbf u,
\qquad
\boxed{\psi=\frac p\rho+\Phi+\frac{|\mathbf v_a|^2}{2}.}
$$
The <Newtonian gravitational potential> $\Phi$ remains in $\psi$; uniform <mass density> does not justify dropping a prescribed <gravitational acceleration>. Adding and subtracting the two equations proves the <Elsässer variable> equations
$$
\boxed{\partial_t\mathbf z^\pm+(\mathbf z^\mp\cdot\nabla)\mathbf z^\pm=-\nabla\psi,\qquad \nabla\cdot\mathbf z^\pm=0.}
$$
Here $\mathbf z^\pm=\mathbf u\pm\mathbf v_a$; each <Elsässer variable> is transported by the other.

Define $I_\pm=\int_V|\mathbf z^\pm|^2\,dV$. Taking the <dot product> with $2\mathbf z^\pm$ gives the <Elsässer energy invariant> balance
$$
\partial_t|\mathbf z^\pm|^2+\nabla\cdot\left(|\mathbf z^\pm|^2\mathbf z^\mp+2\psi\mathbf z^\pm\right)=0.
$$
The <divergence theorem> proves $dI_\pm/dt=0$ whenever the net boundary flux vanishes. In particular, $\mathbf u\cdot\mathbf n=\mathbf B\cdot\mathbf n=0$ makes $\mathbf z^\pm\cdot\mathbf n=0$, so both fluxes vanish pointwise. <Periodic boundary conditions> or decay at infinity are also sufficient. These <boundary conditions> matter: fixed volume alone gives no conservation.

The <kinetic energy> plus <magnetic energy> is
$$
E=\frac{\rho}{2}\int_V\left(u^2+v_a^2\right)dV.
$$
Expanding $|\mathbf u\pm\mathbf v_a|^2$ and using the <cross-helicity> definition yields
$$
\boxed{E=\frac{\rho}{4}(I_++I_-),\qquad H_c=\frac{\sqrt{\mu_0\rho}}{4}(I_+-I_-),\qquad I_\pm=\frac{2E}{\rho}\pm\frac{2H_c}{\sqrt{\mu_0\rho}}.}
$$
Both <energy> and <cross-helicity> therefore follow from the two <Elsässer energy invariants>. The quantity $E$ here is exactly the requested <kinetic energy> plus <magnetic energy>, without an additional gravitational term.