NMM: Week 7 - Cellular Automata
This section explores lattice gase models of cellular automata, specifically implementing Matlab codes for both Frish-Hasslacher-Pomeau (FHP) and Hardy-de Pazzis-Pomeau (HPP) update rules governing a 2D lattice gas confined to a rectangular space, with one of two initial conditions (either ommitting elements from an inner square, or adding additional elements to the same inner square at start of simulation).
FHP works on a triagonal lattice, whereas HHP is a square lattice. I consider the collision of lattice elements with the walls of the confinement first, then collisions between elements themselves, and finally consider transitions at each grid location (e.g. switching direction of element trajectory).
Here is the initial state of the lattice gas on a 20x20 randomly seeded rectangle, with a fully occupied 3x3 element center:
And here is the resulting lattice after 5 time steps. Note the center is still mostly occupied but has begun to diffuse outward already at edges of the inner square: