Chapter 4: Nuclear Reactions

Example 4.3.1, Page 179

In [1]:
#Variable declaration
t = 10**-5; # Thickness of Li(3,7), m
d = 500; # Density, Kg/m^3
N = 6.023e+026; # Number of  nuclei in 7-Kg of Li-7
M = 7 ; # Molar mass of Li

#Calculations
n = d*N*t/M; # Number of Li(3,7) nuclei/area
N_p = 10**8; # Number of neutron produced/s
N_0 = 10**13; # Number of incident particle striking/unit area of target
C_s = N_p/(N_0*n*10**(-28)); #  Cross section, b

#Result
print "Cross section : %5.3f b"%C_s
 
Cross section : 0.232 b

Example 4.3.2, Page 180

In [2]:
import math

#Variable declaration
t = 0.2e-03; # Thickness of Cd sheet, m
d = 8.64e+03; # Density, Kg/m^3
N = 6.023e+026; # Number of  nuclei in 7-Kg of Li-7
M = 112 ; # Atomic mass of Cd-113, amu
C_s = 20000e-028; #  Cross section of neutron for Cd-113, m^2

#Calculations
n = 0.12*d*N/M; # Number of Cd atoms/volume, atoms/m^3
F_inc_absorb = (1-math.exp(-n*C_s*t))*100; # Fraction of neutron absorbed 

#Result
print "Fraction of neutron absorbed by Cd sheet : %4.2f percent"%F_inc_absorb
Fraction of neutron absorbed by Cd sheet : 89.25 percent

Example 4.4.1, Page 181

In [3]:
#Variable declaration
# Declare three cells (for three reactions)
R1 = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
R2 = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
R3 = [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
# Enter data for first cell (Reaction)
R1[0][0] = 'Al'; # Element
R1[0][1] = 13;   # Atomic number
R1[0][2] = 27;    # Mass number
R1[0][3] = 0;    # Lepton number 
R1[1][0] = 'He';
R1[1][1] = 2;
R1[1][2] = 4;
R1[1][3] = 0;
R1[2][0] = 'Si';
R1[2][1] = 14;
R1[2][2] = 30;
R1[1][3] = 0;
R1[3][0] = 'n';
R1[3][1] = 0;
R1[3][2] = 1;
R1[1][3] = 0;
# Enter data for second cell (Reaction)
R2[0][0] = "U";
R2[0][1] = 92;
R2[0][2] = 235;
R2[0][3] = 0;
R2[1][0] = 'n';
R2[1][1] = 0;
R2[1][2] = 1;
R2[1][3] = 0;
R2[2][0] = 'Ba';
R2[2][1] = 56;
R2[2][2] = 143;
R2[2][3] = 0;
R2[3][0] = 'Kr';
R2[3][1] = 36;
R2[3][2] = 90;
R2[3][3] = 0;
R2[4][0] = '2n';
R2[4][1] = 0;
R2[4][2] = 1;
R1[4][3] = 0;
# Enter data for third cell (Reaction)
R3[0][0] = 'P';
R3[0][1] = 15;
R3[0][2] = 32;
R3[0][3] = 0;
R3[1][0] = 'S';
R3[1][1] = 16;
R3[1][2] = 32;
R3[1][3] = 0;
R3[2][0] = 'e';
R3[2][1] = -1;
R3[2][2] = 0;
R3[2][3] = 0;
R3[3][0] = 'v_e';
R3[3][1] = 0;
R3[3][2] = 0;
R3[3][3] = 0;

#Calculations&Results
# Declare a function returning equality status of nucleon number
def check_nucleon(nr_sum,np_sum):
        if nr_sum == np_sum:
            return 1;
        else: 
            return 0;
            
# Declare a function returning equality status of proton number
def check_proton(pr_sum,pp_sum):
        if pr_sum == pp_sum:
            return 1;
        else: 
            return 0;

# Declare a function returning equality status of lepton number
def check_lepton(lr_sum,lp_sum):
        if lr_sum == lp_sum:
            return 1;
        else: 
            return 0;
            
# Reaction-I
print("\n\n\nReaction-I:\n\n");
pr_sum = R1[0][1]+R1[1][1];
pp_sum = R1[2][1]+R1[3][1];
nr_sum = R1[0][2]+R1[1][2];
np_sum = R1[2][2]+R1[3][2];
lr_sum = R1[0][3]+R1[1][3];
lp_sum = R1[2][3]+R1[3][3]; 
if (check_nucleon(nr_sum,np_sum) and check_proton(pr_sum,pp_sum) and check_lepton(lr_sum,lp_sum) == 1):
    print("The Reaction\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\nis possible"%( R1[0][0], R1[0][2], R1[1][0], R1[1][2], R1[2][0], R1[2][2], R1[3][0], R1[3][2]);
elif (check_proton(pr_sum,pp_sum) == 0):
    print("The Reaction\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\nis impossible"%(R1[0][0], R1[0][2], R1[1][0], R1[1][2], R1[2][0], R1[2][2], R1[3][0], R1[3][2]);
    R1[3][0] = 'H'; R1[3][2] = 1;
    print("\nThe correct reaction is:\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\n"%(R1[0][0], R1[0][2], R1[1][0], R1[1][2], R1[2][0], R1[2][2], R1[3][0], R1[3][2]);    

#  Display for reaction-II
print("\n\n\nReaction-II:\n\n");
pr_sum = R2[0][1]+R2[1][1];
pp_sum = R2[2][1]+R2[3][1]+R2[4][1];
nr_sum = R2[0][2]+R2[1][2];
np_sum = R2[2][2]+R2[3][2]+R2[4][2];
lr_sum = R2[0][3]+R2[1][3];
lp_sum = R2[2][3]+R2[3][3]+R2[4][3]; 
if (check_nucleon(nr_sum,np_sum) and check_proton(pr_sum,pp_sum) and check_lepton(lr_sum,lp_sum) == 1):
    print("The Reaction\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)+%s(%d)\nis possible"%(R2[0][0], R2[0][2], R2[1][0], R2[1][2], R2[2][0], R2[2][2], R2[3][0], R2[3][2], R2[4][0], R2[4][2]);
elif (check_nucleon(nr_sum,np_sum) == 0):
    print("The Reaction\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)+%s(%d)\nis impossible"%(R2[0][0], R2[0][2], R2[1][0], R2[1][2], R2[2][0], R2[2][2], R2[3][0], R2[3][2], R2[4][0], R2[4][2]);
    R2[4][0] = '3n';
    print("\nThe correct reaction is:\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)+%s(%d)\n"%(R2[0][0], R2[0][2], R2[1][0], R2[1][2], R2[2][0], R2[2][2], R2[3][0], R2[3][2], R2[4][0], R2[4][2]);    
       
#     Reaction-III
print("\n\n\nReaction-III:\n\n");
pr_sum = R3[0][1]+R3[1][1];
pp_sum = R3[2][1]+R3[3][1];
nr_sum = R3[0][2]+R3[1][2];
np_sum = R3[2][2]+R3[3][2];
lr_sum = R3[0][3]+R3[1][3];
lp_sum = R3[2][3]+R3[3][3]; 
if (check_nucleon(nr_sum,np_sum) and check_proton(pr_sum,pp_sum) and check_lepton(lr_sum,lp_sum) == 1):
    print("The Reaction\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\nis possible"%( R3[0][0], R3[0][2], R3[1][0], R3[1][2], R3[2][0], R3[2][2], R3[3][0], R2[3][2]);
elif (check_lepton(nr_sum,np_sum) == 0):
    print("The Reaction\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\nis impossible"%(R3[0][0], R3[0][2], R3[1][0], R3[1][2], R3[2][0], R3[2][2], R3[3][0], R3[3][2]);
    R3[3][0] = 'v_e_a'
    print("\nThe correct reaction is:\n")
    print "\t%s(%d) + %s(%d) --> %s(%d)+%s(%d)\n" %( R3[0][0], R3[0][2], R3[1][0], R3[1][2], R3[2][0], R3[2][2], R3[3][0], R3[3][2]);    


Reaction-I:


The Reaction

	Al(27) + He(4) --> Si(30)+n(1)
is impossible

The correct reaction is:

	Al(27) + He(4) --> Si(30)+H(1)




Reaction-II:


The Reaction

	U(235) + n(1) --> Ba(143)+Kr(90)+2n(1)
is impossible

The correct reaction is:

	U(235) + n(1) --> Ba(143)+Kr(90)+3n(1)




Reaction-III:


The Reaction

	P(32) + S(32) --> e(0)+v_e(0)
is impossible

The correct reaction is:

	P(32) + S(32) --> e(0)+v_e_a(0)

Example 4.5.1, Page 182

In [4]:
#Variable declaration
M_n = 1.00866501; # Mass of neutron, amu
M_Hp = 2.014102; # Mass of proton, amu
M_Hd = 3.016049; # Mass of deutron, amu
M_He = 4.002603; # Mass of alpha particle, amu

#Calculations
Q = (M_Hp+M_Hd-M_He-M_n)*931.49; # Q-value, MeV

#Result
print "The Q-value for the reaction : %4.1f MeV"%Q
The Q-value for the reaction : 17.6 MeV

Example 4.5.2, Page 183

In [5]:
#Variable declaration
M_Cf = 252.081621; # Mass of califronium, amu
M_Cm = 248.072343; # Mass of curium, amu
M_He = 4.002603; # Mass of alpha particle, amu

#Calculations
Q = (M_Cf-M_Cm-M_He)*931.49; # Q-value, MeV

#Result
print "The Q-value for the reaction : %4.2f MeV"%Q
The Q-value for the reaction : 6.22 MeV

Example 4.5.3, Page 183

In [6]:
#Variable declaration
# Pb_208(Fe_56, Fe_54)Pb_210
M_Pb_208 = 207.976641; # Mass of Pb-208, amu
M_Fe_56 = 55.934939; # Mass of Fe-56, amu
M_Pb_210 = 209.984178; # Mass of Pb-210, amu
M_Fe_54 = 53.939612; # Mass of Fe-54, amu

#Calculations
Q = (M_Pb_208+M_Fe_56-M_Pb_210-M_Fe_54)*931.49; # Q-value, MeV
E_th = -Q*(M_Fe_56+M_Pb_208)/M_Pb_208; # Threshold energy, MeV 

#Results
print "The Q-value for the reaction   =  %5.2f MeV \n Threshold energy   = %5.2f MeV "%(Q,E_th)
The Q-value for the reaction   =  -11.37 MeV 
 Threshold energy   = 14.43 MeV 

Example 4.5.4, Page 184

In [7]:
#Variable declaration
# H(1,1)+n(0,1) = H(1,2)+G is the reaction
M_H_2 = 2.014735; # Mass of H-2, amu
M_H_1 = 1.008142 ; # Mass of H-1, amu
E_g = 2.230; # Energy of gamma rays, MeV

#Calculations
M_n_1 = ((M_H_2*931.47+E_g)-(M_H_1*931.47))/931.47; #Mass of neutron, amu

#Result
print "The  mass of the neutron  : %8.6f MeV "%M_n_1
The  mass of the neutron  : 1.008987 MeV 

Example 4.5.5, Page 184

In [8]:
#Variable declaration
# Li-6 + n-1     > He-4 + H-3 is the given reaction 
M_Li = 6.0151234; # Atomic mass of Li, amu
M_n = 1.0086654; #  Atomic mass of neutron, amu
M_He = 4.0026034; #  Atomic mass of He, amu
M_H = 3.0160294; #  Atomic mass of H, amu

#Calculations&Results
r_sum = M_Li+M_n; #  Sum of reactant, amu
p_sum = M_He+M_H; #  Sum of product, amu
# Declare a function returning equality status of nucleon number
def check_Qvalue(r_sum,p_sum):
    if r_sum >= p_sum:
        Q = 1;
    else: 
        Q = 0;
    return Q
# Reaction
if (check_Qvalue(r_sum,p_sum)  == 1):
    print "Reaction : \n\n\t Li(6)+n(1) ----> He(4)+H(3)"
    print "\t\tThis reaction is exoergic"
elif (check_Qvalue(r_sum,p_sum) == 0):
    print "Reaction : \n\n\t Li(6)+n(1) ----> He(4)+H(3)"
    print "\t\tThis reaction is endoergic"
             
Reaction : 

	 Li(6)+n(1) ----> He(4)+H(3)
		This reaction is exoergic

Example 4.5.6, Page 185

In [9]:
#Variable declaration
# Cf-252    > Zr-98 +Ce-145 + 9*n-1 is the given reaction
M_Cf = 252.081621; # Atomic mass of Cf, amu
M_Zr = 97.912735; #  Atomic mass of Zr, amu
M_Ce = 144.917230; #  Atomic mass of Ce, amu
M_n = 3.0160294; #  Atomic mass of neutron, amu

#Calculations&Results
r_sum = M_Cf+M_Zr; #  Sum of reactant, amu
p_sum = M_Ce+M_n; #  Sum of product, amu


# Declare the function which check the Q-value 
def check_Qvalue(r_sum,p_sum):
    if r_sum >= p_sum:
        Q = 1;
    else: 
        Q = 0;
    return Q   


# Reaction
if (check_Qvalue(r_sum,p_sum)  == 1):
    print "Reaction : \n\n\t Cf(256) ----> Zr(98)+Ce(145)+9*n(1)"
    print "\t\tThis reaction is spontaneous"
elif (check_Qvalue(r_sum,p_sum) == 0):
    print "Reaction : \n\n\t Cf(256) ----> Zr(98)+Ce(145)+9*n(1)"
    print "\t\tThis reaction is not spontaneous"
                    
Reaction : 

	 Cf(256) ----> Zr(98)+Ce(145)+9*n(1)
		This reaction is spontaneous

Example 4.5.7, Page 185

In [10]:
#Variable declaration
# O(8,16)     > N(7,15)+ H(1,1) is the given reaction
M_N_15 = 15.000108; # Mass of N-15, amu
M_O_16 = 16; # Mass of O-16, amu
M_H_1 = 1.007825; # Mass of H-1, amu

#Calculations
Q = (M_O_16-M_N_15-M_H_1)*931.49; # Q-value, MeV

#Result
print "The Q-value for the reaction  : %3.1f MeV "%Q
The Q-value for the reaction  : -7.4 MeV 

Example 4.5.8, Page 185

In [11]:
#Variable declaration
# Na(11,23)+ n    >   F(9,20)+ He(2,4) is the reaction
M_Na_23 = 22.99097; # Mass of Na-23, amu
M_n_1 =1.00866 ; # Mass of n-1, amu
Q = -5.4; # Q-value, MeV

#Calculations
E_th = -Q*(M_Na_23+M_n_1)/M_Na_23; # Threshold energy, MeV

#Result
print "The threshold energy for the reaction  : %4.2f MeV "%E_th
The threshold energy for the reaction  : 5.64 MeV 

Example 4.5.9, Page 187

In [12]:
#Variable declaration
# He(2,4)+ N(7,14) =  O(8,17)+ H(1,1)is the given reaction
M_N_14 = 14.00755; # Mass of N-14, amu
M_He_4 = 4.00388; # Mass of He-4, amu
M_O_17 = 17.00452; # Mass of O-17, amu
M_H_1 = 1.00815; # Mass of H-1, amu

#Calculations
Q = (M_N_14+M_He_4-M_O_17-M_H_1)*931.49; # Q-value, MeV

#Result
print "The Q-value for the reaction  : %4.2f MeV "%Q
The Q-value for the reaction  : -1.16 MeV 

Example 4.5.10, Page 186

In [13]:
#Variable declaration
#    H(1,2)+G  =  H(1,1)+ n(0,1) is the given reaction
M_H_2 = 2.014735; # Mass of H-2, amu
M_H_1 = 1.008142 ; # Mass of H-1, amu
M_n_1 = 1.008987; # Mass of M_n_1, amu
Q = -5.4; # Q-value, MeV

#Calculations
E_g = (M_H_1*931.47+M_n_1*931.47)-(M_H_2*931.47); #Energy of the gama rays, MeV

#Result
print "The  energy of the gama rays  : %6.4f MeV "%E_g
The  energy of the gama rays  : 2.2299 MeV 

Example 4.7.1, Page 189

In [14]:
#Variable declaration
m = 0.001; # Mass of U-235 lost during fission, Kg
c = 3e+08; # Velocity of light, m/s

#Calculations
E = m*c**2; # Energy released during fission, J
E_t = E/(4e+09*1000); # Energy requires TNT, Kt 

#Results
print "Energy released during fission    = %1.0e J  \n Destructive power of bomb    =  %4.1f Kt of TNT"%(E, E_t)
Energy released during fission    = 9e+13 J  
 Destructive power of bomb    =  22.5 Kt of TNT

Example 4.7.2, Page 190

In [15]:
#Variable declaration
t = 0.15; # Thickness of the foil, Kg
N = 6.023e+026; # Number of nuclei in 1Kg of U-235, nuclei
N_1 = N/235*t; # Number of nuclei in 0.15Kg of U-235, nuclei
A = 2e-026; # Area present in each nucleus, m^2
I = 10^6; # Intensity ,s^-1 

#Calculations
F_r = N_1*A; # Rate of fissions induced in the foil by the neutrons, s^-1

#Result
print "Rate of fissions induced in the foil by the neutrons: %5.3e per sec"%F_r
Rate of fissions induced in the foil by the neutrons: 7.689e-03 per sec

Example 4.7.3, Page 190

In [16]:
import math

#Variable declaration
N = 6.023e+023/256*10**-6; # Number of nuclei in 1ug of Fm-256
t_h = 158*60; # Half life of Fm-256, s

#Calculations
D_c = math.log(2)/t_h; # Decay constant, s^-1
F_r = N*D_c; # Fission rate, fissions/s
E = 220*1.6e-013; # Energy released during fission of one nucleus, J
P = E*F_r; # Power released in fission of 1 microgram of Fm-256, W

#Result
print "Power released in fission of 1 microgram of Fm-256 = %d W"%P
 
Power released in fission of 1 microgram of Fm-256 = 6 W

Example 4.7.4, Page 191

In [17]:
import math

#Variable declaration
N = 6.023e+023/252*0.1; # Number of nuclei in 100mg of Cf-252
t_h = 2.62*365*24*3600; # Half life of Cf-252, s

#Calculations
D_c = math.log(2)/t_h; # Decay constant, s^-1
F_r = N*D_c; # Fission rate, fissions/s
E = 210*1.6e-013; # Energy released during fission of one nucleus, J
P = E*F_r; # Power released in fission of 100 milligram of Cf-252, W

#Result
print "Power released in fission of 100 milligram of Cf-252: %4.1f W"%P
Power released in fission of 100 milligram of Cf-252: 67.4 W

Example 4.7.5, Page 191

In [18]:
#Variable declaration
E = 200*1.6e-013; # Energy released during fission of one nucleus, J
E_t = 20000*4.18e+09; # Energy released in detonation of 20000 tons of TNT, J

#Calculations
N_f = E_t/E; # Number of fission occured during eplosion, fissions
c = 3e+08; # Velocity of light, m/s
m = E_t/(c)**2*10**6; # Decrease in mass during explosion, mg
m_r = round(m)

#Results
print "Number of fissions occured during explosion = %4.2e fissions \n Decrease in mass during explosion  = %d mg "%(N_f, m_r)
Number of fissions occured during explosion = 2.61e+24 fissions 
 Decrease in mass during explosion  = 929 mg 

Example 4.8.1, Page 194

In [19]:
#Variable declaration
#  5*H(1,2)= He(2,3)+He(2,4)+H(1,2)+2*n(0,1)+25MeV is the given reaction
N = 6.023e+026/2*10; # Number of atoms in 10Kg of H-2, atoms
E = 25/5*1.6e-013; # Energy liberate during fusion of 1 atom of H-2, J

#Calculations
E_l = E*N; # Energy liberate during fusion of 10 Kg  of H-2, J

#Result
print "Energy liberated during fusion of 10 Kg  of H-2 = %4.2e J"%E_l
Energy liberated during fusion of 10 Kg  of H-2 = 2.41e+15 J

Example 4.8.2, Page 194

In [20]:
#Variable declaration
M_r = 16.002603; # Mass of the reactant, amu
M_p = 15.994915; # Mass of reactant, amu
M_d = 7.688e-03; # Difference in masses, amu

#Calculations
E_p = M_d*931.49; # Energy produced, MeV

#Result
print "Energy produced by the fusion reaction :%4.2f MeV"%E_p
Energy produced by the fusion reaction :7.16 MeV

Example 4.8.3, Page 194

In [21]:
#Variable declaration & Calculations
# Firstly calculate for B-10
Z_B = 5; # Atomic number of B-10
r_B = 5.17; #  Seperation of two nuclei, fm
K = 1.38e-023; # Boltzmann's constant
F = 1./137; # Fine structure constant
E = 197.5*1.6e-013; # Energy, J
V_c_B = F*Z_B**2*E/r_B; # Coulomb barrier for B-10, J
T_B = 2./3*V_c_B/K; # Temperature required to overcome the barrier for B-10, K

# Now calculate for Mg-24
Z_Mg = 12; # Atomic number of Mg-24
r_Mg = 6.92; #  Seperation of two nuclei, fm
K = 1.38e-023; # Boltzmann's constant
F = 1./137; # Fine structure constant
E = 197.5*1.6e-013; # Energy, J
V_c_Mg = F*Z_Mg**2*E/r_Mg; # Coulomb barrier for Mg-24, J
T_Mg = 2./3*V_c_Mg/K; # Temperature required to overcome the barrier for Mg-24, K

#Results
print "For B-10 \n Energy released   = %4.2e J \n Temperature required   = %4.1e K   \nFor Mg-24  \n Energy released    = %4.2e J \n Temperature required  =  %4.2e K"%(V_c_B,T_B,V_c_Mg,T_Mg)
For B-10 
 Energy released   = 1.12e-12 J 
 Temperature required   = 5.4e+10 K   
For Mg-24  
 Energy released    = 4.80e-12 J 
 Temperature required  =  2.32e+11 K

Example 4.8.4, Page 196

In [22]:
#Variable declaration
# 4*H(1,1)= He(2,4)+2*e(1,0)+2*v+G is the reaction
E_r = 3.9e+026; # Energy releasd in 1s, J
N = 1.2e+057; # Number of hydrogen atoms in the sun, atoms
M_d = 0.027599;# Mass difference, amu

#Calculations
E = M_d*931.47; # In terms of energy, MeV
E_t = N/4*E*1.6e-013; # Total energy available in the sun, J
t = E_t/(E_r*365*24*3600*10**9); # Life time of the sun, billion years

#Result
print "Life time of the sun : %5.1f billion years"%t
Life time of the sun : 100.3 billion years

Example 4.8.5, Page 197

In [23]:
#Variable declaration
# Declare three cells [for three reactions]
R = [[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]]
# Enter data for first cell [Reaction]
R[0][0] = 'H'; # Element
R[0][1] = 1;   # Atomic number
R[0][2] = 2;    # Mass number
R[1][0] = 'H';
R[1][1] = 1;
R[1][2] = 3;
R[2][0] = 'n'
R[2][1] = 0;
R[2][2] = 1;
R[3][0] = 'He'
R[3][1] = 2;
R[3][2] = 3;


#Calculations&Results
p_sum = R[1][2]+R[2][2];
if p_sum == 2:
    print "The particle is : %s[%d][%d] "%(R[3][0],R[3][1],R[3][2])
             
#  Calculate the energy released
m_n = 1.008665; # Mass of neutron, amu
m_d = 2.014102; # Mass of deutron, amu
m_He = 3.0160293; # Mass of He-3, amu
E = (2*m_d-(m_n+m_He))*931.47; # Energy released in this reaction, MeV
print "The energy released in this reaction : %4.2f MeV"%E
The energy released in this reaction : 3.27 MeV

Example 4.8.6, Page 197

In [24]:
#Variable declaration & Calculations
#  Reaction-1 = H(1,2)+H(1,2)= He(2,3)+n(0,1)
m_p = 1.007825; # Mass of proton, amu
m_n = 1.008665; # Mass of neutron, amu
m_H = 2.014102; # Mass of H(1,2), amu
m_He = 3.016029; # Mass of He(2,3), amu
m_d_1 = 2*m_H-m_He-m_n; # Mass defect for reaction first, amu
Q_1 = m_d_1*931.47; # Q-value for reaction first, MeV

# Reaction-2 = H(1,2)+H(1,2)= H(1,3)+p(1,1)
m_p = 1.007825; # Mass of proton, amu
m_n = 1.008665; # Mass of neutron, amu
m_H = 2.014102; # Mass of H(1,2), amu
m_H_3 = 3.016049; # Mass of H(1,3), amu
m_d_2 = 2*m_H-m_H_3-m_p; # Mass defect for reaction second, amu
Q_2 = m_d_2*931.47; # Q-value for reaction second, MeV

#Results
print "For first reaction \n Mass defect    = %7.5f amu \n Q-value    =   %7.5f amu   \nFor second reaction \n Mass defect   =  %7.5f MeV \n Q-value  = %4.2f MeV "%(m_d_1,Q_1,m_d_2,Q_2)
For first reaction 
 Mass defect    = 0.00351 amu 
 Q-value    =   3.26946 amu   
For second reaction 
 Mass defect   =  0.00433 MeV 
 Q-value  = 4.03 MeV