Conservative energy flux of a polytropic ideal gas (source code)

= Conservative energy flux of a polytropic ideal gas
{title2=$E=\tfrac12\rho u^2+\frac p{\gamma-1},\quad F_E=u_x(E+p)$}

For an unmagnetized <ideal gas> without gravity, the <pressure> equation gives internal-energy balance $\partial_te+\partial_x(u_xe)=-p\partial_xu_x$, where $e=p/(\gamma-1)$. The momentum equation gives kinetic-energy balance with source $-u_x\partial_xp$. Their sum is conservative with the displayed total-energy flux. Tangential <velocities> contribute to <kinetic energy> even when all derivatives are in the normal direction. Smooth <polytropic flow> advects its <entropy> parameter; a physical shock need not preserve that parameter across the discontinuity.