Hover over the menu bar to pick a physics animation.

For a black body cavity, the photon group inside the cavity is in equilibrium with emitters and absorbers in the inner walls of the cavity. Here we show two versions of these emitters:either circular waves emnaniting from the walls or photons coming from the walls. Both of these entities propagate at the speed of light, c. However, the directions of the photons are quantized here in order to have an integer number of half waves between between vertical walls and horizontal walls which allows us to have zero tangential field at the boundaries. If there are to be some integer number of half waves in both x and y directions, then we must have

`f=(c/2)sqrt[(n_x/w)^2+(n_y/h)^2] `

where `f` is the frequency, `c` is speed of light, and `(n_x,n_y)` are integers and `w` and `h` are width and height of the cavity. In any case, the frequency to be used in the black body radiant power equation of a square cavity varies in a manner proportional to `n=sqrt(n_x^2+n_y^2)`. The velocity of a photon depends on the x and y components of its wave vector `k` which are `k_x=(pin_x)/w` and `k_y=(pin_y)/h` so that, for a square cavity, the speeds of these components are`(v_x,v_y)=(n_x,n_y)c/sqrt(n_x^2+n_y^2)`

An important goal of this animation is to show that the emitted frequency photon distribution matches the black body curve for the parameters being used. In order to achieve this coal in as little time as possible, I have chosen to stop the photon motion after 2000 photons have been emitted. From 2000 photons on up, the new photons are shown in the body of the cavity but the bins of the "experimental" plot are still being updated so that the learner can see the improved match to the black body curve. The expression for the radiant power as a function of frequency is`P(f)=h(f^3/c^2)/(exp((hf)/(kT))-1)`

It is interesting to find the maximum of P versus f. Planck, when he worked to try to fit an expression such as this to experimental data, could not have been aware that photons are bosons so the expression he used was`P(f)=hf^3/c^2/exp[-(hf)/(kT)] `

which is very similar the the correct expression. It is very easy to solve for the peak value for this expression. The result is `hf_(Peak)=3kT`. A very simple way to correct the factor 3 in this expression is to multiply it by [exp(3)-1]/exp(3) and then the factor becomes 2.8506... while the more accurate numerically solved value from Wien's Displacement Law is 2.821439. For our purposes here we will use the expression`P=Cn^3/(exp(n/(n_(avg)))-1) `

where `C` is a constant, `n` is the rms value of the mode indices given above and `n_(avg)` will be an adjustable parameter like the temperature.