{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 1 : Semiconductor Materials"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.1 - Page No : 15\n",
      "        "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import exp\n",
      "#Given data\n",
      "E_G = 0.72 # in eV\n",
      "E_F = (1/2)*E_G # in eV\n",
      "k = 8.61*10**-5 # in eV/K\n",
      "T = 300 # in K \n",
      "# The fraction of the total number of electrons \n",
      "n_C_by_n = 1/( 1 + (exp((E_G-E_F)/(k*T))) ) \n",
      "print \"The fraction of the total number of electrons = %0.2e\" %n_C_by_n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The fraction of the total number of electrons = 8.85e-07\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.2\n",
      " - Page No : 20"
     ]
    },
    {
     "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",
      "# Ratio of electron to hole concentation,\n",
      "ratio = n/p \n",
      "print \"Ratio of electron to hole concentration = %0.1e\" %ratio"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of electron to hole concentration = 1.0e+12\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.3\n",
      " - Page No : 22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "e = 1.6*10**-19 # in C\n",
      "m = 9.1*10**-31 # in kg\n",
      "miu_e = 7.04 * 10**-3 # in m**2/V-s\n",
      "n = 5.8*10**28 # in /m**3\n",
      "torque = (miu_e/e)*m # in sec\n",
      "print \"The relaxation time = %0.3e second \" %torque\n",
      "sigma = n*e*miu_e \n",
      "rho = 1/sigma  # in ohm-m\n",
      "print \"The resistivity of conductor = %0.3e ohm-m \" %rho"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The relaxation time = 4.004e-14 second \n",
        "The resistivity of conductor = 1.531e-08 ohm-m \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.4\n",
      " - Page No : 22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "e = 1.601*10**-19 # in C\n",
      "m = 9.107 * 10**-31 # in kg\n",
      "E = 100 # in V/m\n",
      "n = 6*10**28 # in /m**3\n",
      "rho = 1.5*10**-8 # in ohm-m\n",
      "sigma = 1/rho \n",
      "torque = (sigma*m)/(n*(e**2)) # in second\n",
      "print \"The relaxation time = %0.3e second \" %torque\n",
      "v = ((e*E)/m)*torque # in m/s\n",
      "print \"The drift velocity = %0.3f m/s \" %v"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The relaxation time = 3.948e-14 second \n",
        "The drift velocity = 0.694 m/s \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.5\n",
      " - Page No : 22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from numpy import pi\n",
      "#Given data\n",
      "d = 2 # in mm\n",
      "d = d * 10**-3 # in m\n",
      "sigma = 5.8*10**7 # in S/m\n",
      "miu_e = 0.0032 # in m**2/V-s\n",
      "E = 20 # in mV/m \n",
      "E = E * 10**-3 # in V/m\n",
      "e = 1.6*10**-19 # in C\n",
      "n = sigma/(e*miu_e) # in /m**3\n",
      "print \"The charge density of free electrons = %0.3e /m**3 \" %n\n",
      "J = sigma*E # in A/m**2\n",
      "print \"The current density = %0.2e A/m**2 \" %J\n",
      "I = J * ( (pi*(d**2))/4 ) # in A\n",
      "print \"The current flowing in the wire = %0.3f A \" %I\n",
      "v = miu_e*E # in m/s\n",
      "print \"The electron drift velocity = %0.1e m/s \" %v"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The charge density of free electrons = 1.133e+29 /m**3 \n",
        "The current density = 1.16e+06 A/m**2 \n",
        "The current flowing in the wire = 3.644 A \n",
        "The electron drift velocity = 6.4e-05 m/s \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.6\n",
      " - Page No : 25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "l = 1 # in cm\n",
      "l = l * 10**-2 # in m\n",
      "A = 1 # in mm**2\n",
      "A = A * 10**-6 # in m**2\n",
      "R = 100 # in ohm\n",
      "rho = (R*A)/l # in ohm-m\n",
      "sigma = 1/rho \n",
      "e = 1.6*10**-19 # in C\n",
      "miu_e = 1350 # in cm**2/V-s\n",
      "miu_e = miu_e * 10**-4 # in m**2/V-s\n",
      "n = sigma/(e*miu_e) # in /m**3\n",
      "print \"The dopant density = %0.2e /m**3\" %n\n",
      "\n",
      "# Note: The unit of the answer is wrong because 0.0463*10**23/m**3 = 4.63*10**21/m**3, not in /cm**3"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The dopant density = 4.63e+21 /m**3\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.7\n",
      " - Page No : 26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "R = 1 # in k ohm\n",
      "R = R * 10**3 # in ohm\n",
      "L = 400 # in \u00b5m\n",
      "L = L * 10**-6 # in m\n",
      "W = 20 # in \u00b5m\n",
      "W = W * 10**-6 # in m\n",
      "a = L*W # in m**2\n",
      "l = 4 # in mm\n",
      "l = l * 10**-3 # in m\n",
      "rho_i = (R*a)/l # in ohm-m\n",
      "sigma_i = 1/rho_i # in S/m\n",
      "e = 1.6*10**-19 # in C\n",
      "miu_h = 480 # in cm**2/V-s\n",
      "miu_h = miu_h * 10**-4 # in m**2/V-s\n",
      "# sigma_i = p*e*miu_h \n",
      "p = sigma_i/(e*miu_h) # in /m**3\n",
      "print \"The concentration of acceptor atom = %0.2e /m**3 \" %p"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The concentration of acceptor atom = 6.51e+22 /m**3 \n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.8\n",
      " - Page No : 26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "rho = 0.5 # in ohm-m\n",
      "J = 100 # in A/m**2\n",
      "miu_e = 0.4 # in m**2/V-s\n",
      "e = 1.6*10**-19 # in C\n",
      "sigma = 1/rho \n",
      "E = J/sigma \n",
      "v = miu_e*E # in m/s\n",
      "print \"The drift velocity = %0.f m/s \" %v\n",
      "D = 10 # distance of travel in \u00b5m\n",
      "D = D * 10**-6 # in m\n",
      "# Time taken by electron\n",
      "t= D/v # time taken in second \n",
      "print \"The time taken = %0.1e second \" %t"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The drift velocity = 20 m/s \n",
        "The time taken = 5.0e-07 second \n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.9\n",
      " - Page No : 26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "rho = 0.039 # in ohm-cm\n",
      "sigma_n = 1/rho # in mho/cm\n",
      "miu_e = 3600 # in cm**2/V-s\n",
      "e = 1.602*10**-19 # in C\n",
      "# sigma_n = n*e*miu_e = N_D*e*miu_e \n",
      "N_D = sigma_n/(e*miu_e) # in /cm**3\n",
      "n = N_D # in /cm**3\n",
      "print \"The electrons density = %0.2e per cm**3 \" %n\n",
      "n_i = 2.5*10**13 # in /cm**3\n",
      "p = (n_i**2)/n # in /cm**3\n",
      "print \"The hole density = %0.1e per cm**3 \" %p"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electrons density = 4.45e+16 per cm**3 \n",
        "The hole density = 1.4e+10 per cm**3 \n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.10\n",
      " - Page No : 26 "
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "rho_i = 0.47 # in ohm-m\n",
      "sigma_i = 1/rho_i # in S/m\n",
      "miu_e = 0.39 # in m**2/V-s\n",
      "miu_h = 0.19 # in m**2/V-s\n",
      "e = 1.6*10**-19 # in C\n",
      "#sigma_i = n_i*e*(miu_e+miu_h) \n",
      "n_i = sigma_i/( e*(miu_e+miu_h) ) # in /m**3\n",
      "print \"The density of electrons = %0.3e per m**3 \" %n_i\n",
      "E = 10**4 \n",
      "v_n = miu_e*E # in m/s\n",
      "print \"The drift velocity for electrons = %0.f m/s \" %v_n\n",
      "v_h = miu_h*E # in m/s\n",
      "print \"The drift velocity for holes = %0.f m/s \" %v_h"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The density of electrons = 2.293e+19 per m**3 \n",
        "The drift velocity for electrons = 3900 m/s \n",
        "The drift velocity for holes = 1900 m/s \n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.11\n",
      " - Page No : 27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "rho = 3000 # in ohm-m\n",
      "n = 1.1*10**6 # in /m**3\n",
      "e = 1.6*10**-19 # in C\n",
      "#miu_e = 3*miu_h   (i)\n",
      "# miu_e+miu_h = 1/(rho*e*n)    (ii)\n",
      "# From eq (i) and (ii)\n",
      "miu_h = (1/(rho*e*n))/4 # in m**2/V-s\n",
      "print \"The holes mobility = %0.3e m**2/V-s \" %miu_h\n",
      "miu_e = 3*miu_h # in m**2/V-s\n",
      "print \"The electron mobility = %0.2e m**2/V-s \" %miu_e\n",
      "\n",
      "# Note: The calculated value of hole mobility is wrong ."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The holes mobility = 4.735e+08 m**2/V-s \n",
        "The electron mobility = 1.42e+09 m**2/V-s \n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.12\n",
      " - Page No : 27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "n_i = 2.5*10**13 # in /cm**3\n",
      "miu_e = 3800 #in cm**2/V-s\n",
      "miu_h = 1800 # in m**2/V-s\n",
      "e = 1.6*10**-19 # in C\n",
      "sigma_i = n_i*e*(miu_e+miu_h) # in (ohm-cm)**-1\n",
      "print \"The intrinsic conductivity = %0.4f (ohm-cm)**-1 \" %sigma_i\n",
      "n = 4.4*10**22 \n",
      "impurity = 10**-7 \n",
      "N_D = n*impurity # in /cm**3\n",
      "n = N_D # in /cm**3\n",
      "p = (n_i**2)/N_D # in holes/cm**3\n",
      "sigma_n = e*N_D*miu_e # in (ohm-cm)**-1\n",
      "print \"The conductivity in N-type Ge semiconductor = %0.2f (ohm-cm)**-1 \" %sigma_n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The intrinsic conductivity = 0.0224 (ohm-cm)**-1 \n",
        "The conductivity in N-type Ge semiconductor = 2.68 (ohm-cm)**-1 \n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.13\n",
      " - Page No : 27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "e = 1.6*10**-19 # in C\n",
      "miu_e = 0.38 # in m**2/V-s\n",
      "miu_h = 0.18 # in m**2/V-s\n",
      "V = 10 # in V\n",
      "l = 25 # in mm\n",
      "l = l * 10**-3 # in m\n",
      "w = 4 # in mm\n",
      "w = w * 10**-3 # in m\n",
      "t= 1.5*10**-3 # in m\n",
      "E = V/l # in V/m\n",
      "v_e = miu_e*E # in m/s\n",
      "print \"The electron drift velocity = %0.f m/s \" %v_e\n",
      "v_h = miu_h*E # in m/s\n",
      "print \"The hole drift velocity = %0.f m/s \" %v_h\n",
      "n_i = 2.5*10**19 # in /m**2\n",
      "sigma_i = n_i*e*(miu_e+miu_h) # in (ohm-cm)**-1\n",
      "print \"The interinsic conductivity of Ge = %0.2f (ohm-cm)**-1 \" %sigma_i\n",
      "A = w*t # in m**2\n",
      "I = sigma_i*E*A # in A\n",
      "I = I * 10**3 # in mA\n",
      "print \"The total current = %0.3f mA \" %I"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electron drift velocity = 152 m/s \n",
        "The hole drift velocity = 72 m/s \n",
        "The interinsic conductivity of Ge = 2.24 (ohm-cm)**-1 \n",
        "The total current = 5.376 mA \n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.14\n",
      " - Page No : 28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "I_electrons = 3/4 \n",
      "I_holes= 1/4 \n",
      "v_h = 1 \n",
      "v_e = 3 \n",
      "ratio = (I_electrons/I_holes)*(v_h/v_e) \n",
      "print \"Ratio of electrons to holes = %0.f\" %ratio "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of electrons to holes = 1\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.15\n",
      " - Page No : 28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "miu_e = 0.17 # in m**2/V-s\n",
      "miu_h = 0.025 # in m**2/V-s\n",
      "e = 1.602*10**-19 # in C\n",
      "T = 27 # in degree C\n",
      "T = T + 273 # in K\n",
      "kdas = 1.38*10**-23 # in J/K\n",
      "De = miu_e*( (kdas*T)/e ) # in m**-2/s\n",
      "De = De * 10**4 # in cm**2/s\n",
      "print \"The diffusion coefficients of electrons = %0.2f cm**2/s\" %De\n",
      "Dh = miu_h*( (kdas*T)/e ) # in m**2/s\n",
      "Dh = Dh * 10**4 # in cm**2/s\n",
      "print \"The diffusion coefficients of holes = %0.2f cm**2/s\" %Dh"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The diffusion coefficients of electrons = 43.93 cm**2/s\n",
        "The diffusion coefficients of holes = 6.46 cm**2/s\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.16\n",
      " - Page No : 28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "N = 3*10**25 # in /m**3\n",
      "e = 1.602*10**-19 # in C\n",
      "E_G = 1.1 # in eV\n",
      "E_G = E_G*e # in J\n",
      "kdas = 1.38*10**-23 # in J/K\n",
      "T = 300 # in K\n",
      "miu_e = 0.14 # in m**2/V-s\n",
      "miu_h = 0.05 # in m**2/V-s\n",
      "n_i = N*(exp((-E_G)/(2*kdas*T))) # in /m**3\n",
      "print \"The interinsic carrier concentration = %0.3e /m**3 \" %n_i\n",
      "sigma = n_i*e*(miu_e+miu_h) # in S/m\n",
      "print \"The conductivity of silicon = %0.3e S/m \" %sigma"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The interinsic carrier concentration = 1.715e+16 /m**3 \n",
        "The conductivity of silicon = 5.219e-04 S/m \n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.17\n",
      " - Page No : 28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "Je = 360 # in A/cm**2\n",
      "T = 300 # in K\n",
      "d = 1.5 # in mm\n",
      "d = d * 10**-1 # in cm\n",
      "e = 1.6*10**-19 # in C\n",
      "delta = 2*10**18-5*10**17 # assumed\n",
      "dnBYdx = delta/d \n",
      "De = Je/(e*dnBYdx) # in cm**2/s\n",
      "V_T = T/11600 \n",
      "miu_e = De/V_T # in cm**2/V-s\n",
      "print \"The mobility of electrons = %0.f cm**2/V-s \" %miu_e"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The mobility of electrons = 8700 cm**2/V-s \n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.18\n",
      " - Page No : 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " #Given data\n",
      "E_CminusE_F = 0.24 # in eV\n",
      "T = 300 # in K\n",
      "T1 = 350 # in K\n",
      "# E_CminusE_F = K*T*log(n_c/N_D) (i)\n",
      "# E_CminusE_F1 =K*T1*log(n_C/N_D) (ii)\n",
      "# From eq(i) and (ii)\n",
      "E_CminusE_F1 = E_CminusE_F*(T1/T) # in eV\n",
      "print \"The new position of the Fermi level lies \",round(E_CminusE_F1,2),\" eV below the conduction band\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The new position of the Fermi level lies  0.28  eV below the conduction band\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example : 1.19\n",
      " - Page No : 30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log \n",
      "#Given data\n",
      "E_FminusE_V = 0.39 # in eV\n",
      "kT = 0.026 # in ev\n",
      "#N_A1 = n_V * (%e**(-E_FminusE_V)/kT)       (i)\n",
      "# N_A2=3*N_A1=n_V * (%e**(-E_F2minusE_V)/kT)    (ii)\n",
      "#From eq(i) and (ii)\n",
      "E_F2minusE_V = kT*(15-log(3)) # in eV\n",
      "print \"The new position of fermi level = %0.2f eV \" %E_F2minusE_V"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The new position of fermi level = 0.36 eV \n"
       ]
      }
     ],
     "prompt_number": 20
    }
   ],
   "metadata": {}
  }
 ]
}