text: As an example of a thermodynamic process involving a photon gas, consider a cylinder with a movable piston. The interior walls of the cylinder are "black" in order that the temperature of the photons can be maintained at a particular temperature. This means that the space inside the cylinder will contain a blackbody-distributed photon gas. Unlike a massive gas, this gas will exist without the photons being introduced from the outside – the walls will provide the photons for the gas. Suppose the piston is pushed all the way into the cylinder so that there is an extremely small volume. The photon gas inside the volume will press against the piston, moving it outward, and in order for the transformation to be isothermic, a counter force of almost the same value will have to be applied to the piston so that the motion of the piston is very slow. This force will be equal to the pressure times the cross sectional area (A ) of the piston. This process can be continued at a constant temperature until the photon gas is at a volume V . Integrating the force over the distance (x ) traveled yields the total work done to create this photon gas at this volume
  where the relationship V = Ax  has been used. Defining
  The pressure is
  Integrating, the work done is just
  The amount of heat that must be added in order to create the gas is
  where H is the enthalpy at the end of the transformation. It is seen that the enthalpy is the amount of energy needed to create the photon gas.