# What exactly is a photon gas?

I came upon this question in a JEE Advanced mock test online:

The number of photons of wavelength $$\lambda$$ required to achieve pressure $$P$$ in an empty cubical box of edge length $$l$$ is given by $$\displaystyle \frac{Np\lambda l^3}{hc}$$. Find $$N.$$

In the solution, they have assume that the photon particles behave liked a ideal gas and used the equation $$\displaystyle PV=\frac{NMV_\mathrm{rms}^2}{3}$$. After that they substituted $$MV_\mathrm{rms}(V_\mathrm{rms})$$ with $$\displaystyle\frac{hc}{\lambda}$$.

I tried my best and couldn't find the exact source of this question, but I did find this about photon gasses from Franz Schwabl. Chapter 4 Statistical Mechanics, Edition 2; Springer-Verlag Berlin Heidelberg; pp 197-199:

The value of the mean collision time (of photons) is approximately $$τ ≈ \pu{10^{31} s}$$ at room temperature and $$τ ≈ \pu{10^{18} s}$$ at the temperature of the Sun’s interior $$(\pu{107 K}).$$ Even at the temperature in the center of the Sun, the interaction of the photons is negligible. Photons do indeed constitute an ideal quantum gas.

The number of photons is not conserved. Photons are emitted and absorbed by the material of the cavity walls. From the quantum-field description of photons it follows that each wavenumber and polarization direction corresponds to a harmonic oscillator.

Now I have many questions regarding photon gasses. How did the solution assume the number of molecules to be constant if photons can be emitted or absorbed by cavity walls? Why did they substitute $$MV_\mathrm{rms}$$ with $$h/\lambda$$ when the de Broglie equation $$p=h/\lambda$$ is only applicable to massive particles? And is the question and/or the solution even correct in the first place?

• Go to Google Scholar, there is a readible article "Teaching the photon gas in introductory physics", by Harvey S. Leff in the American Journal of Physics. It should be accessible. Direct access is behind paywall. Sep 27 '21 at 2:23
• @M.Farooq cpp.edu/~hsleff/PhotonGasAJP.pdf I found this free pdf, is it essentially the same thing or do you recommend getting it from American journal of physics Sep 27 '21 at 3:11
• @poutnik I think you forgot to add  in front of your mathjax equation Sep 27 '21 at 7:06
• De Broglie equation is applicable on particles with momentum, which photons possess. The full form of the famour $E=mc^2$ is $E=\sqrt{{(mc^2)}^2 + {(pc)}^2}$, so for $m=0$, $E=pc \implies p=E/c=hf/c=h/\lambda$. Sep 27 '21 at 7:17
• How did the solution assume the number of molecules to be constant if photons can be emitted or absorbed by cavity walls? At the thermal equilibrium, the rate of photon emission equals the rate of the photon absorption, so the photon count is constant, with existing, but negligible fluctuations. Sep 27 '21 at 7:25