In 1843, Joule did this simple experiment to show that the internal energy of a gas is a function of temperature, independent of pressure or volume. When the gas in the left sphere initially flows without resistance into the vacuum of the right sphere, no work is performed and no heat is transferred. Thus the temperature remains constant. It is now understood that this result is accurate only for an ideal gas.