Chapter 3 , Electricity and Ohm's Law¶

Example 3.1 , Page Number 23¶

In :
import math

#Variables

W = 75.0     #Work done (in Joules)
Q = 50.0     #Charge produced (in Coulomb)

#Calculation
V = W/Q    #Voltage between battery terminals (in Volts)

#Result
print "Terminal voltage of a battery is ",V," V."
Terminal voltage of a battery is  1.5  V.

Example 3.2 , Page Number 23¶

In :
import math

#Variables

V = 1.5    #Voltage (in Volts)
E =7.5     #Energy produced (in Joules)

#Calculation
Q = E/V    #Charge separated ( in Coulomb )

#Result
print "The Amount of charge separated by the battery is ",Q," C."
The Amount of charge separated by the battery is  5.0  C.

Example 3.3 , Page Number 25¶

In :
import math

#Variables

Q = 7.5         #Charge (in Coulomb)
t = 0.5         #Time (in minute)

#Calculation

t = 0.5 * 60    #Time (in seconds)
I= Q/t          #Current (in Ampere)

#Result

print "The current in the element is ",I," A."
The current in the element is  0.25  A.

Example 3.4 , Page Number 25¶

In :
import math

#Variables

I = 5             #Current (in Ampere)
Q = 4 * 10**-3    #Charge (in Coulomb)

#Calculation
t = Q/I           #time (in seconds)

#Result
print "Time in which the 4 mC of charge flows through this element is ",t * 10**3," ms."
Time in which the 4 mC of charge flows through this element is  0.8  ms.

Example 3.5 , Page Number 25¶

In :
import math

#Variables

I = 0.3    #Current (in Ampere)
W = 9.45   #Heat (in Joules)
t = 5      #Time (in seconds)

#Calculation

Q = I * t
V = W/Q    #Voltage (in Volts)

#Result

print "The voltage across filament is ",V," volts."
The voltage across filament is  6.3  volts.

Example 3.6 , Page Number 28¶

In :
import math

#Variables

p = 2.83 * 10**-8    #Resistivity (in ohm-meter)
w = 0.5              #width (in meter)
t = 2 * 10**-3       #thickness (in meter)
l = 1                #length (in meter)

#Calculation

A = w * t            #Area of cross-section (in metersquare)
R = p*l/A            #Resistance (in ohm)

#Result

print "The resistance between left end and right end is ",R * 10**6," micro-ohm."
The resistance between left end and right end is  28.3  micro-ohm.

Example 3.7 , Page Number 28¶

In :
import math

#Case 1:

#Variables

w = 0.01              #width (in meter)
h = 0.01              #height (in meter)
l = 0.50              #length (in meter)
p = 3.5 * 10**-5      #Resistivity (in ohm-meter)

#Calculation

A = w * h             #Area of cross section (in metersquare)
R = p*l/A             #Resistance (in ohm)

#Result 1:

print "Resistance in case 1 is : ",R," ohm."

#Case 2:

#Variables

w = 0.50              #width (in meter)
h = 0.01              #height (in meter)
l = 0.01              #length (in meter)

#Calculation

A = w * h             #Area of cross section (in metersquare)
R = p*l/A             #Resistance (in ohm-meter)

#Result

print "Resistance in case 2 is: ",R," ohm."
Resistance in case 1 is :  0.175  ohm.
Resistance in case 2 is:  7e-05  ohm.

Example 3.8 , Page Number 28¶

In :
import math

#Variables

l = 120               #length of wire (in meter)
d = 0.25 * 10**-2     #Diameter of cross section (in meter)
p = 1.7 * 10**-8      #Resistivity (in ohm-meter)

#Calculation

r = d/2               #Radius of cross section (in meter)
A = math.pi *r*r      #Area of cross section (in metersquare)
R = p*l/A             #Resistance (in ohm)

#Result

print "Resistance of the wire is ",round(R,3)," ohm."
Resistance of the wire is  0.416  ohm.

Example 3.9 , Page Number 29¶

In :
import math

#Variables

p = 2.8 * 10**-8      #Resistivity (in ohm-meter)
d = 0.15 * 10**-2     #Diameter of wire (in meter)
R = 10                #Resistance (in ohm)

#Calculation

A = math.pi *d*d/4    #Area of cross section (in metersquare)
l = R*A/p             #Length of wire (in meter)

#Result

print "Length of the wire is ",round(l)," meter."
Length of the wire is  631.0  meter.

Example 3.10 , Page Number 29¶

In :
import math

#Variables

p = 1.7 * 10**-8             #Resistivity (in ohm-meter)
l = 2 * 150                  #Length (in meter)
R = 0.722                    #Resistance (in ohm)

#Calculation

A = p*l/R                    #Area of cross section (in metersquare)
d = (A * 4 / math.pi)**0.5   #diameter of wire (in meter)

#Result

print " Diameter of the wire is : ",round(d * 10**3)," mm."
Diameter of the wire is :  3.0  mm.

Example 3.11 , Page Number 30¶

In :
import math

#Variables

lc = 200                   #Length of copper wire (in meter)
Rc = 1.5                   #Resistance of Copper wire(in ohm)
pc = 1.7 * 10**-8          #Resistivity of  (in ohm-meter)
ls = 10                    #Length of silver wire (in meter)
ps = 1.6 * 10**-8          #Resistivity of Silver (in ohm-meter)

#Calculation

A = pc * lc / Rc           #Area of cross section (in metersquare)
Rs = ps * ls / A           #Resistance of silver wire(in ohm)

#Result

print "The resistance of silver wire is ",round(Rs,2)," ohm."
The resistance of silver wire is  0.07  ohm.

Example 3.12 , Page Number 32¶

In :
import math

#Variables

T1 = 800                                 #Temperature (in celsius degeree)
T2 = 2250                                #Temperature (in celsius degeree)
R20 = 3.49                               #Resistance at 20 degree celsius (in ohm)
alpha20 = 4.5 * 10**-3                   #Temperature coefficient at 20 degree celsius (in per degree Celsius)

#Calculation

R800 = R20 * (1 + alpha20*(T1 - 20))     #Resistance at 800 degree celsius (in ohm)
R2250 = R20 * (1 + alpha20*(T2-20))      #Resistance at 2250 degree celsius (in ohm)

#Result

print "Resistance at 800 degree celsius is ",round(R800,1), " ohm.\nResistance at 2250 degree celsius is ",round(R2250,1)," ohm."
Resistance at 800 degree celsius is  15.7  ohm.
Resistance at 2250 degree celsius is  38.5  ohm.

Example 3.13 , Page Number 32¶

In :
import math

#Variables

T1 = 20                              #Temperature (in degree celsius)
R1 = 10000                           #Resistance at 20 degree celsius (in ohm)
T2 = -25                             #Temperature (in degree celsius)
alpha = 0.0039                       #Temperature coefficient at 20 degree celsius (in per degree Celsius)

#Calculation

R80 = R1*(1 + alpha*(80 - T1))       #Resistance at 80 degree celsius (in ohm)
RT2 = R1*(1 + alpha*(-25 - T1))      #Resistance at -25 degree celsius (in ohm)

#Result

print "Resistance at 80 degree celsius is ",round(R80 * 10**-3,1)," kilo-ohm.\nResistance at -25 degree celsius is ",round(RT2 * 10**-3,1)," kilo-ohm."
Resistance at 80 degree celsius is  12.3  kilo-ohm.
Resistance at -25 degree celsius is  8.2  kilo-ohm.

Example 3.14 , Page Number 32¶

In :
import math

#Variables

p = 14 * 10**-8                   #Resistivity of gold (in ohm-meter)
alpha = 5.8 * 10**-4              #Temperature coefficient (in per degree celsius)
l = 3                             #Length (in meter)
d = 13 * 10**-6                   #diameter of wire

#Calculation

A = math.pi * d * d / 4           #Area of cross-section (in metersquare)
R = p * l /A                      #Resistance of wire at 20 degree celsius(in ohm)
R1 = R*(1 + alpha*(200-20))
#Result

print "Resistance of wire at 200 degree celsius is ",round(R1,1)," ohm."
Resistance of wire at 200 degree celsius is  3494.6  ohm.

Example 3.15 , Page Number 34¶

In :
import math

#Variables

R = 10*10**-3       #Resistance (in ohm)

#Calculation

G = 1/R             #Conductance (in siemens)

#Result

print "The conductance of gold conductor is ",G," siemens."
The conductance of gold conductor is  100.0  siemens.

Example 3.16 , Page Number 34¶

In :
import math

#Variables

R = 10.0*10**3       #Resistance (in ohm)

#Calculation

G = 1/R              #Conductance (in siemens)

#Result

print "The conductance of gold conductor is ",G," siemens."
The conductance of gold conductor is  0.0001  siemens.

Example 3.17 , Page Number 34¶

In :
import math

#Variables

G = 50*10**-6         #Conductance (in siemens)

#Calculation

R = 1/G               #Resistance (in ohm)

#Result

print "The Resistance is ",R * 10**-3," kilo-ohm."
The Resistance is  20.0  kilo-ohm.

Example 3.18 , Page Number 35¶

In :
import math

#Variables

V = 18                   #Voltage (in volts)
I = 60*10**-6            #current (in Ampere)

#Calculation

R = V/I                  #Resistance (in ohm)
G = 1/R                  #Conductance (in siemens)

#Result

print "The conductance is ",round(G * 10**6,2)," micro-siemens."
The conductance is  3.33  micro-siemens.

Example 3.19 , Page Number 38¶

In :
import math

#Variables

R = 600.00               #Resistance (in ohm)
V = 230.00               #Voltage (in volts)

#Calculation

I = V/R                  #Current (in Ampere)

#Result

print "Current in the power line is ",round(I,3)," A."
Current in the power line is  0.383  A.

Example 3.20 , Page Number 39¶

In :
import math

#Variables

R = 8                 #Resistance (in ohm)
I = 2.5               #Current (in Ampere)

#Calculation

V = I*R               #Voltage (in volts)

#Result

print "The maximum safe voltage is ",V," volts."
The maximum safe voltage is  20.0  volts.

Example 3.21 , Page Number 39¶

In :
import math

#Variables

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

#Calculation

V = I*R                 #Voltage (in volts)

#Result

print "The voltage that must be applied to the relay coil to energize it is ",V," volts."
The voltage that must be applied to the relay coil to energize it is  24.0  volts.

Example 3.22 , Page Number 39¶

In :
import math

#Variables

I = 20 * 10**-3              #Current per segment (in Ampere)
V = 5                        #Voltage (in volts)

#Calculation

R = V/I                      #Resistance (in ohm)

#Result

print "Resistance that must be inserted into the circuit of each segment is ",R," ohm."
Resistance that must be inserted into the circuit of each segment is  250.0  ohm.

Example 3.23 , Page Number 39¶

In :
import math

#Variables

V = 7 * 2                  #Voltage : 7 div * (2 V/div) (in volts)
I = 5 * 5 * 10**-3         #Current : 5 div * (5 * 10**-3) (in Ampere)

#Calculation

R = V/I                    #Resistance (in ohm)

#Result

print "The value of resistance is ",R," ohm."
The value of resistance is  560.0  ohm.

Example 3.24 , Page Number 42¶

In :
import math

#Variables

W = 64000                    #Heat produced (in Joules)
t = 40                       #time (in seconds)

#Calculation

P = W/t                      #Rate at which electrical energy is converted into heat energy (in watt)

#Result

print "The rate at which electrical energy is converted into heat energy is : ",P," W."
The rate at which electrical energy is converted into heat energy is :  1600  W.

Example 3.25 , Page Number 42¶

In :
import math

#Variables

I = 5                 #Current (in Ampere)
V = 230               #Voltage (in volts)

#Calculation

P = V*I               #Power consumed (in watt)

#Result

print "The power consumed by the toaster is: ",P," watt."
The power consumed by the toaster is:  1150  watt.

Example 3.26 , Page Number 42¶

In :
import math

#Variables

P = 36.0               #Power consumed (in watt)
V = 230.0              #Voltage (in volts)

#Calculation

I = P/V                #Current (in Ampere)

#Result

print "Current through filament is ",round(I,3)," A."
Current through filament is  0.157  A.

Example 3.27 , Page Number 42¶

In :
import math

#Variables

P = 150 *12/1000.0        #Power consumed by 12 bulbs (in kilowatt)
t = 10.0                  #Time (in hours)

#Calculation

W = P * t                 #Energy used (in kWh)

#Result

print "The energy used is ",W," kWh."
The energy used is  18.0  kWh.

Example 3.28 , Page Number 42¶

In :
import math

#Variables

Ps = 500.0                   #Power of stereo system (in watt)
Pa = 2400.0                  #Power of air conditioner (in watt)
t = 3                        #time (in hours)

#Calculation

P = (Ps + Pa)/1000           #Total power consumed (in kilowatt)
W = P * t                    #Energy used (in kilowatthour)

#Result

print "The energy used is ",W," kWh."
The energy used is  8.7  kWh.

Example 3.29 , Page Number 43¶

In :
import math

#Variables

V = 230.0               #Voltage (in volts)
P = 180.0               #Power (in watt)

#Calculation

I = P/V                 #Current (in Ampere)

#Result

print "The input current is ",round(I,3)," A."
The input current is  0.783  A.

Example 3.30 , Page Number 43¶

In :
import math

#Variables

V = 24.0                      #Voltage (in volts)
I = 2.0                       #Current (in Ampere)
Pb = 0.5                      #Power rating of each light bulb (in watt)

#Calculation

P = V * I                     #Maximum power (in watt)
P80 = P * 0.8                 #80% of power rating (in watt)
n = (P80//Pb)                 #Number of bulbs required

#Result

print "The number of bulbs required is ",n,"."
The number of bulbs required is  76.0 .

Example 3.31 , Page Number 44¶

In :
import math

#Variables

R = 750.0               #Resistance (in ohm)
I = 32.0                #Current (in milliAmpere)

#Calculation

P = I**2 * 10**-6 * R   #Power (in watt)

#Result

print "Power consumed by relay coil is ",P*1000," mW."
Power consumed by relay coil is  768.0  mW.

Example 3.32 , Page Number 44¶

In :
import math

#Variables

R = 36.0                   #Resistance (in ohm)
V = 230.0                  #Voltage (in volts)

#Calculation

P = V**2/R                 #Power (in watt)

#Result

print "Power rating is ",round(P/1000,3)," kW."
Power rating is  1.469  kW.

Example 3.33 , Page Number 45¶

In :
import math

#Variables

P = 36              #Power (in watt)
V = 230.0           #Voltage (in volts)

#Calculation

R = V**2/P          #Resistance (in ohm)

#Result

print "Resistance of the heating element is ",round(R)," ohm."
Resistance of the heating element is  1469.0  ohm.

Example 3.34 , Page Number 45¶

In :
import math

#Case a :

#Variables

R = 8.0            #Resistance (in ohm)
P1 = 60.0          #Power (in watt)

#Calculation

I1 = (P1/R)**0.5   #Current (in Ampere)

#Case b :

#Variables

R = 8.0            #Resistance (in ohm)
P2 = 120.0         #Power (in watt)

#Calculation

I2 = (P2/R)**0.5   #Current (in Ampere)

#Result

print "Maximum new current is ",round(I1,2)," A.\nMaximum new current is ",round(I2,2)," A."
Maximum new current is  2.74  A.
Maximum new current is  3.87  A.

Example 3.35 , Page Number 46¶

In :
import math

#Variables

R = 30.0               #Resistance (in kiloohm)
I                      #Value of previous current (in Ampere)
I1 = 1.5*I             #New value of current (in Ampere)

#Calculation

P = I**2 * R           #Power dissipated due to previous current (in kilowatt)
P1 = I1**2 * R         #Power dissipated due to new current (in kilowatt)
P2 = (P1 - P)/P * 100  #Percentage increase in power dissipation

#Result

print "Percentage Increase in power dissipation is ",P2," %."
Percentage Increase in power dissipation is  125.0  %.

Example 3.36 , Page Number 46¶

In :
import math

#Variables

V = 6.0                  #voltage (in volts)
C = 2.0                  #Capacity of battery (in Ampere-hour)
P = 1.2                  #Power rating (in watt)

#Calculation

R = V**2 / P             #Resistance (in ohm)
I = V/R                  #Current  (in Ampere)
t = C/I                  #time (in hour)

#Result

print "Battery will last for ",t," hours."
Battery will last for  10.0  hours.