{
 "metadata": {
  "name": "",
  "signature": "sha256:d8c62a33cdb998cb212b402408ceb0e19f54a33922b51cf1b80232d50d8d2341"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "6: Dielectric Properties"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.1, Page number 6.23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "C = 2     #capacitance(micro-farad)\n",
      "V = 1000    #voltage applied(V)\n",
      "epsilon_r = 100     #permitivity\n",
      "\n",
      "#Calculation\n",
      "C = C*10**-6      #capacitance(farad)\n",
      "W = (C*V**2)/2      #energy stored in capacitor(J)\n",
      "C0 = C/epsilon_r      #capacitance removing the dielectric\n",
      "W0 = C0*(V**2)/2      #energy stored without dielectric(J)\n",
      "E = 1-W0       #energy stored in dielectric(J)\n",
      "\n",
      "#Result\n",
      "print \"energy stored in capacitor is\",W,\"J\"\n",
      "print \"energy stored in the dielectric is\",E,\"J\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "energy stored in capacitor is 1.0 J\n",
        "energy stored in the dielectric is 0.99 J\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.2, Page number 6.24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "epsilon_r = 4.94\n",
      "n_2 = 2.69     #square of index of refraction\n",
      "alpha_i = 0    #at optical frequencies\n",
      "\n",
      "#Calculation\n",
      "#(epsilon_r-1)/(epsilon_r+2) = N*(alpha_e+alpha_i)/(3*epsilon0)\n",
      "X = (epsilon_r-1)/(epsilon_r+2)\n",
      "#epsilon_r = n**2. therefore (n**2-1)/(n**2+2) = N*alpha_e/(3*epsilon0)\n",
      "Y = (n_2-1)/(n_2+2)\n",
      "#N*(alpha_e+alpha_i)/N*alpha_e = X/Y\n",
      "#let alpha = alpha_i/alpha_e\n",
      "alphai_e = (X/Y)-1     #ratio between electronic ionic and electronic polarizability\n",
      "alphai_e = math.ceil(alphai_e*10**4)/10**4   #rounding off to 4 decimals\n",
      "alphae_i = 1/alphai_e      #ratio between electronic and ionic polarizability\n",
      "alphae_i = math.ceil(alphae_i*10**3)/10**3   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"ratio between electronic ionic and electronic polarizability is\",alphai_e\n",
      "print \"ratio between electronic and ionic polarizability is\",alphae_i"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "ratio between electronic ionic and electronic polarizability is 0.5756\n",
        "ratio between electronic and ionic polarizability is 1.738\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.3, Page number 6.25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "epsilon_r = 2.56\n",
      "tan_delta = 0.7*10**-4\n",
      "f = 1     #frequency(MHz)\n",
      "A = 8     #area(cm**2)\n",
      "d = 0.08     #diameter(mm)\n",
      "epsilon0 = 8.85*10**-12\n",
      "\n",
      "#Calculation\n",
      "A = A*10**-4      #area(m**2)\n",
      "d = d*10**-3     #diameter(m)\n",
      "epsilon_rdash = epsilon_r*tan_delta\n",
      "omega = 2*math.pi*10**6\n",
      "Rp = d/(omega*epsilon0*epsilon_rdash*A)      #parallel loss resistance(ohm)\n",
      "Rp = Rp*10**-6      #parallel loss resistance(Mega ohm)\n",
      "Rp = math.ceil(Rp*10**3)/10**3   #rounding off to 3 decimals\n",
      "Cp = A*epsilon0*epsilon_r/d     #capacitance(farad)\n",
      "\n",
      "#Result\n",
      "print \"parallel loss resistance is\",Rp,\"ohm\"\n",
      "print \"capacitance in Farad is\",Cp,\"Farad\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "parallel loss resistance is 10.036 ohm\n",
        "capacitance in Farad is 2.2656e-10 Farad\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.4, Page number 6.26"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "N = 3*10**28     #density(atoms/m**3)\n",
      "alpha_e = 10**-40    #electronic polarizability(Farad-m**2)\n",
      "epsilon0 = 8.854*10**-12\n",
      "\n",
      "#Calculation\n",
      "epsilon_r = 1+(N*alpha_e/epsilon0)       #dielectric constant of material\n",
      "epsilon_r = math.ceil(epsilon_r*10**3)/10**3   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"dielectric constant of material is\",epsilon_r "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "dielectric constant of material is 1.339\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.5, Page number 6.27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "epsilon0 = 8.854*10**-12\n",
      "epsilon_r = 1.0000684      #dielectric constant\n",
      "N = 2.7*10**25     #density(atoms/m**3)\n",
      "\n",
      "#Calculation\n",
      "alpha_e = epsilon0*(epsilon_r-1)/N        #electronic polarizability(Fm**2)\n",
      "\n",
      "#Result\n",
      "print \"electronic polarizability is\",round(alpha_e/1e-41,3),\"*10^-41 Fm**2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "electronic polarizability is 2.243 *10^-41 Fm**2\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.6, Page number 6.27"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "epsilon0 = 8.85*10**-12\n",
      "V = 100     #potential(V)\n",
      "A = 100     #area(cm**2)\n",
      "d = 1    #plate seperation(cm)\n",
      "\n",
      "#Calculation\n",
      "A = A*10**-4      #area(m**2)\n",
      "d = d*10**-2    #plate seperation(m)\n",
      "C = epsilon0*A/d     #capacitance(farad)\n",
      "Q = C*V     #charge on plates\n",
      "\n",
      "#Result\n",
      "print \"capacitance of capacitor is\",C,\"F\"\n",
      "print \"charge on plates in coulomb is\",Q,\"coulomb\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "capacitance of capacitor is 8.85e-12 F\n",
        "charge on plates in coulomb is 8.85e-10 coulomb\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.7, Page number 6.28"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "N = 6.02*10**26     #avagadro number\n",
      "d = 2050      #density(kg/m**3)\n",
      "AW = 32       #atomic weight of sulphur\n",
      "epsilon_r = 3.75    #relative dielectric constant\n",
      "epsilon0 = 8.55*10**-12\n",
      "\n",
      "#Calculation\n",
      "n = N*d/AW    #number of atoms(per m**3)\n",
      "alpha_e = ((epsilon_r-1)/(epsilon_r+2))*3*epsilon0/n     #electronic polarizability(Fm**2) \n",
      "\n",
      "#Result\n",
      "print \"electronic polarizability is\",round(alpha_e/1e-40,3),\"*10^-40 Fm**2\" "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "electronic polarizability is 3.181 *10^-40 Fm**2\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.8, Page number 6.29"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "Q = 2*10**-10       #charge(coulomb)\n",
      "d = 4     #plate seperation(mm)\n",
      "epsilon_r = 3.5    #dielectric constant\n",
      "A = 650     #area(mm**2)\n",
      "epsilon0 = 8.85*10**-12\n",
      "\n",
      "#Calculation\n",
      "d = d*10**-3      #plate seperation(m)\n",
      "A = A*10**-6     #area(m**2)\n",
      "V = Q*d/(epsilon0*epsilon_r*A)       #voltage across capacitors(V)\n",
      "V = math.ceil(V*10**3)/10**3   #rounding off to 3 decimals\n",
      "\n",
      "#Result\n",
      "print \"resultant voltage across capacitors is\",V,\"V\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "resultant voltage across capacitors is 39.735 V\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example number 6.9, Page number 6.30"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#importing modules\n",
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#Variable declaration\n",
      "V = 10      #potential(V)\n",
      "d = 2*10**-3      #plate seperation(m)\n",
      "epsilon_r = 6\n",
      "epsilon0 = 8.85*10**-12\n",
      "\n",
      "#Calculation\n",
      "E = V/d     #electric field(V/m)\n",
      "D = epsilon0*epsilon_r*E       #dielectric displacement(C/m**2)\n",
      "\n",
      "#Result\n",
      "print \"dielectric displacement is\",D,\"Cm^-2\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "dielectric displacement is 2.655e-07 Cm^-2\n"
       ]
      }
     ],
     "prompt_number": 18
    }
   ],
   "metadata": {}
  }
 ]
}