Tuesday, January 27, 2015

Statistical Mechanics, Part 3

[This blog post is part of two series. The first series, titled Statistical Mechanics, is a series of lessons that I have developed to illustrate how curriculum and instruction can be designed to encourage vertical learning. We start by drilling down from our understanding of diffusion to develop a dynamic model of diffusion grounded in random particle motion using statistical mechanics. We then build on top of this foundation to construct deeper understandings of fluid flow, heat transfer, and electrical circuits. You can navigate through the lessons in this series using the links below. These lessons are then part of a larger series, Defining Vertical Learning.]

Part 1  |  Part 2  |  Part 3  |  Part 4  |  Part 5  |  Part 6  |  Part 7  |  Summary


Applying Statistical Mechanics to Model Diffusion


So far, we have developed a model for diffusion using pennies. To move the pennies randomly, we flip them. If they come up tails, they move to the left. If they come up heads, they move to the right. When simulating a system where all of the pennies are concentrated to the left, we have seen that random motion does cause the pennies to move from regions of higher concentration to regions of lower concentration without any coordination or sense of the big picture. But how?

Pennies moving randomly left and right, region to region, over time

When running this simulation, everyone is assigned to count, flip, sort, and move pennies in a region. Our view is restricted to that one region. To figure out how the pennies “know” to move from regions of higher concentration to regions of lower concentration, we are going to change our perspective. Instead of observing a single region, we are going to observe the boundary between two regions. This boundary is known as a control surface.

Imagine that you are watching the boundary between a region with six pennies and a region with ten pennies. What’s going to happen? Well, you don’t know because you don’t know which pennies will come up tails and which pennies will come up heads when we flip them. But what would you expect to happen on average if you ran this simulation a hundred times?

A net flow of two pennies from region 5 to region 4

On average, you would expect half of the pennies (three) in region 4 to come up heads and move to the right, and half of the pennies (five) in region 5 to come up tails and move to the left. On average, there would be a net flow of two pennies from region 5 to region 4.

A net flow of four pennies from region 4 to region 5

Now imagine that region 4 has ten pennies and region 5 has two pennies. In that case, there would be an average net flow of four pennies from region 4 to region 5.

A net flow of zero pennies between region 4 and region 5

If region 4 and region 5 both have six pennies, pennies still move randomly across the control surface, but the average net flow is zero pennies.

In our model, pennies aren’t moving from regions of higher concentration to regions of lower concentration; they are moving randomly. But when a region with more pennies is next to a region with fewer pennies, there will be, on average, a net flow of pennies from the region with more pennies to the region with fewer pennies. Why? Simply because there are more pennies on that side of the boundary.


In fact, the average net flow between two regions is proportional to the difference of the number of pennies in those regions. And, if we wanted to, we could come up with a formula for it. Don’t worry about this formula for now. We will come back to it later.

When we start using probabilities to predict the state of the simulation in the next round, we are applying statistical mechanics. I believe that it is important to run a few simulations where you are still physically flipping the pennies because it makes the experience more concrete, and you can see that pennies are constantly moving in both directions and that nothing is controlling them. That is less obvious when you add a layer of abstraction with statistical mechanics or by running the simulation on a screen. But running a simulation with pennies is time-consuming, and it is a lot faster to predict that, on average, ten pennies will come up as five tails and five heads than to actually flip, sort, and count them. It also means that you can run simulations individually or in small groups instead of having to do it as a whole-class activity.

Pennies diffusing in a pipe with six regions

Here is a simulation with 200 pennies and six regions. I am using statistical mechanics, so I am saying that half the pennies will come up tails and move to the left and half the pennies will come up heads and move to the right.


You can calculate the number of pennies in each region for each round manually, or you can set up a spreadsheet and use formulas to perform the calculations automatically. It took about five minutes to set up this simulation in a spreadsheet. In the first row, I typed in the initial conditions. In the second row, I set up the formulas to calculate the number of pennies in each region in round 1 using the data in round 0. Then, using the “fill down” or “auto-fill” feature of the spreadsheet, I added more rounds. You can look at my spreadsheet here.

By modeling diffusion with randomly moving pennies, we have grounded our understanding of diffusion in our understanding of the particle theory of matter, that matter is made up of particles in perpetual motion. We have established, on a visceral level, that simple local mechanisms can generate complex macroscopic phenomena. We have made our understanding of diffusion more functional by introducing the idea that the rate of diffusion is proportional to the concentration gradient. And we have developed a tool that we can use to investigate self-generated “what-if” questions. For example, what happens if the pipe we are simulating is a different length?

Pennies diffusing in a pipe with four regions

Pennies diffusing in a pipe with eight regions

The ability to observe diffusion at a molecular scale and to conduct your own investigations stimulates curiosity and encourages inquiry.


Part 1  |  Part 2  |  Part 3  |  Part 4  |  Part 5  |  Part 6  |  Part 7  |  Summary

3 comments:

  1. Replies
    1. The lessons are still building, so stay tuned! :)

      Delete
    2. Hi Steve. Finally finished this series of lessons. I learned a lot by writing this up. I’m going to try to finish defining vertical learning next, and then I may take a stab at another series of lessons.

      Delete