I have trouble understanding Joule-Thomson effect, may be i am missing some basic concepts of thermodynamics. We have two chambers. When we compress ideal gas to low volume by external work (adiabatic process), We increase its internal energy and hence temperature. And then we release this compressed gas through plug to vacuum. Here is the problem arise. Final Internal energy is same as before. But how? Compressed gas is released to vacuum and hence no work is done by the gas.
I think you answered your question. If no work is done and no heat transfer occurs then by first law there is no change in internal energy
So my question is does the internal energy of the gas before work is done on it (compressing it) as same as after it is expended to vacuum?
No. The internal energy before the compression work is done on it is less than the internal energy of the gas after it expanded into the vacuum.
The internal energy of the gas increased when it was compressed. When it expanded into the vacuum, its internal energy does not change because the gas does no work when it expands into the vacuum. It keeps the increase given to it by the compression. In order for the gas to do work when it expands it must expand against some resistance (force). The vacuum offers no resistance to the expansion.
Hope this helps