Beruflich Dokumente
Kultur Dokumente
EXERCISE 2.1 Write a program that computes the raioactive decay of two types of nuclei, A and B, where A nuclei decay into B nuclei. The system of dierential equations is: NA NA = dt A NB NA NB = dt A B where A and B are the decay time constants for type A and type B nuclei respectively. Investigate how the behavior of NA (t) and NB (t) at early times A and at late times for various values of the ratio B . Obtain analytic solutions for NA (t) and NB (t) and compare your numerical results to these solutions. SOLUTION PROGRAM TO COMPUTE RADIOACTIVE DECAY OF TWO TYPES OF NUCLEI: The given system of dierential equations is solved by Euler method. (NA )n+1 = (NA )n + (NB )n+1 = (NB )n + (NA )n t A (NA )n (NB )n A B
Figure 1 - Code for Euler method for two nuclei decay Following input is given to the program: N0 = 100 A = 0.5 B = 0.2 t = 0.04 tmax = 5
Figure 2 - Output of program in Figure 1 DECAY BEHAVIOR FOR VARIOUS RATIOS OF TIME CONSTANTS: To investigate the behavior of NA and NB for various values of the ratio A \B , following input values are given to the program for A and B : A = 1, A = 1, A = 1, Other input values are: N0 = 100 t = 0.04 3 tmax = 5, 6, 20 B = 0.1 B = 1 B = 10
Figure 3
Figure 4
Figure 5 For A \B = 10 (in gure 3), Nuclei A show exponential decay and only a small amount of Nuclei B are produced. For A \B = 1 (in gure 4), initially number of Nuclei A decrease and number of Nuclei B increase. At t=1s, both types are present in same amounts. After t=1s, number of nuclei start decreasing for both types. However, Nuclei B are more in number than Nuclei A. For A \B = 0.1 (in gure 5), the trend is similar for A \B = 1 case for initial times. However, at later times when Nuclei A have decayed, there is substantial number of Nuclei B present that show exponential decay. COMPARISON OF NUMERICAL AND ANALYTICAL SOLUTIONS:
We obtain the analytical solution of the system of dierential equations: dNA NA = dt A dNB NA NB = dt A B At t = 0, number of A atoms = N0 At t = 0, number of B atoms = 0 Solving (1): dt dNA = NA A t ln NA = + C1 A At t = 0, NA = N0 C1 = ln N0 NA N0 t A
t
A
(1) (2)
ln
(3)
= e B :
1 B
t N dNB N0 t B + e B = e dt B A t d N0 t e B NB = e dt A
1 1
1 B
(4)
N0 e NB = A NB =
1 B
1 B
1 A
+ C2
B t t N0 e A + C2 e B A B
At t = 0, NB = 0 0= N0 B + C2 A B N0 B C2 = A B B t t NB = N0 [e A e B ] A B
(5)
N0 t + C3 A
(6)
Using equations (3), (5) and (6), fractional error for Euler solutions is computed at dierent values of t and plotted using the code in Figure 6.
Figure 6 For example, for A = 1, B = 10, fractional errors for two nuclei are plotted in Figure 7. Other input values used are: N0 = 100 t = 0.04 tmax = 5
Figure 7
10