So I've been wondering if anyone knows a formula to relate these quantities in this scenario. Say I have a container that originally has some volume, some amount of atoms at a constant velocity and is at a certain pressure and is airtight and then connect it to another container that has twice the volume and is at a very low pressure. Now some of these atoms will move from the first container to the second container due to the difference in pressure. Is there a formula I could use to calculate how many of these atoms move over to the second container to reach equilibrium? What about a change in velocity of the atoms? Is there a formula I can use?