Radioactivity
Radioactivity
7 Simulation of radioactivity
Principle
of r.a nd0 m mimuPrs X 1,:. k = 1, .. uniformly distributed on (0, 1). The atom s urvivcs
1111 til
tlte first occ11ra 1H'< ' of ~r1,: < A. This ap proach can be used to simul ate an ensemble
of N atoms. Lrt 6 IV be thr numbe r of particles that decay in some small time interval
!::::.t · Tl1<'n th<' decay probab ility per particle , 6 N / N, is propor tional to the length of
t he timr interva l over which ·we observe the particle .
t:::. N(l )
N(L) = - A!::::.L, 6. N(t) = - A!::::.tN (t,)
This is a finite-difference equation in which t:::.N(l ) and t:::.t are experim ental observ-
ables. Hence it cannot be integrated the way one solves a differential equation. But
rn1n1eri cal or algebraic solutions are possibl e. Because t he decay process is random , an
exact value for t:::. N(t) cannot be predicted. 6.N (t) may be taken as the average num-
ber of decays when observations are made of many identical systems of N radioactive
particl es.
Algor ithm
1: Read N .D. (initial number of parent and daught rr atoms), maximum no of time
intervals rn ancl dPcay ronstan t A
2: T < -- 0
3: while N > 0 and T < m do
4: NU +- N
5: for i = 1 to NU do
6: x +- rand()
7: if O < x < lam bda then
8: N <- N - 1
9: end if
10: end for
11 : T +- T + 1
12: end while
13: End
It can be seen t hat as N increases , the decay graph coincides wi t h t he exponent ial curve.
Hence th e differential equ ation dN - >.dt is only a large-number a pproximation of
N
the difference equation ~ N = ->.6- t
N
Radioactive deca y
Simulated
Exponentia: I
E
0
~
-:0 60
-0
a;
>,
Ill
u
QJ
"O
C:
:, 40
0
ci
z
20
00 2 4 6 8 10
time
ll, radioactivity.py • C:\Users\AISWARYA\ Deslctop\radioactivity.py (3.8.3) □ X
File Edit Format Run Options Window Help
from pylab import *
#from random import*
n, lamda,t,tm=l000000,0.21,0.0, 10
N=[n)
T=[t)
while n>O and t<tm:
for i in range (n):
if random()<=lamda:
n-=1:n=n- 1
t+=l
N.append(n)
T.append(t)
plot (T, N, ' r ' )
T=array(Tl
Y=N[OJ*exp(-lamda*T)
plot (T, Y, ' - - b ' )
legend ( [ "s imulated" , "exponential " ))
~label ( " cime " )
ylabel( "no . of undecayed atoms" )
title ('' radioac tivit y" )
grid(True )
show()
~~ f igure 1 D X
le6 radioactivity
1.0 simulated
- - - exponential
0.8 + +
Ill
E
...
0
RI
"O
41 0.6
>-
RI
~
"O
-
C
::,
0
0 0.4
C
0 .2
0 2 4 6 8 10
time
• l+-1_. I + la l~ II ig)I