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
- Assume a value for the decay constant
(this sets the time
scale, and each run through the do loop corresponds to an additional
).
- Start with Nnuc = total number of nuclei at t=0.
- Generate a random number
for each nucleus, which has not decayed yet.
- Use as the basic algorithm for each nucleus:
if
, the
nucleus decays and Nnuc=Nnuc-1
else it remains.
- When done sampling all nuclei, print number of remaining nuclei.
- Repeat process for remaining nuclei.
Next: Project
Up: Problem: Spontaneous Decay Simulation
Previous: Problem: Spontaneous Decay
Simulation