IntRoduction to solid state physics
Practice Course
Sheng Yun Wu
Practice Course
Sheng Yun Wu
Week 13: Magnetic Properties of Solids
This example calculates the magnetic susceptibility of a paramagnetic material using Curie’s law:
where C is the Curie constant and T is the temperature.
Curie’s law relates the magnetic susceptibility χ of a paramagnetic material to its Curie constant C and temperature T. This example calculates the magnetic susceptibility at a given temperature, illustrating the inverse relationship between temperature and susceptibility.
def magnetic_susceptibility(C, T):
return C / T
# Example: Curie constant C = 1.0, temperature T = 300 K
C = 1.0 # Curie constant
T = 300 # Kelvin
chi = magnetic_susceptibility(C, T)
print(f"Magnetic Susceptibility: {chi:.2e}")
This example calculates the magnetization MMM in a paramagnetic material using the Langevin function:
The Langevin function describes the magnetization of paramagnetic materials in the presence of an external magnetic field. This example calculates the magnetization based on the number of atoms, magnetic moment, magnetic field, and temperature.
import numpy as np
k_B = 1.38e-23 # Boltzmann constant (J/K)
def magnetization(N, mu, B, T):
return N * mu * (np.cosh(mu * B / (k_B * T)) - k_B * T / (mu * B))
# Example: Number of atoms N = 1e28, magnetic moment μ = 1e-23 J/T, magnetic field B = 0.1 T, temperature T = 300 K
N = 1e28 # atoms/m³
mu = 1e-23 # J/T
B = 0.1 # Tesla
T = 300 # Kelvin
M = magnetization(N, mu, B, T)
print(f"Magnetization: {M:.2e} A/m")
This example generates a plot of the magnetization curve for a ferromagnetic material, which exhibits hysteresis.
Ferromagnetic materials exhibit hysteresis, where the magnetization depends on the history of the applied magnetic field. This example plots the magnetization curve, showing how magnetization saturates at high fields and the coercive field causes hysteresis.
import matplotlib.pyplot as plt
def magnetization_ferromagnet(B, M_s, H_c):
return np.piecewise(B, [B < -H_c, (B >= -H_c) & (B <= H_c), B > H_c],
[-M_s, lambda B: M_s * B / H_c, M_s])
# Example: Saturation magnetization M_s = 1e6 A/m, coercive field H_c = 0.2 T, magnetic field range from -0.5 to 0.5 T
B = np.linspace(-0.5, 0.5, 1000) # Tesla
M_s = 1e6 # A/m
H_c = 0.2 # Tesla
M = magnetization_ferromagnet(B, M_s, H_c)
plt.plot(B, M)
plt.xlabel("Magnetic Field (T)")
plt.ylabel("Magnetization (A/m)")
plt.title("Magnetization Curve of Ferromagnetic Material (Hysteresis)")
plt.grid(True)
plt.show()
This example calculates the Curie temperature of a ferromagnetic material using:
where J is the exchange interaction constant, and S is the spin quantum number. The Curie temperature is the temperature above which a ferromagnetic material becomes paramagnetic. This example calculates the Curie temperature using the exchange interaction constant and the spin quantum number.
def curie_temperature(J, S):
return (J * S * (S + 1) * k_B) / 3
# Example: Exchange interaction constant J = 1e-21 J, spin quantum number S = 1/2
J = 1e-21 # J
S = 1/2
T_C = curie_temperature(J, S)
print(f"Curie Temperature: {T_C:.2f} K")
This example calculates the magnetic dipole moment μB of an electron using the Bohr magneton:
The Bohr magneton represents the magnetic dipole moment of an electron due to its orbital angular momentum. This example calculates the Bohr magneton, which is a fundamental constant in quantum magnetism.
e = 1.6e-19 # Charge of electron (C)
h_bar = 1.0545718e-34 # Reduced Planck's constant (J·s)
m_e = 9.11e-31 # Mass of electron (kg)
def bohr_magneton():
return (e * h_bar) / (2 * m_e)
mu_B = bohr_magneton()
print(f"Bohr Magneton: {mu_B:.2e} J/T")
This example calculates the magnetic susceptibility χ in a diamagnetic material using:
where N is the number of atoms per unit volume, ⟨r^2⟩ is the mean square radius of the electron orbit. Diamagnetic materials exhibit a weak negative susceptibility, meaning they are repelled by magnetic fields. This example calculates the magnetic susceptibility of a diamagnetic material based on the number of atoms and the size of the electron orbit.
def diamagnetic_susceptibility(N, r_sq, e, m_e):
return -N * e**2 * r_sq / (6 * m_e)
# Example: Number of atoms N = 1e28 m⁻³, mean square radius r² = 1e-20 m²
N = 1e28 # m⁻³
r_sq = 1e-20 # m²
chi = diamagnetic_susceptibility(N, r_sq, e, m_e)
print(f"Diamagnetic Susceptibility: {chi:.2e}")
This example calculates the energy associated with exchange interactions in a ferromagnetic material:
where J is the exchange interaction constant and Si, Sj are the spins of neighboring atoms. Exchange interactions are responsible for the alignment of spins in ferromagnetic materials. This example calculates the exchange energy between two neighboring spins based on the exchange interaction constant and spin vectors.
def exchange_energy(J, S_i, S_j):
return -J * np.dot(S_i, S_j)
# Example: Exchange constant J = 1e-21 J, spin vectors S_i = [1/2, 0, 0], S_j = [1/2, 0, 0]
J = 1e-21 # J
S_i = np.array([1/2, 0, 0])
S_j = np.array([1/2, 0, 0])
E = exchange_energy(J, S_i, S_j)
print(f"Exchange Energy: {E:.2e} J")
This example calculates the total magnetic moment of a ferromagnetic domain, given the number of aligned spins:
M=NμB
In ferromagnetic domains, spins align to produce a strong magnetic moment. This example calculates the total magnetic moment of a domain based on the number of aligned spins and the Bohr magneton.
def total_magnetic_moment(N, mu_B):
return N * mu_B
# Example: Number of spins N = 1e23, Bohr magneton μ_B = 9.27e-24 J/T
N = 1e23 # Number of spins
mu_B = 9.27e-24 # J/T (Bohr magneton)
M = total_magnetic_moment(N, mu_B)
print(f"Total Magnetic Moment: {M:.2e} J/T")
This example calculates the magnetic susceptibility near the Curie temperature using the Curie-Weiss law:
The Curie-Weiss law describes the magnetic susceptibility of a material near its Curie temperature. This example calculates the susceptibility near the Curie temperature, illustrating how susceptibility diverges as the temperature approaches TC.
def curie_weiss_susceptibility(C, T, T_C):
return C / (T - T_C)
# Example: Curie constant C = 1.0, temperature T = 350 K, Curie temperature T_C = 330 K
C = 1.0 # Curie constant
T = 350 # Kelvin
T_C = 330 # Kelvin
chi = curie_weiss_susceptibility(C, T, T_C)
print(f"Magnetic Susceptibility (Curie-Weiss Law): {chi:.2e}")
This example generates a plot of magnetic susceptibility vs. temperature for a paramagnetic material using Curie’s law.
Magnetic susceptibility decreases with increasing temperature in paramagnetic materials, as described by Curie’s law. This example generates a plot of magnetic susceptibility vs. temperature, showing the inverse relationship.
T = np.linspace(100, 500, 1000) # Temperature range from 100 K to 500 K
C = 1.0 # Curie constant
chi = magnetic_susceptibility(C, T)
plt.plot(T, chi)
plt.xlabel("Temperature (K)")
plt.ylabel("Magnetic Susceptibility")
plt.title("Magnetic Susceptibility vs Temperature (Curie's Law)")
plt.grid(True)
plt.show()
These 10 Python examples cover key concepts from Week 13: Magnetic Properties of Solids, including magnetic susceptibility, magnetization, ferromagnetism, exchange interactions, Curie temperature, and the Curie-Weiss law. These examples help students understand the behavior of different types of magnetic materials, their temperature dependence, and the underlying quantum mechanical interactions.