The random number generator will be used to simulate the radioactive decay of an element.
tif between t and t + dt is K dt where K is a time-independent constant having the inverse dimension of a time. The evolution of the population of a sample of N0 atoms of a radioactive element is given in the form:
N(t = 0) = N0
N(t + dt) = N(t) − N(t) K dt
This differential equation corresponds to an exponential evolution of the population of the sample:
N(t > 0) = N0 exp(−K t)
We also de ne the half-life time of the element, t1/2, which corresponds to the time for which the initial number of atoms has been divided by 2:
t1/2 =ln(2)/K
The following table shows the values of K and t1/2 for some short-lived radioactive elements (used, in particular, in medial analysis and in molecular biology):
Elément t1/2en jours K en jours−1

125I 59.6 0.0116
32P 14.3 0.0485
35S 87.4 0.0079

1- Write a program that will follow the evolution day after day of the population of a sample of atoms of a radioactive element, over a period of 500 days. The initial number of atoms will be N0 = 1000.
Hint: the population of atoms will be derived by an array of size N0 which will initially be filled with 1.
At each time step (∆t = 1 day), you will use the random number generator to determine which atoms decay between t and t+∆t (the corresponding array elements will be set to zero). At the end of the time step and before going to the next one, you will count the number of “surviving” atoms, which you will store in a file. The “core” of the program is the part managing the disintegration of atoms during a time step ∆t. For this, we draw, at each time step and for each atom not yet disintegrated, a random number p between 0 and 1, which will be compared with the probability of disintegration of the atom: K ∆t. If p < K ∆t then the atom decays over time and its position in the array is set to zero.
2. What conditions must the time step ∆t and the initial number of atoms N0 meet for this simulation to be correct?

1 Like

Welcome to the forum !
First off :

1. What exactly do you need help with ?
2. What compiler are you gonna use ?
3. How much Fortran do you know ?

These questions might help people understand your position better.

I need to create new Fortran program for my homework
and I use gfortran compiler
I have just some knowledge for Fortran

Best Regards,

Yes, but what specific part of making the Fortran program do you need help with ?
Compilation ? Runtime ? Can’t understand a concept in Fortran ?

I highly suggest you start making the Fortran program on your own, and if you run into problems concerning compilation, execution, or you don’t know how to implement an idea then come back.

Yes you’re right, I’ll create the program on my own, and if I have a problem I’ll back to you,
Thank for you help

Best Regards,

3 Likes