https://en.wikipedia.org/wiki/Isentropic_process
[edit: typo]
https://en.wikipedia.org/wiki/Isentropic_process
[edit: typo]
Expansion through a nozzle is extremely chaotic and generates entropy. You can’t model JT that way.
When you compress air in an air pump you are doing work against the system and increasing its internal energy u = q - w, which can be explained using ideal gases by knowing that u = u(T). But this is not because the pressure increases but because of your work.
Sorry for butting in. It took me a long time to get comfortable with throttling. Non-equilibrium stat mech stuff can really throw you (well, at least me) off if you come at it too microscopically at first.
Edit -- H. Callen's thermo book has a great little section on it. Best book on thermo out there if you're into a real postulate-and-construct approach. One of my favorite books of all time. https://en.m.wikipedia.org/wiki/Thermodynamics_and_an_Introd...