# This is a code for 8.08 - 8.S308 recitation. # Kuramoto model # for installing required packages # using Pkg # Pkg.add("Plots") # Pkg.add("Random") # for plotting using Plots using Random cd(@__DIR__) include("Rec7_2D_Ising_module.jl") #random number generator rng = MersenneTwister(1234) # parameters L = 200 # number of particles J = 1 # interaction strength T = 2.27 # temperature # set parameters param = Rec.setParam(L, J, T) # set state state = Rec.setState(param) # initialize state.t = 0 for x in 1:L, y in 1:L state.s[x,y] = -1 + 2*floor(2*rand(rng)) end # let's see what happens with movie get_movie!(state, param, rng, 1, 200, 20)