{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 16 : Capacitance"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 16_1 Page No.  492"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Charge Stored = 1.00e-04 Columb\n",
      "i.e 100*10**-6 Columbs\n"
     ]
    }
   ],
   "source": [
    "# How much charge is stored in a 2 uF capacitor connected across a 50-V supply?\n",
    "\n",
    "# Given data\n",
    "\n",
    "V = 50#         # Voltage=50 Volts\n",
    "C = 2*10**-6#    # Capacitor=2 uFarad\n",
    "\n",
    "Q = C*V#\n",
    "print 'The Charge Stored = %0.2e Coulomb'%Q\n",
    "print 'i.e 100*10**-6 Coulombs'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 16_2 Page No.  492"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Charge Stored = 2.00e-03 Columb\n",
      "i.e 2000*10**-6 Columbs\n"
     ]
    }
   ],
   "source": [
    "# How much charge is stored in a 40 uF capacitor connected across a 50-V supply?\n",
    "\n",
    "# Given data\n",
    "\n",
    "V = 50#         # Voltage=50 Volts\n",
    "C = 40*10**-6#   # Capacitor=2 uFarad\n",
    "\n",
    "Q = C*V#\n",
    "print 'The Charge Stored = %0.2e Coulomb'%Q\n",
    "print 'i.e 2000*10**-6 Coulombs'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 16_3 Page No.  493"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Charge Stored = 4.00e-05 Columb\n",
      "i.e 40*10**-6 Columbs OR 40 uColumb\n"
     ]
    }
   ],
   "source": [
    "# A constant current of 2 uA charges a capacitor for 20 s. How much charge is stored? Remember I=Q/t or Q=I*t.\n",
    "\n",
    "# Given data\n",
    "\n",
    "I = 2*10**-6#        # Current=2 uAmps\n",
    "t = 20#             # Time=20 Sec\n",
    "\n",
    "Q = I*t\n",
    "print 'The Charge Stored = %0.2e Coulomb'%Q\n",
    "print 'i.e 40*10**-6 Coulombs OR 40 uCoulomb'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 16_4 Page No.  494"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Capacitance = 2.00e-06 Farad\n",
      "i.e 2 uF\n"
     ]
    }
   ],
   "source": [
    "# The voltage across the charged capacitor is 20 V. Calculate C.\n",
    "\n",
    "#Given data\n",
    "\n",
    "V = 20#         # Voltage=20 Volts\n",
    "Q = 40*10**-6#   # Charge=40 uCoulomb\n",
    "\n",
    "C = Q/V\n",
    "print 'The Capacitance = %0.2e Farad'%C\n",
    "print 'i.e 2 uF'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 16_5 Page No.  495"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Voltage across Capacitor = 500.00 Volts\n"
     ]
    }
   ],
   "source": [
    "# A constant current of 5 mA charges a 10 uF capacitor for 1 s. How much is the voltage across the capacitor?\n",
    "\n",
    "# Given data\n",
    "\n",
    "I = 5*10**-3#       # Current=5 mAmps\n",
    "t = 1#             # Time=1 Sec\n",
    "C = 10*10**-6#      # Cap=10 uFarad\n",
    "\n",
    "Q = I*t#\n",
    "\n",
    "V = Q/C#\n",
    "print 'The Voltage across Capacitor = %0.2f Volts'%V"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 16_6 Page No.  496"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Capacitance = 1.77e-09 Farad\n",
      "i.e 1700*10**-12 F OR 1770 pF\n"
     ]
    }
   ],
   "source": [
    "# Calculate C for two plates, each with an area 2 sqm, separated by 1 cm with a dielectric of air.\n",
    "\n",
    "# Given data\n",
    "\n",
    "c = 8.85*10**-12#    # Constant=8.85 p\n",
    "A = 2#              # Area=2 sqm\n",
    "d = 1*10**-2#        # Distance=1 cm\n",
    "K = 1               # Permeability=1\n",
    "\n",
    "C = K*c*(A/d)#\n",
    "print 'The Capacitance = %0.2e Farad'%C\n",
    "print 'i.e 1700*10**-12 F OR 1770 pF'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 16_11 Page No.  514"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Energy Stored = 0.23 Joules\n"
     ]
    }
   ],
   "source": [
    "# The high-voltage circuit for a color picture tube can have 30 kV across 500 pF of C . Calculate the stored energy.\n",
    "\n",
    "# Given data\n",
    "\n",
    "V = 30*10**3#         # Voltage=30 kVolts\n",
    "C = 500*10**-12#      # Cap=500 pFarad\n",
    "\n",
    "E = 0.5*C*V*V\n",
    "print 'The Energy Stored = %0.2f Joules'%E"
   ]
  }
 ],
 "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
}