{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 5 : Parallel Circuits"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 5_1 Page No.  149"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Current Resistor R1 = 0.015 Amps\n",
      "i.e 15 mAmps\n",
      "The Current Resistor R2 = 0.03 Amps\n",
      "i.e 25 mAmps\n"
     ]
    }
   ],
   "source": [
    "# Solve for branch currents I1 and I2.\n",
    "\n",
    "R1 = 1.*10**3#    # Resistor 1=1*10**3 Ohms\n",
    "R2 = 600.#       # Resistor 2=600 Ohms\n",
    "Va = 15.#        # Applied Voltage=15 Volts\n",
    "\n",
    "I1 = Va/R1#\n",
    "print 'The Current Resistor R1 = %0.3f Amps'%I1\n",
    "print 'i.e 15 mAmps'\n",
    "\n",
    "I2 = Va/R2#\n",
    "print 'The Current Resistor R2 = %0.2f Amps'%I2\n",
    "print 'i.e 25 mAmps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 5_2 Page No.  150"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Total Current in the Mainline = 11 Amps\n"
     ]
    }
   ],
   "source": [
    "# An R1 of 20 Ohms\u0002, an R2 of 40 Ohms\u0002, and an R3 of 60 Ohms\u0002 are connected in parallel across the 120-V power line. Using Kirchhoff’s current law, determine the total current It.\n",
    "\n",
    "# Given data\n",
    "\n",
    "R1 = 20.#      # Resistor 1=20 Ohms\n",
    "R2 = 40.#      # Resistor 2=40 Ohms\n",
    "R3 = 60.#      # Resistor 3=60 Ohms\n",
    "Va = 120.#     # Applied Voltage=120 Volts\n",
    "\n",
    "I1 = Va/R1#\n",
    "I2 = Va/R2#\n",
    "I3 = Va/R3#\n",
    "\n",
    "It = I1+I2+I3\n",
    "print 'The Total Current in the Mainline = %0.f Amps'%It"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 5_3 Page No.  151"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Current in R2 branch = 5 Amps\n"
     ]
    }
   ],
   "source": [
    "# Two branches R1 and R2 across the 120-V power line draw a total line current It of 15 A. The R1 branch takes 10 A. How much is the current I2 in the R2 branch?\n",
    "\n",
    "# Given data\n",
    "\n",
    "I1 = 10#        # Current in R1 branch=10 Amps\n",
    "It = 15#        # Total Current=15 Amps\n",
    "\n",
    "I2 = It-I1#\n",
    "print 'The Current in R2 branch = %0.f Amps'%I2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 5_4 Page No.  152"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Total Current = 0.6008 Amps\n",
      "i.e 600.8 mAmps\n"
     ]
    }
   ],
   "source": [
    "# Three parallel branch currents are 0.1 A, 500 mA, and 800 \u0002A. Using Kirchhoff’s current law, calculate It.\n",
    "\n",
    "\n",
    "# Given data\n",
    "\n",
    "I1 = 0.1#              # Branch Current 1=0.1 Amps\n",
    "I2 = 0.5#              # Branch Current 2=500m Amps\n",
    "I3 = 800*10**-6#        # Branch Current 3=800u Amps\n",
    "\n",
    "It = I1+I2+I3#\n",
    "print 'The Total Current = %0.4f Amps'%It\n",
    "print 'i.e 600.8 mAmps'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 5_5 Page No.  153"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Equivalent Resistance Req = 9 Ohms\n"
     ]
    }
   ],
   "source": [
    "# Two branches, each with a 5-A current, are connected across a 90-V source. How much is the equivalent resistance Req?\n",
    "\n",
    "# Given data\n",
    "\n",
    "I1 = 5#      # Branch Current 1=5 Amps\n",
    "I2 = 5#      # Branch Current 2=5 Amps\n",
    "Va = 90#     # Applied Voltage=90 Volts\n",
    "\n",
    "It = I1+I2#\n",
    "Req = Va/It#\n",
    "print 'The Equivalent Resistance Req = %0.f Ohms'%Req"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 5_6 Page No.  158"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Value of Rx = 60.00 Ohms\n"
     ]
    }
   ],
   "source": [
    "# What Rx in parallel with 40 Ohms\u0002 will provide an Req of 24 Ohms?\n",
    "\n",
    "# Given data\n",
    "\n",
    "R = 40.0#         # Resistance=40 Ohms\n",
    "Req = 24.0#       # Equivqlent Resistance=24 Ohms\n",
    "\n",
    "Rx = (R*Req)/(R-Req)#\n",
    "print 'The Value of Rx = %0.2f Ohms'%Rx"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example No. 5_7 Page No.  158"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The value of R = 50000 Ohms\n",
      "i.e 50 kohms\n"
     ]
    }
   ],
   "source": [
    "# What R in parallel with 50 kOhms will provide an Req of 25 kOhms\u0002\n",
    "\n",
    "# Given data\n",
    "\n",
    "R1 = 50*10**3#         # R1=50k Ohms\n",
    "Req = 25*10**3#       # Req=25k Ohms\n",
    "\n",
    "R = (R1*Req)/(R1-Req)#\n",
    "print 'The value of R = %0.f Ohms'%R\n",
    "print 'i.e 50 kohms'"
   ]
  }
 ],
 "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
}