# Why are simulations like Monte Carlo or Metropolis studied for Ising Models when 1d and 2d case have analytical solutions?

I know that absolute analytical solutions exist for the 1d and 2d case but need some intuition as to why these simulation algorithms are used and how do we benefit from them ?

• Note also the there are no solution for the $2d$ model with a nonzero magnetic field, nor with complicated boundary conditions, nor with a constraint on the total magnetization, etc. Also, numerical simulations can be used (and are used) to analyze the dynamics of the model. – Yvan Velenik Oct 16 '18 at 9:20

## 1 Answer

When doing computer simulations, the big question is (or should be) whether or not the computed answer has anything to do with reality. So, you research the physics, find some algorithms that seem to apply, and code up a bunch of stuff. Do you just run it and publish the results? Nope - you have to verify and validate the code against reality (analytic or experimental as the case may be).

For a generalized Ising model, the fact that 1D and 2D problems have exact, analytic results is a wonderful thing. You can run your simulation knowing full well what the result should be. You can vary the size of the problem, the number of iterations, and this way get a feel for how well your code works and what the limits of the algorithm are. How fast does it converge? How does that scale with dimension? Etc.

Of course, if your code does not come close to the known analytic results, well, you have a problem...

If the simulation converges to the analytic results, you know know that (1) the code works, and (2) have some understanding of how the results scale with the problem.

With confidence that your code implements the proper physics and numerics, you can now push onwards. Want to go to a 3D Ising model? You have some clue how long it will take on what size of a model. Want to vary the 'pure' Ising interactions a bit in 1D or 2D, where the result would deviate from the analytic results? Again, you have some faith in the results.

Want to apply it to a multi-body model of the solar system? Well, sorry, you have to go back and V&V the code again.

• With regard to a multi-body model of the solar system, you'll need a good 2nd order ODE propagator and a good derivative function. Ensuring the propagator and derivative function can replicate a two body Keplerian orbit is a good start. Ensuring they can replicate known orbits of satellites that orbit the Earth, or Mercury's 43 arcseconds per century relativistic precession on top of the much larger Newtonian precession due to the other planets, even better. There are lots of numerical integration techniques that utterly fail these tests. Verification and validation are important. +1. – David Hammen Oct 15 '18 at 23:35
• Untreated to answer: congrats on getting 10k close reviews! – Kyle Kanos Nov 3 '18 at 10:43