{
 "metadata": {
  "name": "",
  "signature": "sha256:52aec0ea98abde6e8f04f9a7bf644564cf443f3e3280ece147b509c27e4e9a1b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 8 Scattering of psrticles by barriers and wells"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.2 page no 155 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "b=-32\n",
      "a=32.0\n",
      "c=1\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "r=(-b+(math.sqrt(b**2-(4*a*c))))/(2.0*a)\n",
      "\n",
      "#Result\n",
      "print\"The ratio of E/V0 = \", round(r*10**0)\n",
      "print \"-ve value is not possible. \""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ratio of E/V0 =  1.0\n",
        "-ve value is not possible. \n"
       ]
      }
     ],
     "prompt_number": 28
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.3 Page no 156"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E=9                                 #ev\n",
      "v0=5                                #ev\n",
      "\n",
      "#Calculation\n",
      "R=((math.sqrt(E)-(math.sqrt(E-v0)))/(math.sqrt(E)+(math.sqrt(E-v0))))**2\n",
      "\n",
      "#Result\n",
      "print\"Reflection ratio is \", R"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reflection ratio is  0.04\n"
       ]
      }
     ],
     "prompt_number": 53
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.4 Page no 156"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E=9                             #Kinetic energy of a particle in ev\n",
      "v0=10                           #ev\n",
      "E1=5                            #ev\n",
      "E2=15\n",
      "E3=10                           #ev\n",
      "\n",
      "#calculation\n",
      "import math\n",
      "R=((math.sqrt(E2)-(math.sqrt(E2-v0)))/(math.sqrt(E2)+(math.sqrt(E2-v0))))**2\n",
      "T=1-R\n",
      "\n",
      "#Result\n",
      "print\"(a) E1 < vo, therefore R=1, T=0\"\n",
      "print\"(b) reflection coefficient R= \",round(R,3),\"\\n transmission coefficient T= \",round(T,3)\n",
      "print\"(c) E3=v0, therefore R=1 , T=0\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a) E1 < vo, therefore R=1, T=0\n",
        "(b) reflection coefficient R=  0.072 \n",
        " transmission coefficient T=  0.928\n",
        "(c) E3=v0, therefore R=1 , T=0\n"
       ]
      }
     ],
     "prompt_number": 52
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.6 Page no 163"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E=2                                 #ev\n",
      "v0=3                                #ev\n",
      "m=9*10**-31\n",
      "a=4*10**-10                         #m\n",
      "h=1.05*10**-34\n",
      "b=(v0-E)*(1.6*10**-19)\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "Ka=((math.sqrt(2*m*(b)))*a)/h\n",
      "x=math.sin(Ka*3.14/180.0)\n",
      "T=(v0**2)/(4.0*E*(v0-E))\n",
      "T1=1/(1+(T*x**2))\n",
      "\n",
      "#Result\n",
      "print\"Transmission coefficient is \", round(T1,3)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transmission coefficient is  0.999\n"
       ]
      }
     ],
     "prompt_number": 103
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.7 Page no 164"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E=2                                 #ev\n",
      "v0=3                                #ev\n",
      "m=9*10**-31\n",
      "a=1*10**-10                        #m\n",
      "h=1.05*10**-34\n",
      "b=(v0-E)*(1.6*10**-19)\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "Ka=((math.sqrt(2*m*(b)))*a)/h\n",
      "x=math.sin(Ka*3.14/180.0)\n",
      "T=(v0**2)/(4.0*E*(v0-E))\n",
      "T1=1/(1.0+(T*x))\n",
      "\n",
      "#Result\n",
      "print\"Transmission coefficient is \", round(T1,2)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transmission coefficient is  0.99\n"
       ]
      }
     ],
     "prompt_number": 94
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8.8 Page no 164"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "E=10*10**6                                             #ev\n",
      "T=2.0*10**-3\n",
      "m=6.68*10**-27                                   #kg\n",
      "h=1.054*10**-34                                  #Js\n",
      "e=1.6*10**-19\n",
      "v0=30.0*10**6                                         #ev\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "K=(math.sqrt(2*m*(v0-E)*e))/h\n",
      "a=(1/(2.0*K))*(2.303*log10((16/T)*(E/v0)*(1-(E/v0))))\n",
      "\n",
      "#Result\n",
      "print\"The width of the barrier is \", round(a,17),\"m\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The width of the barrier is  1.91e-15 m\n"
       ]
      }
     ],
     "prompt_number": 24
    }
   ],
   "metadata": {}
  }
 ]
}