Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.55 KB

File metadata and controls

46 lines (31 loc) · 1.55 KB

DecaySimulator

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).

k1 > k2

E1

E2

Comparison with analytical plot

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: E3

k2 << k1

E4

E5