Chapter 2: Maxwell's Equations

Example 1,Page No:33

In [1]:
import math

# Variable Declaration
# µr1 = 3;     # relative permeability of region 1
# µr2 = 5;     # relative permeability of region 2
#  H1 = (4ax + 3ay -6az)A/m;   Magnetic field intensity
# Therefore B1 = µoµr1H1
#              = µo(12ax + 9ay -18az)A/m
# since normal component of (B) is continuous across the interface
# Therefore, B2 = µo[12ax + 9(µr2/µr1)ay -18(µr2/µr1)az]
#               = µo[12ax + 15ay - 30az]
#            H2 = [12/5ax + 15/5ay - 30/5az]A/m
#            H2 = (2.4ax + 3ay - 6az)
H2      = math.sqrt((2.4**2) + (3**2) + (6**2));

# output
print'Magnetic field intensity in region- 2 = %3.3f A/m'%H2;
Magnetic field intensity in region- 2 = 7.125 A/m

Example 10, Page No:40

In [17]:
import math

# Variable Declaration
# D  = 3*10**-7 sin(6*10**7 - 0.35x)az
er = 100;       # relative permitivity

# Calculations
# ∂D/∂t =  3*10**-7 * 6*10**7* cos(6*10**7 - 0.35x)az
A =  3*10**-7 * 6*10**7

#output
print'Amplitude of displacement current density = %d A/m**2'%A;
Amplitude of displacement current density = 18 A/m**2

Example 13,Page No:42

In [4]:
import math;

# Variable Declaration

#E = 20π e**j(wt - βz)ax
#H = Hm e**j(wt + βz)ay
lamda = 1.8;         # wavelength in m
c     = 3*10**8;     # vel. in m/s
er    = 49;          # relative permitivity
ur    = 1;           # relative permeability
Em    = 20*math.pi      # from the given expression

# Calculations
v     = c/float(math.sqrt(er));    # velocity of propagation of wave in medium with er rel.permitivity
w     = (2*math.pi*v)/float(lamda);
# let k = E/H
k = (120*math.pi)*math.sqrt(ur/float(er));
Hm = Em/float(k);
# sign of Hm can be determined by evaluating the maxwells eqn
# V*E = ∂B/∂x 
# V*E = -j20π e**j(wt - βz)ay              ---------------- 1
# -∂B/∂x = -juow Hm e**j(wt + βz)ay        ---------------- 2
# comparing 1 and 2 singn of Hm must be positive

# Output
print'w = %3.1e rad/s\n'%w;
print'Hm = %3.2f A/m'%Hm;
w = 1.5e+08 rad/s

Hm = 1.17 A/m

Example 14,Page No:42

In [8]:
import math
# given data
f       = 1000;     # frequency in Hz
sigma   = 5*10**7;   # conductivity in mho/m
er      = 1;        # relative permitivity 
eo      = 8.85*10**-12;  # permitivity
#J     = 10**8sin(wt-444z)ax A/float(m**2)

# Calculations
w       = 2*math.pi*f
# J  = σE
# E  = 10^8sin(wt-444z)ax/sigma
# E  = 0.2sin(6280t-444z)ax
# D  = eoerE
# D  = 8.85*10**-12*0.2sin(6280t-444z)ax
# ∂D/∂t = 1.77*1088-12*6280cos(6280t - 444z)ax
A     =  1.77*10**-12*6280
#output
print'Amplitude of displacement current density = %3.2e A/m^2'%A;
print'\nNote: calculation mistake in textbook';
Amplitude of displacement current density = 1.11e-08 A/m^2

Note: calculation mistake in textbook