{
 "metadata": {
  "name": ""
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 17 : Dielectirc Materials"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 17.1, Page No 414"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "l= 10.0      # length of capacitor in mm\n",
      "b = 10.0     # width of capacitor in mm\n",
      "d = 2.0\t\t # distance of separation in mm\n",
      "c = 1e-9 \t# capacitance in farad\n",
      "epsilon_0 = 8.85e-12 # permittivity of free space\n",
      "\n",
      "#Calculations\n",
      "epsilon_r = c*d*1e-3/(epsilon_0*l*1e-3*b*1e-3)\n",
      "\n",
      "#Calculations\n",
      "print(\" Relative dielectric constant is %d\" %epsilon_r)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " Relative dielectric constant is 2259\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 17.2, Page No 421"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#initialisation of variables\n",
      "Ti_shift= 0.06 \t\t# shift of TI ion in angstrom\n",
      "O_shift = 0.06 \t\t# shift of oxygen ion of side face in angstrom\n",
      "o_shift = 0.08 \t\t#shift of oxygen ion of top and bottom faces in angstrom\n",
      "O_charge  = 2.0 \t# unit charge on oxygen ion of side face\n",
      "o_charge  = 2.0\t\t # unit charge on oxygen ion of top and bottom faces\n",
      "Ti_charge  = 4.0\t # unit charge on titanium ion \n",
      "n_O = 2.0\t\t\t # number of oxygen ion of side face\n",
      "n_o = 1.0\t\t\t # number of oxygen ion of top and bottom face\n",
      "n_Ti = 1.0\t\t\t # number of titanium ion \n",
      "e = 1.6e-19 \t\t# amount of one unit charge in coulomb\n",
      "\n",
      "#Calculations\n",
      "p_Ti = n_Ti*Ti_charge *e*Ti_shift*1e-10\n",
      "p_O = n_O*O_charge*e*O_shift*1e-10\n",
      "p_o = n_o*o_charge*e*o_shift*1e-10\n",
      "Total = p_Ti+p_O+p_o\n",
      "P = Total/(4.03*3.98**2*1e-30)\n",
      "\n",
      "#Results\n",
      "print(\"Polarization of BaTiO3 crystal is %.2f Cm^-2 \" %P)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Polarization of BaTiO3 crystal is 0.16 Cm^-2 \n"
       ]
      }
     ],
     "prompt_number": 2
    }
   ],
   "metadata": {}
  }
 ]
}