sgstudent said:
Hmm I was never really told what were the conditions of the system actually. I was just told that the gas was expanded into a vacuum. Which meant that w=0 as the external pressure is 0. I guess the setup is like this:
https://en.wikipedia.org/wiki/Free_expansion#/media/File:Before_during_after_sudden_expansion.jpg where the walls are insulated
So I'm not sure if I was overthinking this. But now I'm thinking that q=0 because the walls are adiabatic and so no heat can be transferred.
Based on what you showed, you are correct to say that both q and w are equal to zero.
Suppose you have an adiabatic chamber with a partition, with gas on one side of the partition and vacuum on the other. If you suddenly remove the partition, what is ΔU when the system finally re-equilibrates? If you regard the contents of the chamber as your system, then the contents does no work on its surroundings (the chamber walls), so w = 0.
If you have a mass-less piston in place of the partition and you suddenly release the piston, what is ΔU when the system finally re-equilibrates. Here again, the contents does no work on its surroundings, so w = 0.
If you have a piston with mass in place of the mass-less piston and you suddenly release the piston, what is ΔU when the system finally re-equilibrates. When the system has re-equilibrated, the piston is no longer moving, so here again the contents do no work on its surroundings, so w = 0.
This is an example of the beauty of the first law of thermodynamics. You can sometimes figure out what the final state of the system is without knowing the details of what happens between the initial and final states of the system.
In the case of a stopcock between two chambers, the situation is the same if the chambers can equilibrate thermally. But, if the chambers cannot equilibrate thermally, the situation is different.
Chet