As answered in this question, a convergent-divergent nozzle (de Laval nozzle) accelerates a gas flow by converting its heat energy into kinetic energy. My intuition says that this violates the second law of thermodynamics because the nozzle does not need a temperature gradient to do this; the gas flow cools down and increases its kinetic energy.
Eventually this is a conversion of heat energy into useful work and is ruled out according to the second law of thermodynamics. I assume that it is more difficult than this, so I ask for an intuitive explanation for why it is not a perpetual motion machine of the second kind.