{
 "metadata": {
  "name": "",
  "signature": "sha256:dd227268a9d19f5e7b124ff2e3d8219b9fcc3bf4655f5f8e908de4958335cce5"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 11: Semiconductor Theory and Devices"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.1, Page 400"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import numpy\n",
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "e = 1.6e-019;    # Energy equivalent of 1 eV, J\n",
      "k = 1.38e-023;    # Boltzmann constant, J/K\n",
      "T = 293;    # Room temperature, K\n",
      "\n",
      "#Calculations&Results\n",
      "dE = [0.10, 1.0, 10.0];    # Energies above the valence band, eV\n",
      "F_FD = numpy.zeros(3);\n",
      "for i in range(0,3):\n",
      "    F_FD[i] = 1/(math.exp(dE[i]*e/(k*T)) + 1);\n",
      "    print \"For E - E_F = %4.2f eV, F_FD = %4.2e\"%(dE[i], F_FD[i])\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For E - E_F = 0.10 eV, F_FD = 1.88e-02\n",
        "For E - E_F = 1.00 eV, F_FD = 6.53e-18\n",
        "For E - E_F = 10.00 eV, F_FD = 1.40e-172\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.3, Page 402"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable declaration\n",
      "e = 1.6e-019;    # Energy equivalent of 1 eV, J\n",
      "rho = 5.92e-008;    # Resistivity of the zinc at room temperature, ohm-m\n",
      "B = 0.25;    # Magnetic field applied perpendicular to the strip, T\n",
      "x = 10.0e-002;    # Length of the zinc strip, m\n",
      "y = 2.0e-002;    # Width of the zinc strip, m\n",
      "V = 20e-003;    # Potential difference applied across the strip, V\n",
      "I = 0.400;    # Current through the strip, A\n",
      "V_H = 0.56e-006;    # Hall voltage that appeared across the strip, V\n",
      "\n",
      "#Calculations\n",
      "z = rho*x*I/(y*V);    # Thickness of the strip, m\n",
      "n = I*B/(e*V_H*z);    # Number density of the charge carriers, per metre cube\n",
      "\n",
      "#Results\n",
      "print \"The thickness of the zinc strip = %4.2e m\"%z\n",
      "print \"The number density of the charge carriers = %4.2e per metre cube\"%n\n",
      "print \"The charge carries in zinc are positive.\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thickness of the zinc strip = 5.92e-06 m\n",
        "The number density of the charge carriers = 1.89e+29 per metre cube\n",
        "The charge carries in zinc are positive.\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.4, Page 408"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "e = 1.602e-019;    # Energy equivalent of 1 eV, J\n",
      "k = 1.38e-023;    # Boltzmann constant, J/K\n",
      "T = 293;    # Room temperature, K\n",
      "V_f = 0.200;    # Forward voltage, V\n",
      "I_f = 50e-003;    # Forward current, A\n",
      "V_r = -0.200;    # Reverse voltage, V\n",
      "\n",
      "#Calculations\n",
      "I_r = I_f*(math.exp(e*V_r/(k*T))-1)/(math.exp(e*V_f/(k*T)) - 1);    # Reverse current from diode equation, A\n",
      "\n",
      "#Result\n",
      "print \"The reverse current through pn-junction diode = %2d micro-ampere\"%(I_r/1e-006)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The reverse current through pn-junction diode = -18 micro-ampere\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.5, Page 413"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "A = 100*100;    # Area of solar cell, Sq.m\n",
      "t = 12*60*60;    # Time for which the solar cell operates, s\n",
      "phi = 680;    # Solar flux received by the solar cell, W/Sq.m\n",
      "eta = 0.30    # Efficiency of the solar array\n",
      "\n",
      "#Calculations&Results\n",
      "E_array = eta*phi*A*t;    # Energy produced by solar cell in one 12-hour day, J\n",
      "print \"The energy produced by solar cell in one 12-hour day : %3.1e J\"%E_array\n",
      "P = 100e+006;    # Power output of power plant, W\n",
      "t = 24*60*60;    # Time for which power plant operates, s\n",
      "E_plant = P*t;    # Energy produced by power plant, J\n",
      "print \"The energy produced by power plant in one day : %3.1e J which is about %d times more than that produced by solar cell array..!\"%(E_plant, math.ceil(E_plant/E_array))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy produced by solar cell in one 12-hour day : 8.8e+10 J\n",
        "The energy produced by power plant in one day : 8.6e+12 J which is about 99 times more than that produced by solar cell array..!\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 11.6, Page 418"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable declaration\n",
      "r1 = 2.30e-002;    # Radius of inner edge of storing region of CD-ROM, m\n",
      "r2 =5.80e-002;    # Radius of outer edge of storing region of CD-ROM, m\n",
      "A = math.pi*(r2**2 - r1**2);    # Area of the usable region of CD-ROM, Sq.m\n",
      "N = 700e+006*8;    # Total number of bits in CD-ROM\n",
      "\n",
      "#Calculations\n",
      "APB = A/N;    # Area per bit of CD-ROM, Sq.m/bit\n",
      "t = 1.6e-006;    # Track width of CD_ROM, m\n",
      "l = APB/t;    # Bit length, m\n",
      "\n",
      "#Results\n",
      "print \"The surface area of CD-ROM allowed for each data bit = %3.1e Sq.m/bit\"%APB\n",
      "print \"The approx. dimensions of each bit along the track = %1.0f micro-metre\"%(l/1e-006)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The surface area of CD-ROM allowed for each data bit = 1.6e-12 Sq.m/bit\n",
        "The approx. dimensions of each bit along the track = 1 micro-metre\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}