Scientists as far back as Isaac Newton have investigated how a sand pile’s properties depend on the way the individual grains are arranged. Newton, possibly motivated in part by financial considerations associated with his own apple orchard, studied the various ways spherical objects could be densely packed. For example, random pouring fills an apple barrel to the rim, but inefficiently. Mechanical vibrations cause the apples to adjust their positions, filling open gaps and moving closer together. Barrels topped off at the orchard are thus only partly filled when they arrive at the market. This phenomenon also explains the warning you see on breakfast cereal boxes that “contents may have settled during shipping.”

With every shake, granular material becomes more densely packed, eventually tending toward the close-packed state. With all the grains as near to one another as possible, 26 percent of the volume is still gaps, but the substance is extremely rigid — as anyone who has hefted a vacuum-sealed pound of coffee can attest.

The difference between the lightest, fluffiest packing and the densest state corresponds to an inter-grain spacing variation of only 10 percent. Yet it takes many vibrations to change from one state to the other. Physicists at the University of Chicago have found that a container of beads will not have reached its final limit of density even after more than a million jolts.

It’s probably for the best that Sandman is made of only one type of sand. Even the cleverest comic book creators might be stumped by the behavior of granular mixtures. If you put both large and small beads in a cylinder, tip it on its side and rotate it around its horizontal axis, the contents will spontaneously segregate into alternating bands of large and small beads, like rings on a finger. This counterintuitive de-mixing phenomenon, called axial segregation, complicates efforts by the pharmaceutical industry to combine drug powders in drum mixers.

Even though sand is everywhere — and seems to get into everything — scientists have yet to elucidate all its properties. The insights they have gained so far about granular media have had important applications in the construction, agricultural and pharmaceutical industries. And our improving understanding of the stacking, flowing and mixing of grains and powders is also likely to affect the lives of nearly everyone. It may help a certain friendly neighborhood Spider-Man in his battles with granular supervillains, too.