Why inversion temperature does not matter for work-producing expansion system? I was reading about cryogenics in the Perry's 8th Ed. when I stumbled upon this paragraph and I can't wrap my head around the fact that inversion temperature does not matter if you have a work-producing expansion and the gas will always cool down. Can you help me understand?


 A: We consider potential gas cooling ($\Delta T<0$) occurring upon a decrease in pressure ($\Delta P<0$) under certain scenarios (specifically, throttling and force–distance work). Does cooling always occur, and for what types of gases?
The phenomenon can be expressed as
$$\left(\frac{\partial T}{\partial P}\right)_X,$$
or the decrease in temperature per unit decrease in pressure under the condition of constant $X$.
In Joule–Thomson throttling, we use a model of a control volume $dV=0$ with a liquid moving in and out too fast to interact thermally with the surroundings; thus, the heat transfer $Q$ and work $W=-P\,dV$ are zero. An energy balance in this control volume includes the net internal energy of the incoming matter $U$ plus the net work done to move the surroundings out of the way, which is $PV$, to obtain that the net enthalpy change $\Delta H=\Delta U+\Delta(PV)$ is zero. For constant enthalpy, we write the temperature-change expression as
\begin{align}
\left(\frac{\partial T}{\partial P}\right)_H&=-\left(\frac{\partial H}{\partial T}\right)^{-1}_P\left(\frac{\partial H}{\partial P}\right)_T=-\frac{1}{C_P}\left[T\left(\frac{\partial S}{\partial P}\right)_T+V\right]\\&=-\frac{1}{C_P}\left[-T\left(\frac{\partial V}{\partial T}\right)_P+V\right]=\frac{V}{C_P}(\alpha T-1)
\end{align}
for temperature $T$, pressure $P$, enthalpy $H$, and volume $V$ and where I've used the triple product rule, a Maxwell relation, and the definitions of the constant-pressure heat capacity $C_P\equiv T\left(\frac{\partial H}{\partial T}\right)_P$, and thermal expansion coefficient $\alpha\equiv \frac{1}{V}\left(\frac{\partial V}{\partial T}\right)_P$.
Note that for the real-gas equation of state $PV=znRT$, where $z$ is the compressibility factor, $\alpha=\frac{1}{T}+\left(\frac{\partial \ln z}{\partial T}\right)_P$.
Now, for an ideal gas, $z=0$, $\alpha =1/T$, and no cooling occurs. (Alternatively, since regions of gas can do work only on neighboring regions of gas, we conclude that the kinetic energy lost in one region exactly equals the kinetic energy gained in the adjacent region, and the average temperature remains unchanged.)
But for a real gas, with finite-volume molecules and some degree of potential-energy interaction between them, the volume increase and pressure drop can result in a temperature increase or decrease, depending on which aspect  dominates. The threshold of zero effect is the inversion temperature; above this temperature, the real gas actually warms upon expansion, and we observe no cooling in this case unless supplemental refrigeration is used, as noted in the first highlighted text.
In contrast, for pressure–volume work obtained by moving a piston, for example, the cooling can be expressed as
$$ \left(\frac{\partial T}{\partial P}\right)_S=-\left(\frac{\partial S}{\partial T}\right)^{-1}_P\left(\frac{\partial S}{\partial P}\right)_T=\frac{T}{C_P}\left(\frac{\partial V}{\partial T}\right)_P=\frac{V\alpha T}{ C_P},$$
where I've taken the system as the entire amount of expanding gas; since no heat transfer $Q=T\,dS$ is assumed to occur, we can idealize the entropy $S$ as remaining constant for a sufficiently gradual process. I use a similar simplification process as before to evaluate the partial derivative.
Since all the terms are positive for a gas, the result—that is, the temperature decrease for decreasing pressure—is also always positive for a gas. Here, we can visualize the gas molecules bouncing against a retreating surface (rather than more of the same gas) and thus losing energy with each rebound as the piston provides us with work. Thus, cooling always occurs in this case, as noted in the second highlighted text. Make sense?
