Vstar Matlab ActTime

From New IAC Wiki
Revision as of 19:52, 3 April 2014 by Foretony (talk | contribs) (Created page with "This example was done for Bi-206. %%%%%%%%%%%%%%%%%% clear all; load bics.m % loads cross-section file: first column is energy, second column is c-s in b load flpb.m %loads pho…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This example was done for Bi-206.

%%%%%%%%%%%%%%%%%% clear all;

load bics.m % loads cross-section file: first column is energy, second column is c-s in b load flpb.m %loads photon flux file: first column is energy, second column is flux in photons/cm^2 per source electron energy=bics(:, 1); flux=flpb(:, 2); cs=bics(:,2);


%% Parameters (target parameters) (need to be entered every time program is compiled)

% Below enter target mass in grams; M = 1; % Below enter target average atomic mass in amu; m = 208; % Below enter natural abundance of an isotope of interest; abundance = 0.55; % Below enter a half-life of the isotope of interest in hours: halflife = 6.24*24; % %If you want to know activity after certain time of irradiation, then below enter irradiation time in hours: T = 1; % %If you want to see activity as a function of time, then below enter irradiation time in hours: t = [0:0.1:100]; %% Activity calculation is conducted below (don't edit)

% Average number of electrons per second is calculated and stored in variable N (for 1 kW of % beam power and 40 MeV electron beam): N = (1 * 10^(-3)) / (40 * 1.6 * 10^(-19));

% Photon flux - cross section overlap integral I (in s^-1) is calculated and stored in variable I:


I=0; for i=1:length(cs), I=I+flux(i).*cs(i);

end I = I*N * 10^(-27); % Total number of the isotope of interest in the target is calculated and stored in variable Tot; Tot = M * abundance / (m * 1.6605 * 10^(-24) );

% Production rate (in s^-1) is calculated and stored in variable R: R = Tot * I;

% Activity obtained in uCi: A0 = ( R * (1 - exp(-log(2)* T / halflife))) / (37000); %converted from Bq into microCi

sprintf('Activity obtained is %g uCi/(%g g kW %g hours)', A0, T)

A = ( R * (1 - exp(-log(2)* t / halflife))) / (37000); %converted from Bq into microCi plot(t,A)