{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 18: Dielectric Materials"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.1, page no-460"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Relative permitivity of KCl\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "atom=4                             # number of atoms             \n",
      "kci=0.629*10**-9                   # LAttice parameter of KCl   \n",
      "alfk=1.264*10**-40                 # electronic polarisability for K+ ion\n",
      "alfCl=3.408*10**-40                # electronic polarisability for Cl- ion\n",
      "eps0=8.854*10**-12                 # permitivity of free space\n",
      "\n",
      "# Calculations\n",
      "pol=alfk+alfCl\n",
      "N=atom/kci**3\n",
      "epsr=(N*pol/eps0)+1\n",
      "\n",
      "#Result\n",
      "print(\"\\nThe electronic polarisability for KCL = %.3f *10^-40 F m^2\\n\"%(pol*10**40))\n",
      "print(\"\\nThe no of Dipoles per m^3 = %.3f * 10^28 atoms m^-3\\n\"%(N/10**28))\n",
      "print(\"\\nThe dielectric constant of KCL is %.3f\"%epsr)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "The electronic polarisability for KCL = 4.672 *10^-40 F m^2\n",
        "\n",
        "\n",
        "The no of Dipoles per m^3 = 1.607 * 10^28 atoms m^-3\n",
        "\n",
        "\n",
        "The dielectric constant of KCL is 1.848\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.2, page no-460"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# electronic polarisability\n",
      "\n",
      "import math\n",
      "#variable declarations\n",
      "r=0.12*10**-9                  # atomic radius of Se\n",
      "eps=8.854*10**-12              # permitivity of free space \n",
      "\n",
      "# Calculations\n",
      "alf=4*math.pi*eps*r**3\n",
      "\n",
      "# Result\n",
      "print(\"The electronic polarisability of an isolated Se is %.4f * 10^-40 F m^2\"%(alf*10**40))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic polarisability of an isolated Se is 1.9226 * 10^-40 F m^2\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.3, page no-461"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#electronic to ionic polarability ratio\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "n=2.69                         # refraction index\n",
      "er=4.94                        # dielectric cnstant\n",
      "\n",
      "# calculations\n",
      "alfi_by_alfe=(((n+2)*(er-1))/((er+2)*(n-1)))-1\n",
      "\n",
      "# Result\n",
      "print(\"The ratio of the electronic to ionic polarability is %.4f\"%(1/alfi_by_alfe))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ratio of the electronic to ionic polarability is 1.7376\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.4, page no-462"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# dielectric constant\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "N= 2.7*10**25                # number of atoms\n",
      "alfe=0.35*10**-40            # electronic polarisability \n",
      "eps=8.854*10**-12            # permitivity of free space\n",
      "\n",
      "# calculations\n",
      "epsr=(1+(2*N*alfe)/(3*eps))/(1-(N*alfe)/(3*eps))\n",
      "\n",
      "# Result\n",
      "print(\"The dielectric constant of Ne gas is %.8f\"%epsr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The dielectric constant of Ne gas is 1.00010674\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.5, page no-462"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# charge on the capacitor\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "eps=8.85*10**-12               # permitivity of free space\n",
      "epsr=6                         # relative permitivity of dielectric\n",
      "A=5*10**-4                     # Area of the capacitor plate  \n",
      "d=1.5*10**-3                   # distance between the plates\n",
      "v=100                          # Applied voltage\n",
      "\n",
      "# calculations\n",
      "Q=eps*epsr*A*v/d\n",
      "\n",
      "# Result\n",
      "print(\"The charge on the capacitor is %.2f * 10^-9 C\"%(Q*10**9))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The charge on the capacitor is 1.77 * 10^-9 C\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.6, page no-463"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# dielectric constant\n",
      "\n",
      "import math\n",
      "# variable declaration\n",
      "N=2.7*10**25                    # Number of Ar atoms\n",
      "d=0.384*10**-9                  # diameter of Ar atom\n",
      "eps=8.854*10**-12               # permitivity of free space\n",
      "\n",
      "# calculations\n",
      "alfe=4*math.pi*eps*d**3\n",
      "alfe=alfe*10**-2                # correction\n",
      "epsr=(1+((2*N*alfe)/(3*eps)))/(1-((N*alfe)/(3*eps)))\n",
      "\n",
      "# Result\n",
      "print(\"The dielectric constant of Ar  is %.8f\"%(epsr))\n",
      "# correction is to match the answer in the book \n",
      "# answer for alfe is given as 0.63 * 10^-40 but it is actually 0.63* 10^-38."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The dielectric constant of Ar  is 1.00019213\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.7, page no-464"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Energy stored\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "c=2*10**-6                     # capacitance\n",
      "epsr=80                        # permitivity of the dielectric\n",
      "v=1000                         # Applied voltage\n",
      "\n",
      "#Calculations\n",
      "E1=(c*v**2)/2\n",
      "c0=c/epsr\n",
      "E2=(c0*v**2)/2\n",
      "E=E1-E2\n",
      "\n",
      "# Result\n",
      "print(\"\\nThe Energy stored in capacitor =%.0f J\"%E1)\n",
      "print(\"\\nThe energy stored in polarising the capacitor = %.4f J\"%E)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "The Energy stored in capacitor =1 J\n",
        "\n",
        "The energy stored in polarising the capacitor = 0.9875 J\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.8, page no-464"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# nternal field to applied field ratio\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "N=5*10**28                  # no of atoms present per m^3\n",
      "alfe=2*10**-40              # Polarisability    \n",
      "eps=8.854*10**-12           # permitivity of free space\n",
      "\n",
      "\n",
      "# Calculations\n",
      "P=N*alfe\n",
      "E_ratio=1/(1-(P/(3*eps)))\n",
      "\n",
      "# Result\n",
      "print(\"The ratio of the internal field to the applied field = %.4f\"%E_ratio)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The ratio of the internal field to the applied field = 1.6038\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.9, page no-465"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# relative permitivity\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "E=1000                           # Applied electric field\n",
      "P=4.3*10**-8                     # Polarisation\n",
      "eps=8.854*10**-12                # permitivity of free space\n",
      "\n",
      "# calculations\n",
      "epsr=1+P/(eps*E)\n",
      "\n",
      "#Result\n",
      "print(\"The relative permitivity of NaCl is %.2f\"%epsr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The relative permitivity of NaCl is 5.86\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.10, page no-466"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#polarisability of argon atom\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "epsr=1.0024                   # relative permitivity\n",
      "N=2.7*10**25                  # Number of atoms\n",
      "eps=8.854*10**-12             # permitivity of free space\n",
      "\n",
      "# calculations\n",
      "alfe=eps*(epsr-1)/N\n",
      "\n",
      "#Result\n",
      "print(\"The polarisability of argon atom is %.1f * 10^-40 F m^2\"%(alfe*10**40))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The polarisability of argon atom is 7.9 * 10^-40 F m^2\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.11, page no-466"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# electronic polarisability\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "epsr=1.0000684                     # Dielectric constant of the gas at NTP\n",
      "N=2.7*10**25                       # Number of He atoms\n",
      "eps=8.854*10**-12                  # permitivity of free space\n",
      "\n",
      "#calculations\n",
      "alfe=eps*(epsr-1)/N\n",
      "\n",
      "#Result\n",
      "print(\"The electronic polarisability of He atom at NTP is %.3f * 10^-41 F m^2\"%(alfe*10**41))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic polarisability of He atom at NTP is 2.243 * 10^-41 F m^2\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.12, page no-467"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# electronic polarisability\n",
      "\n",
      "import math\n",
      "# variable declaration\n",
      "epsr=12                      # relative dielectric constant of material\n",
      "N=5*10**28                   # number of atoms in the element\n",
      "eps=8.854*10**-12            # permitivity of free space\n",
      "\n",
      "#Calculations\n",
      "alfe=eps*(epsr-1)/N\n",
      "\n",
      "# result\n",
      "print(\"The electronic polarisability of given element is %.3f * 10^-39 F m^2\"%(math.floor(alfe*10**39*1000)/1000))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic polarisability of given element is 1.947 * 10^-39 F m^2\n"
       ]
      }
     ],
     "prompt_number": 22
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.13, page no-467"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# energy stored in dielectric\n",
      "\n",
      "import math\n",
      "# variable declaration\n",
      "c=2*10**-6                    # capacitance of plate condenser\n",
      "v=1000                        # applied voltage\n",
      "epsr=100                      # dielectric permitivity\n",
      "\n",
      "# calculations\n",
      "E=(c*v**2)/2\n",
      "c0=c/epsr\n",
      "e2=(c0*v**2)/2\n",
      "E1=E-e2\n",
      "\n",
      "# Result\n",
      "print(\"The energy stored in dielectric is %.2f J\"%E1)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The energy stored in dielectric is 0.99 J\n"
       ]
      }
     ],
     "prompt_number": 23
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.14, page no-468"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# electronic polarisability\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "epsr=3.4                        # dielectric constant of sulphur \n",
      "eps=8.854*10**-12               # permitivity of free space\n",
      "d=2.07*10**3                    # density of sulphur \n",
      "w=32.07                         # Atomic weight\n",
      "Avg=6.023*10**23                # avogadro's number\n",
      "\n",
      "# calculations\n",
      "N=Avg*10**3*d/w\n",
      "N= (math.ceil(N*10**-26))/10**-26\n",
      "alfe=3*eps*(epsr-1)/(N*(epsr+2))\n",
      "\n",
      "#Result\n",
      "print(\"The electronic polarisability of sulphur is %.3f * 10^-40 F.m^2\"%(alfe*10**40))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic polarisability of sulphur is 3.035 * 10^-40 F.m^2\n"
       ]
      }
     ],
     "prompt_number": 43
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.15, page no-469"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# charge stored and polarisation produced in the plate\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "A=6.45*10**-4                  # Area of the capacitor plate\n",
      "d=2*10**-3                     # distance between plates\n",
      "epsr=6                         # relative permitivity \n",
      "v=10                           # applied voltage \n",
      "eps=8.854*10**-12              # permitivity in free space\n",
      "\n",
      "\n",
      "# calculations\n",
      "c=eps*epsr*A/d\n",
      "q=c*v\n",
      "E=v/d\n",
      "p=eps*(epsr-1)*E\n",
      "\n",
      "# Result\n",
      "print(\"Capacitance of Capacitor = %.2f pF\"%(c*10**12))\n",
      "print(\"\\ncharge stored on the plate is %.2f *10^-11 C\"%(q*10**11))\n",
      "print(\"\\nPolarisation produce in the plate is %.3f *10^-7 Cm^-2\"%(math.ceil(p*10**7*1000)/1000))\n",
      "# answer forstored charge is wrong in the book"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Capacitance of Capacitor = 17.13 pF\n",
        "\n",
        "charge stored on the plate is 17.13 *10^-11 C\n",
        "\n",
        "Polarisation produce in the plate is 2.214 *10^-7 Cm^-2\n"
       ]
      }
     ],
     "prompt_number": 53
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.16, page no-470"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Polarisation produced in NaCl\\\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "E=600*10**3                      # electric field strength\n",
      "eps=8.854*10**-12                # permitivity in free space   \n",
      "epsr=6                           # dielectric constant of sodium chloride\n",
      "\n",
      "# calculations\n",
      "p=eps*(epsr-1)*E\n",
      "\n",
      "# Result\n",
      "print(\"Polarisation produced in NaCl is %.3f *10^-5 C.m^-2\"%(p*10**5))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Polarisation produced in NaCl is 2.656 *10^-5 C.m^-2\n"
       ]
      }
     ],
     "prompt_number": 54
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.17, page no-470"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Relative permitivity\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "E=1000                      # applied electric field\n",
      "p=4.3*10**-8                # Polarisation   \n",
      "eps=8.854*10**-12           # permitivity of free space\n",
      "\n",
      "#Calculations\n",
      "epsr=1+p/(eps*E)\n",
      "\n",
      "#Result\n",
      "print(\"Relative permitivity of NaCl is %.2f\"%epsr)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Relative permitivity of NaCl is 5.86\n"
       ]
      }
     ],
     "prompt_number": 55
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.18, page no-471"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# voltage across capacitor and electric field strength\n",
      "\n",
      "import math\n",
      "# variable declaration\n",
      "A=1000*10**-6               # Area of the capacitor plate\n",
      "d=5*10**-3                  # distance between the plate\n",
      "epsr=4                      # relative permitivity of the dielectric\n",
      "Q=3*10**-10                 #charge on the capacitor \n",
      "eps=8.854*10**-12           # permitivity of free space\n",
      "\n",
      "# Calculations\n",
      "c=(eps*epsr*A)/d\n",
      "v=Q/c\n",
      "E=v/d\n",
      "\n",
      "# Result\n",
      "print(\"The voltage across capacitor is %.2f V\\nThe electric field strength is %d V/m\"%(v,E))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The voltage across capacitor is 42.35 V\n",
        "The electric field strength is 8470 V/m\n"
       ]
      }
     ],
     "prompt_number": 57
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.19, page no-472"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# electronic polarisability\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "epsr=1.0000684                    # dielectric constant of the gas at NTP\n",
      "N=2.7*10**25                      # Number of He atoms \n",
      "eps=8.85*10**-12                  # permitivuty of free space\n",
      "\n",
      "# calculations\n",
      "alfe=eps*(epsr-1)/N\n",
      "\n",
      "# Result\n",
      "print(\"The electronic polarisability of He atoms at NTP is %.3f *10^-41 F.m^2\"%(alfe*10**41))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The electronic polarisability of He atoms at NTP is 2.242 *10^-41 F.m^2\n"
       ]
      }
     ],
     "prompt_number": 61
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.20, page no-472"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Capacitance and electric field strength\n",
      "\n",
      "import math\n",
      "# Variable declaration\n",
      "A=3*10**-3                     # area of the capacitor plate\n",
      "d=1*10**-3                     # distance between the plate\n",
      "epsr=3.5                       # relative permitivity of the dielectric\n",
      "Q=20*10**-9                    # charge on the capacitor\n",
      "eps=8.85*10**-12              # permitivity of free space\n",
      "\n",
      "# calculations\n",
      "c=eps*epsr*A/d\n",
      "E=Q/(c*d)\n",
      "\n",
      "# Result\n",
      "print(\"The capacitance of capacitor is %.2f pF\"%(math.ceil(c*10**14)/100))\n",
      "print(\"The electric field strength is %.2f*10^3 V/m\"%(math.floor(E*10**-1)/100))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The capacitance of capacitor is 92.93 pF\n",
        "The electric field strength is 215.22*10^3 V/m\n"
       ]
      }
     ],
     "prompt_number": 71
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.21, page no-473"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# capacitance, stored charge, polarisation and dielectric displacement\n",
      "\n",
      "import math\n",
      "# variable declaration\n",
      "A=7.45*10**-4                        # Area of the capacitor plates\n",
      "d=2.45*10**-3                        # distance between the plates\n",
      "epsr=6                               # relative permitivity of the dielectric \n",
      "v=10                                 # applied voltage \n",
      "eps=8.85*10**-12                    # permitivity of free space\n",
      "\n",
      "#Calculations\n",
      "c=eps*epsr*A/d\n",
      "Q=c*v\n",
      "E=v/d\n",
      "p=eps*(epsr-1)*E\n",
      "D=eps*epsr*E\n",
      "\n",
      "# Result\n",
      "print(\"\\nThe capacitance of the capacitor is %.3f pF\"%(c*10**12))\n",
      "print(\"\\nCharge stored on capacitor = %.3f *10^-11 C\\n\\nE=%.2f*10^3 V/m\"%(Q*10**11,E*10**-3))\n",
      "print(\"\\nPolarisation=%.3f*10^-7 C.m^-2\\n\\ndielectric displacement = %.3f*10^-7 C.m^-2\"%(p*10**7,D*10**7))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "\n",
        "The capacitance of the capacitor is 16.147 pF\n",
        "\n",
        "Charge stored on capacitor = 16.147 *10^-11 C\n",
        "\n",
        "E=4.08*10^3 V/m\n",
        "\n",
        "Polarisation=1.806*10^-7 C.m^-2\n",
        "\n",
        "dielectric displacement = 2.167*10^-7 C.m^-2\n"
       ]
      }
     ],
     "prompt_number": 77
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.22, page no-475"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# polarisation produced\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "E=500                          # electric field strength\n",
      "epsr=6                         # dielectric constant of sodium cloride\n",
      "eps=8.854*10**-12              # permitivity of free space\n",
      "\n",
      "# calculations\n",
      "p=eps*(epsr-1)*E\n",
      "\n",
      "# Result\n",
      "print(\"The polarisation produced in NaCl is %.3f * 10^-8 C.m^-2\"%(math.ceil(p*10**11)/1000))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The polarisation produced in NaCl is 2.214 * 10^-8 C.m^-2\n"
       ]
      }
     ],
     "prompt_number": 91
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.23, page no-475"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# polarisation produced in NaCl\n",
      "\n",
      "import math\n",
      "#Variable declaration\n",
      "E=500                           # electric field strength\n",
      "epsr=15                         # dielectric constant of sodium cloride       \n",
      "eps=8.854*10**-12               # permitivity of free space\n",
      "\n",
      "#calculations\n",
      "p=eps*(epsr-1)*E\n",
      "\n",
      "#Result\n",
      "print(\"The polarisation produced in NaCl is %.3f * 10^-8 C.m^-2\"%(p*10**8))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The polarisation produced in NaCl is 6.198 * 10^-8 C.m^-2\n"
       ]
      }
     ],
     "prompt_number": 92
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.24, page no-475"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Voltage across capacitor\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "A=650*10**-6                              # Area of the capacitor plate          \n",
      "d=4 *10**-3                               # distance between the plates\n",
      "epsr=3.5                                  # relative permitivity of the dielectric\n",
      "eps=8.85*10**-12                          # permitivity of free space \n",
      "q=2*10**-10                               # charge on the capacitor\n",
      "\n",
      "# calculations\n",
      "v=q*d/(eps*epsr*A)\n",
      "\n",
      "# Result\n",
      "print(\"The voltage across capacitor is %.2f V\"%v)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The voltage across capacitor is 39.73 V\n"
       ]
      }
     ],
     "prompt_number": 97
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.25, page no-476"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# charge on the capacitor\n",
      "\n",
      "import math\n",
      "# variable declaration\n",
      "A=5*10**-4                           # Area of the capacitor plates\n",
      "d=1.5*10**-3                         # Distance between the plates\n",
      "epsr=6                               # Relative permitivity of the dielectric\n",
      "v=100                                # Applied voltage\n",
      "eps=8.854*10**-12                    # permitivity of free space\n",
      "\n",
      "#calculation\n",
      "q=eps*epsr*A*v/d\n",
      "\n",
      "#Result\n",
      "print(\"The charge on the capacitor is %.2f *10^-9 C\"%(q*10**9))"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The charge on the capacitor is 1.77 *10^-9 C\n"
       ]
      }
     ],
     "prompt_number": 98
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 18.26, page no-476"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#dielectric constant\n",
      "\n",
      "import math\n",
      "#variable declaration\n",
      "d=2.08*10**3                 # density of sulphur\n",
      "wt=32                        # atomic weight of sulphur\n",
      "ep=3.28*10**-40              # electronic polarisability\n",
      "eps=8.854*10**-15            # permeability of free space\n",
      "\n",
      "# Calculations\n",
      "k=(3*10**28*7*10**-40)/(3*eps)\n",
      "epsr=2.5812/(1-0.7906)\n",
      "\n",
      "# result\n",
      "print(\"The dielectric constant of the given material is %.3f\"%epsr)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The dielectric constant of the given material is 12.327\n"
       ]
      }
     ],
     "prompt_number": 3
    }
   ],
   "metadata": {}
  }
 ]
}