Monte Carlo simulations of radioactive decay chains.
You must have a standard C compiler and gnuplot
to run this program.
-
First clone the repository using
git clone https://github.com/feynhat/DecaySimulator
. -
To run the program, open the directory
DecaySimulator
in terminal and type./run.sh
. -
Enter values for decay constants of A and B (Note that these constants have unit per iteration and not per unit time).
-
Enter the number of iterations that you want to run. Leave it blank for default value
100000
. -
Enter the initial number of nuclei of A. Leave it blank for default value
100000
. -
Enter the name of the file in which you want the textual data of generated by the simulation. Leave it blank for default value
plot.dat
(It will be created if it does not exist and will be replaced if it does). -
Enter the name of the file in which you want the plot to be drawn by gnuplot. Leave it blank for default value
MC_Plot.png
(It will be created if it does not exit and will be replaced if does).
##Examples
Following are some plots generated by the DecaySimulator (using gnuplot).
The plot generated using Monte Carlo simulation is very similar to the one which we get by analytically solving the differential equation for the 3-species decay chain: