{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#13: Dielectrics"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 13.1, Page number 356"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The electron polarisation is 3.945 *10**-7 C/m^2\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "a=3.61*10**-10;    #lattice constant of copper which is Fcc crystal(m)\n",
    "x=1*10**-18;     #average displacement of the electrons relative to the nucleus(m)\n",
    "z=29;     #atomic number of copper\n",
    "n=4;      #number of atoms per unit cell in FCC crystal\n",
    "e=1.6*10**-19;    #charge of electron(c)\n",
    "\n",
    "#Calculation\n",
    "ne=((n*z)/(a*a*a));     #number of electrons(electrons/m^3) \n",
    "P=ne*e*x;    #The electron polarisation(C/m^2)\n",
    "\n",
    "#Result\n",
    "print \"The electron polarisation is\",round(P*10**7,3),\"*10**-7 C/m^2\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 13.2, Page number 356"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The dipole moment of each atom in a field is 1.9646 *10**-35 C m**-3\n",
      "The effective distance at this field strength between the centre and the nucleus is 8.77 *10**-18 m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "rp=11.7;   #relative permittivity of silicon\n",
    "N=4.82*10**28;   #number of atoms per unit volume(atoms/m^3)\n",
    "ro=8.85*10**-12;   #permittivity of free space\n",
    "E=10**4;    #E(Vm^-1)\n",
    "e=1.6*10**-19;   #charge of electron(c)\n",
    "Z=14;     #atomic number of silicon \n",
    "\n",
    "#Calculation\n",
    "z=(ro*(rp-1))/N     #electronic polarisability(Fm^2)\n",
    "mew=z*E;       #The dipole moment of each atom(Cm^-3)\n",
    "x=y/(Z*e);   #The effective distance at this field strength between the centre and the nucleus(m)\n",
    "\n",
    "#Result\n",
    "print \"The dipole moment of each atom in a field is\",round(y*10**35,4),\"*10**-35 C m**-3\"\n",
    "print \"The effective distance at this field strength between the centre and the nucleus is\",round(x*10**18,2),\"*10**-18 m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 13.3, Page number 357"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The electronic polarisability is 1.39 *10**-41 Fm**2\n",
      "The relative permittivity in hydrogen gas is 1.0015\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "d=9.8*10**26;    #density of hydrogen gas(atoms/m^3)\n",
    "r=0.50*10**-10;   #radius of the hydrogen atom(m)\n",
    "ro=8.85*10**-12;   #permittivity of free space\n",
    "\n",
    "#Calculation\n",
    "z=(4*math.pi*ro*r**3)/10**-41;    #electronic polarisability(Fm^2)\n",
    "rp=(((d*z*10**-41)/ro)+1);        #The relative permittivity in hydrogen gas\n",
    "\n",
    "#Result\n",
    "print \"The electronic polarisability is\",round(z,2),\"*10**-41 Fm**2\"\n",
    "print \"The relative permittivity in hydrogen gas is\",round(rp,4)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 13.4, Page number 357"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The static dielectric constant of solid argon is 1.53679\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "z=1.75*10**-40;    #electronic polarisability(Fm^2)\n",
    "d=1.8*10**3;   #density of argon atom(Kg/m^3)\n",
    "Z=39.95;    #atomic weight of argon\n",
    "NA=6.025*10**26;    #Avagadro number(mole^-1)\n",
    "ro=8.85*10**-12;    #permittivity of free space\n",
    "\n",
    "#Calculation\n",
    "N=((NA*d)/Z);     #The number of atoms/unit volume(atoms/m^3) \n",
    "rp=(((N*z)/ro)+1);    #The static dielectric constant of solid argon\n",
    "\n",
    "#Result\n",
    "print \"The static dielectric constant of solid argon is\",round(rp,5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 13.5, Page number 366"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Ratio between electronic and ionic polarisability of this material is 1.7376\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "er=4.94;   #static dielecric constant of a material\n",
    "n=2.69;    #index of friction\n",
    "\n",
    "#Calculation\n",
    "x=((er-1)*(n+2))/((er+2)*(n-1))-1;     #Ratio between ionic and electronic polarisability of this material\n",
    "y=1/x;      #Ratio between electronic and ionic polarisability of this material\n",
    "\n",
    "#Result\n",
    "print \"Ratio between electronic and ionic polarisability of this material is\",round(y,4)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}