{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 9: Dielectrics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.1, Page 9.11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "E = 10**6 # electric field inside the plates in V/m\n",
      "d = 0.02 # distance between the plates in meter\n",
      "k = 3 # dielectric constant of slab\n",
      "e_ = 8.85e-12 # electric permittivity of air in C^2/Nm^2\n",
      "\n",
      "#Calculations\n",
      "D = e_*k*E\n",
      "P = D-e_*E\n",
      "\n",
      "#Result\n",
      "print \"Polarization vector is %.2e C/m^2 \\nDisplacement vector is %.3e C/m^2\"%(P,D)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Polarization vector is 1.77e-05 C/m^2 \n",
        "Displacement vector is 2.655e-05 C/m^2\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.2, Page 9.11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "# Given \n",
      "E1 = 3*10**5 # electric intensity when space between plates evacuated in V/m\n",
      "E2 = 1*10**5 # electric intensity when space between plates is filled with dielectric in V/m\n",
      "e_ = 8.85e-12 # electric permittivity of air in C^2/Nm^2\n",
      "\n",
      "#calculation\n",
      "sigma = e_*(E1 - E2)\n",
      "\n",
      "#result\n",
      "print \"The included charge density on the surface of the dielectric is %.2e C/m^2\"%sigma"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The included charge density on the surface of the dielectric is 1.77e-06 C/m^2\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.3, Page 9.11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "E = 1*10**5 # electric field strength inside the plates in V/m\n",
      "d = 6. # distance between the plates in mm\n",
      "k = 2.8 # dielectric constant of slab\n",
      "e_ = 8.85e-12 # electric permittivity of air in C^2/Nm^2\n",
      "\n",
      "#Calculations\n",
      "P = e_*(k-1)*E\n",
      "D = e_*k*E\n",
      "energy_density = 1./2 * k*e_*E**2\n",
      "\n",
      "#Result\n",
      "print \"Polarization vector is %.1e C/m^2 \\nDisplacement vector is %.1eC/m^2 \\nEnergy density is %.3f J/m^3\"%(P,D,energy_density )"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Polarization vector is 1.6e-06 C/m^2 \n",
        "Displacement vector is 2.5e-06C/m^2 \n",
        "Energy density is 0.124 J/m^3\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.4, Page 9.12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "D = 5e-4 # electric displacement vector in C/m^2\n",
      "P = 4e-4 # electric polarization vector in C/m^2\n",
      "v = 0.5 # volume of the slab in m^3\n",
      "e_ = 8.85e-12 # electric permittivity of air in C^2/Nm^2\n",
      "\n",
      "#Calculations\n",
      "E= (D-P)/ e_\n",
      "k = D/(e_*E)\n",
      "p = P*v\n",
      "energy_density = 1./2 * k*e_*E**2\n",
      "\n",
      "#Result\n",
      "print \"Value of relative permittivity is %d \\nTotal dipole moment of the slab is %.e C-m\"%(k,p) "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Value of relative permittivity is 5 \n",
        "Total dipole moment of the slab is 2e-04 C-m\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.5, Page .12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given that\n",
      "E = 3e4 # external field in V/m\n",
      "k = 1.00074 # dielectric constant of gas at N.T.P.\n",
      "e_ = 8.85e-12 # electric permittivity of air in C^2/Nm^2\n",
      "\n",
      "#Calculations\n",
      "x = k-1\n",
      "P = x*e_*E\n",
      "N = 6.023e23/22.4e-3\n",
      "p = P/N\n",
      "\n",
      "#Result\n",
      "print \"Induce dipole moment of each is %.2e C-m\"%p"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Induce dipole moment of each is 7.31e-36 C-m\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 9.6, Page .13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Given \n",
      "E = 3e4 # external field in V/m\n",
      "k = 1.000041 # dielectric constant of gas at 0 degree centigrate\n",
      "\n",
      "#calculation\n",
      "x = k-1\n",
      "\n",
      "#Result\n",
      "print \"Electric susceptibility at 0 degree centigrate is %.1e\"%x"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Electric susceptibility at 0 degree centigrate is 4.1e-05\n"
       ]
      }
     ],
     "prompt_number": 8
    }
   ],
   "metadata": {}
  }
 ]
}