HK algorithm for estimation of percolation in square lattice using Python programing - Nath, Madhumita; Bandyopadhyay, Atul; Chakraborty, Saptarshi (AIP conference proceedings, 2020)
Percolation theory spans a wide area of application ranging from social science, geology, soil science, to complex material structure. Here in this paper, a high speed Monte Carlo program is developed using Python language to find out the site percolation threshold precisely in the square lattice. The coding is done by using the inbuilt libraries of Python named NumPy, SciPy, Matplotlib etc. The cluster identification and numbering is based on Hoshen-Kopelman(HK) algorithm which consumes low computer memory with small computation time compared to other methods. The percolation threshold (pc) computed in our case was is 0.5924528 which is consistent with series expansion method. We have also characterized the percolation by demonstrating normalized mass of percolating cluster (Npc), normalized size of spanning cluster (Nsc) and the ratio of Nsc /Npc. Present work is our generous effort to represent Python as an efficient tool for coding in percolation theory. The realizations of percolations by means of HK algorithm using Python language is reported for the first time as far as our knowledge is concerned.