Professional Documents
Culture Documents
6 MonteCarlo Ising
6 MonteCarlo Ising
6 MonteCarlo Ising
Katarzyna Sznajd-Weron
Department of Theoretical Physics
Stanisław Ulam and the Monte Carlo method
„The idea for what was later called the Monte Carlo method
occurred to me when I was playing solitaire during my illness.
I noticed that it may be much more practical to get an idea
of the probability of the successful outcome of a solitaire game
(like Canfield or some other where the skill of the player is not
important) by laying down the cards, or experimenting with the
process and merely noticing what
proportion comes out successfully,
rather than to try to compute all
the combinatorial possibilities…”
2
The basic idea of the Monte Carlo method
Chance of winning = ¼ !
3
Historical accounts: coin tosses
5
Monte Carlo method – why does it work?
6
Phase transition
Strong magnet
Ferromagnet
(Nickel)
Reduced magnetization:
𝑀𝑀
𝑀𝑀0
Magnetisation in the
8 ground state (max)
The Ising model (Lenz-Ising?)
9
Why such an Energy?
𝐿𝐿
𝐿𝐿 𝐿𝐿
𝑻𝑻 < 𝑻𝑻𝒄𝒄
𝑻𝑻 > 𝑻𝑻𝒄𝒄
1
1 𝑙𝑙𝑠𝑠𝑠𝑠𝑠𝑠
• 𝑚𝑚 = ∑ |𝑚𝑚𝑗𝑗 |
𝑙𝑙𝑠𝑠𝑠𝑠𝑠𝑠 𝑗𝑗=1
2 ……
𝑗𝑗
• Susceptibility:
𝑁𝑁
𝜒𝜒 = 𝑚𝑚2 − 𝑚𝑚 2
𝑘𝑘𝐵𝐵 𝑇𝑇
𝐿𝐿
12
1 2……………L
Simulation for the fixed temperature T
13
Metropolis algorithm
The most popular but not the only!
14
Elementary update
Random sequential updating, single-flip dynamics
1) Choose randomly one spin 𝑆𝑆𝑖𝑖𝑖𝑖 𝑖𝑖, 𝑗𝑗 ∼ 𝑈𝑈 1, 𝐿𝐿
2) Calculate Δ𝐸𝐸 for 𝑆𝑆𝑖𝑖𝑖𝑖 → −𝑆𝑆𝑖𝑖𝑖𝑖
3) If Δ𝐸𝐸 ≤ 0 then 𝑆𝑆𝑖𝑖𝑖𝑖 → −𝑆𝑆𝑖𝑖𝑖𝑖
4) If Δ𝐸𝐸 > 0 the
a) Choose randomly 𝑥𝑥 ∼ 𝑈𝑈(0,1)
Δ𝐸𝐸 𝑖𝑖
b) If 𝑥𝑥 < exp − then 𝑆𝑆𝑖𝑖𝑖𝑖 → −𝑆𝑆𝑖𝑖𝑖𝑖
𝑘𝑘𝐵𝐵 𝑇𝑇
1
2 ……
𝑗𝑗
• Time unit= 1 𝑀𝑀𝑀𝑀𝑀𝑀
(Monte Carlo Step)
𝐿𝐿
• 1 𝑀𝑀𝑀𝑀𝑀𝑀 = 𝑁𝑁 = 𝐿𝐿2
15
updates i.e. steps 1-4 1 2……………L
New configuration and the energy change
𝑆𝑆𝑖𝑖,𝑗𝑗
2 ……
𝑗𝑗
Δ𝐸𝐸 = 2𝐽𝐽 −1 −1 − 1 + 1 − 1 = 4𝐽𝐽 > 0
16 1 2……………L
1 MCS Choose 𝑆𝑆𝑖𝑖𝑖𝑖
Calculate Δ𝐸𝐸
for 𝑆𝑆𝑖𝑖𝑖𝑖 → −𝑆𝑆𝑖𝑖𝑖𝑖
YES NO
𝑆𝑆𝑖𝑖𝑖𝑖 → −𝑆𝑆𝑖𝑖𝑖𝑖 𝛥𝛥𝐸𝐸 ≤ 0? Choose 𝑥𝑥 ∼ 𝑈𝑈(0,1)
YES NO
𝑆𝑆𝑖𝑖𝑖𝑖 → −𝑆𝑆𝑖𝑖𝑖𝑖 𝑥𝑥 < 𝑒𝑒 −Δ𝐸𝐸/𝑘𝑘𝐵𝐵 𝑇𝑇 ?
𝑖𝑖𝑖𝑖𝑖𝑖𝑖𝑖 ≥ 𝑁𝑁?
NO
YES 𝐿𝐿
1
𝑚𝑚 𝑡𝑡 = 2 � 𝑆𝑆𝑖𝑖𝑗𝑗 (𝑡𝑡)
Calculate 𝑚𝑚 𝐿𝐿
𝑖𝑖,𝑗𝑗=1
Time
T=0
T<T*
T=T*
T>T*
18
Play in NetLogo
𝑘𝑘𝐵𝐵
𝑇𝑇 ∗= 𝑇𝑇
𝐽𝐽
Here:
𝑘𝑘𝐵𝐵 = 1, 𝐽𝐽 = 1
19
Spontaneous jumps in small systems
Simulations by Paweł Majewski (BDA, 2019)
20
𝑘𝑘𝐵𝐵
Trajectories for 𝑇𝑇 ∗ = 𝑇𝑇 = 1.85,
𝐽𝐽
The square lattice 𝑁𝑁 = 𝐿𝐿 × 𝐿𝐿, 𝐿𝐿 = 100
Simulations: Jakub Pawłowski (IK, 2019)
T=1.85
1
0.8
• Why the absolute value?
• Why termalization?
0.6
0.4
• What average?
0.2
0
𝐿𝐿
m
1
𝑚𝑚 𝑡𝑡 = 2 � 𝑆𝑆𝑖𝑖𝑗𝑗 (𝑡𝑡)
-0.2
-0.4 𝐿𝐿
𝑖𝑖,𝑗𝑗=1
-0.6
-0.8
-1
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
t [MCS]
21
Calculate 𝑚𝑚(𝑡𝑡) after each MC – note that 𝑡𝑡[𝑀𝑀𝑀𝑀𝑀𝑀]
∗ 𝑘𝑘𝐵𝐵
Trajectories for 𝑇𝑇 = 𝑇𝑇 = 1.85,
𝐽𝐽
The square lattice 𝑁𝑁 = 𝐿𝐿 × 𝐿𝐿, 𝐿𝐿 = 100
Simulations: Jakub Pawłowski (IK, 2019)
1
T=1.85
Time average
0.8
Skip first 𝐾𝐾0 steps
0.6
Time average over 𝐾𝐾 − 𝐾𝐾0 steps
ensemble average
0.4
0.2
𝐿𝐿
1
0
m
-0.8
-1
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
t [MCS]
22
∗ 𝑘𝑘𝐵𝐵
Trajectories for 𝑇𝑇 = 𝑇𝑇 = 2.26,
𝐽𝐽
The square lattice 𝑁𝑁 = 𝐿𝐿 × 𝐿𝐿, 𝐿𝐿 = 100
Simulations: Jakub Pawłowski (IK, 2019)
T=2.26
1
0.8
0.6
0.4
0.2
Near the critical point:
0 • Large fluctuations
m
-0.2
• Critical slowing down
-0.4
-0.6
-0.8
-1
0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
t [MCS]
23
∗ 𝑘𝑘𝐵𝐵
Histograms for 𝑇𝑇 = 𝑇𝑇 = 1.85
𝐽𝐽
Simulations: Jakub Pawłowski (IK, 2019)
t=0 t=1000
60 60
40 40
P(m)
P(m)
20 20
0 0
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
m m
t=2000 t=10000
200 400
150 300
100 200
P(m)
P(m)
50 100
0 0
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
m m
24
∗ 𝑘𝑘𝐵𝐵
Histograms for 𝑇𝑇 = 𝑇𝑇 = 2.26
𝐽𝐽
Simulations: Jakub Pawłowski (IK, 2019)
t=0 t=1000
80 40
60 30
40 20
P(m)
P(m)
20 10
0 0
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
m m
t=2000 t=10000
40
100
30
20
P(m)
P(m)
50
10
0 0
-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1
m m
25
What is the transition probability
In the equilibrium statistical physics
𝑑𝑑𝑃𝑃𝑟𝑟
= � 𝑊𝑊𝑠𝑠→𝑟𝑟 𝑃𝑃𝑠𝑠 − � 𝑊𝑊𝑟𝑟→𝑠𝑠 𝑃𝑃𝑟𝑟
𝑑𝑑𝑑𝑑
𝑠𝑠≠𝑟𝑟 𝑠𝑠≠𝑟𝑟
𝑑𝑑𝑃𝑃𝑟𝑟 Stationary
= � 𝑊𝑊𝑠𝑠→𝑟𝑟 𝑃𝑃𝑠𝑠 − 𝑊𝑊𝑟𝑟→𝑠𝑠 𝑃𝑃𝑟𝑟 = 0 condition
𝑑𝑑𝑑𝑑
𝑠𝑠≠𝑟𝑟
Detailed balance
𝑾𝑾𝒔𝒔→𝒓𝒓 𝑷𝑷𝒔𝒔 = 𝑾𝑾𝒓𝒓→𝒔𝒔 𝑷𝑷𝒓𝒓
condition
Glaubera = heat-bath:
1
𝑊𝑊𝐺𝐺 =
1 + exp(𝛽𝛽Δ𝐸𝐸)
For 𝑇𝑇 = 0:
0 𝑖𝑖𝑖𝑖 Δ𝐸𝐸 > 0
𝑊𝑊(Δ𝐸𝐸) = �𝑊𝑊0 𝑖𝑖𝑖𝑖 Δ𝐸𝐸 = 0
1 𝑖𝑖𝑖𝑖 Δ𝐸𝐸 < 0
27
The transition probability
𝟏𝟏
𝜷𝜷 =
𝒌𝒌𝑩𝑩 𝑻𝑻
28
Magnetization
Simulations: Paweł Majewski (BDA, 2019)
4nn
3nn
6nn
31
Universal critical exponents
𝑇𝑇𝑐𝑐 −𝑇𝑇
𝑡𝑡 = reduced temperature
𝑇𝑇𝑐𝑐
𝜒𝜒 𝑇𝑇, 0 ∼ 𝑡𝑡 −𝛾𝛾
𝑐𝑐 𝑇𝑇, 0 ∼ 𝑡𝑡 −𝛼𝛼
𝜉𝜉 𝑇𝑇, 0 ∼ 𝑡𝑡 −𝜈𝜈
32
𝐺𝐺 𝑟𝑟, 𝑇𝑇𝑐𝑐 , 0 ∼ 𝑟𝑟 −𝑑𝑑+2−𝜂𝜂
Critical exponents for the Ising model
d 2 3 4
33
Finite size scaling (FSS)
𝑇𝑇𝑐𝑐 𝐿𝐿 −𝑇𝑇𝑐𝑐 ∞
• ∼ 𝐿𝐿−𝜃𝜃
𝑇𝑇𝑐𝑐 ∞
1
• 𝜃𝜃 = for 𝐿𝐿 → ∞
𝜈𝜈
34
Finite size scaling (FSS)
∞ FSS
Specific heat −𝜶𝜶
𝑐𝑐 𝑡𝑡 𝐿𝐿𝛼𝛼/𝜈𝜈
Susceptibility −𝜸𝜸
𝜒𝜒 𝑡𝑡 𝐿𝐿𝛼𝛼/𝜈𝜈
Correlation lenght −𝝂𝝂
𝜉𝜉 𝑡𝑡 𝐿𝐿
Order parameter 𝑚𝑚 𝑡𝑡 𝛽𝛽 𝐿𝐿−𝛽𝛽/𝜈𝜈
35
1/𝐿𝐿
FSS – universal method
Skalowanie skończonego rozmiaru
36
Be careful with the initial state
37
Literature
38