{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter - 13 : PASSIVE CIRCUITS DEVICES"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 13.4 Pg 248"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Reqmin= 1.76538461538 ohm\n",
      "Reqmax= 2.23235294118 ohm\n",
      "Req= 2.0 ohm\n",
      "t= 11.75 %\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "\n",
    "R1min=2.7#\n",
    "R2min=5.1#\n",
    "Rmin=R1min+R2min#\n",
    "R1max=3.3#\n",
    "R2max=6.9#\n",
    "Rmax=R1max+R2max#\n",
    "a=9-Rmin#\n",
    "b=Rmax-9#\n",
    "tolerance=b/9#\n",
    "Reqmin=(R1min*R2min)/(R1min+R2min)#\n",
    "print \"Reqmin=\",Reqmin,'ohm'\n",
    "Reqmax=(R1max*R2max)/(R1max+R2max)#\n",
    "print \"Reqmax=\",Reqmax,'ohm'\n",
    "R1N=3#\n",
    "R2N=6#\n",
    "Req=(R1N*R2N)/(R1N+R2N)#\n",
    "print \"Req=\",Req,'ohm'\n",
    "minval=Reqmin#\n",
    "maxval=Reqmax#\n",
    "maxchng=0.235#\n",
    "t=(maxchng/2)*100#\n",
    "print \"t=\",t,'%'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 13.5 Pg 248"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "L= 1.00091141943 H\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "from math import pi\n",
    "N=150#\n",
    "mur=3540#\n",
    "mu0=4*pi*10**-7#\n",
    "l=0.05#\n",
    "A=5*10**-4#\n",
    "L=(mur*mu0*A*N*N)/l#\n",
    "print \"L=\",L,\"H\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 13.6 Pg 249"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "k= 0.199757665685\n"
     ]
    }
   ],
   "source": [
    "from math import sqrt\n",
    "from __future__ import division\n",
    "\n",
    "#e.g 13.6\n",
    "L1=40*10**-6#\n",
    "L2=80*10**-6#\n",
    "M=11.3*10**-6#\n",
    "k=M/sqrt(L1*L2)#\n",
    "print \"k=\",k"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 13.7 Pg 250"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "R0= 10.471975512 ohm\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "from math import pi\n",
    "Q=90#\n",
    "L=15*10**-6#\n",
    "f=10*10**6#\n",
    "R0=(2*pi*f*L)/Q#\n",
    "print \"R0=\",R0,'ohm'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 13.8 Pg 251"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "C= 88.5 pF\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "A=0.04#\n",
    "d=0.02#\n",
    "e0=8.85*10**-12#\n",
    "er=5.0#\n",
    "C=(e0*er*A)/d# \n",
    "print \"C=\",C*10**12,\"pF\"##answer printed in the book is wrong."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Ex 13.9 Pg 252"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "d= 4.96261682243 mm\n"
     ]
    }
   ],
   "source": [
    "from __future__ import division\n",
    "A=0.2#\n",
    "C=0.428*10**-6#\n",
    "e0=8.85*10**-12#\n",
    "er=1200#\n",
    "d=(e0*er*A)/C##ans printed in the book is wrong\n",
    "print \"d=\",d*10**3,'mm'"
   ]
  }
 ],
 "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
}
