Is the ideal gas equation valid for a flowing fluid? The assumptions for an ideal gas are:


*

*the gas consists of a large number of molecules, which are in random motion and obey Newton's laws of motion;

*the volume of the molecules is negligibly small compared to the volume occupied by the gas; and 

*no forces act on the molecules except during elastic collisions of negligible duration.
I am confused: Does the equation of state of the ideal gas $PV=mRT$ hold for flowing fluids (open systems) or just for closed systems?
Since we know that for open systems we have the equation for energy conservation:
$$ h +  \frac{V^2}2 + gz = \text{const}.$$
So there should be a velocity term in the ideal gas equation if the ideal gas equation should also be valid for open systems. Please help me understand this discrepancy.
 A: A note on notation: I slightly deviate from the notational conventions in the question to use the notation standard I am used to. I use $V$ to denote the volume, in turn I denote the velocity as $v$. Also I use a lower case $p$ for the pressure.
The equation of state of an ideal gas is only valid in thermal equilibrium. This cannot be the case for an open system with a net flow (even if it is steady state).
However, if we consider a parcel of the fluid in its co-moving frame of reference, this parcel will approximately be in thermal equilibrium so we can use our equilibrium results for the parcel and this is how we compute the enthalpy $h$ per unit mass used in the generalized Bernoulli equation you quote (which assumes steady, inviscid, adiabatic flow). This approximation is known as assuming partial equilibrium and is quite good (in the sense that thermalisation is very fast for small volumes, so the approximation is very accurate). For the ideal gas we will get an enthalpy per unit mass of
$$ h = \frac{U + pV}{M} = \frac \nu {2m} k T + p/\rho. $$
Where $m$ is the mass of the particles and $\nu$ is the number of degrees of freedom. It remains to express $\rho$ in the natural variables $p$ and $T$, which is achieved by rearranging the equation of state $pV = NkT$ after first multiplying both sides by the particle mass $m$:
$$ \rho = mN/V = mp/kT.$$
Inserting this in the equation for the enthalpy we arrive at:
$$ h = \frac \nu {2m} k T + kT/m = \frac{\nu + 2}{2kTm}. $$
