Calculate the magnetostatic interaction energy for one Bohr magneton in a field of 40 $\mu$T and plot for angles 0 $\rightarrow$ 180. To do anything, we need to import numpy and matplotlib first.
In [1]:
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
# This allows us to plot in the notebook environment
Use the equation: $E=-m_b B \cos(\theta)$ for range of $\theta$s.
In [2]:
# define some variables
mb=9.27e-24 # one Bohr magneton in Am^2
B=40e-6 # field in tesla
thetas=np.arange(0,180,1) # makes an array of thetas from 0 to 180
Es=-mb*B*np.cos(np.radians(thetas)) # makes an array of energies
plt.plot(thetas,Es) # make a nice plot
plt.title("Magnetostatic energy versus angle")
plt.xlabel("Angle between moment and applied field") # label x axis
plt.ylabel("Magnetostatic in Joules"); # label y axis
# putting a ';' at the end of the plotting block suppresses an annoying announcement
For the rest of the problem we need to know the thermal energy (Bolzmann's constant $k=1.38 x 10^{-23}$ J/K and the absolute temperature $T=300$ Kelvin.
In [3]:
k=1.38e-23
T=300
print ('Thermal energy at room temperature is: ',k*T)
Which is a LOT bigger than the magnetostatic energy.
We must find the induced moment $m$ knowing that the magnetetization (moment per unit volume) is $M=\chi_p H$ for a paramagnetic substance. For Fayalite $\chi_p$ = = 4.4 x 10$^{-4}$ (cgs; per unit volume).
In [4]:
chi_p=4.4e-4 # susceptibility of fayalite in cgs per volume
B = 10. # applied field in Oersteds
vol=2. # volume in cm^3
M=chi_p*B # magnetization
m=M*vol # moment in emu
print (m)
Now we have to convert everything to SI.
$\chi_{SI} = 4\pi\chi_{cgs}$
$H_{SI}={{H_{cgs}}\over {4\pi 10^{-3}}}$
$vol_{SI}={{vol_{cgs}}*{10^{-6}}}$
In [5]:
chi_SI=chi_p*4.*np.pi
H_SI = B/(np.pi*4.*1e-3)
vol_SI=vol*1e-6
M_SI=H_SI*chi_SI
m_SI=M_SI*vol_SI
print ('Magnetization in A/m is: ',M_SI)
print ('magnetic moment in Am^2 is: ',m_SI)
Now we have to convert the $m$ in Am$^2$ to emu cm$^{-3}$ by muliplying by 10$^3$.
In [6]:
m_cgs=m_SI*1e3
print ('converted to cgs, m is: ',m_cgs)
The governing equation here is the Curie Law of paramagnetic susceptibility (Equation 3.6 in the text): $$ \chi_p={M\over H} = {{Nm^2\mu_o}\over{3kv}}\cdot {1\over T}. $$
which shows that $\chi_p$ is inversely related to temperature. We were given $\chi_p$ at 273K, so at 773K, we have: $$ \chi_{773} = {\chi_{273}} { 273\over{773}} = { 4.4 \times 10^{-4} } { 273\over{773}} = 1.6 \times 10^{-4} { {\hbox {emu}} \over {\hbox {cm}^3 \hbox{oe}}} $$
So if $H$ = 100 oe at T= 773K:
$$ M = \chi_{773} H = 1.6 \times 10^{-2} { {\hbox {emu}} \over {\hbox {cm}^3 }} $$Here again we use the Curie Law of Paramagnetism: $$ \chi_p = {N\over v} m_b^2 { {\mu_o}\over {3kT}} . $$
${N\over v}$ is the number of atomic magnetic moments per unit volume. The number of atoms was given to us as 4 x 10$^{28}$ per m$^3$ and ${\bf m_b}$ is their moment (the Bohr magneton). Looking up from Figure 3.4 in the text we find that there are 5 unpaired spins for Mn$^{2+}$. So ${N\over v}$ is 20 x 10$^{28}$. The other parameters are given in the text as $\mu_o = 4 \pi$ x 10$^{-7}$ Hm$^{-1}$, $m_b$ = 9.27 x 10$^{-24}$ Am$^2$ and $k$ = 1.381 x 10$^{-23}$ JK$^{-1}$. So, $\chi_p \sim 1.7$ x 10$^{-3}$.
In [7]:
N_v=5*4e28
m_b=9.27e-24
k=1.381e-23
mu_0=4*np.pi*1e-7
T=300.
chi_p=(N_v*m_b**2*mu_0)/(3.*k*T)
print (chi_p)
For this problem, we use the data in the file BMoskinBan81.txt. Read it in and make a simple X,Y plot of the data.
In [2]:
# read in the data files
import pandas as pd
data=pd.read_csv('Chapter_3/BMoskinBan91.txt',sep='\t',header=0) # read in data
data.head() # take a peek.
Out[2]:
Now make the plot.
In [3]:
plt.plot(data['T (C)'],data['M/Ms'])
plt.xlabel('Temperature ($^{\circ}$C)')
plt.ylabel('M/M$_s$');
It looks like the Curie Temperature is about 570$^{\circ}$C.
In [17]:
def M_over_Ms(Tc,gamma):
"""
Calculates the M/Ms curve using Equation 3.11 in Essentials text book, given Curie T and gamma
M_over_Ms(Tc,gamma)
Returns array of M/Ms values.
"""
Ts=np.arange(32,Tc,1)
Tcs=Tc*np.ones(len(Ts))
Ms=((Tcs-Ts)/Tcs)**gamma
return Ms,Ts
And now let's call it..
In [18]:
Tc=570.
plt.figure(1,(8,10))
for gamma in np.arange(.36,.43,.01):
zeroK=((Tc+273)/Tc)**gamma
Ms,Ts=M_over_Ms(Tc,gamma)
plt.plot(Ts/Tc,Ms/zeroK,label=gamma,linestyle='dashed')
print (gamma,zeroK)
plt.plot(data['T (C)']/Tc,data['M/Ms']/zeroK,'r-',linewidth=2,label='Data')
plt.xlabel('T/Tc')
plt.ylabel('M/M$_s$')
plt.legend();
It looks like $\gamma$ = 0.38 is the best fit to the data and the value of 0.43 cited by Dunlop and Ozdemir (1997) is off.
In [ ]: