As a result, the chemical potential of the black-body photon gas is zero at thermodynamic equilibrium.
The reverse process can also take place, resulting in a photon being destroyed and removed from the gas.
The thermodynamics of a black-body photon gas may be derived using quantum statistical mechanical arguments, with the radiation field being in equilibrium with the atoms in the wall.
The derivation yields the spectral energy density u, which is the energy of the radiation field per unit volume per unit frequency interval, given by:[3] where h is the Planck constant, c is the speed of light, ν is the frequency, k is the Boltzmann constant, and T is temperature.
Note that for a particular temperature, the particle number N varies with the volume in a fixed manner, adjusting itself to have a constant density of photons.
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 H0 is the enthalpy at the end of the transformation.
In low-dimensional systems, for example in dye-solution filled optical microcavities with a distance between the resonator mirrors in the wavelength range where the situation becomes two-dimensional, also photon gases with tunable chemical potential can be realized.
One consequence of the tunable chemical potential is that at high phase space densities then Bose-Einstein condensation of photons is observed.