2-D & 3-D Random Walk Simulations of Stochastic Diffusion Bob Brazzle (Jefferson College)
HexCellEnt: A 2-D Random Walk Game Game Basics: Place your marker in the center hexagon; roll a die; move one space in the direction indicated by the 6-point rose. Repeat. Goal: Move your marker off the game board (minimum number is 4 rolls). Questions: What is the probability of exiting the board in exactly 4 rolls? How could you calculate this probability?
Typical Student Answers (Introductory Lab)
An Elegant Path-Counting Method After Roll #1 After Roll #2
Setting up the Excel Spreadsheet ABCDE 1Roll #Center1 st Ring2 Main2 Neighbor 22 nd rd =6*C2=2*(C2+E2)+B2+D2=2*(E2+G2)+C2+F2=2*(C2+D2+G2) Setting up the spreadsheet: Every type of cell gets its own column (it helps to name them, as shown) Each row is a new roll For a given cell, set up the equation to add the values from the previous roll in the neighboring cells. (Not shown: Column F is “3 rd Ring Main”, column G is “3 rd Ring neighbor”, column H is “Number escaping”) 3M 3n 2M 2n C
Major Conceptual Shift from path counting {single particle} to relative concentration {infinitely many} Occupation numbers Occupation probabilities, OR… Relative Concentrations
Example Calculations using the Spreadsheet (most are probably beyond the introductory course) We can use the relative concentrations to calculate a weighted average of distance traveled by a particle. The equation for the best-fit curve is consistent with the well-known result for a random walk – a power law relationship between distance traveled and number of steps taken.
Example Calculation: Flux across a Border Outbound flux: Notice that all cells in ring #1 have three sides exiting to ring #2. For each cell: Flux out = (2 * 3/6) ÷ 36 Inbound flux: Some cells have 1 side leading in and some have 2 sides. Total inbound flux is: Flux in = [(1*6*1/6)+(2*6*2/6)] ÷ 36
Fick’s 1 st Law of Diffusion Compare the net flux across some boundary with the total difference between the relative concentrations across the same boundary. This yields the graph below.
The Continuity Equation…
… becomes the diffusion equation (Fick’s 2 nd Law)
Extensions I have created Excel files to study the following alternatives: Larger hexagon boards – up to 17 concentric rings Other plane tiling arrangements (e.g. a “great rhombitrihexagonal” tiling: dodecagon, hexagon & square) Soccer-ball-shaped HexCellEnt board A 3-D space-filling shape – the truncated octahedron