{
 "metadata": {
  "name": "",
  "signature": "sha256:d42b95d086e994736fd89da8bf44c85325c991b363e30dcf52a4839620130b97"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Ch-3 Electroluminescent Sources"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.1  Page no 80"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import log\n",
      "#Calculation of barrier potential\n",
      "#Given data\n",
      "p=5#                        # Resistivity of p-region\n",
      "n=2#                        # Resistivity of n-region\n",
      "mu=3900#\n",
      "k=0.026#                    #Boltzmann constant\n",
      "ni=2.5*10**13#              #Density of the electron hole pair\n",
      "e=1.6*10**-19#              #charge of electron\n",
      " \n",
      "#Barrier potential calculation\n",
      "r0=(1/p)#          # Reflection at the fiber air interface \n",
      "r1=(1/n)#\n",
      "m=r1/(mu*e)#\n",
      "p=6.5*10**14#       #Density of hole in p -region\n",
      "Vb=k*log(p*m/ni**2)#\n",
      "print \"Barrier potential = %0.3f V\"%Vb\n",
      "\n",
      "# The answers vary due to round off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Barrier potential = 0.175 V\n"
       ]
      }
     ],
     "prompt_number": 19
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.15 Page no 484"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Calculation of external efficiency \n",
      "#Given data\n",
      "ne1=0.20#       #Total efficiency \n",
      "V=3#            # Voltage applied\n",
      "Eg=1.43#        # Bandgap energy\n",
      "\n",
      "# External efficiency\n",
      "ne=(ne1*Eg/V)*100#\n",
      "print \"External efficiency of the device = %0.1f %% \"%(ne)#"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "External efficiency of the device = 9.5 % \n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.16 Page no 484"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import exp\n",
      "#  Calculation of ratio of threshold current densities\n",
      "# Given data\n",
      "To1=160#                     # Device temperature\n",
      "To2=55#                      # Device temperature\n",
      "T1=293#\n",
      "T2=353#\n",
      "J81=exp(T1/To1)#            # Threshold current density \n",
      "J21=exp(T2/To1)#\n",
      "J82=exp(T1/To2)## \n",
      "J22=exp(T2/To2)## \n",
      "cd1=J21/J81#               # Ratio of threshold current densities\n",
      "cd2=J22/J82#\n",
      "\n",
      "print\"Ratio of threshold current densities= %0.2f  \"%(cd1)\n",
      "print\"Ratio of threshold current densities= %0.2f  \"%(cd2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Ratio of threshold current densities= 1.45  \n",
        "Ratio of threshold current densities= 2.98  \n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.17 Page no 484"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Computation of conversion efficiency \n",
      "#Given data\n",
      "i=10*10**-6#            # Device current\n",
      "p=5#                  # Electrical power\n",
      "op=50 *10**-6#         # Optical power\n",
      "ip=5*10*10**-3#        # Input power\n",
      "\n",
      "#Conversion efficiency\n",
      "c=op/ip*100#              \n",
      "print \"Conversion efficiency = %0.1f %% \"%(c)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Conversion efficiency = 0.1 % \n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.18 Page no 485"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Calculation of total power emitted\n",
      "#Given data\n",
      "r=0.7#            # Emissivity\n",
      "r0=5.67*10**-8#    # Stephen's constant\n",
      "A=10**-4#          # Surface area\n",
      "T=2000#           # Temperature\n",
      "\n",
      "# Total power emitted\n",
      "P=r*r0*A*T**4#                     \n",
      "\n",
      "print\"Total power emitted = %0.1f Watts \"%P"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total power emitted = 63.5 Watts \n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.19 Page no 485"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Computation of total energy\n",
      "#Given data\n",
      "h=6.63*10**-34#        # Planck constant\n",
      "v=5*10**14#            # Bandgap frequency of laser\n",
      "N=10**24#              # Population inversion density\n",
      "V=10**-5#              # Volume of laser medium\n",
      "\n",
      "# Total energy\n",
      "E=(1/2)*h*v*(N)*V#           \n",
      "\n",
      "print \"Total energy = %0.1f J \"%E"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total energy = 1.7 J \n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 3.20 Page no 485"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Computation of pulse power\n",
      "# Given data\n",
      "L=0.1#               # Length of laser\n",
      "R=0.8#               # Mirror reflectance of end mirror\n",
      "E=1.7#               # Laser pulse energy\n",
      "c=3*10**8#            # Velocity of light\n",
      "t=L/((1-R)*c)#         # Cavity life time\n",
      "\n",
      "# Pulse power\n",
      "p=E/t#                       \n",
      "\n",
      "print\"Pulse power = %0.0f W \"%p"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pulse power = 1020000000 W \n"
       ]
      }
     ],
     "prompt_number": 20
    }
   ],
   "metadata": {}
  }
 ]
}