# CHAPTER1 EX 1-1 PG NO 17
L=5.*10.**-3.; # length
B=2.*10.**-2.; # breath
A=(5.*10.**-3.)*(2.*10.**-2.); # area
P=1.72*10.**-5. ; # resistivity of copper
R=P*L/A; # resistance of copper
print'i) resistance = ',round (R,5),'ohm'
R=P*L/A; # resistance in ohm
# EXAMPLE 1-2 PG NO 18
from math import pi
R=0.69; # RESISTANCE
P=2.83*10**-8; # PRO
L=60.; # LENGTH OF CABLE
a=(P*L)/R;
print'i) a = ',round (a,6),'m**2'
D=((4.*a)/pi)**0.5; # DIAMETER
print'i) DIAMETER = ',round (D,5),'mm'
# EXAMPLE 1-3 PG NO-18
A20=0.00393; # ALPHA 20
R30=1.3; # RESITANCE 30
A30=A20/(1.+A20*(30.-20.)); # ALPHA 30
print'i)Alpha30 (A30) = ',round (A30,7)
T=(((1.6/1.3)-1.)/0.00378); # THE RISE IN TEMPERATURE TO BE FIND where T=t-30
print'ii)Resistance Temperature (t-30) = ',round (T,2),'degree celcious'
# EXAMPLE 1-4 PG NO 18-19
R1=2.22; # RESISTANCE
R2=0.6; # RESISTANCE
R3=3.; # Resistance
R4=4.;
R5=5.;
R6=6.;
R7=2.;
R=R1+R2+R3;
print'i) Resistance (R) is = ',round(R,2),'ohm'
V=12.; # VOLTAGE
I=V/R; # Current
print'ii) CURRENT (I) is = ',round(I,2),'A'
I3=I; # CURRENT THROUGH 3 ohm RESISTANCE
print'iii) CURRENT (I3) is = ',round(I3,2),'A'
I5=(I3*R4)/(R4+R5); # CURRENT THROUGH 5 ohm RESISTANCE
print'iv) CURRENT (I5) is = ',round(I5,2),'A'
I4=(I3*R5)/(R4+R5); # CURRENT THROUGH 4 ohm RESISTANCE
print'v) CURRENT (I4) is = ',round(I4,2),'A'
V1=1.236; # VOLTAGE ACROSS THREE PARALLEL RESISTANCE
I2=V1/R7; # current
print'vi) CURRENT (I2) is = ',round(I2,2),'A'
I1=V1; # CURRENT THROUGH 1 ohm RESISTANCE
print'iv) CURRENT (I1) is = ',round(I1,2),'A'
I6=V1/R6; # CURRENT THROUGH 6 ohm RESISTANCE
print'vii) CURRENT (I6) is = ',round(I6,2),'A'
# EXAMPLE 1-5 PG NO-19
V1=230.; # VOLTAGE ONE
P1=1000.; # POWER
R=V1*V1/P1; # RESISTANCE OF HEATER
V2=210.; # VOLTAGE TWO
P2=V2*V2/R; # POWER OF HEATER WHEN VOLTAGE IS 210
R=(V1*V1)/P1 # Resistance
print'i)RESISTANCE = ',round(R,2),'ohm'
P2=(V2*V2)/R;# Power
print'ii)POWER = ',round(P2,2),'ohm'
# EXAMPLE 1-6 PG NO-19-20
I=12.; # CURRENT
V=230.; # VOLTAGE
P=1000.; # POWER
T=3.; # TIME
S=3600.;
E=(I*V/P)*T; # ENERGY USED
Q=I*T*S; # QUANTITY OF ELECTRICITY USED
IC=6.24*10.**18.;
NC=IC*Q; # NUMBER OF ELECTRON
R=I*V; # RATE OF ENERGY
print'i) ENERGY = ',round(E,2),' KWh'
print'ii) QUANTITY = ',round(Q,2),' C'
print'iiI) NUMBER OF ELECTRON = ',round(NC,2)
print'iiII) RATE OF ENERGY = ',round(R,2),' W'
# Example 1_7 PG NO-20
I1=3.; # current
I2=1.; # current
R=4.; # Resistor
I=I1-I2; # current through resistance
print'i)Current Through resistance (I) = ',round(I,2),' A'
P=I*I*R;
print'ii)Power dissipated in resistor (P) = ',(P,2),' W'
V=I*R;
print'iii)voltage (V) = ',round(V,2),' V'
P1=V*I1; # power dissipated with 3A source
print'iv)power dissipated with 3A source (P1) = ',round(P1,2),' W'
# EXAMPLE 1-11 PG NO-21
R55=58.; # resistance
R15=50.; # Resistance
T1=55.; # Temperature
T2=15.; # Temperature
A15=((R55/R15)-1.)/(T1-T2); # alpha 15
print'i) ALPHA (A15) = ',round (A15,5)
T3=0;
A2=A15/(1.+A15*(T3-T2)); # Alpha 2
print'ii) ALPHA (A2) = ',round (A2,5)
# EXAMPLE 1-13 PG NO 21-22
R=10.; # RESISTANCE
V=230.; # VOLTAGE
P=(V*V)/R; # POWER
print'i) POWER = ',round (P,2),'W'
# EXAMPLE 1-14 PG NO-22
R1=4.; # Resistance
R2=2.; # Resistance
R3=8.; # Resistance
RS=R1+R2; # resistance When Point A&B is short circuit
print'i)resistance When Point A&B is short circuit = ',round (RS,2),'ohm'
RO=R1+R2+R3; # resistance When Point A&B is open circuit
print'i)resistance When Point A&B is open circuit = ',round (RO,2),'ohm'
# EXAMPLE 1-15 PG NO-22
I1=0.04; # CURRENT
I2=0.01; # CURRENT
V1=200; # VOLTAGE
R=V1/I1; # Resistance
print'i)resistance (R) = ',round (R,2),'ohm'
V2=10.; # VOLTAGE
I3=50.; # CURRENT
A=0.1; # AMMETER RESISTANCE
R1=(V2/I3)-0.1;
print'i)Resistance (R1) = ',round (R1,2),'ohm'
V3=5000.;
V4=250.;
I=I3/V3;
print'i)Current (I) = ',round (I,2),'A'
R2=(V4-I3)/I;
print'i)resistance (R2) = ',round (R2,2),'ohm'
# EXAMPLE 1-16 PG NO-23
V=1.; # ASSUMING
t=1.; # ASSUMING
R1=30.; # RESISTANCE
R2=20.;
R3=10.;
E30=(V/R1)*t; # ENERGY AT 30 ohm RESISTANCE
print'i) ENERGY = ',round (E30,2)
E20=(V/R2)*t; # ENERGY AT 20 ohm RESISTANCE
print'ii) ENERGY = ',round (E20,2)
E10=(V/R3)*t; # ENERGY AT 10 ohm RESISTANCE
print'iii) ENERGY = ',round (E10,2)
TE=E30+E20+E10; # TOTAL ENERGY
print'iv) TOTAL ENERGY = ',round (TE,2)
PTE=(E30/TE)*100.; # PERCENTAGE OF TOTAL ENERGY
print'ii) PERCENTAGE OF TOTAL ENERGY = ',round (PTE,2),'%'
# EXAMPLE 1-17 PG NO-23
from math import pi
N=10.**3.; # Number of Turns
a=6.25*10.**-4.; # Diameter
l=0.25;
L=(N*N*4.*pi*10.**-7.*a)/(pi*l); # INDUCTANCE
print'i)inductance = ',round (L,5),'H'
e=L*100.; # EMF
print'ii)EMF = ',round (e,2),'V'
# EXAMPLE 1-18 PG NO-23
E=0.05; # ENERGY
i=0.1; # CURRENT
L=2*E/i**2 # INDUCTANCE OF COIL
print'i)inductance = ',round (L,2),' H'
# EXAMPLE 1-19 PG NO 23
i=0.184 # derivative of I
e=0.16;
L=e/i; # Inductance
print'i)Inductance = ',round (L,2),'H'
# EXAMPLE 1-20 PG NO-24
A=20.*10.**-6.;
L=30.;
P20=1.72*10**-8;
R20=P20*L/A;
X0=0.00426;
I=5.;
X20=X0/(1.+(X0*20));
R55=R20*(1.+X20*(55-20));
P=I*I*R55;
print'i)RESISTANCE = ',round (R20,2),' ohm'
print'i) ALPHA 20(X20)= ',round(X20,2),' ohm'
print'i)RESISTANCE = ',round (R55,2),' ohm'
print'i)POWER = ',round (P,2),'w'
# EXAMPLE 1-21 PG NO-24
L=200.*10.**-3.; # INDUCTAR
t1=1.; # di/dt=(-2e**-t+4e**-2t)=-1.9*10**-7;
V=L*(-1.94*10.**-7.); # VOLTAGE AT TIME 1
print'i) Voltage = ',round (V,2),'V'
t2=0.1; # di/dt=(-2e**-t+4e**-2t)**2=0.216;
V1=L*0.5*(0.216); # VOLTAGE AT TIME O.1
print'ii) Voltage = ',round (V1,2),'V'
# EXAMPLE 1-26 PG NO 27
L1=(1.1-0.8)/0.75; # Inductance
print'i)Inductance = ',round (L1,2),'H'
L2=3*L1; # Inductance
print'ii)Inductance = ',round (L2,2),'H'
# EXAMPLE 1-27 PG NO27
L1=50.*10.**-3.; # Inductar
L2=100.*10.**-3.; # Inductar
X=(L1/L2);
print'i) (L1/L2) = ',round (X,2)
#Q11+Q22=600.;
Q11=200.; # flux
Q22=400.; # flux
print'ii) Flux Q11 = ',round (Q11),'mWb'
print'iii) Flux Q22 = ',round (Q22),' mWb'
# EXAMPLE 1-28 PG NO-27
C1=60.; # TWO CAPACITOR CONNECTED IN SERIES
EC=(C1*C1)/(C1+C1); # EQUIVALENT CAPACITOR
print'i) Equivalent Cpacitor (EC) is = ',round (EC,2),'microF'
# EXAMPLE 1-29 PG NO-27-28
C1=12.; # CAPACITOR
C2=4.; # CAPACITOR
C3=8.;
C4=7.;
C1=(C1*C2)/(C1+C2); # CAPACITOR IN SEREIS
print'i) Capacitor = ',round (C1,2),' muF'
C2=(C3*C4)/(C3+C4); # CAPACITOR IN PARALLEL
print'i) Capacitor = ',round (C2,2),' muF'
# EXAMPLE 1-30 PG NO-28
Q=80.*10.**-4.; # COULUMB CHARGR
C=150.*10.**-6.;
C1=100.*10.**-6.; # CAPACITANCE
C2=50.*10.**-6.;
Va=Q/C1;
Vb=Q/C2;
E1=(0.5*C1*Va*Va)+(0.5*C2*Vb*Vb); # ENERGY
E2=0.5*C*(Va+Vb)*(Va+Vb);
print'i)variable = ',round (Va,2),'ohm'
print'i)variable = ',round (Vb,2),'ohm'
print'i)energy = ',round (E1,2),'J'
print'i)energy = ',round (E2,2),'J'
# EXAMPLE 1-32 PG NO-29
V=10.; # VOLTAGE
R1=2.;
R2=8.; # RESISTANCE
I1=V/(R1+R2); # CURRENT
I2=1.25; # CURRENT THROUGH SECOND BRANCH
R=V/I2-5.;
print'i)CURRENT = ',round (I1,2),' A'
print'ii)RESISTANCE = ',round (R,2),' ohm'
# EXAMPLE 1-33 PG NO-29-30
R1=29980; # RESISTANCE
I1=9.99; # current
R2=20;
I2=0.01; # current
r=20*0.01/9.99; # resistance
print'i)resistance = ',round (r,2),'ohm'
# Example 1-34 PG NO-30
V=20.; # VOLTAGE
R1=5.; # Resistance
X=7.5;
P=(20./(R1+X))**2.*(X); # Power
print'i) Power (P) is = ',round(P,2),'W'
# EXAMPLE 1-35 PG NO 30-31
I1=4.; # Current
I2=6.; # Current
V=110.; # Voltage
Vab1=V-(6.+4.)*2.;
VB=80.;
VC=50.;
R11=(Vab1-VB)/I1;
R12=(Vab1-VC)/I2;
Vab2=V-(-2.+20.)*2.; # Voltage
R21=(VB-Vab2)/2.; # Resistance
R22=(Vab2-VC)/20.; # Resistance
I=(V-VB)/2.; # Current
R=(VB-VC)/I; # Resistance
print'i)variable = ',round(Vab1,2),'ohm'
print'ii)resistance = ',round(R11,2),'ohm'
print'iii)resistance = ',round(R12,2),'ohm'
print'iv)variable = ',round(Vab2,2),'ohm'
print'v)resistance = ',round(R21,2),'ohm'
print'vi)resistance = ',round(R22,2),'ohm'
print'vii)resistance = ',round(R,2),'ohm'
print'viii)Current = ',round(I,2),'A'
# EXAMPLE 1-36 PG NO-31
T=0.99425; # TIME
print'i)Time = ',round(T,2),'seconds'
X=0.37; # DERAVATIVES OF 'I' W.R.T
print'ii)(di\dt) = ',round(X,2),'A\sec'
LI=0.63; # CURRENT
dli=0.37; # deravatives of 'SI' w.r.t
print'iii)(dsi\dt) = ',round(dli,2),' Wb-turns\sec'
VL=dli;
print'iv)(VL) = ',round(VL,2),'V'
Ri=0.63;
VR=Ri;
print'v)VR = ',round(VR,2),'V'
E=0.5*LI*LI; # ENERGY
print'vi)ENERGY stored in magnetic field = ',round(E,2),'J'
E1=LI*VL; # ENERGY STORED IN MAGNETIC FIELD
H=Ri*Ri; # HEAT
print'vii) Rate of Energy stored in magnetic field = ',round(E1,2),'W'
print'viii)Rate of dissipation of heat in resistor = ',round(H,2),' W'
print'ix)Rate of supply of battery energy = ',round(Ri,2),'W'
T=2000.; # TEMPERATURE
T1=15.; # ROOM TEMPERATURE
V=220.; # VOLTAGE
P=40.; # POWER
A15=0.005;
R=V*V/P; # RESISTANCE
R15=R/(1.+A15*(T-T1)); # RESISTANCE AT TIME OF SWITICHING
I=V/R15; # CURRENT
print'i)resistance = ',round(R,2),'ohm'
print'ii)resistance = ',round(R15,2),'ohm'
print'iii)current = ',round(I,2),'A'
# EXAMPLE 1-38 PG NO-32
from math import pi
F=50.; # Frequency
W=2.*pi*F;
print'i)W = ',round(W,2),'rad/sec'
t=0.0025; # time
Vm=10.;
A1=0.01;
A2=0.005;
i=((A2*Vm**2.)/2.)+0.0707;
print'ii)Current = ',round(i,2),'A'
# EXAMPLE 1-39 PG NO-32-33
V=440.; # voltage
V1=5.; # voltage
R=40.; # resistance
V2=220.;
V3=100.;
Rv=(V3*R)/(V2-V3); # insulation resistance
print'i)Resistance (Rv) = ',round(Rv,2),'Kohm'
Ri=(Rv*(V-V1))/V1; # insulation resistance
print'iii)Resistance(Ri) = ',round(Ri,2),'Kohm'
# EXAMPLE 1-40 PG NO-33
from math import pi
P=1.72*10.**-8.; # PRO
t=0.03; # distance
R=((4.*P)/(pi*0.03))*0.47; # Resistance
print'i)Resistance = ',round(R,7),'ohm'
# EXAMPLE 1-41 PG NO-33
from math import pi
P=1.72*10**-8; # PRO
t=0.03;
R=((P*pi)/(4.*0.03*0.47));
print'i)Resistance = ',round(R,7),'ohm'
# EXAMPLE 1-42 PG NO-34
import math
P=100.; # pro
L=0.5; # inductance
r1=0.15; # radius
r2=0.075; # radius
R=(100./(2.*math.pi*L))*(0.731); # resistance
print'i)Resistance = ',round(R,2),'ohm'
# EXAMPLE 1-44 PG NO-36
R1=12.; # Resistance
R2=0.2; # Resistance
R3=15.;
V1=(-(R2*R3)+R1)/3.; # voltage drop
print'i) VOLTAGE = ',round(V1,2),'V'
# EXAMPLE 1-46 PG NO37
import numpy
A=([85, -25],[-25, 135]); # Finding current
B=([60],[100]);
X=numpy.divide(A,B);#current
print'i)CURRENT = ',X,'A'
I1=0.977;
I2=0.922; # WE HAVE FOUNDED I1 and I2
I3=I1-I2;
print'ii)CURRENT = ',I3,'A'
# EXAMPLE 1-48 PG NO-39-40
R1=4.; # Resistance
R2=4.; # Resistance
R3=8.; # Resistance
RA=(R1*R2)/(R1+R2+R3);
print'i)RESISTANCE = ',round(RA,2),'ohm'
RB=(R1*R3)/(R1+R2+R3);
print'ii)RESISTANCE = ',round(RB,2),'ohm'
RC=(R2*R3)/(R1+R2+R3);
print'iii)RESISTANCE = ',round(RC,2),'ohm'
# EXAMPLE 1-48 PG NO-39-40
R1=6.8; # Resistance
R2=15.;
R3=10.;
RA=(R1*R2)/(R1+R2+R3);
print'i)RESISTANCE = ',round(RA,2),'ohm'
RB=(R1*R3)/(R1+R2+R3);
print'ii)RESISTANCE = ',round(RB,2),'ohm'
RC=(R2*R3)/(R1+R2+R3);
print'iii)RESISTANCE = ',round(RC,2),'ohm'
# EXAMPLE 1-50 PG NO-45
TR=17./6.; # TOTAL RESISTANCE
V=40.; # VOLTAGE
I=5.; # CURRENT
Vs=(TR*I)-V;
print'i)VOLTAGE = ',round(Vs,2),'V'
# EXAMPLE 1-51 PG NO-45-46
TR=2.05; # TOTAL RESISTANCE
V=2.; # VOLTAGE
P=V**2./TR; # ower
print'i)POWER = ',round(P,2),'W'
# EXAMPLE 1-52 PG NO-46
L1=1.;
L2=1.;
L3=1.; # INDUCTANCE
DL1=((L1*L2)+(L2*L3)+(L3*L1))/(L1*L2*L3);
print'i)DELTA INDUCTANCE = ',round(DL1,2),'H'
L4=1.5;
L5=1.5; # Inductance
L6=1.5;
L=(L4*(L5+L6))/(L4+L5+L6);
print'ii)INDUCTANCE = ',round(L,2),'H'
# EXAMPLE 1-53 PG NO-46-47
R1=200.; # RESISTANCE
R2=50.;
R3=30.;
R4=20.;
Rab=(R1*(R2+R3+R4))/(R1+R2+R3+R4); # equvalent resistance
print'i)RESISTANCE = ',round(Rab,2),'ohm'