{
 "metadata": {
  "name": "",
  "signature": "sha256:146b2a737d67bfa0a93cceee1f0df7461bc034ad0becba42baf98a47d6983e5d"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter : 1 - Energy Bands & Charge Carriers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.7.1 - Page No : 1-21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "# Given data\n",
      "E_g = 0.75# in eV\n",
      "E_g = 0.75 * 1.6 * 10**-19 # in J\n",
      "h = 6.63 * 10**-34 # in J\n",
      "c = 3 * 10**8 # in m/s \n",
      "# hv = E_g\n",
      "#E_g = (h*c)/lambda\n",
      "Lambda=(h*c)/E_g # in m\n",
      "Lambda=Lambda * 10**10 # in A\u00b0\n",
      "print \"The wavelength at which germanium starts to absorb light = %0.f A\u00b0 \" %Lambda"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The wavelength at which germanium starts to absorb light = 16575 A\u00b0 \n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  1.7.2 - Page No : 1-22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "h = 6.625 * 10**-34 # in J\n",
      "c = 3 * 10**8 # in J\n",
      "lambda_Gr = 17760 * 10**-10 # in m\n",
      "lambda_Si = 11000 # in A\u00b0\n",
      "lambda_Si = lambda_Si * 10**-10 # in m\n",
      "E_g = (h*c)/lambda_Si # in J\n",
      "E_g = E_g /(1.6*10**-19) # in eV\n",
      "print \"The energy gap of Si = %0.3f eV \" %E_g\n",
      "E_g1 = (h*c)/lambda_Gr # in J\n",
      "E_g1 = E_g1/(1.6 * 10**-19) # in eV\n",
      "print \"The energy gap of Germanium = %0.2f eV \" %E_g1"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy gap of Si = 1.129 eV \n",
        "The energy gap of Germanium = 0.70 eV \n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.18.1\n",
      " - Page No : 1-51"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "del_E = 0.3 # in eV\n",
      "T1 = 300 # in K\n",
      "T2 = 330 # in K\n",
      "# del_E = K * T1 * log(N/N_c) where del_E= E_C-E_F\n",
      "# del_E1 = K * T2 * log(N/N_c) where del_E1= E_C-E_F at T= 330 \u00b0K\n",
      "del_E1 = del_E*(T2/T1) # in eV \n",
      "print \"The Fermi level will be \",round(del_E1,2),\" eV below the conduction band\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi level will be  0.33  eV below the conduction band\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.18.2\n",
      " - Page No : 1-52"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import exp\n",
      "# Given data\n",
      "N_c = 2.8 * 10**19 # in cm**-3\n",
      "del_E = 0.25 # fermi energy in eV\n",
      "KT = 0.0259 \n",
      "f_F = exp(-(del_E)/KT) \n",
      "print \"The probaility in the condition band is occupied by an electron = %0.2e\"  %f_F\n",
      "n_o = N_c * exp(-(del_E)/KT) # in cm**-3\n",
      "print \"The thermal equilibrium electron concentration = %0.1e cm**-3 \" %n_o"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The probaility in the condition band is occupied by an electron = 6.43e-05\n",
        "The thermal equilibrium electron concentration = 1.8e+15 cm**-3 \n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :1.18.3\n",
      " - Page No : 1-54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "T1 = 300 # in K\n",
      "T2 = 400 # in K\n",
      "del_E = 0.27 # Fermi level in eV\n",
      "KT = (0.0259) * (T2/T1) # in eV\n",
      "N_v = 1.04 * 10**19 # in cm**-3\n",
      "N_v = N_v * (T2/T1)**(3/2) # in cm**-3 \n",
      "p_o = N_v * exp(-(del_E)/KT) # in per cm**3\n",
      "print \"The thermal equilibrium hole concentration = %0.2e per cm**3 \" %p_o"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thermal equilibrium hole concentration = 6.44e+15 per cm**3 \n"
       ]
      }
     ],
     "prompt_number": 30
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  1.21.1 - Page No : 1-65"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "Mu_e = 1500 # in cm**2/volt sec\n",
      "Mu_h = 500 # in cm**2/volt sec\n",
      "n_i = 1.6 * 10**10 # in per cm**3\n",
      "e = 1.6 * 10**-19 # in C\n",
      "Sigma = n_i * (Mu_e + Mu_h) * e # in mho/cm\n",
      "print \"The conductivity of pure semiconductor = %0.2e mho/cm \" %Sigma"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The conductivity of pure semiconductor = 5.12e-06 mho/cm \n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  1.21.2 - Page No : 1-65"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "Rho = 10 # in \u03a9-cm\n",
      "Mu_d = 500 # in cm**2/v.s.\n",
      "e = 1.6*10**-19 \n",
      "n_d = 1/(Rho * e * Mu_d) # in per cm**3\n",
      "print \"The number of donor atom must be added to achieve = %0.2e per cm**3 \" %n_d"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The number of donor atom must be added to achieve = 1.25e+15 per cm**3 \n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.21.3 - Page No : 1-66"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "AvagadroNumber = 6.02 * 10**23 # in atoms/gm.mole\n",
      "at_Ge = 72.6 # atom weight of Ge\n",
      "e = 1.6 * 10**-19 # in C\n",
      "D_Ge = 5.32 # density of Ge in gm/c.c\n",
      "Mu = 3800 # in cm**2/v.s.\n",
      "C_Ge = (AvagadroNumber/at_Ge) * D_Ge # concentration of Ge atoms in per cm**3\n",
      "n_d = C_Ge/10**8 # in per cc\n",
      "Sigma = n_d * Mu * e # in mho/cm\n",
      "print \"The conductivity = %0.3f mho/cm \" %Sigma"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The conductivity = 0.268 mho/cm \n"
       ]
      }
     ],
     "prompt_number": 34
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.21.4 - Page No : 1-66"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "Rho = 0.3623 * 10**-3 # in Ohm m\n",
      "Sigma = 1/Rho #in mho/m\n",
      "D = 4.42 * 10**28 # Ge density in atom/m**3\n",
      "n_d = D / 10**6 # in atom/m**3\n",
      "e = 1.6 * 10**-19 # in C\n",
      "Mu = Sigma/(n_d * e) # in m**2/V.sec\n",
      "print \"The mobility of electron in germanium = %0.2f m**2/V.sec \" %Mu"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mobility of electron in germanium = 0.39 m**2/V.sec \n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.21.5 - Page No : 1-67"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "AvagadroNumber = 6.025 * 10**26 # in kg.Mole\n",
      "W = 72.59 # atomic weight of Ge\n",
      "D = 5.36 * 10**3 #density of Ge in kg/m**3\n",
      "Rho = 0.42 # resistivity in Ohm m\n",
      "e = 1.6 * 10**-19 # in C\n",
      "Sigma = 1/Rho # in mho/m\n",
      "n = (AvagadroNumber/W) * D # number of Ge atoms present per unit volume\n",
      "# Holes per unit volume, H = n*10**-6%\n",
      "H= n*10**-8 \n",
      "a=H \n",
      "# Formula sigma= a*e*Mu_h\n",
      "Mu_h = Sigma/(a * e) # in m**2/V.sec\n",
      "print \"Mobility of holes = %0.4f m**2/V.sec \" %Mu_h"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Mobility of holes = 0.0334 m**2/V.sec \n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.21.6 - Page No : 1-68"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "e = 1.6 * 10**-19 # in C\n",
      "n_i = 2 * 10**19 # in /m**3\n",
      "Mu_e = 0.36 # in m**2/v.s\n",
      "Mu_h = 0.17 # in m**2/v.s\n",
      "A = 1 * 10**-4 # in  m**2\n",
      "V = 2 #in volts\n",
      "l = 0.3 # in mm\n",
      "l = l * 10**-3 # in m\n",
      "E=V/l # in volt/m\n",
      "Sigma = n_i * e * (Mu_e + Mu_h) # in mho/m\n",
      "# J = I/A = Sigma * E\n",
      "I= Sigma*E*A \n",
      "print \"The current produced in a small germanium plate = %0.2f amp \" %I\n",
      "\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current produced in a small germanium plate = 1.13 amp \n"
       ]
      }
     ],
     "prompt_number": 37
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  1.21.7 - Page No : 1-68"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "D = 4.2 * 10**28 #density of Ge atoms in atoms/m**3\n",
      "N_d = D / 10**6 # in atoms/m**3\n",
      "e = 1.6 * 10**-19 # in C\n",
      "Mu_e = 0.36 # in m**2/vs\n",
      "Sigma_n = N_d *  e * Mu_e # in mho/m\n",
      "Rho_n = 1/Sigma_n # in ohm m\n",
      "print \"The resistivity of drop Ge = %0.3e ohm m \" %Rho_n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The resistivity of drop Ge = 4.134e-04 ohm m \n"
       ]
      }
     ],
     "prompt_number": 38
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  1.21.8 - Page No : 1-69"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "e = 1.6 * 10**-19 # in C\n",
      "n_i = 1 * 10**19 # in per m**3\n",
      "Mu_e = 0.36 # in m**2/volt.sec\n",
      "Mu_h = 0.17 # in m**2/volt.sec \n",
      "A = 2 # in cm**2\n",
      "A = A * 10**-4 # im m**2\n",
      "t = 0.1 # in mm\n",
      "t = t * 10**-3 # in m\n",
      "V = 4 # in volts\n",
      "Sigma_i = n_i * e * (Mu_e + Mu_h) # in mho/m\n",
      "J = Sigma_i * (V/t) # in Amp/m**2\n",
      "I = J * A # in Amp\n",
      "print \"The current produced in a Ge sample = %0.3f Amp \" %I"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current produced in a Ge sample = 6.784 Amp \n"
       ]
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.21.9 - Page No : 1-70"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "e = 1.6 * 10**-19 # in C\n",
      "Mu_h = 500 # in cm**2/V.s.\n",
      "Mu_e = 1500 # in cm**2/V.s.\n",
      "n_i = 1.6 * 10**10 # in per cm**3\n",
      "Sigma_i = n_i * e * ( Mu_h + Mu_e) # in mho/cm\n",
      "print \"Conductivity of pure silicon at room temperature = %0.2e mho/cm \" %Sigma_i"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Conductivity of pure silicon at room temperature = 5.12e-06 mho/cm \n"
       ]
      }
     ],
     "prompt_number": 40
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.1 - Page No : 1-74"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "l= 0.50*10**-2 # width of ribbon in m\n",
      "d= 0.10*10**-3 # thickness of ribbon in m\n",
      "A= l*d # area of ribbon in m**2\n",
      "B = 0.8 # in Tesla\n",
      "D = 10.5 #density in gm/cc\n",
      "I = 2 # in amp\n",
      "q = 1.6 * 10**-19 # in C\n",
      "n=6*10**28 # number of elec. per m**3\n",
      "V_H = ( I * B * d)/(n * q * A) # in volts\n",
      "print \"The hall Voltage produced = %0.2e volts \" %V_H"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The hall Voltage produced = 3.33e-08 volts \n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.2 - Page No : 1-74"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "l = 1 # in m\n",
      "d = 1 # in cm\n",
      "d = d * 10**-2 # in m\n",
      "W = 1 # in mm\n",
      "W = W * 10**-3 # in m\n",
      "A = d * W # in m**2\n",
      "I= 1 # in Amp\n",
      "B = 1 # Tesla\n",
      "V_H = 0.074 * 10**-6 # in Volts\n",
      "Sigma = 5.8 * 10**7 # in mho/m\n",
      "R_H = (V_H * A)/(B*I*d) # in m**3/c\n",
      "print \"The hall coefficient = %0.1e m**3/c \" %R_H\n",
      "Mu = Sigma * R_H # in m**2/volt.sec\n",
      "print \"The mobility  of electrons in copper = %0.1e m**2/volt-sec \" %Mu"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The hall coefficient = 7.4e-11 m**3/c \n",
        "The mobility  of electrons in copper = 4.3e-03 m**2/volt-sec \n"
       ]
      }
     ],
     "prompt_number": 42
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :1.23.3 - Page No : 1-75"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "n_i = 1.4 * 10**18 # in /m**3\n",
      "n_D = 1.4 * 10**24 # in /m**3\n",
      "n=n_D # in /m**3\n",
      "p = n_i**2/n # in /m**3\n",
      "R = n/p \n",
      "print \"The ratio of electrons to hole concentration = %0.1e\" %R"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ratio of electrons to hole concentration = 1.0e+12\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.4 - Page No : 1-76"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import atan, pi\n",
      "# Given data\n",
      "B = 0.48 # in wb/m**2\n",
      "R_H = 3.55 * 10**-4 # in m**3/c\n",
      "Rho = 0.00912 # in ohm-m\n",
      "Sigma = 1/Rho # in (ohm-m)**-1\n",
      "theta_H = atan( Sigma * B * R_H)*180/pi # in degree\n",
      "print \"The hall angle for a hall coefficient = %0.4f\u00b0\" %theta_H"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The hall angle for a hall coefficient = 1.0704\u00b0\n"
       ]
      }
     ],
     "prompt_number": 47
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.5 - Page No : 1-76"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "R = 9 * 10**-3 # in ohm-m\n",
      "R_H = 3.6 * 10**-4 # in m**3\n",
      "e = 1.6 * 10**-19 # in C\n",
      "Sigma = 1/R # in (ohm-m)**-1\n",
      "Rho = 1/R_H # in coulomb/m**3\n",
      "n = Rho/e # in /m**3\n",
      "print \"Density of charge carriers = %0.5e per m**3 \" %n\n",
      "Mu = Sigma * R_H # in m**2/v-s\n",
      "print \"Mobility of charge carriers = %0.2f m**2/V-s \" %Mu"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Density of charge carriers = 1.73611e+22 per m**3 \n",
        "Mobility of charge carriers = 0.04 m**2/V-s \n"
       ]
      }
     ],
     "prompt_number": 48
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.6 - Page No : 1-76"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data\n",
      "e = 1.6 * 10**-19 # in C\n",
      "R_H = 0.0145 # in m**3/coulomb\n",
      "Mu_e = 0.36 # in m**2/v-s\n",
      "E = 100 # in V/m\n",
      "n = 1/(e * R_H) # in /m**3\n",
      "J = n * e * Mu_e * E # in A/m**2\n",
      "print \"The current density of specimen = %0.3e A/m**2 \" %J"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The current density of specimen = 2.483e+03 A/m**2 \n"
       ]
      }
     ],
     "prompt_number": 49
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.7 - Page No : 1-77"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt\n",
      "#Given data\n",
      "Mu_e = 7.04 * 10**-3 # in m**2/v-s\n",
      "m = 9.1 * 10**-31 \n",
      "E_F = 5.5 # in eV\n",
      "n = 5.8 * 10**28 \n",
      "e = 1.6 * 10**-19 # in C\n",
      "Torque = (Mu_e/e) * m # in sec\n",
      "print \"Relaxation Time = %0.3e sec \" %Torque\n",
      "Rho = 1 /(n * e * Mu_e) # in ohm-m\n",
      "print \"Resistivity of conductor = %0.3e ohm-m \" %Rho\n",
      "V_F = sqrt((2 * E_F * e)/m) # in m/s\n",
      "print \"Velocity of electrons with fermi-energy = %0.4e m/s \" %V_F"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Relaxation Time = 4.004e-14 sec \n",
        "Resistivity of conductor = 1.531e-08 ohm-m \n",
        "Velocity of electrons with fermi-energy = 1.3907e+06 m/s \n"
       ]
      }
     ],
     "prompt_number": 52
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.8 - Page No : 1-77"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log\n",
      "# Given data\n",
      "E= 5.95 # in eV\n",
      "EF= 6.25 # in eV\n",
      "delE= 0.01 \n",
      " # delE= 1-1/(1+exp((E-EF)/KT))\n",
      "K=1.38*10**-23 # Boltzman Constant in J/K\n",
      "T = ((E-EF)/log(1/(1-delE) -1)*1.6*10**-19)/K # in K\n",
      "print \"The temperature =\" ,int(T),\"K\"\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The temperature = 756 K\n"
       ]
      }
     ],
     "prompt_number": 57
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.9 - Page No : 1-78"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given data \n",
      "N_V = 1.04 * 10**19 # in cm**-3\n",
      "T1 = 300 # in K\n",
      "T2 = 400 # in K\n",
      "del_E = 0.27 # in eV\n",
      "N_V = N_V * (T2/T1)**1.5 # in cm**-3\n",
      "KT = (0.0259) * (T2/T1) # in eV\n",
      "P_o = N_V * exp(-(del_E)/KT) # in cm**-3\n",
      "print \"The thermal equilibrium hole concentration in silicon = %0.2e cm**-3 \" %P_o"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The thermal equilibrium hole concentration in silicon = 6.44e+15 cm**-3 \n"
       ]
      }
     ],
     "prompt_number": 58
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.10 - Page No : 1-78"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "N_c = 2.8 * 10**19 \n",
      "N_V = 1.04 *10**19 \n",
      "T1 = 550 # in K\n",
      "T2 = 300 # in K\n",
      "E_g = 1.12 \n",
      "KT = (0.0259)  \n",
      "n_i = sqrt(N_c *N_V *(T1/T2)**3* exp(-(E_g)/KT*T2/T1)) # in cm**-3\n",
      "# n_o = N_d/2 + sqrt((N_d/2)**2 + (n_i)**2)\n",
      "# 1.05*N_d -N_d/2= sqrt((N_d/2)**2 + (n_i)**2)\n",
      "N_d=sqrt((n_i)**2/((0.55)**2-1/4)) \n",
      "print \"Minimum donor concentration required = %0.3e cm**-3 \"  %N_d"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Minimum donor concentration required = 1.396e+15 cm**-3 \n"
       ]
      }
     ],
     "prompt_number": 61
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.11 - Page No : 1-79"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "T = 300 # in K\n",
      "n_o = 10**15 # in cm**-3\n",
      "n_i = 10**10 # in cm**-3\n",
      "p_o = 10**5 # in cm**-3\n",
      "del_n = 10**13 # in cm**-3\n",
      "del_p = del_n # in cm**-3\n",
      "KT = 0.0259 # in eV\n",
      "delta_E1= KT*log(n_o/n_i) # value of E_F-E_Fi in eV\n",
      "delta_E2= KT*log((n_o+del_n)/n_i) # value of E_Fn-E_Fi in eV\n",
      "delta_E3= KT*log((p_o+del_p)/n_i) # value of E_Fi-E_Fp in eV\n",
      "print \"The Fermi level for thermal equillibrium = %0.4f eV \" %delta_E1\n",
      "print \"The quase-Fermi level for electrons in non equillibrium = %0.4f eV \" %delta_E2\n",
      "print \"The quasi-Fermi level for holes in non equillibrium = %0.3f eV \" %delta_E3\n",
      "print \"The quasi-Fermi level for electrons is above E_Fi while the quasi-Fermi level for holes is below E_Fi\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The Fermi level for thermal equillibrium = 0.2982 eV \n",
        "The quase-Fermi level for electrons in non equillibrium = 0.2984 eV \n",
        "The quasi-Fermi level for holes in non equillibrium = 0.179 eV \n",
        "The quasi-Fermi level for electrons is above E_Fi while the quasi-Fermi level for holes is below E_Fi\n"
       ]
      }
     ],
     "prompt_number": 63
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example :  1.23.12 - Page No : 1-79"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "n_i = 1.5 * 10**10 \n",
      "n_o = 10**17 \n",
      "KT = 0.0259 \n",
      "P_o = (n_i)**2/n_o # in cm**-3\n",
      "del_E = KT * log(n_o/n_i) # in eV\n",
      "print \"equilibrium hole concentration = %0.3f eV \" %del_E"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "equilibrium hole concentration = 0.407 eV \n"
       ]
      }
     ],
     "prompt_number": 64
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.23.13 - Page No : 1-79"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given data\n",
      "Mu_n = 700 #in cm**2/v-s\n",
      "n_o = 10**17 # in /cm**3\n",
      "q = 1.6 * 10**-19 # in C\n",
      "l = 0.1 # in cm\n",
      "A = 10**-6 \n",
      "V = 10 # in V\n",
      "Sigma = q * Mu_n * n_o # in (ohm cm)**-1\n",
      "Rho = 1/Sigma #in ohm cm \n",
      "R = Rho * (l/A) # in ohm\n",
      "I = V/R # in A\n",
      "print \"The value of current = %0.2f mA \" %(I*10**3)\n",
      "\n",
      "\n",
      " "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The value of current = 1.12 mA \n"
       ]
      }
     ],
     "prompt_number": 65
    }
   ],
   "metadata": {}
  }
 ]
}