Chapter 10: Electromagnetism

Example 10.15, Page 10.42

In [1]:
# Given 
n = 2000 # flux lines enter in given volume  in Vm
n_ = 4000 # flux lines diverge from given volume in Vm
e0 = 8.85e-12 # permittivity of space

#Calculations
fi = n_ - n
q = e0 * fi

#Result
print 'The total charge within volume(in C) = ',q
The total charge within volume(in C) =  1.77e-08

Example 10.16, Page 10.42

In [1]:
# Given 
n = 20000 # flux lines entering in given volume in Vm
n_ = 45000 # flux lines entering out from given volume in Vm
e0 = 8.85e-12 # permittivity of space

#Calculations
fi = n_ - n
q = e0 * fi

#Result
print "The total charge enclosed by closed surface is %.3e C"%q
The total charge enclosed by closed surface is 2.212e-07 C

Example 10.17, Page 10.43

In [3]:
# Given 
q = 13.5e-6 # charge enclosed at the centre of cube in C
l = 6 # length of the side of cube in cm
e0 = 8.85e-12 # permittivity of space

#Calculations
fi = q / e0
fi_ = fi / 6
q = e0 * fi

#Results
print "Electric flux through the whole volume of the cube is %.3e Nm^2/C\nElectric flux through one face of the cube is %.2e Nm^2/C"%(fi,fi_)
Electric flux through the whole volume of the cube is 1.525e+06 Nm^2/C
Electric flux through one face of the cube is 2.54e+05 Nm^2/C

Example 10.18, Page 10.43

In [4]:
# Given 
q = 11 # charge enclosed at the centre of cube in C
l = 5 # length of the side of cube in cm
e0 = 8.85e-12 # permittivity of space

#Calculation
fi_ = (q / e0) / 6

#Result
print " Electric flux through each surface of the cube = %.2e Nm^2/C"%fi_
 Electric flux through each surface of the cube = 2.07e+11 Nm^2/C

Example 10.19, Page 10.43

In [5]:
from math import pi

# Given 
q = 1e-8 # charge uniformly spread over metallic sphere in C
r = .1 #radius of sphere in m
d = 7 # distance of a point from centre of the sphere in cm
d_ = .5 # distance of another point from centre of the sphere in m
e0 = 8.85e-12 # permittivity of space

#calculations
E1 = (1 / (4 * pi * e0) * (q / r**2))
E2 = 0 #because sphere is metallic
E3 = (1 / (4 * pi * e0) * (q / d_**2))

#Result
print "Electric field intensity-\n(1) On the surface of the sphere = %.e N/C\n(2) At first point = %d N/C\n(3)At second point = %.2e N/C"%(E1,E2,E3)
Electric field intensity-
(1) On the surface of the sphere = 9e+03 N/C
(2) At first point = 0 N/C
(3)At second point = 3.60e+02 N/C

Example 10.20, Page 10.44

In [6]:
from math import pi

# Given 
q = 1.6e-19 # charge on a proton in C
d = 1e-10 # distance of a point from proton in m
e0 = 8.85e-12 # permittivity of space

#Calculation
E = (1 / (4 * pi * e0)) * (q / d**2)

#Result
print "Electric field = %.2e V/m"%E
Electric field = 1.44e+11 V/m

Example 10.21, Page 10.44

In [7]:
# Given 
v = 1000 # potential through which alpha particle accelerated in V
q = 3.2e-19 # charge on an alpha particle in C
e0 = 8.85e-12 # electric permittivity of space

#calculation
E = q * v

#Result
print "Energy gained by alpha particle = %.1e J"%E
Energy gained by alpha particle = 3.2e-16 J

Example 10.22, Page 10.44

In [8]:
from math import pi

# Given 
q = 1.6e-19 # charge on a proton in C
d = 1e-10 # distance of a point from proton in m
d_ = 2e-11 # distance of another point from proton in m
e0 = 8.85e-12 # permittivity of space

#calculations
v = (1 / (4 * pi * e0)) * (q / d)#calculation for potential at first point
E = -q * v#calculation for energy at first point in J
delta_v = (1 / (4 * pi * e0)) * q * ((1 / d_) - (1 / d))#calculation for potential difference between points

#Result
print "Potential energy at first point = %.1f eV\nPotential difference between points = %.1f V"%(E/q,delta_v)
Potential energy at first point = -14.4 eV
Potential difference between points = 57.5 V

Example 10.23, Page 10.45

In [9]:
from math import pi, ceil

# Given 
q = 1.5e-6 # charge in C
v = 30 # potential of a surface in V
e0 = 8.85e-12 # permittivity of space

#Calculation
r = (1 / (4 * pi * e0)) * (q / v)

#Result
print "Radius of equipotential surface = %d m"%ceil(r)
Radius of equipotential surface = 450 m

Example 10.24, Page 10.45

In [10]:
from math import pi

# Given 
p = 3.8e26 # power radiated by sun in W
r = 7e8 # radius of sun in m
e0 = 8.85e-12 # permittivity of space

#Calculation
s = p / (4 * pi * r**2)

#Result
print "The value of poynting vector at the surface of the sun = %.3e W/m^2"%s
The value of poynting vector at the surface of the sun = 6.171e+07 W/m^2

Example 10.25, Page 10.45

In [1]:
#Given
Se = (2*4.2)/(60*10**-4)   #J/m^2-sec
c = 3*10**8                #m/s
res = 1.4*10**11           #m
rs = 7*10**7               #W/m^2

#Calculations
Prad_e = Se/c
Ss = Se*((res/rs)**2)
Prad_s = Ss/c

#Results
print "Radiation pressure at the surface of the earth =%.2e N/m^2"%Prad_e
print "Radiation pressure at the surface of the sun =%.3e N/m^2"%Prad_s
Radiation pressure at the surface of the earth =4.67e-06 N/m^2
Radiation pressure at the surface of the sun =1.867e+01 N/m^2

Example 10.28, Page 10.47

In [2]:
from math import sqrt

# Given 
s = 2 # energy received by the earth in cal/cm^2.min
e0 = 8.85e-12 # electric permittivity of space
mu0 = 1.2567e-6 # magnetic permittivity of space
c = 3e8 # speed of light in meter/sec

#calculations
r = sqrt(mu0 / e0)
P = s*4.2/(60*1e-4)
E = sqrt(P*r)
H = E/r

#Result
print "Magnitude of electric field vector = %.1f v/m\nMagnitude of magnetic field vector = %.3f A/m"%(E * sqrt(2),H*sqrt(2))
Magnitude of electric field vector = 1027.2 v/m
Magnitude of magnetic field vector = 2.726 A/m

Example 10.29, Page 10.48

In [3]:
from math import sqrt

# Given 
H = 1 # magnitude of magnetic field vector A/m
e0 = 8.85e-12 # electric permittivity of space
mu0 = 1.2567e-6 # magnetic permittivity of space
c = 3e8 # speed of light in meter/sec

#Calculations
r = sqrt(mu0 / e0) # ratio of E,H
E = H * r

#Result
print "Magnitude of electric field vector = %.2f v/m."%E
Magnitude of electric field vector = 376.83 v/m.

Example 10.31, Page 10.48

In [4]:
from math import sqrt, pi

# Given 
p = 1000 # power of lamp in W
d = 2 # distance of a point from lamp in meter
e0 = 8.85e-12 # electric permittivity of space
mu0 = 1.2567e-6 # magnetic permittivity of space
c = 3e8 # speed of light in meter/sec

#Calculations
s = p / (4 * pi * d**2) #calculation for 
r = sqrt(mu0 / e0) # ratio of E,H
E = sqrt(s * r)#calculation for average value of intensity of electric field of radiation

#Result
print "Average value of the intensity of electric field of radiation = %.2f v/m."%E
Average value of the intensity of electric field of radiation = 86.58 v/m.

Example 10.32, Page 10.49

In [5]:
from math import sqrt

# Given 
k = 81 # relative permittivity of water 
c = 3e8 # speed of light in meter/sec

#Calculations
mu = sqrt(k)
v = c / mu

#Result
print "Refractive index of distilled water is %d \nSpeed of light in water is %.2e m/sec"%(mu,v)
Refractive index of distilled water is 9 
Speed of light in water is 3.33e+07 m/sec