Creative Commons License Copyright © Michael Richmond. This work is licensed under a Creative Commons License.

Project 4: The Planck Function

Due Dates

Thursday, April 4, at 4:00 PM
Pseudocode outline for numerical integration
Monday, April 9, at noon
The finished Scilab code and analysis

Instructor's solution: planck_peak.sci
Instructor's solution: planck_integ.sci

Your job in this project: write programs to

  1. find the peak wavelength of blackbody emission for some given temperature
  2. find the total energy emitted in a given wavelength interval for a blackbody of a given temperature

You may not use Scilab's built-in functions for finding maxima or performing numerical integration -- instead, please implement these algorithms yourself.

You'll need to create two different Scilab source code files this week:

However, I'll start you off with a Scilab function to calculate the Planck function for a given temperature and wavelength


Finding the peak wavelength

The first function should look like this:

 function peak_lambda = planck_peak(start_lambda, end_lambda, temp, epsilon)
where
      peak_lambda   is the output argument: the wavelength at which
                        a blackbody of the given temperature
			radiates the most energy
 
      start_lambda  is the starting wavelength of the interval (in meters)
                        to check for a peak

      end_lambda    is the ending wavelength of the interval (in meters)
                        to check for a peak

      temp          is the temperature of the blackbody in question,
                        in degrees Kelvin

      epsilon       is the fractional relative error to use as a 
                        termination criterion

For this week's exercise, please always use the interval between 1e-8 and 1e-3 meters. Set epsilon = 1e-6.

You may stop when you have convinced yourself that

       [  (true peak lambda  -  your peak lambda) ]
   abs [ ---------------------------------------  ]   <  epsilon
       [            true peak lambda              ]

This task is very, very much like searching for a root. The key difference is that you don't know the value of the function at the peak wavelength, whereas you do know the value of a function at its root (it's zero!). Here's a tip: the Planck function is smooth, and has a single, global peak value; therefore, the slope of the function at any point always points towards the peak. If you always go "uphill" from your current guess, you'll head towards the peak.

Of course, in order to determine the slope, you'll either have to differentiate the Planck function with respect to wavelength (ick!), or use an approach like the Secant Method (Chap 6.3) to estimate the derivative.

I'll even provide the pseudocode I used when writing this function myself. You should create an outline of the same depth (if not deeper) before you start to write any actual code.

Use your program to find the peak wavelength of emission for a blackbody of these temperatures:

  1. 10 K
  2. 100 K
  3. 310 K (live human)
  4. 1000 K
  5. 10000 K

Make a table and a graph showing the peak wavelength as a function of temperature. Is there a simple relationship between temperature and peak wavelength?


Integrating the energy emitted within a range of wavelengths

The second task is to calculate the energy emitted by a blackbody at some temperature per second, per square meter per steradian, in the band between two wavelengths. Your function for this task should look like this:

 function energy = planck_integ(start_lambda, end_lambda, temperature, epsilon)
where
      energy        is the output argument: the energy emitted per second
			per square meter per steradian by a blackbody of the given 
			temperature between the given wavelengths

      start_lambda  is the starting wavelength of the interval (in meters)
                        to integrate

      end_lambda    is the ending wavelength of the interval (in meters)
                        to integrate

      temp          is the temperature of the blackbody in question,
                        in degrees Kelvin

      epsilon       is the fractional relative error to use as a 
                        termination criterion

Set epsilon = 1e-6.

Use your program to determine the energy emitted per second per square meter for the following cases:

  1. temp 10 K, start_lambda 0.1 mm, end_lambda = 1.0 mm
  2. temp 1000 K, start_lambda 2.0 micrometers, end_lambda 5.0 micrometers
  3. temp 10,000 K, start_lambda 100 nm, end_lambda 2000 nm

As a check, try this integral: You should find a total emitted power of about 8 million Joules per second per square meter of surface area per steradian.

Your program is computing the energy emitted by a perfect blackbody, per square meter, per steradian. That last term -- per steradian -- breaks the total emitted power by the solid angle. If we consider a flat plate, 1 meter on a side, and ask how much energy it emits from one face, then we are integrating up all the power emitted in (2 pi) steradians. This integral turns out to yield a multiplicative factor of (pi). So, if you multiply your integral by (pi), you should end up with the amount of power emitted per square meter.

Use the Stefan-Boltzmann equation to calculate the total power emitted by one square meter of a blackbody in each of these cases. How close does your program come to calculating the total energy in each case? Comment upon the answer.


Bells and Whistles

  1. Use your program to calculate the energy emitted by the Sun (T = 5600 K) between wavelengths of 1 nm and 1 m. Hint: this isn't going to be easy with intervals in wavelength of constant width.

  2. For a living adult human being, find the total energy emitted per second (over the entire body) in the visible range (400 nm - 800 nm). If you were sitting next to another person in a completely dark room, would you be able to see this radiation? Use the physiological limits of human vision to justify your answer.

  3. The SIRTF space telescope will be launched in just a few weeks. There are three major instruments on board. Please provide:
    1. the names of these instruments
    2. the wavelength range of each one (in micrometers, or "microns")
    3. the range in temperatures of blackbodies to which each instrument will be most sensitive
    Suppose the telescope looks at the Alpha Centauri star system, and takes a picture which shows Alpha Centauri A together with a (hypothetical) Earth-like planet which is orbiting it. Assume SIRTF uses its imaging camera over a wavelength range of 50 to 100 microns to take the picture. Estimate the ratio of the brightness of the planet to the brightness of the star (i.e. 1:100, or 1:1000, or ....). Comment on the likelihood that SIRTF will be able to detect an Earth-like planet near a Sun-like star.


This page maintained by Michael Richmond. Last modified Apr 8, 2007.

Creative Commons License Copyright © Michael Richmond. This work is licensed under a Creative Commons License.