# Compressible flow - subsonic to supersonic and the 2nd law of thermodynamics

I'm reading chapter 16 in Fluid Mechanics by Kundu.

It is stated (figures 16.16 and 16.17) that in a constant area duct flow with heating or friction, to go from subsonic conditions to supersonic violates the 2nd law of thermodynamics. How can that be possible? How does a fluid attain supersonic speeds in the first place? Somehow, one must be able to get ambient quiescent air to supersonic velocities (it's done all the time). I know that you cannot generate a normal shock by going from subsonic to supersonic, only the other way around, but why can't you speed a fluid from subsonic conditions to supersonic in the duct? In that case, there just would not be any shock generated? Would that violate the 2nd law?

I'm missing something here...

... the upper left branch of the solution $M_2 > 1$ when $M_1 < 1$ is inaccessible because it violates the second law of thermodynamics