A Joule expansion is an example of classical thermodynamics, as it is easy to work out the resulting increase in entropy. It occurs where a volume of gas is kept in one side of a thermally isolated container (via a small partition), with the other side of the container being evacuated; the partition between the two parts of the container is then opened, and the gas fills the whole container. The internal energy of the gas remains the same, while the volume increases. The original state cannot be recovered by simply compressing the gas to its original volume, since the internal energy will be increased by this compression. The original state can only be recovered by then cooling the re-compressed system, and thereby irreversibly heating the environment. The diagram to the right applies only if the first expansion is "free" (Joule expansion), i.e. there can be no atmospheric pressure outside the cylinder and no weight lifted.