{
 "metadata": {
  "name": "",
  "signature": "sha256:4021239986e9b103686ab01f7ccbdc5317b1bf2aa2e09bf052e63053a477f649"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter23-Dielectrics"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex1-pg679"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 23.1\n",
      "##calculation of relative permittivity\n",
      "\n",
      "##given values\n",
      "\n",
      "E=1000.;##electric field in V/m\n",
      "P=4.3*10**-8;##polarization in C/m**2\n",
      "e=8.85*10**-12;##permittivity in F/m\n",
      "\n",
      "\n",
      "##calculation\n",
      "er=1.+(P/(e*E));\n",
      "print'%s %.2f %s'%('relative permittivity of NaCl is ',er,'');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relative permittivity of NaCl is  5.86 \n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex2-pg675"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 23.2\n",
      "##calculation of electronic polarizability\n",
      "\n",
      "##given values\n",
      "\n",
      "e=8.85*10**-12;##permittivity in F/m\n",
      "er=1.0024;##relative permittivity at NTP\n",
      "N=2.7*10**25.;##atoms per m**3\n",
      "\n",
      "\n",
      "##calculation\n",
      "alpha=e*(er-1)/N;\n",
      "print'%s %.3e %s'%('electronic polarizability (in F/m^2)is ',alpha,'');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "electronic polarizability (in F/m^2)is  7.867e-40 \n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex3-pg678"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 23.3\n",
      "##calculation of electronic polarizability and relative permittivity\n",
      "\n",
      "##given values\n",
      "\n",
      "e=8.85*10**-12.;##permittivity in F/m\n",
      "N=9.8*10**26.;##atoms per m**3\n",
      "r=.53*10**-10.;##radius in m\n",
      "\n",
      "\n",
      "##calculation\n",
      "alpha=4*math.pi*e*r**3;\n",
      "print'%s %.3e %s'%('electronic polarizability (in F/m**2)is ',alpha,'');\n",
      "er=1+(4*math.pi*N*r**3);\n",
      "print'%s %.2f %s'%('relative permittivity is',er,'')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "electronic polarizability (in F/m**2)is  1.656e-41 \n",
        "relative permittivity is 1.00 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex4-pg681"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 23.4\n",
      "##calculation of electronic polarizability and relative permittivity\n",
      "\n",
      "##given values\n",
      "w=32.;##atomic weight of sulphur \n",
      "d=2.08*10**3.;##density in kg/m**3\n",
      "NA=6.02*10**26.;##avogadros number\n",
      "alpha=3.28*10**-40.;##electronic polarizability in F.m**2\n",
      "e=8.854*10**-12.;##permittiviy\n",
      "##calculation\n",
      "\n",
      "n=NA*d/w;\n",
      "k=n*alpha/(3.*e);\n",
      "er=(1+2*k)/(1.-k);\n",
      "print'%s %.2f %s'%('relative permittivity is',er,'')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "relative permittivity is 3.80 \n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex5-pg682"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 23.5\n",
      "##calculation of ionic polarizability\n",
      "\n",
      "##given values\n",
      "n=1.5;##refractive index\n",
      "er=6.75;##relative permittivity\n",
      "\n",
      "##calculation\n",
      "Pi=(er-n**2.)*100./(er-1.);\n",
      "print'%s %.2f %s'%('percentage ionic polarizability (in %)) is',Pi,'')"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "percentage ionic polarizability (in %)) is 78.26 \n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex6-pg685"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 23.6\n",
      "##calculation of frequency and phase difference\n",
      "\n",
      "##given values\n",
      "t=18*10**-6;##relaxation  time in s\n",
      "\n",
      "##calculation\n",
      "f=1/(2*math.pi*t);\n",
      "print'%s %.2f %s'%('frequency at which real and imaginary part of complx dielectric constant are equal is',f,'');\n",
      "alpha=math.atan(1)*180/math.pi;## phase difference between current and voltage( 1 because real and imaginry parts are equal of the dielectric constant)\n",
      "print'%s %.2f %s'%('phase diffeerence (in degree) is',alpha,'');"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "frequency at which real and imaginary part of complx dielectric constant are equal is 8841.94 \n",
        "phase diffeerence (in degree) is 45.00 "
       ]
      },
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Ex7-pg692"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "##Example 23.7\n",
      "##calculation of frequency\n",
      "\n",
      "##given values\n",
      "t=5.5*10**-3.;##thickness of plate in m\n",
      "Y=8*10**10.;##Young's modulus in N/m**2\n",
      "d=2.65*10**3.;##density in kg/m**3\n",
      "\n",
      "\n",
      "\n",
      "##calculation\n",
      "f=math.sqrt(Y/d)/(2.*t);##in Hz\n",
      "print'%s %.2f %s'%('frequency of fundamental note(in KHz) is',f/10**3,'');\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "frequency of fundamental note(in KHz) is 499.49 \n"
       ]
      }
     ],
     "prompt_number": 7
    }
   ],
   "metadata": {}
  }
 ]
}