TASEPCompact.py
From Werner KRAUTH
Revision as of 14:23, 10 June 2024 Werner (Talk | contribs) ← Previous diff |
Revision as of 14:31, 10 June 2024 Werner (Talk | contribs) (→Python program) Next diff → |
||
Line 16: | Line 16: | ||
NStrob = NIter // 20 | NStrob = NIter // 20 | ||
Conf = [1] * NPart + [0] * (NSites - NPart) | Conf = [1] * NPart + [0] * (NSites - NPart) | ||
- | Active = random.randint (0, NSites - 1) | ||
- | while Conf[Active] != 1: | ||
- | Active = random.randint(0, NSites - 1) | ||
Text = 'Periodic TASEP, N= ' + str(NPart) + ', L= ' + str(NSites) | Text = 'Periodic TASEP, N= ' + str(NPart) + ', L= ' + str(NSites) | ||
print(' ' * (NSites// 2 + 1 - len(Text) // 2) + Text + ' ' * (NSites// 2 + 1 - len(Text) // 2)) | print(' ' * (NSites// 2 + 1 - len(Text) // 2) + Text + ' ' * (NSites// 2 + 1 - len(Text) // 2)) | ||
Line 39: | Line 36: | ||
Text = 'Total time = ' + str(prefactor) + ' * N ^ ' + str(exponent) | Text = 'Total time = ' + str(prefactor) + ' * N ^ ' + str(exponent) | ||
print(' ' * (NSites// 2 + 1 - len(Text) // 2) + Text + ' ' * (NSites// 2 + 1 - len(Text) // 2)) | print(' ' * (NSites// 2 + 1 - len(Text) // 2) + Text + ' ' * (NSites// 2 + 1 - len(Text) // 2)) | ||
- | |||
==Output== | ==Output== |
Revision as of 14:31, 10 June 2024
This page is part of my 2024 Beg Rohu Lectures on "The second Markov chain revolution" at the Summer School "Concepts and Methods of Statistical Physics" (3 - 15 June 2024).
My Lecture 3 is concerned with the Symmetric Simple Exclusion Process (SSEP), and its liftings, the TASEP (totally asymmetric simple exclusion process) (treated here) and the lifted TASEP. All these dynamical systems carry the word "Process" in their descriptions. This is because, it is usually described in continuous time. We rather use a formulation in descrete time, where at each time step, a single move is attempted. In fact, each move consists in the choice of a random particle and the choice of a random direction.
Here, we are concerned with the TASEP. With periodic boundary conditions, we may separate the forward-and-backward moving TASEP, as discussed in Lecture 3, into two independent copies. At each time step, the TASEP samples the random particle to be moved (forward). This, as discussed, is one half of a lifting of the SSEP.
Contents |
Python program
import math import random exponent = 2.0 alpha = 0.5 prefactor = 1.0 NPart = 32; NSites = 2 * NPart NIter = int(prefactor * NPart ** exponent) NStrob = NIter // 20 Conf = [1] * NPart + [0] * (NSites - NPart) Text = 'Periodic TASEP, N= ' + str(NPart) + ', L= ' + str(NSites) print(' ' * (NSites// 2 + 1 - len(Text) // 2) + Text + ' ' * (NSites// 2 + 1 - len(Text) // 2)) print('-' * (NSites + 2)) for iter in range(NIter): Active = random.randint (0, NSites - 1) while Conf[Active] != 1: Active = random.randint(0, NSites - 1) Step = 1 NewActive = (Active + Step) % NSites if Conf[NewActive] == 0: Conf[Active], Conf[NewActive] = 0, 1 if iter % NStrob == 0: PP = for k in range(NSites): if Conf[k] == 0: PP += ' ' else: PP += 'X' print('|' + PP + '|') print('-' * (NSites + 2)) Text = 'Total time = ' + str(prefactor) + ' * N ^ ' + str(exponent) print(' ' * (NSites// 2 + 1 - len(Text) // 2) + Text + ' ' * (NSites// 2 + 1 - len(Text) // 2))
Output
Here is output of the above Python program for the TASEP with, for simplicity, N=32, L=64 and only 20 configurations over the length of the simulation.
Periodic TASEP, N= 32, L= 64 ------------------------------------------------------------------ |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX | |XXXXXXXXXXXXXXXXXXXXXXXXXXXX XXX X | |XXXXXXXXXXXXXXXXXXXXXXXXX XXXX XX X | |XXXXXXXXXXXXXXXXXXXXXXXX XXXXX X X X | |XXXXXXXXXXXXXXXXXXXXXX XXXXXX X XX X | |XXXXXXXXXXXXXXXXXXXXX XXXXX X XXX XX | |XXXXXXXXXXXXXXXXXXXXX XXX XX XXXX X X | |XXXXXXXXXXXXXXXXXXX XXXXX X XX XX XXX | |XXXXXXXXXXXXXXX XXXXXXXXX X XX X XXXX | |XXXXXXXXXXXXXX XXXXXXXX XX XX XX XXX X | |XXXXXXXXXXXXXX XXXXXXXX XXXX XX X X XX | |XXXXXXXX XXXXXXXXXXXXX X XXXX XX XX XX | |XXXX XXXXXXXXXXXXXXXXX XX XX X X XX X X X | |XX XXXXXXXXXXXXXXXXXX X X XXX X XX X XX X | | XXXXXXXXXXXXXXXXXX X XX XXX X XX XXX X X | | XXXXXXXXXXXXXXX X XX XX X X X X XX X XX X X X | | XXXXXXXXXXXXXX XX X XXX X XX X XX XXX X X X | | XXXXXXXXXXX XX XXX XX XX XX X X XXXXX X X X | | XXXXXXXXX XXX XXXX XX XXXX X XXX X X XX X X | | XXXXXXXX XXXX XXXX XX XXX X XX XX XX X X X X | | XXXXXXX XXXX XX XXX XX XX X X XX X XXX X X X X | ------------------------------------------------------------------ Total time = 1.0 * N ^ 2.0
With all its limitations, the program illustrates that the N^2 steps are not sufficient to move the compact initial state and to approach the equilibrium.
Further Information
- The mixing behavior of the TASEP t_mix \sim N^(5/2) has been computed by Baik & Liu (20XX) (see references). This is in our units, where one move takes place per unit time.
- The relaxation time of the TASEP is likewise t_rel \sim N^(5/2). Again this is in the MCMC units of one move per time step.
- The description of the TASEP as a lifting of the SSEP is from Kapfer et al. (2017).
- An example transition matrix for the TASEP with open boundary conditions (hard walls) can be found in Essler et al. (2023).
- The TASEP can be solved by Bethe ansatz, and many of its properties are known.
- As discussed at length in Lecture 3, the transition matrix of the TASEP is doubly stochastic so that, in equilibrium, every allowed configuration is equally likely.
References
- Baik and Liu
- ET