Problems for due beginning of class Friday, Sept. 19

Two analytic problems -- hand these in on paper at the beginning of class

1) Approximate Wien's law:

As the following python plot shows if you simplify the Planck function by removing the -1 in the denominator, the location of the peak wavenumber doesn't really change too much. The advantage of the approximate version is that it is easier to differentiate and solve for the maximum wavenumber. Take the derivitive of approx_plancwavenum and solve for the wavenumber where the derivitive is zero. Show that it agrees roughly with the value for the exact equation and the wikipedia result.


In [0]:
import numpy as np
from matplotlib import pyplot as plt

In [0]:
%matplotlib inline

In [0]:
def planckwavenum(waven,Temp):
    """
      input: wavenumber (m^{-1}), Temp (K)
      output: planck function in W/m^2/m^{-1}/sr
    """
    h=6.63e-34
    c=3.e8
    c1=2.*h*c**2.
    kb=1.38e-23
    c2=h*c/(kb*Temp)
    Bwaven=c1*waven**3./(np.exp(c2*waven) -1)
    return Bwaven

In [0]:
def approx_planckwavenum(waven,Temp):
    """
      input: wavenumber (m^{-1}), Temp (K)
      output: planck function in W/m^2/m^{-1}/sr
    """
    h=6.63e-34
    c=3.e8
    c1=2.*h*c**2.
    kb=1.38e-23
    c2=h*c/(kb*Temp)
    Bwaven=c1*waven**3./(np.exp(c2*waven))
    return Bwaven

In [0]:
wavenum_icm=np.arange(25,2500,20) #in inverse cm
wavenum_im=wavenum_icm*100.  #in inverse m
the_temp=300.  #K
flux=planckwavenum(wavenum_im,the_temp)*np.pi*100 #convert to W/m^2/cm^-1 
approx=approx_planckwavenum(wavenum_im,the_temp)*np.pi*100
fig=plt.figure(1,figsize=(9,9))
fig.clf()
ax1=fig.add_subplot(111)
ax1.plot(wavenum_icm,flux,color='r',label='exact')
ax1.plot(wavenum_icm,approx,color='k',label='approx') 
ax1.legend()

In [0]:
h=6.63e-34
c=3.e8
kb=1.38e-23
Temp=300.
nmax=3.*kb*Temp/(h*c) #nmax in m-1
print("nmax= {:6.3f} (cm-1)".format(nmax*1.e-2))
print("corresponding to a wavelength of {:6.3f} microns".format(1/nmax*1.e6))

In [0]:
Bmax=approx_planckwavenum(nmax,Temp)*100.*np.pi
print("value of approximate planck function at nmax: {:5.3f} W/m^2/cm^-1".format(Bmax))

2) Show formally using change of variables that if you start with

$$B_\lambda =\frac{2 h c^2 \lambda^{-5}}{\exp \left ( \frac{hc}{k_b \lambda T} \right ) - 1}$$

and make the change $n=1/\lambda$ you get the function used in planckwavenum()


In [0]: