Next: Project
Up: Problem: Spontaneous Decay Simulation
Previous: Problem: Spontaneous Decay Simulation

Method Numeric

Instead of looking at the limit for many particles, we can simulate radiactive decay with random numbers following the simple algorithm below.

Simulation Scheme
  1. Assume a value for the decay constant lambda .LE. 1 (this sets the time scale, and each run through the do loop corresponds to an additional delta t).
  2. Start with Nnuc = total number of nuclei at t=0.
  3. Generate a random number 0 .LE. r_i .LE. 1 for each nucleus, which has not decayed yet.
  4. Use as the basic algorithm for each nucleus:
    if r_i .LT. lambda , the nucleus decays and Nnuc=Nnuc-1
    else it remains.
  5. When done sampling all nuclei, print number of remaining nuclei.
  6. Repeat process for remaining nuclei.


Next: Project
Up: Problem: Spontaneous Decay Simulation
Previous: Problem: Spontaneous Decay Simulation