Chapter2-Passive Component and DC Sources and Circuit Theorems and Basic Meters

Ex1-pg44

In [2]:
##Ex2_1
import math
Q = 2*10**-6;
V = 10.
print'%s %.2e %s'%("Q = ",Q,"C")## charge
print'%s %.2f %s'%("V = ",V,"V") ##voltage
print'%s %.2e %s'%("C = Q/V = ",Q/V,"F")##calculation for capacitance
Q =  2.00e-06 C
V =  10.00 V
C = Q/V =  2.00e-07 F

Ex2-pg44

In [4]:
##Ex2_2
import math
C = 10**-6
V = 10.
print'%s %.2e %s'%("C =",(C),"F")##capacitance
print'%s %.2f %s'%("V = ",(V),"V")##voltage
print'%s %.2e %s'%("Q = C*V = ",(C*V),"C")##calculation for charge
#conveted in units
C = 1.00e-06 F
V =  10.00 V
Q = C*V =  1.00e-05 C

Ex3-pg44

In [5]:
##Ex2_3
import math
Q = 5.*(10**-12) ;
V = 50.
print'%s %.2e %s'%("Q = ",(Q),"C")##charge
print'%s %.7f %s'%("V = ",(V),"V")##voltage
print'%s %.2e %s'%("C = Q/V = ",(Q/V),"F")##calculation for capacitance
#conveted into units
Q =  5.00e-12 C
V =  50.0000000 V
C = Q/V =  1.00e-13 F

Ex4-pg45

In [7]:
##Ex2_4
import math
I = 10.*(10**-6)
t= 10.
print'%s %.2e %s'%("I = ",(I),"A")##current
print'%s %.2f %s'%("t = ",(t),"seconds")##time
print'%s %.1e %s'%("Q =",(I*t),"* C ")##calculation for charge
#converted into units
I =  1.00e-05 A
t =  10.00 seconds
Q = 1.0e-04 * C 

Ex5-pg45

In [9]:
##Ex2_5
import math
C = 2.*math.pow(10,-6)
t= 2.
I = 10.*math.pow(10,-6)
Q = I*t
print'%s %.2e %s'%("C = ",(C),"F")##capacitance
print'%s %.2f %s'%("t = ",(t),"seconds")##time
print'%s %.2e %s'%("I = ",(I),"A")##current
print'%s %.2e %s'%("Q = I*t = ",(Q),"C")##calculation for charge
print'%s %.2f %s'%("V = Q/C = ",(Q/C),"V")##calculation for voltage
C =  2.00e-06 F
t =  2.00 seconds
I =  1.00e-05 A
Q = I*t =  2.00e-05 C
V = Q/C =  10.00 V

Ex6-pg45

In [10]:
##Ex2_6
import math
C = 12* 10** -6
f = 1.0*10**3
Xc = 1./(2.*math.pi*f*C)
print'%s %.2e %s'%("C = ",(C),"F")##capacitance
print'%s %.2f %s'%("at... f = ",(f),"Hz")##frequency
print'%s %.2f %s'%("Xc = 1/(2*pi*f*C) = ",(1./(2.*math.pi*f*C)),"ohm")##calculation for capacitive reactance
C =  1.20e-05 F
at... f =  1000.00 Hz
Xc = 1/(2*pi*f*C) =  13.26 ohm

Ex7-pg46

In [11]:
##Ex2_7
import math
C = 0.2*10**-6
f1 = 1.0*10**3
f2 = 50.
print'%s %.2e %s'%("C = ",(C),"F")##capacitance
print'%s %.2f %s'%("at... f = ",(f1),"Hz")##frequency
print'%s %.2f %s'%("Xc = 1/(2*pi*f*C) = ",(1./(2.*math.pi*f1*C)),"ohm")##calculation for capacitive reactance
print'%s %.2f %s'%("at... f = ",(f2),"Hz")##frequency
print'%s %.2f %s'%("Xc = 1/(2*pi*f*C) = ",(1./(2.*math.pi*f2*C)),"ohm")##calculation for capacitive reactance
C =  2.00e-07 F
at... f =  1000.00 Hz
Xc = 1/(2*pi*f*C) =  795.77 ohm
at... f =  50.00 Hz
Xc = 1/(2*pi*f*C) =  15915.49 ohm

Ex8-pg46

In [12]:
##Ex2_8
import math
C1 = 0.5*10**-6
C2 = 0.5*10**-6
CT = (C1*C2)/(C1+C2)
print'%s %.2e %s'%("C1 = ",(C1),"F")##capacitance 1
print'%s %.2e %s'%("C1 = ",(C1),"F")##capacitance 2
print'%s %.2e %s'%("1/CT = 1/C1 + 1/C2 = (C1*C2)/(C1+C2) = ",(C1*C2/(C1+C2)),"F")##series capacitance
## proper ans. = 0.25*10^-6F
C1 =  5.00e-07 F
C1 =  5.00e-07 F
1/CT = 1/C1 + 1/C2 = (C1*C2)/(C1+C2) =  2.50e-07 F

Ex9-pg46

In [13]:
##Ex2_9
import math
C1 = 0.2*10**-12
C2 = 0.6*10**-12
C3 = 1.0*10**-12
print'%s %.2e %s'%("C1 = ",(C1),"F")##capacitance
print'%s %.2e %s'%("C2 = ",(C2),"F")##capacitance
print'%s %.2e %s'%("C3 = ",(C3),"F")##capacitance
print'%s %.2e %s'%("CT = C1+C2+C3 = ",(C1+C2+C3),"F")##parallel capacitance
C1 =  2.00e-13 F
C2 =  6.00e-13 F
C3 =  1.00e-12 F
CT = C1+C2+C3 =  1.80e-12 F

Ex10-pg47

In [14]:
##Ex2_10
import math
C = 10.*10**-6
V = 100.
W = C*(V**2)/2.
print'%s %.2e %s'%("C = ",(C),"F")##capacitance
print'%s %.2e %s'%("V = ",(V),"V")##voltage
print'%s %.2f %s'%("W = C*(V^2)/2 = ",(W),"Joules")##calculating for energy stored
C =  1.00e-05 F
V =  1.00e+02 V
W = C*(V^2)/2 =  0.05 Joules

Ex11-pg48

In [15]:
##Ex2_11
import math
C = 10.*10**-6
delta_V = 100.
delta_t = 10.
ic = C*delta_V/delta_t
print'%s %.2e %s'%("C = ",(C),"F")##capacitance
print'%s %.2f %s'%("delta_V = ",(delta_V),"V")##change in voltage
print'%s %.2f %s'%("delta_t = ",(delta_t),"sec")##change in time
print'%s %.2e %s'%("ic = C*(delta delta_V/delta_t) = ",(ic),"A")##calculation for instantaneous current
#conveted into units
C =  1.00e-05 F
delta_V =  100.00 V
delta_t =  10.00 sec
ic = C*(delta delta_V/delta_t) =  1.00e-04 A

Ex12-pg50

In [16]:
##Ex2_12
import math
Ii = 10
If = 15
delta_t = 2
dI = Ii - If
print'%s %.2f %s'%("Ii = ",(Ii),"A")##initial current
print'%s %.2f %s'%("If = ",(If),"A")##final current
print'%s %.2f %s'%("delta_t = ",(delta_t),"sec")##time taken to change current
print'%s %.2f %s'%("dI/dt = ",(abs(dI)/delta_t),"Amp/sec.")##calculation for rate of change of current
##wronge answer given in the textbook i.e. 0.5 Amp/sec.
Ii =  10.00 A
If =  15.00 A
delta_t =  2.00 sec
dI/dt =  2.00 Amp/sec.

Ex13-pg50

In [17]:
##Ex2_13
import math
r = 5.0##rate of current change
vL = 50.##induced voltage
L = vL/(r)
print'%s %.2f %s'%("diL/dt = ",(r),"A/s")##rate of current change 
print'%s %.2f %s'%("vL = ",(vL),"V")
print("vL = L*(diL/dt)") 
print'%s %.2f %s'%("L = vL/(diL/dt) = ",(L)," Henry")##calculation for inductane
diL/dt =  5.00 A/s
vL =  50.00 V
vL = L*(diL/dt)
L = vL/(diL/dt) =  10.00  Henry

Ex14-pg51

In [18]:
##Ex2_14
import math
I = 5.
L = 5.
WL = L*(I**2)/2.
print'%s %.2f %s'%("I = ",(I),"A")##current flow
print'%s %.2f %s'%("L = ",(L),"H")##inductance
print'%s %.2f %s'%("WL= ",(WL),"joules")##energy stored
I =  5.00 A
L =  5.00 H
WL=  62.50 joules

Ex15-pg52

In [20]:
##Ex2_15
import math
flux1 = 100.*10**-6
flux2 = 50.*10**-6
flux12 = flux1 - flux2
print'%s %.2e %s'%("flux1 = ",(flux1),"Wb")##flux of coil 1
print'%s %.2e %s'%("flux2 = ",(flux2),"Wb")##flux of coil 2
print("K = flux linkage between coil 1 and coil 2/flux of coil 1")##coefficient of coupling
print'%s %.2f %s'%("total   = ",(flux12/flux1),"")
flux1 =  1.00e-04 Wb
flux2 =  5.00e-05 Wb
K = flux linkage between coil 1 and coil 2/flux of coil 1
total   =  0.50 

Ex16-pg52

In [22]:
##Ex2_16
import math
L1 = 100.*10**-3
L2 = 50.*10**-3
K = 0.3
M = K*(L1*L2)**0.5
print'%s %.2f %s'%("L1 = ",(L1),"H")##inductance of coil 1
print'%s %.2f %s'%("L2 = ",(L2),"H")##inductance of coil 2
print'%s %.2f %s'%("K = ",(K),"")##coefficient of coupling
print("M = K*(L1*L2)^0.5")
print'%s %.2f %s'%("M = ",(M),"H")##mutual inductance
#converted into units
L1 =  0.10 H
L2 =  0.05 H
K =  0.30 
M = K*(L1*L2)^0.5
M =  0.02 H

Ex17-pg54

In [25]:
##Ex2_17
import math
L1 = 10.
L2 = 15.
LT = L1 + L2
print'%s %.2f %s'%("L1 = ",(L1),"H")##inductance of coil 1
print'%s %.2f %s'%("L2 = ",(L2),"H")##inductance of coil 2
print'%s %.2f %s'%("LT = L1+L2 = ",(LT),"mH")##series inductance
L1 =  10.00 H
L2 =  15.00 H
LT = L1+L2 =  25.00 mH

Ex18-pg55

In [30]:
##Ex2_18
import math
L1 = 1.
L2 = 5.
LT = (L1*L2)/(L1+L2)
print'%s %.2f %s'%("L1 = ",(L1),"H")##inductance of coil 1
print'%s %.2f %s'%("L2 = ",(L2),"H")##inductance of coil 2
print("1/LT = 1/L1 + 1/L2")
print'%s %.2f %s'%("LT = (L1*L2)/(L1+L2) = ",(LT),"mH")##parallel inductance
L1 =  1.00 H
L2 =  5.00 H
1/LT = 1/L1 + 1/L2
LT = (L1*L2)/(L1+L2) =  0.83 mH

Ex19-pg61

In [31]:
##Ex2_19
import math
VNL = 50.
VL = 40.
IL = 4.
Rs = (VNL - VL)/IL
print'%s %.2f %s'%("VNL  = ",(VNL),"V")##no load voltage
print'%s %.2f %s'%("VL  = ",(VL),"V")##load voltage
print'%s %.2f %s'%("IL  = ",(IL),"A")##load current
print'%s %.2f %s'%("Rs = (VNL - VL)/IL = ",(Rs),"ohm")##source resistane
VNL  =  50.00 V
VL  =  40.00 V
IL  =  4.00 A
Rs = (VNL - VL)/IL =  2.50 ohm

Ex20-pg61

In [32]:
##Ex2_20
import math
V = 2.5
print'%s %.2f %s'%("V1 = V2 = V3 = V4 = ",(V),"V")##four batteries of equal voltage connected in series
print'%s %.2f %s'%("VT = V1+V2+V3+V4 = ",(V+V+V+V),"V")##resultant voltage(series voltage)
V1 = V2 = V3 = V4 =  2.50 V
VT = V1+V2+V3+V4 =  10.00 V

Ex21-pg61

In [33]:
##Ex2_20
import math
V = 2.
print'%s %.2f %s'%("V1 = V2 = V3 = V4 = ",(V),"V")##four batteries of equal voltage connected in series
print'%s %.2f %s'%("VT = V1 = V2 = V3 = V4 = ",(V),"V")##parallel voltage
V1 = V2 = V3 = V4 =  2.00 V
VT = V1 = V2 = V3 = V4 =  2.00 V

Ex22-pg66

In [34]:
##Ex2_22
import math
##considering the fig. 2.17 given in the question 
R1 = 1.
R2 = 3.
R3 = 2.
V = 20.
print'%s %.2f %s'%("R1 =",(R1),"ohm")##value of resitance R1
print'%s %.2f %s'%("R2 =",(R2),"ohm")##value of resitance R2
print'%s %.2f %s'%("R3 =",(R3),"ohm")##value of resitance R3(across A and B terminals, 
                            ##across which thevenin equivalate circuit is need to determine)
print'%s %.2f %s'%("V =",(V),"V")##value of D.C. voltage applied

##TO FIND THEVENIN'S RESISTANCE (RTH),.. 
##CONSIDERING FIG 2.17
## WE REMOVE THE RESISTANCE (R1) ACROSS LOAD TERMINAL AB I.E. 
##AND ALSO WE SHORT THE VOLTAGE SOURCE
##NOW ACCORDING TO MODIFIED CIRCUIT

print'%s %.2f %s'%("1/RTH = 1/R3 + 1/R2 = ",(1/((1/R3)+(1/R2))),"ohm")##R1 and R2 are in parallel

##TO FIND THEVENIN VOLTAGE (VTH),.. 
##CONSIDERING FIG 2.17
##WE DISCONNECT LOAD RESISTANCE (R1) AND MADE  TERMINAL AB OPEN CIRCUIT
##ACCORDING TO MODIFIED CIRCUIT

##applying KVL in the loop, to find the amount of current flowing in circuit
##taking current as 'I' amperes

print("V = (R3*I)+(R2*I)")
I = V/(R2+R3)
print'%s %.2f %s'%("or, I = V/(R2+R3) = ",(I),"amperes")
##Voltage drop across R2 resistance = Thevenin voltage
##thus, voltage across AB i.e., thevenin voltage, is given as
print'%s %.2f %s'%("VTH = R2*I = ",(R2*I),"V")

##  NOTE :  Notations used in the program are as mentioned in the main fig. 2.17
R1 = 1.00 ohm
R2 = 3.00 ohm
R3 = 2.00 ohm
V = 20.00 V
1/RTH = 1/R3 + 1/R2 =  1.20 ohm
V = (R3*I)+(R2*I)
or, I = V/(R2+R3) =  4.00 amperes
VTH = R2*I =  12.00 V