In a microscopic view, what happen for the real gases passing through an expansion valve? Why gases with negative Joule-Thomson coefficient become colder and some others warmer? what occurs for atoms and molecules?
Wkipedia: At room temperature, all gases except hydrogen, helium and neon cool upon expansion by the Joule–Thomson process; // Further on it shows that for every gas there is a temperarature where the coefficient becomes positive (Inversion temperature).
This should allow you to reformulate the question ??
An IDEAL gas becomes neither cooler nor warmer when passing through an expansion valve because there is no interaction, neither attractive nor repulsive, between ideal gas molecules. But in all REAL gases, there is SOME interaction. If the net interaction between gas molecules is attractive, increasing the distance between the molecules upon the expansion of the gas through the valve COSTS energy. Since this energy must come from the gas itself, cooling results. If the net interaction between gas molecules is repulsive, increasing the distance between the molecules upon the expansion of the gas through the valve YIELDS energy. So warming results. At low temperatures, attractive interactions dominate because the gas molecules are moving slowly enough to be somewhat bonded to each other. At high temperatures gas molecules move too fast to notice any tendency to bond, so repulsion dominates.
The sign of the Joule-Thomson coefficient determines if the gas is cooled or heated as it passes the porous plug. The process is isenthalpic, and the change of temperature for a infinitesimal process if dT=(v/c_p)(T.alpha-1) dp. The inversion curve, where the J-T coefficient vanishes, is defined by T.alpha=1. For ideal gases, alpha=1/T and the J-T coefficient vanishes identically, as Jack stated above. For real gases, the coefficient will be positive in part of the p-T plane and there the gas will be cooled. This may be seen, for instance, using the van der Waals equation of state. This point is discussed thoroughly by Callen in his famous textbook "Thermodynamics and an Introduction to Thermostatistics"