{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 20 : Induced voltages and inductance"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.1 Page No: 665"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Magnetic flux = 1.62e-04 T.m**2\n",
      "Induced emf = 5.06e-03 volt\n"
     ]
    }
   ],
   "source": [
    "B=.5 # in T\n",
    "A=3.24*10**-4 # in m**2\n",
    "Flux=B*A\n",
    "N=25\n",
    "delta_t=.8\n",
    "print \"Magnetic flux = %0.2e T.m**2\"%Flux\n",
    "e=(N*Flux)/(delta_t)\n",
    "print \"Induced emf = %0.2e volt\"%e"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.2 Page No: 667"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Induced emf = 0.45 volt\n"
     ]
    }
   ],
   "source": [
    "B=.6*10**-4 # in T\n",
    "l=30\n",
    "v=250 # in m/s\n",
    "e=B*l*v\n",
    "print \"Induced emf = %0.2f volt\"%e"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.3 Page No: 672"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Solution a\n",
      "Induced emf = 0.25 volt\n",
      "Solution b\n",
      "Current = 0.50 A\n",
      "Solution c\n",
      "Power = 0.12 watt\n",
      "Energy delivered = 0.12 J\n",
      "Solution d\n",
      "Force = 0.06 N\n"
     ]
    }
   ],
   "source": [
    "B=.25 # in T\n",
    "l=.5\n",
    "v=2 # in m/s\n",
    "e=B*l*v\n",
    "print \"Solution a\"\n",
    "print \"Induced emf = %0.2f volt\"%e\n",
    "R=.5 # in ohm\n",
    "I=e/R\n",
    "\n",
    "print \"Solution b\"\n",
    "print \"Current = %0.2f A\"%I\n",
    "delta_v=.25\n",
    "P=I*delta_v\n",
    "print \"Solution c\"\n",
    "print \"Power = %0.2f watt\"%P\n",
    "t=1 # in s\n",
    "w=P*t\n",
    "print \"Energy delivered = %0.2f J\"%w\n",
    " #  Answer give for J in textbook is wrong\n",
    "d=v*t\n",
    "F=w/d\n",
    "print \"Solution d\"\n",
    "print \"Force = %0.2f N\"%F"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.5 Page No: 678"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Solution a\n",
      "Induced emf = 135.72 volt\n",
      "Solution b\n",
      "Current = 11.31 A\n",
      "Solution c\n",
      "Emf in Volt 136*sinwt\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "f=60 # in Hz\n",
    "w=2*pi*f\n",
    "N=8\n",
    "A=.09 # in m**2\n",
    "B=.5 # in T\n",
    "emf=N*A*B*w\n",
    "print \"Solution a\"\n",
    "print \"Induced emf = %0.2f volt\"%emf\n",
    "R=12 # in ohm\n",
    "I=emf/R\n",
    "print \"Solution b\"\n",
    "print \"Current = %0.2f A\"%I\n",
    "\n",
    "print \"Solution c\"\n",
    "print \"Emf in Volt 136*sinwt\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.6 Page No: 680"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Solution a\n",
      "Maximum Current = 12.00 A\n",
      "Solution b\n",
      "Current = 5.00 A\n"
     ]
    }
   ],
   "source": [
    "emf=120 # in Volt\n",
    "R=10 # in Ohm\n",
    "e_back=70\n",
    "I=emf/R\n",
    "print \"Solution a\"\n",
    "print \"Maximum Current = %0.2f A\"%I\n",
    "print \"Solution b\"\n",
    "I=(emf-e_back)/R\n",
    "print \"Current = %0.2f A\"%I"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.8 Page No: 684"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Solution a\n",
      "Inductance = 1.81e-04 H\n",
      "Solution b\n",
      "Emf = 9.05e-04 Volt\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "uo=4*pi*10**-7 # in m/A\n",
    "N=300\n",
    "A=4*10**-4 # in m**2\n",
    "l=25*10**-2\n",
    "L=(uo*N*N*A)/l\n",
    "print \"Solution a\"\n",
    "print \"Inductance = %0.2e H\"%L\n",
    "delta_I=-5\n",
    "delta_t=1\n",
    "e=(-L*delta_I)/(delta_t)\n",
    "print \"Solution b\"\n",
    "print \"Emf = %0.2e Volt\"%e"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 20.9 Page No: 685"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Solution a\n",
      "Time constant = 5.00e-03 s\n",
      "Solution b\n",
      "Current = 1.26 Amps\n"
     ]
    }
   ],
   "source": [
    "L=30*10**-3 # in Henry\n",
    "R=6 # in Ohm\n",
    "tou=L/R\n",
    "print \"Solution a\"\n",
    "print \"Time constant = %0.2e s\"%tou\n",
    "\n",
    "e=12\n",
    "I=(0.632*e)/R\n",
    "\n",
    "\n",
    "print \"Solution b\"\n",
    "print \"Current = %0.2f Amps\"%I\n"
   ]
  }
 ],
 "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
}
