Barotropic magnetic energy equation (source code)

= Barotropic magnetic energy equation

For a <barotropic fluid>, an <energy> per <mass> $e$ can be defined by $de/d\rho=p/\rho^2$. For the <isothermal equation of state>, $e=c_s^2\ln(\rho/\rho_0)$. Adding kinetic, gravitational and <magnetic energy> gives the ideal <magnetic energy> flux $\mathbf u(E+p+B^2/(2\mu_0))-\mathbf B(\mathbf u\cdot\mathbf B)/\mu_0$. This is a mechanical barotropic <energy> identity; it does not say that an isothermal gas is thermally isolated.