$ \left( \frac{p}{\rho}+\alpha \frac{1}{2}\bar{V}^2+gz \right)_{in}=\left( \frac{p}{\rho}+\alpha \frac{1}{2}\bar{V}^2+gz \right)_{out}-h_{L}+h_{S} $ $ h_{L}\equiv \frac{u_{out}-u_{in}-\dot{Q}_{CV}}{\dot{m}}\qquad h_{S}= \frac{\dot{W}_{shaft}}{\dot{m}} $ - head loss $h_{L}$ takes into account the conversion of macroscopic -> microscopic/thermal energy via viscous effects - Shaft head $h_{S}$ is work caused by shaft (pump, turbine)