Chapter 4 , DC Resistive Circuits

Example 4.1 , Page Number 53

In [1]:
import math

#Variables

R1 = 220                  #Resistance (in ohm)
R2 = 470                  #Resistance (in ohm)
R3 = 560                  #Resistance (in ohm)
R4 = 910                  #Resistance (in ohm)

#Calculation

R = R1 + R2 + R3 + R4     #Net Resistance (in ohm)

#Result

print "Total resistance of circuit is ",R," ohm."
Total resistance of circuit is  2160  ohm.

Example 4.2 , Page Number 53

In [2]:
import math

#Variables

R1 = 4                  #Resistance (in kilo-ohm)
R2 = 6                  #Resistance (in kilo-ohm)
R3 = 2                  #Resistance (in kilo-ohm)

#Calculation

R = R1 + R2 + R3        #Equivalent Resistance(in kilo-ohm)

#Result

print "Equivalent Resistance is ",R," kilo-ohm." 
Equivalent Resistance is  12  kilo-ohm.

Example 4.3 , Page Number 54

In [3]:
import math

#Variables

R1 = 250                  #Resistance (in ohm)
R3 = 375                  #Resistance (in ohm)
I = 50 * 10**-3           #Current (in Ampere)
V = 40                    #Voltage (in volts)

#Calculation

R = V/I                   #Equivalent Resistance (in ohm)
R2 = R - (R1 + R3)        #Resistance R2 (in ohm)

#Result

print "The Total Resistance is ",R," ohm.\nThe value of R2 is ",R2," ohm." 
The Total Resistance is  800.0  ohm.
The value of R2 is  175.0  ohm.

Example 4.4 , Page Number 55

In [4]:
import math

#Variables

I = 250 * 10**-3            #Current (in Ampere)
R = 1.5 * 10**3             #Resistance (in ohm)

#Calculation

Vs = I * R                  #Source voltage (in volts)
I1 = 0.75 * I               #New current (in Ampere)
R1 = Vs / I1                #New Resistance (in ohm)
R2 = R1 - R                 #Resistance to be added (in ohm)

#Result

print R2," ohm Resistance must be added in order to accomplish the reduction in current."
500.0  ohm Resistance must be added in order to accomplish the reduction in current.

Example 4.5 , Page Number 55

In [5]:
import math

#Variables

R1 = 2.2                  #Resistance (in kilo-ohm)
R2 = 1                    #Resistance (in kilo-ohm)
R3 = 3.3                  #Resistance (in kilo-ohm)
V2 = 6                    #Voltage drop across R2 (in volts)

#Calculation

I = V2 / R2               #Current in the circuit (in milli-Ampere) 
V1 = R1 * I               #Voltage drop across R1 (in volts)
V3 = R3 * I               #Voltage drop across R3 (in volts)

#Result
print "The voltage drop across R1 is ",V1,"V and the voltage drop across R3 is ",V3," V."
The voltage drop across R1 is  13.2 V and the voltage drop across R3 is  19.8  V.

Example 4.6 , Page Number 57

In [6]:
import math

#Variables

V = 30.0                        #Source voltage (in volts)
R1 = 20.0                       #Resistance (in kilo-ohm)
R2 = 10.0                       #Resistance (in kilo-ohm)
R3 = 70.0                       #Resistance (in kilo-ohm)
VD = 0.0                        #Voltage at D (in volts)

#Calculation

R = R1 + R2 + R3                #Equivalent Resistance (in kilo-ohm)
V1 = (R1 / R) * V               #Voltage drop across R1 (in volts)
V2 = (R2 / R) * V               #Voltage drop across R2 (in volts)
V3 = (R3 / R) * V               #Voltage drop across R3 (in volts)
VC = V3 + VD                    #Voltage at node C (in volts) 
VB = V2 + VC                    #Voltage at node B (in volts)
VA = V1 + VB                    #Voltage at node A (in volts)

#Result

print "The Voltage drop across R1 is ",V1," V.\nThe Voltage drop across R2 is ",V2," V.\nThe Voltage drop across R3 is ",V3," V."
print "Voltage at node A is ",VA," V.\nVoltage at node B is ",VB," V.\nVoltage at node is ",VC," V." 
The Voltage drop across R1 is  6.0  V.
The Voltage drop across R2 is  3.0  V.
The Voltage drop across R3 is  21.0  V.
Voltage at node A is  30.0  V.
Voltage at node B is  24.0  V.
Voltage at node is  21.0  V.

Example 4.7 , Page Number 58

In [7]:
import math

#Variables

R2 = 100              #Resistance R2 (in ohm)
I = 0.3               #Current (in Ampere)
VT = 120              #Voltage (in volts)

#Calculation

RT = VT / I           #Total Resistance (in ohm)
R1 = RT - R2          #Resistance R1 (in ohm)
P1 = I**2 * R1        #Power dissipated by R1 (in watt)
P2 = I**2 * R2        #Power dissipated by R2 (in watt)

#Result

print "The power dissipated by R1 is ",P1," W.\nThe power dissipated by R2 is ",P2," W."
The power dissipated by R1 is  27.0  W.
The power dissipated by R2 is  9.0  W.

Example 4.8 , Page Number 60

In [8]:
import math

#Variables

V = 6                 #Voltage (in volts)
R1 = 1                #Resistance (in ohm)
R2 = 2                #Resistance (in ohm)
R3 = 3                #Resistance (in ohm)

#Case (a):

#Calculation

RT = R1 + R2 + R3     #Equivalent Resistance (in ohm)
I = V / RT            #Current (in Ampere)
P = I**2 * RT         #Power dissipated (in watt)

#Result

print "Power dissipated in the entire circuit is",P," W."

#Case (b):

#Calculation

RT = R1 + R2          #Equivalent Resistance (in ohm)
I = V / RT            #Current (in Ampere)
P = I**2 * RT         #Power dissipated (in watt)

#Result

print "Power dissipated in the circuit when R2 is shortened is",P," W."

#Case (c):

#Calculation

R = R1                #Resistance (in ohm)
I = V / R             #Current (in Ampere)
P = I**2 * R          #Power dissipated (in watt)

print "Power dissipated in the circuit when R3 and R2 is shortened is",P," W."
Power dissipated in the entire circuit is 6  W.
Power dissipated in the circuit when R2 is shortened is 12  W.
Power dissipated in the circuit when R3 and R2 is shortened is 36  W.

Example 4.9 , Page Number 61

In [9]:
import math

#Variables

V = 10.0                 #Voltage (in volts)
R1 = 10**6               #Resistance (in ohm)
R2 = 10 * 10**3          #Resistance (in ohm)

#Case (a):

#Calculation

RT = R1 + R2             #Total Resistance (in ohm)
I = V / RT               #Current (in Ampere)

#Result

print "Current through the circuit is ",I," A."

#Case (b):

#Calculation

RT = R1                  #Total Resistance (in ohm)
I = V / RT               #Current (in Ampere)

#Result

print "Current through circuit when R2 is shortened is ",I," A."
Current through the circuit is  9.90099009901e-06  A.
Current through circuit when R2 is shortened is  1e-05  A.

Example 4.10 , Page Number 62

In [10]:
import math

#Variables

IT = 750              #Current (in milli-Ampere)
I1 = 200              #Current (in milli-Ampere)
I3 = 150              #Current (in milli-Ampere)

#Calculation

I2 = IT - (I1 + I3)   #Current through R2 (in milli-Ampere)

#Result

print "Current drawn by R2 branch is ",I2," mA."
Current drawn by R2 branch is  400  mA.

Example 4.11 , Page Number 63

In [11]:
import math

#Variables

V = 12.0                       #Voltage (in volts)
R1 = 4.0                       #Resistance (in ohm)
R2 = 6.0                       #Resistance (in ohm)
R3 = 12.0                      #Resistance (in ohm)

#Calculation

Req = 1/(1/R1 + 1/R2 + 1/R3)   #Equivalent resistance (in ohm)  
I1 = V/R1
I2 = V/R2
I3 = V/R3

#Result

print "The Equivalent Resistance is ",Req," ohm.\nThe Current through R1 , R2 , R3 are ",I1," A, ",I2," A, ",I3," A."
The Equivalent Resistance is  2.0  ohm.
The Current through R1 , R2 , R3 are  3.0  A,  2.0  A,  1.0  A.

Example 4.12 , Page Number 64

In [12]:
import math

#Variables

R1 = R2 = 10              #Resistances (in kilo-ohm) 

#Calculation

Req = R1*R2 / (R1 + R2)   #Equivalent Resistance (in kilo-ohm)  

#Result

print "The equivalent resistance is ",Req," kilo-ohm."
The equivalent resistance is  5  kilo-ohm.

Example 4.13 , Page Number 65

In [13]:
import math

#Variables

R1 = 4.0                     #Resistance (in ohm)
R2 = 12.0                    #Resistance (in ohm)
V = 6.0                      #Voltage (in volts)

#Calculation

Req = R1*R2/(R1 + R2)        #Equivalent Resistance (in ohm)
IT = V / Req                 #Total Current (in Ampere)
I1 = R2 / (R1 + R2) * IT     #Current through R1     
I2 = R1 / (R1 + R2) * IT     #Current through R2

#Result

print "Current through R1 is ",I1," A and current through R2 is ",I2," A." 
Current through R1 is  1.5  A and current through R2 is  0.5  A.

Example 4.14 , Page Number 66

In [1]:
import math

#Variables

PR1 = 1.0/8             #1/8 watt resistor (in watt)
PR2 = 1.0/4             #1/4 watt resistor (in watt)
PR3 = 1.0/2             #1/2 watt resistor (in watt)
RT = 2400.0             #total resistance  (in ohm)

#Calculation

PT = PR1 + PR2 + PR3    #Total power dissipated (in watt)
I = (PT/RT)**0.5        #Current (in Ampere)
Vs = I * RT             #Applied voltage (in volts)
R1 = PR1 / I**2         #R1 resistor (in ohm) 
R2 = PR2 / I**2         #R2 resistor (in ohm)
R3 = PR3 / I**2         #R3 resistor (in ohm) 

#Result

print "Current in the circuit is ",round(I,3)," A.\nApplied Voltage is ",round(Vs,3)," V.\nValue of R1 is ",round(R1,3)," ohm.\nValue of R2 is ",round(R2,3)," ohm.\nValue of R3 is ",round(R3,3)," ohm."

#Slight variations due to higher precision.
Current in the circuit is  0.019  A.
Applied Voltage is  45.826  V.
Value of R1 is  342.857  ohm.
Value of R2 is  685.714  ohm.
Value of R3 is  1371.429  ohm.

Example 4.15 , Page Number 68

In [15]:
import math

#Variables

V = 6.0                                 #Applied voltage (in volts)
R0 = 0.2                                #Resistance (in ohm) 
R1 = 2.0                                #Resistance (in ohm)
R2 = 3.0                                #Resistance (in ohm)
R3 = 6.0                                #Resistance (in ohm)

#Calculation

Req = 1 / (1/R1 + 1/R2 + 1/R3)          #Equivalent Resistance (in ohm) 
R = R0 + Req                            #Total Resistance (in ohm)
I = V/R                                 #Current (in Ampere) 
V0 = I * R0                             #Voltage drop across R0 (in volts)
Veq = V - V0                            #Voltage drop across Req (in volts)
I1 = Veq / R1                           #Current through R1 (in Ampere)
I2 = Veq / R2                           #Current through R2 (in Ampere) 
I3 = Veq / R3                           #Current through R3 (in Ampere)
P = V * I                               #Power supplied by the voltage source (in volts)
I0 = V/R0                               #Current in case of 'Short' across DE (in Ampere)
P0 = V * I0                             #Power dissipated in case of 'Short' (in watt)

#Result

print "Total Resistance is ",R," ohm."
print "Branch Currents :\nThrough R1 = ",I1," A.\nThrough R2 = ",round(I2,3)," A.\nThrough R3 = ",round(I3,3)," A."
print "Current supplied by voltage source is ",I," A."
print "Power supplied by the voltage source is ",P," W."
print "Current supplied in case of 'Short' across DE is ",I0," A."
print "Power supplied in case of 'Short' acorss DE is ",P0," A."
Total Resistance is  1.2  ohm.
Branch Currents :
Through R1 =  2.5  A.
Through R2 =  1.667  A.
Through R3 =  0.833  A.
Current supplied by voltage source is  5.0  A.
Power supplied by the voltage source is  30.0  W.
Current supplied in case of 'Short' across DE is  30.0  A.
Power supplied in case of 'Short' acorss DE is  180.0  A.