! Activity builup curve for the production of an isotope:
! A(t)=Q*(1-exp(-lambda*t))
! Followed by decay after end of irradiation
! A(t)=Q*(1-exp(-lambda*tira))*exp(-lambda*t)
! tira = irradiation time
! lambda = decay constant = ln 2 / T
! T=half-life
! Program saves output to file:output1
! This output file can be exported to a plotting routine
! M. Ragheb, Univ. of Illinois
program isotope_production
real x, lambda
! This half life is for the 25Mn56 nucleus in hours
! It is formed through neutron irradiation from 25Mn55
! It decays to 26Fe56 through negative beta emission
real :: T = 2.54
! Q is production rate
real :: Q = 1.0E+10
! Conversion ratio from Becquerels to Curies
real :: C =3.71e+10
! Irradiation time: 10 hours, decay time: 10 hours
integer :: steps=20
real activity(51), xtime(51)
! Calculate decay constant
x = log(2.0)
lambda = x/T
write(*,*) x, lambda
! Open output file for plotting in Excel
open(10,file='output1.xls')
! Calculate ratio activity in Curies
steps = steps/2.0
! Irradiation time
do i = 1, steps
xtime(i) = i - 1
activity(i) = Q*(1-exp (- lambda*xtime(i)))/C
! Write results on output file
write(10,*) xtime(i), activity(i)
! Display results on screen
write(*,*) xtime(i), activity(i)
! Store irradiation activity in Curies
QQ=activity(i)
end do
jj=steps
! Decay time
do i = 1, steps+1
xtime(i) = jj+i-1
ti=i
activity(i) = QQ*exp (- lambda*ti)
! Write results on output file
write(10,*) xtime(i), activity(i)
! Display results on screen
write(*,*) xtime(i), activity(i)
end do
end