In [2]:

```
#Input data
mp=1.007277##Atomic Mass of proton in amu
mn=1.008665##Atomic Mass of neutron in amu
me=0.00055##Atomic Mass of electron in amu
mo=15.99491##Atomic Mass of oxygen in amu
np=8##Number of protons in oxygen
ne=8##Number of electrons in oxygen
nn=8##Number of neutrons in oxygen
a=931##One amu in MeV
No=16##Number of nucleons in oxygen
#Calculations
m=(np*mp)+(ne*me)+(nn*mn)-mo##The mass defect in amu
B=m*a##Binding energy in MeV
Bn=B/No##Binding energy per nucleon
#Output
print " The mass defect = %3.5f amu \n The binding energy per nucleon = %3.2f MeV "%(m,Bn)
```

In [24]:

```
#Input data
amr=226.095##Atomic mass of radium in amu
AC=6.023*10**23##Avogadro constant in molecules/g.mol
h=1620##Half life of radium in years
#Calculations
D=(0.6931/(h*365*24*3600))##The decay constant in 1/s
Na=AC/amr##Number of atoms per gram of radium
Ao=D*Na##Initial activity in dis/s
#Output
print "The decay constant = %0.2e s**-1"%D
print "The initial activity of 1 g of radium 226 = %0.2e dis/s"%Ao,
```

In [25]:

```
from __future__ import division
#Input data
F=190##Each fission of U-235 yeilds in MeV
a=85##Assuming the Neutrons absorbed by U-235 cause fission in percentage
b=15##Non fission capture to produce an isotope U-236 in percentage
Q=3000##The amount of thermal power produced in MW
#Calculations
E=F*1.60*10**-13##Each fission yields a useful energy in J
N=1/E##Number of fissions required
B=((10**6)*(N*86400))/(a/100)##One day operation of a reactor the number of U-235 nuclei burned is in absorptions per day
M=(B*235)/(6.023*10**23)##Mass of U-235 consumed to produce one MW power in g/day
M1=M*3##Mass of U-235 consumed to produce 3000 MW power in g/day
#Output
print "The fuel consumed of U-235 per day = %3.1f g/day "%(M1)
```

In [9]:

```
#Input data
sa1=10##Cross section of nucleus in barns
N=2200##Neutrons in m/s
En1=0.1##Kinetic energy of neutrons increases in eV
En2=0.02525##Kinetic energy of neutron in eV
#Calculations
sa2=sa1/((En1/En2)**0.5)##The cross section of neutrons in barns
#Output
print "The cross section of neutrons = %3.2f barns "%(sa2)
```

In [10]:

```
#Input data
U1=99.285##Uranium consists of U-238 in percentage
U2=0.715##Uranium consists of U-235 in Percentage
E=0.025##The energy of neutrons in eV
sc=2.72##Capture cross section for U-238 in barns
sf=0##fission cross section for U-238 in barns
sc1=101##Capture cross section for U-235 in barns
sf1=579##fission cross section for U-235 in barns
#Calculations
sa=(U1/100)*(sc+sf)+(U2/100)*(sc1+sf1)##The microscopic absorption cross section of natural uranium in barns
#Output
print "The microscopic absorption cross section of natural uranium = %3.1f barns "%(sa)
```

In [12]:

```
#Input data
p=1##The density of water in g/cm**3
sch=0.332##The microscopic capture cross section of hydrogen in barn
sco=0.0002##The microscopic capture cross section of oxygen in barn
#Calculations
N=(6.023*10**23)*p/18##Number of molecules of water per cm**3
scw=(2*N*sch*10**-24)+(N*sco*10**-24)##The microscopic capture cross section of water in cm**-1
#output
print "The microscopic capture cross section of water = %3.4f cm**-1 "%(scw)
```

In [15]:

```
#Input data
m=230##The amount of boron piece in g
mw=10##The molecular weight of boron
R=9.57*10**13##Reaction rate in cm**-3s**-1
d=2.3##Density of boron in g/cm**3
sa=755##Absorbption cross section in barns
ss=4##Elastic scattering cross section in barns
#Calculations
st=sa+ss##The total cross section in barns
N=(d*6.023*10**23)/mw##The number density of neutrons in cm**-3
S=N*st*10**-24##Number density of neutrons for total in cm**-1
F=R/S##Neutron flux in cm**-2s**-1
L=1/S##Average distance a neutron travels before it is absorbed in cm
#Output
print "The thermal neutron flux = %0.2e cm**-2s**-1"%F
print "The average distance that a neutron travels before it is absorbed = %0.3f cm"%L
```

In [18]:

```
from math import log
#Input data
Eni=4.8##The energy of the newly born electron in MeV
Enf=0.025##The energy of the electron after slow down in eV
A=12##The mass number of the graphite (carbon)
#Calculations
L=1-(((A-1)**2/(2*A))*log((A+1)/(A-1)))##The logarithmic energy decrement
n=(log(Eni*10**6/Enf))/L##The number of collisions required to slowdown the neutron
#Output
print " The logarithmic energy decrement representing the neutron energy loss per elastic collision = %3.3f \n The number of collisions necessary = %3.0f "%(L,n)
```

In [26]:

```
#Input data
f=100##The reactor is fuelled of natural uranium in tonnes
A=238.05##The atomic mass of natural uranium
F=10**13##The average thermal neutron flux in neutrons/cm**2s
A1=235.04##The atomic mass of U-235
sf=579##The fission cross section of U-235 in barns
sc=101##The capture cross section of U-235 in barns
E=200##The energy released per fission in MeV
P=0.715##U-235 in natural uranium in percentage
N=2200##The average thermal neutron in m/s
#Calculations
n=((f*1000)*6.023*10**26*(P/100))/A##The number of U-235 atoms in the reactor in atoms
R=(sf*10**-24)*F*n##The rate of fission in the reactor in fissions/s
T=R*E*1.602*10**-19##Thermal power of the reactor in MW
Rr=T/f##Rating the reactor MW/tonne
Rc=(((R*A1*60*60*24))/(6.023*10**26))##The rate of consumption of U-235 by fission in kg/day
Rcc=Rc*1000##The rate of consumption of U-235 by fission in g/day
#Output
print " (a) The rating of the reactor = %3.2f MW/tonne \n (b)The rate of consumption of U-235 per day = %3.3f kg/day (or) %3.0f g/day "%(Rr,Rc,Rcc)
```

In [27]:

```
#Input data
f=3.5##Mass fraction of U-235 in the fuel in percentage
G=180##Energy per fission in Mev
F=10**13##The neutron flux in neutrons/cm**2s
sf=577##Fission cross section of U-235 in barns
M=1.602*10**-13##One MeV in J
#Calculations
N=2.372*(f/100)*10**22##The fuel density for a uranium oxide fuel in nuclei/cm**3
q=G*N*sf*10**-24*F##The rate of energy release in MeV/cm**3s
qg=q*M##The rate of energy release in W/cm**3
#Output
print "The specific energy release rate for a light water uranium reactor = %3.2f W/cm**3"%(qg)
```

In [28]:

```
from math import exp
#Input data
P=1##The operating power of a reactor in W
K=1.0015##The effective multiplication factor of Reactor becomes suppercritical
t=0.0001##The average neutron life in s
t1=1.0001##Neutron life time in s
#Calculations
d=(K-1)/K##The reactivity
Z=(d*P)/t##The number of neutrons
n=exp(Z)/10**6##Neutron density * 10**6
#Output
print "The reactor power level at the end of 1s is %3.3f MW"%(n)
```