Solution (source code)

= Solution

Write $D_t=\partial_t+\mathbf u\cdot\nabla$ for the <material derivative>. For any specific quantity $f$, <conservation of mass> gives
$$
\partial_t(\Sigma f)+\nabla\cdot(\Sigma f\mathbf u)=\Sigma D_tf.
$$
Dotting the momentum equation with $\Sigma\mathbf u$ produces the <kinetic energy> balance
$$
\partial_t\left(\frac12\Sigma u^2\right)+\nabla\cdot\left(\frac12\Sigma u^2\mathbf u\right)=-\mathbf u\cdot\nabla P-\Sigma\mathbf u\cdot\nabla\Phi_t.
$$
The <Coriolis acceleration> does no work because $\mathbf u\cdot(\mathbf e_z\times\mathbf u)=0$. Since the <shearing-sheet tidal potential> is time-independent, its advected potential-energy density obeys
$$
\partial_t(\Sigma\Phi_t)+\nabla\cdot(\Sigma\Phi_t\mathbf u)=\Sigma\mathbf u\cdot\nabla\Phi_t.
$$
For the <isothermal equation of state>, define the <barotropic energy density> $U=c_s^2\Sigma\ln(\Sigma/\Sigma_{\rm ref})$, with fixed positive reference <surface density> $\Sigma_{\rm ref}$. The <continuity equation> implies
$$
\partial_tU+\nabla\cdot(U\mathbf u)=-c_s^2\Sigma\nabla\cdot\mathbf u=-P\nabla\cdot\mathbf u.
$$
Adding these balances combines the two <pressure> terms into $-\nabla\cdot(P\mathbf u)$. This establishes <isothermal shearing-sheet energy conservation>. Thus \b[the conserved energy density and its flux] are
$$
\boxed{\partial_tE+\nabla\cdot\mathbf F=0,\quad E=\frac12\Sigma u^2+c_s^2\Sigma\ln\frac{\Sigma}{\Sigma_{\rm ref}}+\Sigma\Phi_t,\quad \mathbf F=(E+P)\mathbf u.}
$$
Choosing the density unit so that $\Sigma_{\rm ref}=1$ reproduces the printed logarithm. Changing the reference adds a multiple of the conserved mass to $E$ and its advective <energy flux>. The <barotropic energy density> is the mathematical energy of this fixed-<isothermal sound speed> closure; it is not the microscopic thermal energy of a thermally isolated gas. Maintaining an <isothermal process> can require heat exchange.