# Monte carlo simulation for continuous spin model (e.g. XY or Heisenberg model)

Unlike the Ising model, the XY model and the Heisenberg model have a continuous spectrum. So one need discretize them for a numerical simulation. But how to make sure the discretization procedure reliable?

For example, for the XY model with variables $\theta_i$, if $\theta_i$ is discretized by choosing a unit $\frac{2\pi}{N}$, how to make sure the $N$ is large enough?

• Why do you need to discretise it? My intuition says that it's no different from most other continuous physical phenomena, where a floating point representation is plenty good enough. Sep 10, 2014 at 9:52
• In pretty much any discretization procedure you can test the quality by computing a solution with a given N and then computing again it with a (slightly) smaller or larger value. If N is high enough, the answer won't change significantly as you increase it. If the computation is cheap enough, make a plot of some output variable vs. N. It'll paint a pretty clear picture of the convergence. Sep 10, 2014 at 12:21

You don't have to discretize your problem (XY model). For each step, just take some value as the new $\theta$, and calculate the transition rate accordingly. Of course, when choosing the new value of $\theta$, better don't do it in a completely random way, otherwise your transition rate might be usually too small and you are just wasting time. Having said that, I believe there is nothing wrong to discretize the problem though. You just need to make sure N is large enough to avoid any artificial effects due to discretization, and you don't want N to be too large since otherwise the simulation may take too long. (not an expert on MC, please correct me if I'm wrong.)