{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 8 - Nuclear Physics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 1 - pg 239"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Nuclear density is 2.3 x 10^17 kg/m**3\n",
      "Nuclear density is 7.0 x 10^13 times Atomic density.\n"
     ]
    }
   ],
   "source": [
    "#pg 239\n",
    "#calculate the nuclear density\n",
    "#Given:\n",
    "import math\n",
    "mp = 1.67*10**-27 ; # proton mass in kg\n",
    "r0 = 1.2*10**-15; # constant in m\n",
    "a0 = 0.5*10**-10; # atomic dimensions in m\n",
    "#rho_nucleus = nuclear mass/ nuclear volume\n",
    "#calculations\n",
    "rho_nucleus = (3*mp)/(4*math.pi*r0**3); # nuclear density in kg/m**3\n",
    "#ratio = rho_nucleus/rho_atom =  (a0/r0)**3\n",
    "ratio = a0**3/r0**3;\n",
    "#results\n",
    "print\"Nuclear density is\",round(rho_nucleus*10**-17,1),\"x 10^17 kg/m**3\"\n",
    "print\"Nuclear density is\",round(ratio*10**-13,0),\"x 10^13 times Atomic density.\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 2 - pg 241"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Rest mass of a pion is 226.0 times the rest mass of an electron\n",
      "textbook answer is 220 , because  approximate value for m_pi was considered.\n"
     ]
    }
   ],
   "source": [
    "#pg 241\n",
    "#calculate the rest mass of pion\n",
    "#Given :\n",
    "h = 1.05*10**-34; #planck's constant in Js\n",
    "m = 9.1*10**-31; #electron rest mass in kg\n",
    "c = 3*10**8; #Speed of light in m/s\n",
    "b = 1.7*10**-15; # range of nuclear force in m\n",
    "#calculations\n",
    "m_pi = h/(b*c); # rest mass of a pion in kg\n",
    "t = m_pi/m; # times the rest mass of an electron\n",
    "#results\n",
    "print \"Rest mass of a pion is\",round(t,0), \"times the rest mass of an electron\"\n",
    "print 'textbook answer is 220 , because  approximate value for m_pi was considered.'\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 - pg 242"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Binding energy : 2.225 MeV\n"
     ]
    }
   ],
   "source": [
    "#pg 242\n",
    "#calculate the Binding energy\n",
    "#Given :\n",
    "mp = 1.007276470 ; # proton mass in u \n",
    "mn = 1.008665012; # neutron mass in u\n",
    "md = 2.013553215; # deuteron mass in u\n",
    "#E = ( mp + mn - md)*c**2\n",
    "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n",
    "#calculations\n",
    "E = (mp + mn - md)*931.5; # Binding energy in MeV\n",
    "#results\n",
    "print \"Binding energy :\",round(E,3),\"MeV\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 4 - pg 243"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Average binding energy per nucleon : 7.074  MeV\n"
     ]
    }
   ],
   "source": [
    "#pg 243\n",
    "#calculate the Average binding energy per nucleon\n",
    "#Given :\n",
    "m_alpha = 4.001506106; # mass of an alpha particle in u\n",
    "mp = 1.007276470 ; # proton mass in u \n",
    "mn = 1.008665012; # neutron mass in u\n",
    "#E = ( 2*mp + 2*mn - m_alpha)*c**2\n",
    "# 1 u * c**2 = 931.5 MeV , where 1 u = 1.66*10**-27 kg and c = 3*10**8 m/s\n",
    "#calculations\n",
    "E = (2*mp + 2*mn - m_alpha)*931.5; # Binding energy in MeV\n",
    "#resuts\n",
    "print \"Average binding energy per nucleon :\",round(E/4.,3),\" MeV\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5 - pg 249"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Q value is (MeV) =  4.7\n"
     ]
    }
   ],
   "source": [
    "#pg 249\n",
    "#calculate the Q value\n",
    "#Given :\n",
    "Mn = 14.00753; #mass of Nitrogen 14 in u\n",
    "Mo = 17.0045; # mass of Oxygen 17 in u\n",
    "m_alpha = 4.00387; # mass of alpha particle in u\n",
    "mp = 1.00184; # mass of proton in u\n",
    "#Q = (m_alpha + Mn - Mo - mp)*c^2\n",
    "## 1 u * c^2 = 931.5 MeV , where 1 u = 1.66*10^-27 kg and c = 3*10^8 m/s\n",
    "#calculations\n",
    "Q = (m_alpha + Mn - Mo - mp)*931.5 ;# Q value in MeV\n",
    "#results\n",
    "print \"Q value is (MeV) = \",round(Q,1)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 7 - pg 250"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Angle of ejection is (degrees) =  90.0\n"
     ]
    }
   ],
   "source": [
    "#pg 250\n",
    "#calculate the angle of ejection\n",
    "#Given :\n",
    "import math\n",
    "Q = 4.;# in MeV\n",
    "Ex = 2.; # in MeV\n",
    "Ey = 5.; # in MeV\n",
    "mx = 4.; # in u\n",
    "my = 1.; # in u\n",
    "My =13.; # in u\n",
    "#calculations\n",
    "theta = math.acos(( (Ey*(1 + (my/My))) - (Ex*(1 - (mx/My))) - Q )/((2/My)*math.sqrt(mx*Ex*my*Ey)))*57.3; # angle of ejection in degrees \n",
    "#resutls\n",
    "print\"Angle of ejection is (degrees) = \",round(theta,0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 8 - pg 251"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Energy for an electron : 0.6  x 10**-17 x n^2  J\n",
      "Energy for a nucleon : 3.29  x 10**-11 x n^2  J\n"
     ]
    }
   ],
   "source": [
    "#pg 251\n",
    "#calculate the energy for electron and nucleon\n",
    "#Given :\n",
    "h = 6.625*10**-34 ; #planck's constant in Js\n",
    "me = 9.1*10**-31 ; #electron mass in kg\n",
    "mn = 1.67*10**-27;# a nucleon mass in kg\n",
    "#calculations\n",
    "#(a)For electron\n",
    "L1 = 1; # in A\n",
    "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n",
    "#L1 = 1*10**-10 m , 1A = 1.0*10**-10 m\n",
    "E1 = h**2/(8*me*(L1*10**-10)**2); # energy in J\n",
    "#(b)For nucleon\n",
    "L2 = 1; # in fm\n",
    "#E = (n**2*h**2)/(8*m*L**2) , here n value is not given , so let us calculate the remaining part (neglecting n**2 in the formula)\n",
    "#L2 = 1*10**-15 m , 1 fm = 1.0*10**-15 m\n",
    "E2 = h**2/(8*mn*(L2*10**-15)**2);#energy in J\n",
    "#results\n",
    "print\"Energy for an electron :\",round(E1*10**17,1),\" x 10**-17 x n^2  J\"\n",
    "print\"Energy for a nucleon :\",round(E2*10**11,2),\" x 10**-11 x n^2  J\"\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 9 - pg 260"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Energy released : 2.0 x 10^10 cal\n",
      "3.0  tonnes of Coal\n",
      "19588.0  tonnes of TNT\n",
      "Results obtained differ from those in textbook , because approximate values were considered in textbook.\n"
     ]
    }
   ],
   "source": [
    "#pg 260\n",
    "#calculate the energy released and tonnes of coal\n",
    "#Given :\n",
    "Na = 6.023*10**23 ; # Avogadro constant in atoms/mole\n",
    "LE = 200.; # liberated energy in MeV\n",
    "mm = 235.; # molar mass  of U 235 in gm/mole\n",
    "#calculations\n",
    "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n",
    "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J\n",
    "# 1 cal = 4.187 J \n",
    "EC = RE/4.187 ; # energy in cal\n",
    "#Burning 1 kg of coal releases 7000 K cal of energy \n",
    "Q1 = EC/(7000*10**3); # Quantity of Coal in Kg\n",
    "#Exploding 1 kg of TNT releases 1000 cal of energy\n",
    "Q2 = EC/1000; # Quantity of TNT in kg\n",
    "#results\n",
    "print\"Energy released :\",round(EC*10**-10,0),\"x 10^10 cal\"\n",
    "print round(Q1*10**-3,0),\" tonnes of Coal\"\n",
    "print round(Q2*10**-3,0),\" tonnes of TNT\"\n",
    "print 'Results obtained differ from those in textbook , because approximate values were considered in textbook.'\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 10 - pg 260"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " tonnes of Coal =  2798.0\n",
      " Electric power for 30 percent conversion efficiency (kW) =  284775.0\n",
      " Results obtained differ from those in textbook , because approximate values were considered in textbook.\n"
     ]
    }
   ],
   "source": [
    "#pg 260\n",
    "#calculate the tonnes of coal and electric power required\n",
    "#Given :\n",
    "Na = 6.023*10**23 ; # Avogadro constant atoms/mole\n",
    "LE = 200.; # liberated energy in MeV\n",
    "mm = 235.*10**-3; # molar mass of U 235 in gm/mole\n",
    "p = 30./100. ; # conversion efficiency\n",
    "#calculations\n",
    "# 1 eV = 1.6*10**-19 J , 1 MeV = 1.0*10**6 eV\n",
    "RE = (Na*LE*1.6*10**-19*10**6)/mm ; #released energy in J per day\n",
    "# 1 day = 24 hrs * 60 mins * 60 sec\n",
    "P = RE/(24.*60*60); # Power output in W per day\n",
    "# 1 cal = 4.187 J \n",
    "EC = RE/4.187 ; # energy in cal\n",
    "#Burning 1 kg of coal releases 7000 K cal of energy \n",
    "Q1 = EC/(7000.*10**3); # Quantity of Coal in Kg per day\n",
    "EP = p*P ; # electric power in W\n",
    "#results\n",
    "print\" tonnes of Coal = \",round(Q1*10**-3,0)\n",
    "print\" Electric power for 30 percent conversion efficiency (kW) = \",round(EP*10**-3,0)\n",
    "print' Results obtained differ from those in textbook , because approximate values were considered in textbook.'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 11 - pg 264"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The tree died (years ago) =  3354.80668676\n",
      "Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.\n"
     ]
    }
   ],
   "source": [
    "#pg 264\n",
    "#calculate how long ago tree died\n",
    "#Given :\n",
    "import math\n",
    "T_half = 5730.; # carbon 14 half life in years\n",
    "Na = 6.023*10**23; # Avogadro constant in nuclei/mole\n",
    "M = 25.;# charcoal mass in gm\n",
    "mm = 12.;# molar mass of carbon 12 in gm/mole\n",
    "a = 250. ; # disinitegrations per minute  (Carbon 14 activity)\n",
    "# 1 year = 525949 minutes\n",
    "#calculations\n",
    "lambd = 0.693/(T_half*525949);# disinitegrations per minute per nucleus\n",
    "N0_1 = (Na/mm)*M ; # Number of nuclei (Carbon 12)\n",
    "# Carbon 14 to Carbon 12  ratio  = 1.3*10**-12 \n",
    "N0_2 = 1.3*10**-12*N0_1 ; # Number of nuclei (Carbon 14)\n",
    "R0 = N0_2*lambd ; # disinitegrations per minute per nucleus\n",
    "a0 = R0 ; # initial activity\n",
    "t = math.log(a0/a)/lambd ;\n",
    "# 1 year = 525949 minutes\n",
    "#results\n",
    "print \"The tree died (years ago) = \",t/525949.\n",
    "print 'Result obtained differs from the textbook, because R0 value obtained here is 375.1025, where as in textbook it is 374.'\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 12 - pg 265"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Original amount (mg) =  20.0\n",
      "Remaining amount after 48 days (mg) =  0.313\n"
     ]
    }
   ],
   "source": [
    "#pg 265\n",
    "#calculate the Original amount and Remaining amount\n",
    "#Given :\n",
    "import math\n",
    "T_half = 8. ; # iodine 131 haf life in days\n",
    "lambd = 0.693/T_half ; # decay constant in decays/day\n",
    "N0 = 20. ; # mass in mg\n",
    "t = 48.; # time in days\n",
    "#calculations\n",
    "N = N0*math.exp(-lambd*t); # in mg\n",
    "#results\n",
    "print\"Original amount (mg) = \",N0\n",
    "print\"Remaining amount after 48 days (mg) = \",round(N,3)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 13 - pg 268"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Equivalent dose is (rem) =  700.0\n"
     ]
    }
   ],
   "source": [
    "#pg 268\n",
    "#calculate the equivalent dose\n",
    "#Given :\n",
    "RBE = 0.7 ; #RBE factor for cobalt 60 gamma rays\n",
    "dose = 1000 ; # dose in rad\n",
    "#calculations\n",
    "e = RBE*dose; # equivalent dose in rem \n",
    "#results\n",
    "print\"Equivalent dose is (rem) = \",e\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
