In quantum mechanics, the results of the quantum particle in a box can be used to look at the equilibrium situation for a quantum ideal gas in a box which is a box containing a large number of molecules which do not interact with each other except for instantaneous thermalizing collisions. This simple model can be used to describe the classical ideal gas as well as the various quantum ideal gases such as the ideal massive Fermi gas, the ideal massive Bose gas as well as black body radiation (photon gas) which may be treated as a massless Bose gas, in which thermalization is usually assumed to be facilitated by the interaction of the photons with an equilibrated mass.
Using the results from either Maxwell–Boltzmann statistics, Bose–Einstein statistics or Fermi–Dirac statistics, and considering the limit of a very large box, the Thomas–Fermi approximation (named after Enrico Fermi and Llewellyn Thomas) is used to express the degeneracy of the energy states as a differential, and summations over states as integrals. This enables thermodynamic properties of the gas to be calculated with the use of the partition function or the grand partition function. These results will be applied to both massive and massless particles. More complete calculations will be left to separate articles, but some simple examples will be given in this article.