2
$\begingroup$

I downloaded a simple implementation of the Ising model in C# from this link.

I have understood more or less the entire code except the following routine:

    private static void transient_results(double T)
    {
        for (int a = 1; a <= transient; a++)
        {
            array_to_list();
            for (int b = 1; b <= L * L; b++)
            {
                choose = choose_random_site("i", 0);
                posx = choose_random_site("x", choose);
                posy = choose_random_site("y", choose);

                if (test_flip(posx,posy,T))
                {
                    flip(posx,posy);
                }

                list.RemoveAt(choose);
            }
        }
    }

transient_results() takes the temperature T as a real value.

transient is an integer read directly from the console. This represents the count of transient sites.

array_to_list() is emptying up a list of strings and initializing it with new strings of the pattern "i , j". This is used as a site-locator. I.e. to keep track of the positions of processed/unprocessed sites.

This block

choose = choose_random_site("i", 0);
posx = choose_random_site("x", choose);
posy = choose_random_site("y", choose);

is selecting a random site and its corresponding (x, y) coordinate.

test_flip() cheks to see if the state flippable. This function returns a boolean value. Therefore, if a specific site is flippable, it is flipped.

Finally, no matter if a site is flippable or not, its site-locator string item is removed from the list, marking the site as already processed.


Questions:

  1. What does it mean to have a transient state or a transient phase in an Ising model?

  2. What does this function achieve altogether?

  3. How is it going to influence the simulation?

$\endgroup$
1
  • $\begingroup$ Hi, interesting question! I suspect you'll get better results in some kinda physics forum, but I hope I'm prove wrong. $\endgroup$ Sep 15, 2022 at 23:08

1 Answer 1

4
+50
$\begingroup$

Conventional approaches uses something called single-spin-flip dynamics, depending on acceptance probability, either Metropolis or Glauber dynamics. See IsingLenzMC R package and associated paper Effective ergodicity in single-spin-flip dynamics. The cited code follows Metropolis dynamics. This is a 1D case but clearly separates temperature and other physical characteristics and investigates transient phases.

What does it mean to have a transient state or a transient phase in an Ising model?

Transient here is the number of MC walks, not the specific sites. Transient phase here means transient to ergodic behaviour. In some literature this is called equilibration time or burn-in period.

What does this function achieve altogether?

The cited code first run a transient phase, an initial MC walks before measuring the observable, i.e., magnetisation, in the main MC-loop. During transient time, the system has not reached to an equilibrium and observable can not be reliably measured.

How is it going to influence the simulation?

This is something called 'approach to ergodicity', see cited paper. It is important that for equilibrium statistical mechanics, a system reaches to an ergodic state before observables are measured.

The following an authoritative book on the subject is highly recommended

  • Monte Carlo Simulation in Statistical Physics An Introduction, Kurt Binder here.
$\endgroup$
2
  • $\begingroup$ This is a 1D case but clearly separates temperature and other physical characteristics and investigates transient phases. --- the source code is of 2D case. $\endgroup$
    – user366312
    Sep 19, 2022 at 16:02
  • $\begingroup$ The method of single-spin-flip is also applied here for 2D code and the approach to ergodicity requirement. $\endgroup$ Sep 19, 2022 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.