{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 19 : Magnetism"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.1 Page No: 631"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The force = 7.62e-19 Newton\n"
     ]
    }
   ],
   "source": [
    "q=1.6*10**-19#in columb\n",
    "v=1*10**5#in m/s\n",
    "B=55*10**-6#in T\n",
    "F=q*v*B* 0.8660\n",
    "print \"The force = %0.2e Newton\"%F"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.2 Page No: 632"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The force = 2.77e-12 Newton\n",
      "Acceleration = 1.66e+15 m/s**2\n"
     ]
    }
   ],
   "source": [
    "q=1.6*10**-19#in columb\n",
    "v=8*10**6#in m/s\n",
    "B=2.5#in T\n",
    "F=q*v*B* 0.8660\n",
    "print \"The force = %0.2e Newton\"%F\n",
    "m=1.67*10**-27\n",
    "a=F/m\n",
    "print \"Acceleration = %0.2e m/s**2\"%a"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.3 Page No: 635"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The maximaum force = 3.96e-02 Newton\n"
     ]
    }
   ],
   "source": [
    "l=36#in m\n",
    "I=22#in A\n",
    "B=0.50*10**-4#in T\n",
    "F=B*I*l\n",
    "print \"The maximaum force = %0.2e Newton\"%F"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.4 Page No: 637"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Torque = 0.39 N-m\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "A=pi*(0.5)*0.5#in m\n",
    "I=2#in A\n",
    "B=0.50#in T\n",
    "T=B*I*A*0.5\n",
    "print \"The Torque = %0.2f N-m\"%T"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.5 Page No: 640"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Velocity = 4.69e+06 m/s\n"
     ]
    }
   ],
   "source": [
    "q=1.6*10**-19\n",
    "B=.35\n",
    "r=14*10**-2#in m\n",
    "m=1.67*10**-27#kg\n",
    "v=(q*B*r)/m\n",
    "print \"Velocity = %0.2e m/s\"%v"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.6 Page No: 641"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Radius of lighter istope = 0.10 m\n",
      "Radius of heavier istope = 0.21 m\n",
      "Distance of seperation = 0.21 m\n"
     ]
    }
   ],
   "source": [
    "q=1.6*10**-19\n",
    "B=.10#in T\n",
    "v=1*10**6#in m/s\n",
    "r=14*10**-2#in m\n",
    "m1=1.67*10**-27#in kg\n",
    "m2=3.34*10**-27#in kg\n",
    "r1=(m1*v)/(q*B)\n",
    "r2=(m2*v)/(q*B)\n",
    "x=(2*r2)-(2*r1)\n",
    "print \"Radius of lighter istope = %0.2f m\"%r1\n",
    "print \"Radius of heavier istope = %0.2f m\"%r2\n",
    "print \"Distance of seperation = %0.2f m\"%x"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.7 Page No: 644"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Magnetic field = 2.5e-04 T\n",
      "Force = 6e-20 Newton\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "Uo=(4*pi*10**-7)\n",
    "I=5#in A\n",
    "r=4*10**-3\n",
    "B=(Uo*I)/(2*pi*r)\n",
    "print \"Magnetic field = %0.1e T\"%B\n",
    "q=1.6*10**-19\n",
    "v=1.5*10**3#in m/s\n",
    "F=q*v*B\n",
    "print \"Force = %0.e Newton\"%F"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.8 Page No: 646"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Current = 7.07 A\n"
     ]
    }
   ],
   "source": [
    "from math import pi, sqrt\n",
    "mo=4*pi*10**-7#Tm/A\n",
    "d=0.1#in m\n",
    "x=1*10**-4#F/l\n",
    "I=sqrt((x*2*pi*d)/mo)\n",
    "print \"Current = %0.2f A\"%I"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.9 Page No: 649"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Magnetic field = 6.28e-04 T\n",
      "Force = 1.88e-20 N\n"
     ]
    }
   ],
   "source": [
    "from math import pi\n",
    "N=100#turns\n",
    "l=.1#in m\n",
    "n=N/l#in turns/m\n",
    "mo=4*pi*10**-7#Tm/A\n",
    "I=.5#in A\n",
    "B=n*I*mo\n",
    "q=1.6*10**-19#in c\n",
    "v=375#in m/s\n",
    "F=q*v*(B/2)\n",
    "\n",
    "print \"Magnetic field = %0.2e T\"%B\n",
    "print \"Force = %0.2e N\"%F"
   ]
  }
 ],
 "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
}
