{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#6: Dielectric properties"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.1, Page number 6.23"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dielectric constant of material is 1.339\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "N=3*10**28;     #number of atoms(per m**3)\n",
    "alpha_e=10**-40;    #electronic polarizability(F m**2)\n",
    "epsilon0=8.85*10**-12;     \n",
    "\n",
    "#Calculation\n",
    "epsilonr=(alpha_e*N/epsilon0)+1;      #dielectric constant of material\n",
    "\n",
    "#Result\n",
    "print \"dielectric constant of material is\",round(epsilonr,3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.2, Page number 6.24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "capacitance is 8.85e-12 F\n",
      "charge on plates is 8.85e-10 C\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "A=100*10**-4;     #area(m**2)\n",
    "d=1*10**-2;     #seperation(m)\n",
    "V=100;     #potential(V)\n",
    "\n",
    "#Calculation\n",
    "C=epsilon0*A/d;    #capacitance(F)\n",
    "Q=C*V;      #charge on plates(C)\n",
    "\n",
    "#Result\n",
    "print \"capacitance is\",C,\"F\"\n",
    "print \"charge on plates is\",Q,\"C\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.3, Page number 6.24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "electronic polarizability is 2.242e-41 F m**2\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "epsilonr=1.0000684;      #dielectric constant of material\n",
    "N=2.7*10**25;    #number of atoms(per m**3)\n",
    "\n",
    "#Calculation\n",
    "alpha_e=epsilon0*(epsilonr-1)/N;     #electronic polarizability(F m**2)\n",
    "\n",
    "#Result\n",
    "print \"electronic polarizability is\",alpha_e,\"F m**2\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.4, Page number 6.24"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "voltage is 39.73 V\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "A=650*10**-6;     #area(m**2)\n",
    "d=4*10**-3;     #seperation(m)\n",
    "Q=2*10**-10;    #charge(C)\n",
    "epsilonr=3.5;\n",
    "\n",
    "#Calculation\n",
    "V=Q*d/(epsilon0*epsilonr*A);       #voltage(V)\n",
    "\n",
    "#Result\n",
    "print \"voltage is\",round(V,2),\"V\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.5, Page number 6.25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "polarization is 212.4 *10**-9 C m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "A=6.45*10**-4;     #area(m**2)\n",
    "d=2*10**-3;     #seperation(m)\n",
    "V=12;    #voltage(V)\n",
    "epsilonr=5;\n",
    "\n",
    "#Calculation\n",
    "P=epsilon0*(epsilonr-1)*V/d;     #polarization(C m)\n",
    "\n",
    "#Result\n",
    "print \"polarization is\",P*10**9,\"*10**-9 C m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.6, Page number 6.25"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "electronic polarizability is 3.29 *10**-40 F m**2\n",
      "answer varies due to rounding off errors\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "epsilonr=3.75;    #dielectric constant\n",
    "gama=1/3;     #internal field constant\n",
    "D=2050;    #density(kg/m**3)\n",
    "Na=6.02*10**26;    #avagadro number\n",
    "M=32;    #atomic weight\n",
    "\n",
    "#Calculation\n",
    "N=Na*D/M;     #number of atoms(per m**3)\n",
    "alphae=((epsilonr-1)/(epsilonr+2))*3*epsilon0/N;    #electronic polarizability(F m**2)\n",
    "\n",
    "#Result\n",
    "print \"electronic polarizability is\",round(alphae*10**40,2),\"*10**-40 F m**2\"\n",
    "print \"answer varies due to rounding off errors\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.7, Page number 6.26"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "orientational polarization is 1.0298 *10**-11 C m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "N=1.6*10**20;     #number of molecules(/m**3)\n",
    "T=300;     #temperature(K)\n",
    "E=5*10**5;    #electric field(V/m)\n",
    "x=0.25*10**-9;   #separation(m)\n",
    "Kb=1.381*10**-23;    #boltzmann constant\n",
    "e=1.6*10**-19;  \n",
    "\n",
    "#Calculation\n",
    "Pd=N*e**2*x**2*E/(3*Kb*T);      #orientational polarization\n",
    "\n",
    "#Result\n",
    "print \"orientational polarization is\",round(Pd*10**11,4),\"*10**-11 C m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.8, Page number 6.26"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "radius is 5.864 *10**-11 m\n",
      "answer varies due to rounding off errors\n",
      "displacement is 0.7 *10**-16 m\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "epsilonr=1.0000684;      #dielectric constant of material\n",
    "N=2.7*10**25;    #number of atoms(per m**3)\n",
    "E=10**6;     #electric field(V/m)\n",
    "e=1.6*10**-19;  \n",
    "Z=2;     #atomic number\n",
    "\n",
    "#Calculation\n",
    "alpha_e=epsilon0*(epsilonr-1)/N;     #electronic polarizability(F m**2)\n",
    "r=(alpha_e/(4*math.pi*epsilon0))**(1/3);     #radius(m)\n",
    "d=alpha_e*E/(Z*e);     #displacement(m)\n",
    "\n",
    "#Result\n",
    "print \"radius is\",round(r*10**11,3),\"*10**-11 m\"\n",
    "print \"answer varies due to rounding off errors\"\n",
    "print \"displacement is\",round(d*10**16,1),\"*10**-16 m\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.9, Page number 6.27"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "voltage is 53.8 V\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "A=750*10**-6;     #area(m**2)\n",
    "d=5*10**-3;     #seperation(m)\n",
    "Q=2.5*10**-10;    #charge(C)\n",
    "epsilonr=3.5;\n",
    "\n",
    "#Calculation\n",
    "V=Q*d/(epsilon0*epsilonr*A);       #voltage(V)\n",
    "\n",
    "#Result\n",
    "print \"voltage is\",round(V,1),\"V\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.10, Page number 6.27"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "dipole moment is 8.9 *10**-40 F m**2\n",
      "polarization is 26.7 *10**-15 C m\n",
      "dielectric constant is 1.00302\n",
      "polarizability is 8.9 *10**-40 F m**2\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "N=3*10**25;    #number of atoms(per m**3)\n",
    "r=0.2*10**-9;    #radius(m)\n",
    "epsilon0=8.85*10**-12;\n",
    "E=1;     #electric field\n",
    "\n",
    "#Calculation\n",
    "p=4*math.pi*epsilon0*r**3;    #dipole moment(F m**2)\n",
    "P=N*p;     #polarization(C m)\n",
    "epsilonr=(P/(epsilon0*E))+1;     #dielectric constant\n",
    "alpha_e=epsilon0*(epsilonr-1)/N;    #polarizability(F m**2)\n",
    "\n",
    "#Result\n",
    "print \"dipole moment is\",round(p*10**40,1),\"*10**-40 F m**2\"\n",
    "print \"polarization is\",round(P*10**15,1),\"*10**-15 C m\"\n",
    "print \"dielectric constant is\",round(epsilonr,5)\n",
    "print \"polarizability is\",round(alpha_e*10**40,1),\"*10**-40 F m**2\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.11, Page number 6.28"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "electronic polarizability is 1.426 *10**-40 F m**2\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "epsilonr=1.000435;      #dielectric constant of material\n",
    "N=2.7*10**25;    #number of atoms(per m**3)\n",
    "\n",
    "#Calculation\n",
    "alpha_e=epsilon0*(epsilonr-1)/N;     #electronic polarizability(F m**2)\n",
    "\n",
    "#Result\n",
    "print \"electronic polarizability is\",round(alpha_e*10**40,3),\"*10**-40 F m**2\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##Example number 6.12, Page number 6.28"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "electronic polarizability is 6.785 *10**-40 F m**2\n"
     ]
    }
   ],
   "source": [
    "#importing modules\n",
    "import math\n",
    "from __future__ import division\n",
    "\n",
    "#Variable declaration\n",
    "epsilon0=8.85*10**-12;\n",
    "epsilonr=4;    #dielectric constant\n",
    "D=2.08*10**3;    #density(kg/m**3)\n",
    "Na=6.02*10**26;    #avagadro number\n",
    "M=32;    #atomic weight\n",
    "\n",
    "#Calculation\n",
    "N=Na*D/M;     #number of atoms(per m**3)\n",
    "alphae=epsilon0*(epsilonr-1)/N;    #atomic polarizability(F m**2)\n",
    "\n",
    "#Result\n",
    "print \"electronic polarizability is\",round(alphae*10**40,3),\"*10**-40 F m**2\""
   ]
  }
 ],
 "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
}