#Variable declaration
M = 1.4 #value of magnetic field when filled with iron
H = 6.5*10**-4 #value of magnetic field in the interior
#Calculations
x = M/H
ur = 1+x
#Result
print "Relative permeability of iron is",round(ur,2),"(Calculation mistake in textbook)"
#Variable declaration
M = 3300 #value of magnetic filed(amp/m)
H = 220 #strength of magnetic filed(amp/m)
#Calculations
x = (M/H)+1
#Result
print "Relative permeability of iron is",round(x,2)
from math import pi
#Variable declaration
H = 10**6 #magnetic field intensity(amp/m)
x = 1.5*10**-3 #susceptibility
Uo = 4*pi*10**-7
#Calculations
M = x*H #magnetization of material
B = Uo*(M+H) #flux density
#Result
print "Magnetization =",round((M/1E+3),1),"*10^3 A/m"
print "Flux density =",round(B,3),"T"
from math import pi
#Variable declaration
H = 10**4 #magnetic field intensity(amp/m)
x = 3.7*10**-3 #susceptibility
Uo = 4*pi*10**-7
#Calculations
M = x*H #magnetization of material
B = Uo*(M+H) #flux density
#Result
print "Magnetization =",M,"A/m"
print "Flux density =",round(B,4),"wb/m^2"
from math import pi
#Variable declaration
I = 500*10**-3 #current(A)
d = 10*10**-2 #diameter of loop(m)
#Calculations
r = d/2 #radius(m)
A = 2*pi*r**2 #area(m^2)
Um = I*A
#Result
print "Magnetic moment =",round((Um/1E-3),3),"*10^-3 A-m^2"
#Variable declaration
r = 5.29*10**-11 #radius of the orbit(m)
B = 2 #field strength(Tesla)
e = 1.602*10**-19 #charge of an electron(C)
m = 9.108*10**-31 #mass of an electron(kg)
#Calculation
Uind = (e**2*r**2*B)/(4*m)
#Result
print "Change in magnetic moment =",round((Uind/1E-29),3),"*10^-29 A-m^2"
#Varaible declaration
T1 = 350 #temperature(K)
x1 = 2.8*10**-4 #susceptibility at T1
T2 = 300 #temperature(K)
#Calculation
x2 = (x1*T1)/T2
#Result
print "Susceptibility at 300k is",round((x2/1E-4),3),"*10^-4"
from math import pi
#Variable declaration
den = 8906 #density of nickel(kg/m^3)
N = 6.025*10**26 #Avogadro's number
Ma = 58.7 #atomic weight
Bs = 0.65 #magnetic induction(wb/m^2)
Uo = 4*pi*10**-7
#Calculations
n = (den*N)/Ma #no. of nickel atoms per m^3
#Since x is very large, B = n*Uo*Um
Um = Bs/(n*Uo))
#Result
print "Magnetic moment =",Um,"A-m^2"
import math
#Variable declaration
H = 2 #magnetic filed intensity(wb/m^2)
U = 9.4*10**-24
k = 1.38*10**-23
#Calculations
'''
n = c*no*exp(-Eg/kT) #no. of electrons
where Eg = -U*H
For parallel orientation,Eg = -U*H
For antiparallel orientation, Eg = U*H
therefore,
np = c*no*exp(U*H/kT) ---(1)
na = c*no*exp(-U*H/kT) ---(2)
Dividing (1) by (2), we get,'''
T = (2*U*H)/(math.log(2)*k)
#Result
print "T=",round(T,1),"K"
from math import pi
#Variable declaration
Uo = 4*pi*10**-7
Ma = 157.26 #atomic weight og gadolinium
den = 7.8*10**3 #density(kg/m^3)
N = 6.025*10**26 #Avogadro's number
x = 7.1 #Bohr magnetron per atom
Um = 9.27*10**-24
#Calculations
n = (den*N)/Ma #no. of atoms in 1 kg
n1 = n*10**-3 #no. of atoms in 1 gm
M = n1*x*Um #magnetic moment per gram(a-m^2)
Bs = n*Uo*Um #saturization magnetization
#Result
print "Magnetic moment per gram =",round(M,3),"Am^2"
print "Saturization magnetization =",round(Bs,3),"Wb/m^2(Calculation mistake in textbok)"