import math
from __future__ import division
#given
X=-0.5E-5; #magnetic susceptibility of silicon
H=0.9E4; #in A/m (magnetic field intensity)
mu0=4*3.14*1E-7; #in H/m (absolute permeability)
#calculate
I=X*H; #calculation of intensity of magnetism
B=mu0*H*(1+X); #calculation of magnetic flux density
#result
print"The intensity of magnetism is I=",I,"A/m";
print"The magnetic flux density is B=",round(B,3),"Wb/m^2";
print "NOTE: The answer in the textbook is wrong"
import math
from __future__ import division
#given
r=0.052; #in nm (radius of orbit)
B=1; #in Wb/m^2 (magnetic field of induction)
e=1.6E-19; #in C (charge of electron)
m=9.1E-31; #in Kg (mass of electron)
#calculate
r=0.052*1E-9; #changing unit from nm to m
d_mu=(e**2*r**2*B)/(4*m); #calculation of change in magnetic moment
#result
print"The change in magnetic moment is =",'%.3E'%d_mu,"Am^2";
print "NOTE: The answer in the textbook is wrong"
import math
from __future__ import division
#given
H=220; #in A/m (magnetic field intensity)
I=3300; #in A/m (intensity of magnetisation)
#calculate
mu_r=1+(I/H); #calculation of relative permeability
#result
print"The relative permeability of a ferromagentic material is =",mu_r;
import math
from __future__ import division
#given
I=3000; #in A/m (intensity of magnetisation)
B=0.005; #in Wb/m^2 (magnetic flus intensity)
pi=3.14; #value of pi used in the solution
mu0=4*pi*1E-7; #in H/m (absolute permeability)
#calculate
H=(B/mu0)-I; #calculation of magnetic force
mu_r=(I/H)+1; #calculation of relative permeability
#result
print"The magnetic force is H=",round(H,3);
print"The relative permeability is =",round(mu_r,3);
import math
from __future__ import division
#given
H=4E3; #in A/m (magnetic field intensity)
N=60; #number of turns
l=12; #in cm (length of solenoid)
#calculate
n=N/(l*1E-2); #calculation of number of turns per unit metre
#Snice H=n*i;
i=H/n; #calculation of current through the solenoid
#result
print"The current through the solenoid is i=",i,"A";
import math
from __future__ import division
#given
l=30; #in cm (length of solenoid)
A=1; #in cm^2 (cross-sectional area)
N=300; #number of turns
i=0.032; #in A (current through the winding)
phi_B=2E-6; #in Wb (magnetic flux)
pi=3.14; #value of pi used in the solution
mu0=4*pi*1E-7; #in H/m (absolute permeability)
#calculate
l=l*1E-2; #changing unit from cm to m
A=A*1E-4; #changing unit from cm^2 to m^2
B=phi_B/A; #calculation of flux density
H=N*i/l; #calculation of magnetic intensity
mu=B/H; #calcluation of absolute permeability of iron
mu_r=mu/mu0; #calcluation of relative permeability of iron
#result
print"The flux density is B=",B,"Wb/m^2";
print"The magnetic intensity is H=",H,"A-turns/m";
print"The relative permeability of iron is =",round(mu_r)," (roundoff error)";
import math
from __future__ import division
#given
A=100; #in m^2 (area of Hysteresis loop)
B=0.01; #in Wb/m^2 (unit space along vertical axis or magnetic flux density)
H=40; #in A/m (unit space along horizontal axis or magnetic fild ntensity)
#calculate
H_L=A*B*H; #calculation of magnetic intensity
#result
print"The Hystersis loss per cycle is =",round(H_L),"J/m^2";