Monte Carlo simulation of a d = 2 Ising model (revisited)
For this problem we will modify the MC program to make a series of runs with temperatures separated by a value ΔT.
1. Use the Python function definition feature to create a function that does the entire MC simulation. Then put the function call inside a loop that first equilibrates the spins for some number of sweeps and then generates the data you want from a longer number of sweeps. The loop should change the temperature by an amount ΔT for every iteration of equilibration and data-taking.
2. Calculate the average energy, specific heat, magnetization, and magnetic susceptabililty for temperatures of T = 2.0, 4.0, and 6.0 for an 8 × 8 lattice. Use a large enough numbers of MC updates to obtain reasonable results, but not so many that you waste your time sitting in front of a blank computer screen.
3. What do you notice about the data from your MC simulation? This is a fairly open-ended question. The main purpose is to think about the results of the simulation.