Assignment 2: CSI 801

CSI 801

Assignment #2: Data, Simulations, and Analytic Science in Decay

Due: October 3, 1996

Time brings all things to pass.
Aeschylus

Simulations, Data, and Analytic Solutions to Radioactive Decay

Description

In this assignment, you will simulation the decay of a radioactive substance and compare this simulation to analytic and experimental results. To make these comparisions, you will need to use numerical methods which fit data using the least squares method You will also need to use a Monte Carlo technique to create the model.

Purpose of the Assignment

Students will learn how Monte Carlo methods can be used to simulate physical processes. Numerical, analytic, and experimental results will be compared using the least squares method. Linear splines will also be used to interpolate between data points.

Assignment

Required Data

The following table contains the count rate of radioactive decays in a sample substance.
Time (sec)Counts per second
0
300
600
900
1200
1500
1800
2100
2400

Procedure

You will need to write three small C, Fortran, or C++ programs for this project. You MUST use one of these languages. Use of Mathematic, Mathcad, etc are not acceptable for this assignment.
  1. Write a routine which generates random numbers using a linear congruential generator.
  2. Assume that the probability of any single atom decaying is 5% in a given time interval. Create a simulation which uses Monte Carlo techniques to determine what fraction of atoms will survive up to 50 intervals. Treat each atom as a single event, and use a random number generator to determine if the atom survives or decays. If it survives, move it to the next bin. If it decays, keep track of the bin it decayed in.
  3. After you have run a few thousand atoms through this decay chain, print the number of atoms which decayed in each of the time intervals into a data file. This represents a decay rate as function of time.
  4. Using the analytic expression:
    	count rate  = K exp(-t/tau)  
    
    Write a program which uses the least squares method to fit the the constants K and tau to the results of your simulation. (HINT: it will help to take the logarithm of the above equation and fit the log of the count rate to the equation.)
  5. Repeat the last step using the data given in the table above.
  6. Write another program which reads in the data in the table above and uses linear interpolation to determine the rate at times not listed in the table.
  7. Write a one page report summarizing your results. Does the numerical model fit the analytic expression? Does the experimental data fit the analytic expression?
  8. Plot the decay rate as a function of time from your simulation. Plot the fitted analytic expression on the same graph.
  9. Repeat the previous step using the experimental data.

Assignment Requirements

The results from this project should be:
  1. You must write your programs in C, Fortran, or C++. Graphics can be produced in any of your favorite graphics programs.
  2. You must produce the two graphs specified above.
  3. You cannot use any other student's subroutines or subroutines taken directly from any commercial or freeware packages.
  4. Be sure and summarize your results in a one-page file.
  5. An html file called "pa2.html" should contain links to your report, your codes, and your graphics.

Plots

numerical simulation and analytic fit
compare the count rates of both
experimental data and analytic fit
compare the count rates for both

Placing it On-Line

When you have produced all the plots, create a web page for this assignment named "pa2.html and place it in your "public_html" directory. Make sure I can access it through the web. On this page, you should have links to your summary, your graphs, you programs, and the Makefile. Make sure the links work through the net.

If you absolutely cannot get the graphics into a form which can be viewed on the Web, I will accept paper copies of the assignments with no deduction in credit. However, it is much cooler to have them on-line and is more effective at showcasing your ablilities to possible employers.



Copyright John Wallin 1996. All rights reserved.
Last Modified : Thur Aug 29 12:31:00 EST 1996 <jwallin@gmu.edu>