#Example 18.1 : magnetization and flux density
import math
#given data :
mu0=4*math.pi*10**-7;
H=10**4;# in A/m
Xm=3.7*10**-3;# room temperature
mu_r=1+Xm;
B=mu0*mu_r*H;
M=Xm*H;
print "{:.2e}".format(B),"= the flux density,B(Wb/m**2) "
print M,"= magnetization,M(A/m) "
#Example 18.2.a : saturation magnetization
#given data :
mu_b=9.27*10**-24;# A.m**2
p=8.9; # in g/cm**3
Na=6.023*10**23;# avogadro's number
A=58.71; # in g/mol
n=((p*Na)/A)*10**6;
Ms=0.60*mu_b*n;
print "{:.1e}".format(Ms),"= saturation magnetization,Ms(A/m) "
# the answe ris slightly different in textbook due to approximation
#Example 18.2.b : saturation flux density
import math
#given data :
mu0=4*math.pi*10**-7;
mu_b=9.27*10**-24;# A.m**2
p=8.9; # in g/cm**3
Na=6.023*10**23;# avogadro's number
A=58.71; # in g/mol
n=((p*Na)/A)*10**6;
Ms=0.60*mu_b*n;
Bs=mu0*Ms;
print round(Bs,2),"= saturation flux density,Bs(tesla) "
#Example 18.3 : magnetic moment
import math
#given data :
mu0=4*math.pi*10**-7;
mu_b=9.27*10**-24;# A.m**2
p=8.9; # in g/cm**3
Na=6.023*10**23;# avogadro's number
A=58.71; # in g/mol
n=((p*Na)/A)*10**6;
Bs=0.65;#in Wb/m**2
Ms=Bs/mu0;
m_mu_b=Ms/n;
print round(m_mu_b,26)," is saturation magnetisation,m_mu_b(A.m**2) "
#Example 18.4 : power loss
#given data :
V=0.01;#in m**3
f=50;# in Hz
area=600;#in jm**-1
Wh=area*V*f;
print Wh,"= power loss,Wh(watts) "
#Example 18.4 : los of energy
#given data :
mass=10.0;# in kg
energy_loss=250.0;# in J/m**2
#energy loss at the rate of 50 cycles/s
E=energy_loss*50.0;# in J/m**3
E_loss=E*3600.0;#in J/m**3
D=7500.0;#density in kg/m**3
Volume=mass/D;
energy_loss_per_hour=E_loss/Volume;
print "{:.1e}".format(energy_loss_per_hour),"= energy_loss_per_hour(J/hour) "
# answer is incorrect in textbook