{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#chapter 7:nuclear reactions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 7.1;pg no: 111"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 7.1, Page:111  \n",
      " \n",
      "\n",
      "The reproduction factor for the reactor is =  1.053\n"
     ]
    }
   ],
   "source": [
    "#cal of reproduction factor for the reactor\n",
    "#intiation of all variables\n",
    "# Chapter 7\n",
    "print\"Example 7.1, Page:111  \\n \\n\"\n",
    "# Given:\n",
    "\n",
    "f=1.03;# fast fission factor\n",
    "n=1.32;# no. of fast neutrons generated per thermal radiations\n",
    "ref=0.89;# resonance escape factor\n",
    "tuf=0.87;# thermal utilization factor\n",
    "\n",
    "# Solution\n",
    "rf=f*n*ref*tuf;#reproduction factor\n",
    "print\"The reproduction factor for the reactor is = \",round(rf,3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 7.2;pg no: 111"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 7.2, Page:111  \n",
      " \n",
      "\n",
      "\n",
      " The approximate critical dimensionsof a Pu 239 in (m)= 4.86\n",
      "\n",
      " \n",
      " The radius of the reactor in (m)= 2.81\n"
     ]
    }
   ],
   "source": [
    "#cal of approximate critical dimensionsof a Pu 239 and radius of the reactor\n",
    "#intiation of all variables\n",
    "# Chapter 7\n",
    "print\"Example 7.2, Page:111  \\n \\n\"\n",
    "# Given:\n",
    "import math\n",
    "k=1.04;\n",
    "m=0.032;# in m^2 i.e., migration area M^2\n",
    "# Solution: (a) Cubical reactor\n",
    "a=3.14*math.sqrt(3*m/(k-1));\n",
    "print\"\\n The approximate critical dimensionsof a Pu 239 in (m)=\",round(a,2)\n",
    "# Solution: (a) Spherical reactor\n",
    "r=a/math.sqrt(3);\n",
    "print\"\\n \\n The radius of the reactor in (m)=\",round(r,2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 7.3;pg no: 111"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 7.3, Page:111  \n",
      " \n",
      "\n",
      "\n",
      " The design parameter for H2O is = 1114.0\n",
      "\n",
      " \n",
      " The design parameter for D2O is = 79042.0\n",
      "\n",
      " \n",
      " The design parameter for C is = 163353.0\n",
      "Example 7.3, Page:111  \n",
      " \n",
      "\n",
      "\n",
      " The design parameter for H2O is = 1114.0\n",
      "\n",
      " \n",
      " The design parameter for D2O is = 79042.0\n",
      "\n",
      " \n",
      " The design parameter for C is = 163353.0\n"
     ]
    }
   ],
   "source": [
    "#cal of design parameter for H2O,D2O,C\n",
    "#intiation of all variables\n",
    "# Chapter 7\n",
    "print\"Example 7.3, Page:111  \\n \\n\"\n",
    "# Given:\n",
    "a1=687; # neutron absorption cross section for U 235 in barns\n",
    "a2=0.66 # neutron absorption cross section for H2O in barns\n",
    "a3=0.0093; # neutron absorption cross section for D2O in barns\n",
    "a4=0.0045; # neutron absorption cross section for C in barns\n",
    "\n",
    "#Solution:\n",
    "\n",
    "F1=1.07*a1/a2;#design parameter for H2O part(a)\n",
    "print\"\\n The design parameter for H2O is =\",round(F1)\n",
    "\n",
    "F2=1.07*a1/a3;#design parameter for D2O part(b)\n",
    "print\"\\n \\n The design parameter for D2O is =\",round(F2)\n",
    "\n",
    "F3=1.07*a1/a4;#design parameter for C part(c)\n",
    "print\"\\n \\n The design parameter for C is =\",round(F3)#cal of design parameter for H2O,D2O,C\n",
    "#intiation of all variables\n",
    "# Chapter 7\n",
    "print\"Example 7.3, Page:111  \\n \\n\"\n",
    "# Given:\n",
    "a1=687; # neutron absorption cross section for U 235 in barns\n",
    "a2=0.66 # neutron absorption cross section for H2O in barns\n",
    "a3=0.0093; # neutron absorption cross section for D2O in barns\n",
    "a4=0.0045; # neutron absorption cross section for C in barns\n",
    "\n",
    "#Solution:\n",
    "\n",
    "F1=1.07*a1/a2;#design parameter for H2O part(a)\n",
    "print\"\\n The design parameter for H2O is =\",round(F1)\n",
    "\n",
    "F2=1.07*a1/a3;#design parameter for D2O part(b)\n",
    "print\"\\n \\n The design parameter for D2O is =\",round(F2)\n",
    "\n",
    "F3=1.07*a1/a4;#design parameter for C part(c)\n",
    "print\"\\n \\n The design parameter for C is =\",round(F3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 7.4;pg no: 112"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 7.4, Page:112  \n",
      " \n",
      "\n",
      "The no. of fissions per second are = 3.125e+17\n"
     ]
    }
   ],
   "source": [
    "#cal of no. of fissions per second\n",
    "#intiation of all variables\n",
    "# Chapter 7\n",
    "print\"Example 7.4, Page:112  \\n \\n\"\n",
    "# Given:\n",
    "P=10*10**6; # power in watts\n",
    "E=200*10**6; # in eV\n",
    "\n",
    "# Solution:\n",
    "e=E*1.6*10**-19;# in joules\n",
    "# Thus for 1 fission occurs per second, rate of power generation is e\n",
    "n=(P)/e;# no. of fissions\n",
    "print\"The no. of fissions per second are =\",n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##example 7.5;pg no: 112"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Example 7.5, Page:112  \n",
      " \n",
      "\n",
      "\n",
      " The thermal energy generated is =(J) 153.85\n"
     ]
    }
   ],
   "source": [
    "#cal of thermal energy generated\n",
    "#intiation of all variables\n",
    "# Chapter 7\n",
    "print\"Example 7.5, Page:112  \\n \\n\"\n",
    "# Given:\n",
    "density=19;# in g/cc\n",
    "E1=200*10**6*(1.6*10**-19); # energy released per fission in J\n",
    "flux1=10**12;# in cm^2/s\n",
    "a1=590*10**-24;#fission cross-section in cm^2\n",
    "Na1=6.02*10**23;\n",
    "\n",
    "# Solution:\n",
    "\n",
    "#Ntgt=volume of target*No.of atoms per cm^3\n",
    "\n",
    "Ni=(30*((0.5)**2)*3.14*density*Na1*(0.72*10**-2))/238;\n",
    "\n",
    "Np=Ni*a1*flux1;\n",
    "\n",
    "E2=E1*Np;# Thermal energy generated in J\n",
    "\n",
    "print\"\\n The thermal energy generated is =(J)\",round(E2,2)\n",
    "# Note: There is discrepancy in answer given in the textbook. After calculations the answer comes out to be 153.850366 "
   ]
  }
 ],
 "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
}
