The energy of the temperature of the gas is calculated separately from the energy to "create" a volume to exist in.

Basically, if you had a volume filled with some environment, and you want to add something to the environment, you have to make room for the thing you want to add, AND you add the thing. If the thing has its own energy, that energy is distinct from the energy required to move the environment out of the way.

Does the energy to displace the environment come from the temperature? Not necessarily. It could, or it could have come from another source. Energy is tricky like that.

At any rate, wherever it came from, the amount needed to create a volume to occupy is distinct from the amount contained within the thing that occupies said volume.


The tangent to buoyancy is hard to analyze because things still float in water in space, its just that gravity is a relatively weak force and the surface tension is much stronger by comparison, if we're talking about a less-than-planet-sized body of water.

To bring it back, whether the energy's origin is in a surface tension force or a gravitational force, it holds the water together, and if you were to put something into that water, you have to displace some water to make room for it. The volume of the blob plus your addition is greater than the original blob. So it had to work *against* surface tension to increase the volume, which required energy to do.

The energy needed to create a vacuum in the water is needed to make room for whatever you want to add. Then whatever you add will increase the energy further, as it exists above absolute zero in temperature, so has positive energy due to thermal motions.