2D Ising Model of Ferromagnetism: Heating all spin down from 0K to >Tc then Cooling

This page summarizes the projects mentioned and recommended in the original post on /r/Physics

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ising-gpu

    GPU-accelerated Monte Carlo simulations of 2D Ising Model

  • You'd be better off looking into GPGPU ("General-Purpose computing on Graphics Processing Units") methods, which use languages like OpenCL or CUDA. I know CUDA has some pretty good examples of fluid or molecular dynamics floating around, and I wouldn't be surprised if you could find an Ising model example somewhere as well (actually, I looked, and yep, they exist). Since you're already familiar with the model, that might be a place to look.

  • IsingOnly

  • Long answer: The heavy lifting is done on the GPU in the fragment shader in here ("IsingComputefs"). It takes the uv coordinates of a texture that spans the entire viewport, then gets the spin value of the lattice at those coordinates, which are stored in the red channel of the texture. The green channel stores the random number generator state, which has to be propagated per-pixel. The blue and alpha channels are just wasted space at the moment, but the default texture pipeline uses RGBA textures, unfortunately, and RG textures don't exist anyway. Next I generate a new random number with a very simple random number generator. There's some int size magic going on here, which is why this code doesn't work on mobile (which uses integers of different size). This RNG is actually pretty bad: if this were a research simulation I'd do something more advanced, but this code is just for visualization so it's fine. Next it checks the neighbouring pixels / lattice sites and adds up their spin values. Only the sum of these is needed to check the Metropolis-Hastings criterion. Since we have only a few discrete state changes to worry amount, we can actually precalculate all the possible Boltzmann weight when the temperature/coupling is set and just tabulate them. Anyway, check the criterion, flip/set spin depending on its outcome, then all that's left is to carry on the new spin and RNG value to the next iteration. This just means saving two numbers to the pixel value: the new spin to the red channel and the new RNG state to the green channel.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts