Fluid total-energy equation (source code)

= Fluid total-energy equation
{title2=$\partial_tE+\nabla\cdot[(E+p)\mathbf u]=-\rho\mathbf u\cdot\nabla\Phi+Q$}

For an inviscid fluid with specific <internal energy> $e$, let $E=\rho(e+|\mathbf u|^2/2)$. In a prescribed potential $\Phi$, $\partial_tE+\nabla\cdot[(E+p)\mathbf u]=-\rho\mathbf u\cdot\nabla\Phi+Q$, where $Q$ is external <heat> supply. A static gravitational potential can instead be included in the conserved energy.