Ising Model

Community Forums/Showcase/Ising Model

SSS(Posted 2009) [#1]
This semester I've been taking a statistical physics course and recently we finished studying a system called the Ising model. Simply put, the Ising model produces a simplified picture of spin systems (or other two state systems) feature nearest neighbor interactions. What this means is that each point in the system can either be in the up or down state, and the energy of the system depends on whether adjacent spins are aligned or anti-aligned.

I decided to program a simulation of the two dimensional Ising model using blitzmax and it ended up working really well. It also uses multithreading to keep the interface dynamic while the simulation is running. The link to the file is,

http://www.megaupload.com/?d=BGTBZHXJ

and a picture in action is,



I would recommend zooming out and setting the size to 400 because bigger systems tend to look cooler. I also have noticed that at low temperatures (<0.5) the system tends to look like those instant generated worms levels from worms armageddon back in the day, I wonder if this is how they did it.

For those people who know some physics you might notice that as T->0 the system doesn't feature spontaneous magnetization as it should. The reason for this is that the simulation is finding a local minimum and not the absolute minimum. I might fix it after the semester is over.

Finally, for those who are interested (and I realize I this whole post speaks to the minority), the simulation is a markov chain monte carlo simulation. At each iteration a single (randomly selected) spin is flipped. If the flipping of the spin lowers the overall energy then the flip is made, otherwise the flip is made with probability specified by the boltzmann distribution at this temperature.


GfK(Posted 2009) [#2]
....or to put it another way..... wiggly patterns!

Meh. Waited 45 seconds for that site to let me download it, then it was Mac only! Might wanna mention that!


SSS(Posted 2009) [#3]
Ah too true... It's mac only people!

If people want the code I can upload that as well...