Wednesday, January 26, 2011

Circulating Cells

Today we present our new simulation program, Circulating Cells, Version 1, or CC1. The following picture shows the program's display shortly after we start it up. The array of cells represents a cross-section of the atmosphere. Each cell represents an equal mass of gas. The color of the cells indicates their absolute temperature, according to the legend at the top, with the exception of the black one. The black cell is black so we can watch it circulating around.

This version of the program heats one location on the bottom row. Any cell that enters this location we heat to 300 K. If the cell enters at a higher temperature, we let it keep its higher temperature. Thus we never remove heat from our array.

The hot cells are rising, and as they rise they cool down. They turn from red to green. Meanwhile, cold cells must descend to make way for the hot cells. The cells that descend warm up. They turn from blue to green. At the beginning of our simulation, all the cells are blue. They are at 250 K. If we press Reset, all the cells will return to 250 K and the simulation will start again.

In our simulation, convection occurs by rotating blocks of four cells. The program picks a block of four cells at random. It calculates how much a quarter-turn will raise or lower the block's center of gravity. If a rotation will lower the center of gravity, the program performs the rotation. Otherwise, it does not. When the program rotates a block, one cell rises, one falls, and two stay at the same height. The one that falls contracts and warms up. The one that rises expands and cools down. The two cells that move sideways do not change temperature. But they may rise when they move from the top of a cold cell to the top of a hot cell. Hot cells are taller than cold cells.

In the following picture we see the distribution of heat in the atmosphere after a few minutes of running. The black cell has moved. We can turn any cell into a black cell by clicking on it with the mouse. We can turn any black cell back into a normal cell by clicking it again.

The simulation is made possible by a fundamental approximation. We arrange the cells as if the cells in each row are all at the same height, even though some may be sitting on top of columns of air that are significantly warmer or cooler than the others. Without this approximation, we cannot arrange the cells in an array, and simulation becomes several orders of magnitude more complex and time-consuming.

In CC1, there is no way for heat to pass from one cell to another. There is no conduction, no mixing, and no radiation. There is no way for heat to leave the array. After an hour of running, we end up with the following distribution of heat, all arising from the single heated location at the center of the bottom row. There is one blue cell on the bottom remaining. It moves around a bit, but so far it has resisted being drawn into the warm location.

Our program is written in TclTk. We encourage you to download the program and run it for yourself. To download it, click here. The file is called CC_1.tcl. It won't take you more than five minutes to get the simulation going. The movement of the cells is fascinating. The pictures I have here cannot do justice to the evolving display. I have inserted detailed comments in the code, which I hope will make it clear how each routine works. There are also instructions on how to run the simulation on Linux, MacOS, and Windows.

Without self-regulation by clouds we estimate that high clouds will warm the Earth by 38°C, doubling CO2 will warm the Earth by 1.5°C, and thick clouds will cool the Earth by 96°C. It is our hope that Circulating Cells will evolve into a simulation of radiation, convection, precipitation, and, ultimately, self-regulation by clouds. We will then be able to estimate the effect of doubling CO2 concentration within a self-regulating climate.

That evolution may take another year or two, and maybe the task will prove too monumental for us. But I think it will be an enjoyable journey, no matter how it ends. So I hope you will accompany me.


  1. Kevan,
    The result that you get seems obvious because the completely adiabatic behavior of the cells among them and of the whole array with the outside. At the end all the cells will be at the same energy CpT + gz = CpTb and the lapse rate of the column will be dT/dz = - gz/Cp.
    Your visualization of the convection is important because it puts in evidence that a source of heating located at the base of the column (without heat exganges to its inside and with surrounding) causes the convection that tends to realize an isoenergetic column with an adiabatic lapse rate.

  2. Dear Michele,

    That's an elegant calculation. I think it applies in this case for two reasons. First, there is no exchange of heat between the cells. Second, the 300 K temperature at the bottom is sufficient to cause a cell to rise almost to the top. But what if I heat the bottom only to 275 K? I'm running that simulation now, and it appears that the cells don't rise more than half-way up the array, so the higher cells will have more energy in your equation.

    Were you able to run the program yourself?

    I think my next step should be to introduce heat exchange between the cells, and see what happens. I predict that the entire array will arrive at the same temperature after a long time.

  3. Elementary, my dear Kevan! Excuse me for the Holmes’ quote.
    The cell will rise until its temperature is greater than 250K and starting with 275K at the bottom this occurs at half height of column where the upward pushing force vanishes. Obviously starting at 325K the top temperature will be 275K.
    I agree with you that the heat exchange between the cells will equalize the temperatures into the entire array to that of source.

  4. Well, that's what happened: they stopped half-way. (Also, I read your "until temperature is greater than" to mean "until temperature is less than").

    I will add conduction and mixing as the basis of my next post.

    Were you able to run the program? If you find it difficult to get going, then I don't suppose anyone else will be able to do it. I may have to figure out how to get the program to run within a browser.

  5. Kevan,
    The force acting on the cell is the same on the balloon in the previous post, F = gMi(Ti/Te-1), and it is directed upward if Ti > Te, i.e. if Tcell > 250K in our case. That’s if I am not mistaking.
    I am waiting for the check of your next post.

  6. Peter Newnam tells me he had no trouble getting the simulation to run on Windows XP.