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:
What does it mean to have a transient state or a transient phase in an Ising model?
What does this function achieve altogether?
How is it going to influence the simulation?