from math import *
# Given
r = 0.53e-10 # radius of orbit in m
f = 6.6e15 # frequency of revolution in Hz
h = 6.6e-34 # Planck constant in J sec
e = 1.6e-19 # charge on an electron in C
m = 9.1e-31 # mass of electron in kg
#Calculations
M = e * f * pi * r**2
mu = (e * h) / (4 * pi * m)
#Result
print "Magnetic moment is %.3e Am^2\nBohr magneton is %.2e J/T"%(M,mu)
from math import *
# Given
X = -4.2e-6 # magnetic susceptibility
H = 1.19e5 # magnetic field in A/m
mu_ = 4 * pi * 1e-7 # magnetic permeability of space
#Calculations
I = X * H
B = mu_ * (H + I)
mur = (1 + I/H)
#Results
print "Magnetisation is %.2f A/m\nFlux density is %.3f T\nRelative permeability is %.2f"%(I,B,mur)
# Given
X = 1.2e-5 # magnetic susceptibility of magnesium
#Calculations
p = 100 * X
#Result
print "Percentage increase in magnetic induction is %.4f percent"%p
from math import *
# Given
X = -0.4e-5 # magnetic susceptibility of material
H = 1e4 # magnetic field in A/m
mu_ = 4 * pi * 1e-7 # magnetic permittivity of space
#Calculations
I = X * H
B = mu_ * (H + I)
#Result
print "Magnetisation is %.2f A/m\nMagnetic flux density is %f T"%(I,B)
from math import *
# Given
X = 2.3e-5 # magnetic susceptibility of aluminium
mu_ = 4 * pi * 1e-7 # magnetic permeability of space
#Calculations
mur = 1 + X
mu = mu_ * mur
#Result
print "Permeability of aluminium is %.2e N/A^2"%mu
from math import pi
# Given
X = 9.4e-2 # magnetic susceptibility
mu_ = 4 * pi * 1e-7 # magnetic permeability of space
#Calculations
mu_r = 1 + X
mu = mu_ * mu_r
#Results
print "Absolute permeability is %.2e N/A^2\nRelative permeability is %.3f"%(mu,mu_r)
from math import *
# Given
mu = 0.126 # maximum value of the permeability in N/A^2
mu_ = 4 * pi * 1e-7 # magnetic permeability of space
#Calculations
mu_r = mu / mu_
X = mu_r - 1
#Results
print "Magnetic susceptibility is %.f\nRelative permeability is %e"%(X,mu_r)
#Answers differ due to rounding off values
from math import pi
# Given
r = 0.6e-10 # radius of the atom
N = 28e26 # no. of electron in per m^3
mu_ = 4 * pi * 1e-7 # magnetic permeability of space
Z = 2 # atomic no. of helium
m = 9.1e-31 # mass of an electron in kg
e = 1.6e-19 # charge on an electron in C
#Calculations
Chi = -(mu_ * Z * N * r**2 * e**2) / (6 * m)
#Result
print "Diamagnetic susceptibility is %.3e"%Chi
from math import pi
# Given
H = 1e3 # magnetisation field in A/m
phi = 2e-5 # magnetic flux in Weber
a = 0.2e-4 # area of cross section in m^2
mu_ = 4 * pi * 1e-7 # magnetic permeability of space
#Calculations
B = phi / a
mu = B / H
X = mu / mu_ - 1
#Results
print "Permeability is %.e N/A^2\nSusceptibility is %.3f"%(mu,X)
# Given
l = 1 # length of iron rod in m
a = 4e-4 # area in m^2
mu = 50e-4 # permeability of iron in H/m
Phi = 4e-4 # magnetic flux in Weber
#Calculations
B = Phi / a
NI = B / mu
#Result
print "Number of ampere turns is %d A/m"%NI
from math import *
# Given
n = 200 # no. of turns
l = 0.5 # the mean length of iron wire in m
phi = 4e-4 # magnetic flux in Weber
a = 4e-4 # area of cross section in m^2
mu = 6.5e-4 # permeability of iron in wb/Am
mu_ = 4 * pi * 1e-7 # magnetic permeability of space
#Calculations
B = phi / a
N = n / l
I = B / (mu * N)
#Result
print "Current through the winding is %.2f A"%I
from math import pi
# Given
X = -5.6e-6 # magnetic susceptibility of material
a = 2.55e-10 # lattice constant in m
H = 1e4 # magnetic field in A/m
mu_ = 4 * pi * 1e-7 # magnetic permittivity of space
m = 9.1e-31 # mass of electron in kg
e = 1.6e-19 # charge in an electron in C
#Calculations
N = 2 / a**3
z = 1
R = ((-X * 6 * m) / (mu_ * z * e**2 * N))**(1./2)
#Result
print "Radius of atom is %.2f A"%(R * 1e10)
from math import pi
# Given
N = 6.5e25 # no. of atom per m^3
T = 300 # room temperature in K
mu_ = 4 * pi * 1e-7 # magnetic permittivity of space
k = 1.38e-23 # Boltzmann's constant in J/K
m = 9.1e-31 # mass of electron in kg
e = 1.6e-19 # charge in an electron in C
h = 6.62e-34 # Planck constant in J sec
#Calculations
M = (e * h) / (4 * pi * m)
X = (mu_ * N * M**2) / (3 * k * T)
#Result
print "Susceptibility is %.3e"%X
from math import *
# Given
w = 168.5 # molecular weight
d = 4370 # density of material in kg/m^3
H = 2e5 # magnetic field in A/m
T = 300 # room temperature in K
mu_ = 4 * pi * 1e-7 # magnetic permittivity of space]
NA = 6.02e26 # Avogadro no. in per kg
mu_b = 9.24e-24 # Bohr magnetons in Am^2
k = 1.38e-23 # Boltzmann's constant in J/K
#Calculations
N = d * NA / w
X = (mu_ * N * (2 * mu_b)**2) / (3 * k * T)
I = X * H
#Result
print "Magnetisation is %.2f A/m"%I
# Given that
A = 2500 # area of hysteresis loop
m = 10000 # weight in kg
d = 7.5 # density of material in g/cm^3
f = 50 # frequency in Hz
#Calculations
E = f * A * 3600
V = m / d
L = E * V
#Result
print "Total loss of energy per hour is %.e ergs"%L
# Given
H = 5e3 # coercivity in A/m
l = 0.10 # length of solenoid in m
n = 50 # no. of turns
#Calculations
N = n / l
i = H / N
#Result
print "Current in solenoid should be %d A"%i
# Given
l = 0.50 # length of iron rod in m
a = 4e-4 # area of cross section of rod in m^2
mu = 65e-4 # permeability of iron in H/m
fi = 4e-5 # flux in weber
#Calculations
B = fi / a
H = B / mu
N = H * l
#Result
print "Number of turns are %.2f"%N
from math import *
# Given
H = 600 # magnetic flux in A/m
a = 0.2e-4 # area of cross section of rod in m^2
phi = 2.4e-5 # flux in weber
mu_ = 4*pi * 1e-7 # permeability of space in N/A^2
#Calculations
B = phi / a
mu = B / H
X = mu / mu_ - 1
#Result
print "Permeability is %.3f N/A^2\nSusceptibility is %.f"%(mu,X)
from math import *
# Given
X = 9.5e-9 # susceptibility of medium
mu_ = 4*pi * 1e-7 # permeability of space in N/A^2
#Calculations
mu = mu_ * (1 + X)
mu_r = mu / mu_
#Result
print "Relative permeability is 1 + %.3e"%(mu_r -1)
# Given
a = 250. # area of the B-H loop in J/m^3
f = 50. # frequency in Hz
d = 7.5e3 # density of iron in kg/m^3
m = 100. # mass of core in kg
#Calculations
V = m / d
n = 3600 * f
A = a * V * n
#Result
print "Energy loss per hour is %.3e J"%A
#Answer varies due to rounding-off values
# Given
B_max = 1.375 # maximum value of B in Wb/m^2
a = 0.513 # area of the loop in cm^2
k = 1000 # value of 1 cm on x axis in A/m
k_ = 1 # value of 1 cm on y axis in Wb/m^2
B = 1.375 # alternating magnetic flux density in Wb/m^2
v = 1e-3 # volume of specimen in m^3
f = 50 # frequency in Hz
#Calculations
K = a * k * k_
L = K * v * f
#Result
print "Hysteresis loss per sec is %.2f W"%L