$$\newcommand{\SI}[2]{{#1}~\mathrm{#2}} \newcommand{\si}[1]{\mathrm{#1}} \renewcommand{\vec}[1]{\mathbf{#1}} $$
A black body or blackbody is an idealized physical body that absorbs all incident electromagnetic radiation, regardless of frequency or angle of incidence. The radiation emitted by a black body in thermal equilibrium with its environment is called black-body radiation.
Of particular importance, although planets and stars (including the Earth and Sun) are neither in thermal equilibrium with their surroundings nor perfect black bodies, blackbody radiation is still a good first approximation for the energy they emit.
The power per unit area of a black body is given by $$P\left(\equiv \frac{P}{A}\right)=\sigma T^4,$$ where $\sigma$ is the Stefan–Boltzmann constant. This has a value of $\sigma = 5.67\times 10^{-8}\mathrm{~W~m^{-2}~K^{-4}}$).
The power per unit area is sometimes called the “Radiant Flux” where “Flux” describes any effect that appears to pass or travel (whether it actually moves or not) through a surface or substance.
The Stefan–Boltzmann Law shows how the total power emitted from a hot objecct depends on temperature. The Wien displacement law gives the way in which the wavelength of maximum intensity—the peak of the curve—shifts with temperature.
It is found that the peak wavelength, $\lambda_\mathrm{peak}$, is inversely proportional to temperature $$\lambda_\mathrm{peak}T=2.90\mathrm{~mm~K}.$$
The shape of black-body curves is given by the Planck radiation law, which gives the energy density as a fuction of wavelength (the Stefan–Boltzmann law and Wien’s displacement law follow immediately from it: by integrating over all $\lambda$ and finding the peak value of $\lambda$ respectively).
Max Planck in 1901 published an equation which fitted the experimental results for black-body radiation, but he could only derive it by quantizing the vibrations allowed in the oscillators within such bodies. This crucial feature of quantum physics - that the energy does not vary continuously, but in “jumps” — was, he believed, a kind of mathematical hypothesis, an artefact that did not refer to real energy exchanges between matter and radiation. From his point of view, there was no reason to suspect a breakdown of the laws of classical mechanics and electrodynamics. Planck clearly did not, at this time, see his theory as a drastic departure from classical physics. This is illustrated by his total publication silence: between 1901 and 1906 he published nothing on black-body radiation or quantum theory.
Only in 1908, and prompted by physicist Hendrik Lorentz, did Planck convert to the view that he had found anything beyond classical physics. In fact the first person to use quanta in a modern way was Einstein in his paper quantizing light in 1905.
Regardless of the origin, what we now call the Planck radiation law gives the spectral emissive power of a black body as:
$$ \rho(\omega, T) = \cfrac{\hbar \omega^3}{\pi^2 c^3} \frac{1}{\exp({\frac{\hbar \omega}{k_BT})} - 1}$$import numpy as np
import matplotlib.pyplot as plt
# Constants
from scipy.constants import c
from scipy.constants import h
from scipy.constants import Boltzmann as kB
from scipy.constants import Wien
def planck (wavelength, temp):
e = 2*np.pi*h*c**2 / (wavelength**5*(np.exp(h*c/(wavelength*kB*temp))-1))
return e
wavelength = np.linspace(100e-9,2000e-9,100)
#Maxima line
peak = 2*np.pi*h*c**2/(wavelength**5*(np.exp(h*c/(kB*Wien))-1))
temps=np.array([4000,5000,6000])
#Plotting from here on in
fig = plt.figure(figsize=(6, 4))
ax = fig.add_subplot(111)
plt.rcdefaults()
ax.plot(Wien/temps, planck(Wien/temps,temps), 'kx', ms=10, mfc='none')
ax.plot(wavelength, planck(wavelength,5500), 'k-')
ax.plot(wavelength, planck(wavelength,4000), 'k-')
ax.plot(wavelength, planck(wavelength,5000), 'k-')
ax.plot(wavelength, planck(wavelength,6000), 'k-')
ax.plot(wavelength, peak, 'k--')
ax.set_ylim(0,12e13) # note this has to come after plotting of data
ax.set_xlim(left=0,right=2e-6)
ax.set_xlabel(r'$\lambda / \mathrm{m}$')
ax.set_ylabel(r'$\mathrm{spectral\;radiance}\,/\,\mathrm{W}\,\mathrm{m}^{-3}$')
#ax.set_title('Black body radiation curves')
from matplotlib import ticker
formatter = ticker.ScalarFormatter(useMathText=True)
formatter.set_scientific(True)
formatter.set_powerlimits((-1,1))
ax.xaxis.set_major_formatter(formatter)
ax.yaxis.set_major_formatter(formatter)
ax.text(Wien/4500+1e-8, planck(Wien/4000,4000)+18e11, r'$4500\;\mathrm{K}$')
ax.text(Wien/5000+1e-8, planck(Wien/5000,5000)+18e11, r'$5000\;\mathrm{K}$')
ax.text(Wien/5500+1e-8, planck(Wien/5500,5500)+18e11, r'$5500\;\mathrm{K}$')
ax.text(Wien/5500+1e-8, planck(Wien/6000,6000)+18e11, r'$6000\;\mathrm{K}$')
plt.show()
The Wien displacement law tells us the part of the spectrum in which the intensity of thermal radiation peaks for sources at different temperatures.
At room temperature, for example: $\lambda_{\text{peak}}\approx\SI{10}{\mu m}$. The hotter an object the whiter then bluer the object appears - the hottest stars produce more of their light at the blue/violet end of the spectrum and appear white or blue-white. Cooler stars look red, since they produce more of their light at longer wavelengths.