User Tools


teaching:radiative_transfer:planck

Planck radiation

Task: Plot the Planck function at 6000 K and at 300 K and calculate the solar irradiance at the top of the atmosphere assuming that the sun has a temperature of 6000 K and emits blackbody radiation.

planck_function.py
from pylab import *
 
def planck(lam, T):
 
    c= 2.99792458e8 # speed of light
    k= 1.380662e-23 # Boltzmann constant
    h= 6.626180e-34 # Planck constant
 
    return 2*pi*h*c*c/(lam**5 * (exp(h*c/(lam*k*T))-1.))
 
lam=arange(0.05, 1000, 0.01)*1e-6
 
d= 1.49e11      # distance between sun and earth
r= 1.3914e9/2.  # radius of sun
 
figure(1, figsize=(8,5))
loglog(lam*1e6, planck(lam, 6000)*1e-6, label='6000 K')
loglog(lam*1e6, planck(lam, 6000)*(r/d)**2*1e-6, ':' )
loglog(lam*1e6, planck(lam, 300)*1e-6, label='300 K')
ylim(1e-1,1e9)
legend()
xlabel('wavelength [$\mu$m]')
ylabel('irradiance [W/(m$^2$ $\mu$m]')
 
savefig('planck_functions.png')

teaching/radiative_transfer/planck.txt · Last modified: 2018/05/04 08:40 (external edit)