{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 3: Properties of Semiconductors"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 1, Page 40"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T=300;  #K\n",
      "ni=1.5*10**16;    #Intrinsic carrier concentartion per m^3\n",
      "yn=0.13;    #Electron mobility in m^2/(V*s)\n",
      "yp=0.05;   #Hole mobility in m^2/(V*s)\n",
      "e=1.6*10**-19;   #Charge of electron in C\n",
      "\n",
      "#Calculations\n",
      "Gi=e*ni*(yn+yp);    #Intrinsic conductivity\n",
      "Ri=1/Gi;    #Intrinsic resistivity\n",
      "\n",
      "#Results\n",
      "print 'Intrinsic conductivity=%.3e S/m'%Gi;   #incorrect answer in textbook for Gi\n",
      "print 'Intrinsic resistivity=%.3e ohm*meter'%Ri;"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Intrinsic conductivity=4.320e-04 S/m\n",
        "Intrinsic resistivity=2.315e+03 ohm*meter\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 2, Page 40"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "Sn=480;     #Conductivity in S/m\n",
      "yn=0.38;    #Electron mobility in m^2/(V*s)\n",
      "e=1.6*10**-19;   #Charge of electron in C\n",
      "\n",
      "#Calculations\n",
      "Nd=Sn/(e*yn);   #Concentration of donor atoms per m^3\n",
      "\n",
      "#Result\n",
      "print 'Concentration of donor atoms = %.1e m^-3'%Nd;\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Concentration of donor atoms = 7.9e+21 m^-3\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 4, Page 41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "T=300;  #K\n",
      "ni=1.5*10**16;    #Intrinsic carrier concentartion per m^3\n",
      "yn=0.13;    #Electron mobility in m^2/(V*s)\n",
      "yp=0.05;   #Hole mobility in m^2/(V*s)\n",
      "e=1.6*10**-19;   #Charge of electron in C\n",
      "l=0.01;    #length in m\n",
      "a=10**-6;    #cross sectional area in m^2\n",
      "\n",
      "#Calculations\n",
      "Gi=e*ni*(yn+yp);    #Intrinsic conductivity\n",
      "Ri=l/(Gi*a);    #Required resistance\n",
      "\n",
      "#Results\n",
      "print 'Intrinsic conductivity=%.2e S/m'%Gi;\n",
      "print 'required resistance = %.2f Mohm'%(Ri*10**-6);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Intrinsic conductivity=4.32e-04 S/m\n",
        "required resistance = 23.15 Mohm\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5, Page 41"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "z=(100./60);#z=conductiarrier concentration in /(m^3)\n",
      "ni=2.5*10**(19);#ni=intrinsic conductivity of intrinsic material in S/m\n",
      "#(P/N)=(1./2);#(P/N)=ratio of hole mobility(P) to electron mobility(N)\n",
      "e=1.6*(10**-19);#e=charge of electron in Coulomb\n",
      "\n",
      "#Calculations&Results\n",
      "N=(z/(e*ni*(1+(1./2))))\n",
      "print \"N=%.4f (m^2)/(V.s)\"%N\n",
      "P=(N/2)\n",
      "print \"P=%.4f (m^2)/(V.s)\"%P\n",
      "#Nd+p=Na+n;n=electron concentration;p=hole concentration\n",
      "#np=(ni^2)\n",
      "Nd=(10**20)#Nd=donor concentration in /(m^3)\n",
      "Na=5*(10**19)#Na=acceptor concentration in /(m^3)\n",
      "n=(1./2)*((Nd-Na)+math.sqrt(((Nd-Na)**2)+(4*(ni**2))))\n",
      "print \"n=%.3e /(m**3)\"%n\n",
      "p=(ni**2)/n\n",
      "print \"p=%.3e /(m^3)\"%p\n",
      "Z=e*((n*N)+(p*P))#Z=conductivity of doped sample in S/m\n",
      "print \"Z=%.1f S/m\"%Z\n",
      "F=200#F=applied electric field in V/cm\n",
      "J=Z*F#J=total conduction current density in A/(m^2)\n",
      "print \"J=%.f A/(m^2)\"%J\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "N=0.2778 (m^2)/(V.s)\n",
        "P=0.1389 (m^2)/(V.s)\n",
        "n=6.036e+19 /(m**3)\n",
        "p=1.036e+19 /(m^3)\n",
        "Z=2.9 S/m\n",
        "J=583 A/(m^2)\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6, Page 42"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "ni=2.5*10**(19);#ni=intrinsic conductivity of intrinsic material in S/m\n",
      "Nd=5*(10**19)#Nd=donor concentration in /(m^3)\n",
      "\n",
      "#Calculations&Results\n",
      "n=(1./2)*(Nd+math.sqrt((Nd**2)+(4*(ni**2))))#n=electron concentration\n",
      "print \"n=%.3e /(m^3)\"%n\n",
      "p=(ni**2)/n#p=hole concentration\n",
      "print \"p=%.3e /(m^3)\"%p\n",
      "N=0.38#N=electron mobility in (m^2)/(V.s)\n",
      "P=0.18#P=hole mobility in (m^2)/(V.s)\n",
      "e=1.6*(10**-19)#e=electronic charge in Coulomb\n",
      "Z=e*((n*N)+(p*P))#Z=conductivity of doped sample in S/m\n",
      "print \"Z=%.3f S/m\"%Z"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "n=6.036e+19 /(m^3)\n",
        "p=1.036e+19 /(m^3)\n",
        "Z=3.968 S/m\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 7, Page 43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "c=3*(10**8);#c=velocity of light in vacuum in m/s\n",
      "h=6.6*(10**-34);#h=Planck's constant in J.s\n",
      "Eg=1.98*1.6*(10**-19)#Eg=band gap in J\n",
      "\n",
      "#Calculations\n",
      "#calculating Y=required wavelength\n",
      "Y=((c*h)/Eg)/(10**-9)\n",
      "\n",
      "#Result\n",
      "print \"Y=%.f nm\"%Y"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Y=625 nm\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 8, Page 43"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "RH=(10**-2);#RH=Hall coefficient in (m^3)/C\n",
      "VH=(10**-3);#VH=Hall Voltage in V\n",
      "b=2*(10**-3);#b=width in m\n",
      "I=(10**-3);#I=current in A\n",
      "\n",
      "#Calculations&Results\n",
      "#RH=(VH*b)/(I*B)\n",
      "B=(VH*b)/(I*RH)#B=magnetic field\n",
      "print \"B= %.1f T\"%B\n",
      "t=(10**-3)#t=thickness in m\n",
      "FH=(VH/t)#FH=Hall field\n",
      "print \"FH=%.f V/m\"%FH\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "B= 0.2 T\n",
        "FH=1 V/m\n"
       ]
      }
     ],
     "prompt_number": 19
    }
   ],
   "metadata": {}
  }
 ]
}