Solution (source code)

= Solution

For steady inviscid motion of a <barotropic fluid> in a conservative <gravitational potential> $\Phi$, the <Euler equations for an inviscid fluid> imply the <Bernoulli equation>
$$
\boxed{\frac{v^2}{2}+h+\Phi=B,\qquad dh=\frac{dp}{\rho},}
$$
along each streamline. The <barotropic enthalpy function> $h$ has units of energy per unit mass. For an isentropic <ideal gas>, $p=K\rho^\gamma$ gives $h=\gamma p/[(\gamma-1)\rho]$ up to an additive constant. For constant density, the corresponding term is $p/\rho$. Pressure work converts between kinetic, enthalpy and gravitational energy.

A converging subsonic nozzle can accelerate a fluid at the expense of its enthalpy; in the incompressible horizontal approximation, higher speed accompanies lower static <pressure>. Together with <conservation of mass>, this explains a <Venturi effect> measurement. Compressible nozzle flow additionally needs its equation of state and sonic conditions. In a stellar wind, the potential term is $-GM/r$, so enthalpy or mechanical energy can be spent escaping gravity. A pressure-negligible marginal-escape wind has $v^2/2-GM/r=0$.

The constant need not be the same on different streamlines. Irrotational barotropic flow in a connected region gives a common value; a general rotational flow does not. A pump, viscosity, a radiating shock, or heat addition changes the relevant energy balance. In particular, adiabaticity alone does not allow one to drop the enthalpy term.