Suppose, there are two cylinders of compressed gas, say air. Both are at same temperature and pressure and the amount too is same. Now, contents of both are released but in a different way. One has been released directly and the other has been released through compressed air turbine having a generator attached to it. Therefore, some amount of power/electricity has been generated by the second. I want to know which one will be able to produce more cold. Common sense tells that it's the second because by this process that dynamic energy of the compressed air has been converted into power/electricity and it should has lesser energy than the first where the velocity of release has been converted into random motion of molecules i.e. heat. Am I right or wrong?