PHGN 450 / EGGN 502 Fall 2005 Project 9: Modeling the Thermodynamics of Magnetic Systems Due Nov. 23 Thermodynamics of Magnetic Systems An atom interacts with a magnetic field through its magnetic moment: µ ~ = gµB ~s, where g is the gyromagnetic ratio (for electrons, g = 2), µB = eh̄/(2m) = 5.788 × 10−5 eV /T , is the Bohr magneton, and ~s is the dimensionless quantum spin angular momentum (the dimensionless angular momentum is the normal angular momentum divided by h̄). The interaction energy of an atom with a magnetic field is given by: H̄ = −~ µ · B̄ = −gµB B̄sz (1) (We anticipate scaling out the units later so by using bars over all dimensionful quantities now, e.g. H̄; the dimensionless quantities will appear simple later.) By choosing the z-axis to be along the magnetic field, the z-component of the dimensionless angular momentum is sz = m = ±1/2, the so-called magnetic quantum number. In this problem we treat the case of magnetic fields due to electrons which have spin-1/2 (m = ±1/2). To eliminate nuisance factors of 1/2 we can absorb the gyromagnetic ratio (g = 2 for electrons); thus σi = gsi = 1 replaces si , and µi = gmi = ±1 replaces mi . The magnetic field can arise from an external source or from other nearby magnetic atoms. The pairwise ¯σi · ~σj = ∓Jµ ¯ i µj , where J¯ is the coupling constant with units interaction energy is given by V̄pair (i, j) = −J~ of energy. Keeping only nearest neighbor pair interactions, the total energy for the lattice becomes: X X (2) H̄ = −µB B̄ µi − J¯ µi µj i <ij> where < ij > refers to nearest-neighbor pairs. As an example, consider the Nl × Nl 2-dimensional lattice. (Note that two indices, (ix , iy ), are needed to identify an atom on the 2-d lattice.) The nearest-neighbor (NN) pair interaction energy for the 2-d lattice becomes X X hV̄pair iN N = −J¯ µix iy µjx jy = −J¯ µix iy (µix +1iy + µix −1iy + µix iy +1 + µix iy −1 ). (3) <(ix iy )(jx jy )> <(ix iy )> where µixiy = ±1. To minimize the effect of the finite boundaries, we employ periodic, or “wrapping”, boundary conditions such that for ix = Nl + 1 → 1 and for ix = 0 → Nl (and similarly for iy ). Specifying all the spin values, i.e. α = {µix iy = ±1, ix (iy ) = 1, . . . , Nl }, determines the state, α, of the lattice. Thermodynamics of the Spin Lattice Assume the lattice is in thermal equilibrium with some reservoir at temperature, T . The probability that the lattice is in some specific state, α, is proportional to the Boltzmann factor: Pα ∝ e−β H̄α (4) where β ≡ 1/(kB T ), kB is Boltzmann’s constant, and H̄α is the energy, Eq.(2), in state α. The equilibrium value of any state quantity, Qα (e.g. the energy, H̄α ), is given by: hQi = X Qα Pα = α 1 X Qα e−β H̄α . Z α (5) P where the normalization factor, Z = α e−β H̄α , is called the partition function. The quantities of interest here will be the average energy, average spin (magnetization), and the heat capacity at constant magnetic field. If we were able to calculate the partition function, we could obtain the 1 average energy and heat capacity by taking derivatives of Z with respect to β. For example, the average energy is given by: X 1 X 1 ∂Z (6) hEi = H̄α Pα = H̄α e−β H̄α = − Z α Z ∂β α The average spin (magnetization) is given by: M = hσi = X σα Pα = α 1 X σα e−β H̄α Z α (7) where σα is the total spin of the system when in state α. The heat capacity at constant B-field is given by the variance: ∂hEi ∂hEi c̄B = (8) = −kB β 2 = kB β 2 (hE 2 i − hEi2 ). ∂T B ∂β B Before proceeding further, we should scale out the dimensions. Using the thermal energy, kB T = 1/β, to ¯ B = βµB B̄, scale the energy, we have the following dimensionless quantities (no bars): H = β H̄, J = β J, and cB = c̄B /kB . The dimensionless energy, Eq(2), now takes the simple form: X X H = −B µi − J µi µj , (9) i <ij> and the partition function becomes Z = α e−Hα . Note how the expression for the equilibrium value of some thermodynamic quantity,Q, Eq.(5), has the form of a normalized weighted quadrature. One could try to calculate this quantity directly. However, even for modest lattice sizes, the total number of states is enormous. For example, for a 16 × 16 lattice, the number of possible states is 216×16 ' 1077 . It is utterly impractical to perform the sum in Eq(5) directly; however we can estimate it using the Monte Carlo methods developed in the text and discussed in class. P Monte Carlo Exercises 1. (20) Monte Carlo warm up problem. a. (5) Use the Metropolis et al. algorithm to estimate the following 2-dimensional integral to 0.1%: Z ∞ Z ∞ √ 2 2 I2 = dx1 dx2 (x21 + x22 ) e− x1 +x2 (10) −∞ −∞ Use the exponential factor as the weight function. The normalization constant for this weight function is: Z ∞ Z ∞ √ 2 2 Z= (11) dx1 dx2 e− x1 +x2 = 2π; −∞ −∞ The properly normalized weighted integral takes the form: Z ∞ Z ∞ I2 = dx1 dx2 f (x1 , x2 ) w(x1 , x2 ) −∞ (12) −∞ √ 2 2 where f (x1 , x2 ) = 2π(x21 + x22 ) and w(x1 , x2 ) = e− x1 +x2 /(2π). (Note that since the Metropolis algorithm only makes use of the ratio of weight factors, the 2π factor could be dropped from w(x1 , x2 ) without affecting the acceptance criterion.) Use Metropolis, et al. to create a pseudo-Markov chain of configurations distributed according to w(x1 , x2 ) and calculate the Monte Carlo estimate for the integral: I2 ' hf i = where N is the number of configurations sampled. 2 1 X fi N i (13) b. (5) Show that your Monte Carlo estimate is accurate to 0.1% by calculating the standard deviation, p (14) σ = (hf 2 i − hf i2 )/N , where N is the number of sampled. c. (10) Repeat parts (1.a) and (1.b) for the 8-dimensional integral: Z ∞ Z ∞ √ 2 2 dx8 (x21 + . . . + x28 ) e− (x1 +...+x8 dx1 . . . I8 = −∞ (15) −∞ (For this case the normalization constant for the weight function is 1680π 4 .) Numerical Solution of the Ising Model 2. (60) In one of more amazing feats of mathematical physics of the last century, Lars Onsager solved the 2-d Ising model analytically in 1943. (The Onsager solution is worked out in detail in Chapter 16 of K. Huang, Statistical Mechanics, Wiley (1963).) There are no analytic solutions for 3 or higher dimensions. In the following exercises you will use Monte Carlo methods to solve the 2-d Ising model and then extend the result to 3-dimensions with the goal of estimating the coupling, Jc , at which the system undergoes a paramagnetic/ferromagnetic phase transition. a. (40) Consider the 2-d Ising model with ferromagnetic (J > 0) coupling on a square 16 × 16 lattice with periodic boundary conditions. Create a code which employs the Metropolis, et al. Monte Carlo algorithm to estimate the mean (dimensionless) energy, hEi, magnetization, M , and heat capacity, cB . Use the Boltzmann factor for your weight function to develop a chain of configurations. (As above, since the Metropolis et al. acceptance criterion only involves the ratio of weight functions, it is not necessary to know the normalization, Z.) Solve the model for the following parameters: B = 0 and J = 0.36 → 0.50 in steps of 0.02. (To give you something to check against, the Onsager solution for the B = 0, J = 0.50 case gives hEi = −0.872782, M = 0.911319, and cB = 0.861698.) b. (20) Use your code to study the phenomenon of hysteresis in magnetic systems. Hysteresis is a form of memory in that for strongly ferromagnetic systems, the internal B-field can overwhelm the external field, causing ferromagnetic states to persist even when the external field changes sign with respect to the magnetization. Set J = 2 (strongly ferromagnetic) and calculate the magnetization for magnetic field strength, B, stepping from -4.0 to +4.0 in steps of 1. When you change B, have the starting configuration be the last state of the run from the previous B value. Repeat the same process but in reverse order, that is, step B from +4.0 to -4.0 in unit steps. Plot the magnetization as a function of the B-field to show the hysteresis effect. 3. (20) Extend your model to the 3-dimensional, 16 × 16 × 16 Ising spin lattice. For B = 0 use your code to calculate the average energy, magnetization, and heat capacity for couplings between 0.2 < J < 0.4. Plot the heat capacity and from your results estimate the value of J at which the system undergoes a paramagnetic/ferromagnetic phase transition. (If you find that the Monte Carlo calculations take too long, you may try reducing the lattice size. Explain your rationale for any choices you make.) 3