Nordhaven
Astronomy/Systems Architecture/Philosophy/Press | | 20 min read

The Universe in a Box

Ginnungagap, Sixteen Million Grains, and the Web That Gravity Spun

On the first night of October the steward asked the cluster at the day job to build a universe from almost nothing, sixteen million grains of unseen matter and fourteen billion years of gravity, and it came back with the cosmic web, a giant cluster, and the numbers to prove it was not lying.

Everything from this story is free to see and to take: two short films at the end, the stills, the charts, the job script that built it, and the measurements, gathered under The Files.

A slice of the simulated universe today: bright clusters joined by threads around dark voids
The box tonight: nearly a billion light-years of simulated sky. The films are at the end.

The Question After Supper

It was the last evening of September turning into the first night of October. The work of the day was done, mostly, and the kitchen was quiet. The steward had spent the afternoon teaching the household’s newest helper to talk to the big cluster at the day job, the one that lives in a rented corner of somebody else’s data center and sleeps until it is needed. The helper could now ask the cluster what it was doing, what software it had, what a job would cost, and why a job had failed. It could even send one, if the steward said yes twice.

So the steward asked it the question you ask when a new tool is in your hand and the evening is still young. Not something useful. Something big.

Could we make a universe?

Not a picture of one. A real one, in the only way a household can: start from the conditions the sky itself tells us were there at the beginning, scatter millions of grains of matter almost evenly through an empty box, switch on gravity and the expansion of space, and let the machine run the clock forward from the dawn of things to tonight. Then look at what grew.

The helper did not laugh. It went and read the shelves of the cluster, found the pieces a cosmology code needs (the parallel message-passing kit, the fast transforms, the scientific number libraries, the big data file format), and said yes: the code itself was not installed, but everything it needs was, and it could be built in the job, on the working nodes, without troubling anyone.

            THE UNIVERSE IN A BOX  .  THE NIGHT MEASURE
  +-------------------------------------------------------------+
  |  Sunrise / Sunset ...... about 07:06  /  about 18:48        |
  |  Daylight .............. about 11h 42m, and shrinking       |
  |  The box ............... nearly a billion light-years wide  |
  |  Grains of matter ...... 16,777,216                         |
  |  Each grain weighs ..... about 60 billion suns              |
  |  Time simulated ........ about 13.8 billion years           |
  |  Steps of the clock .... 5,399                              |
  |  Cores working ......... 88, for just under three hours     |
  |  Halos that formed ..... 28,213                             |
  |  Did it tell the truth?  Yes, and here is how we know       |
  +------------------------------+------------------------------+
                                 |
               +-----------------+-----------------+
               v                                   v
      JERA . THE TURNING YEAR              DAGAZ . THE DAWN
      What is sown small                   Out of the dark,
      is reaped great.                     the first light.

Chapter 1: Ginnungagap

The old poems begin the world with a gap. Not a nothing, quite, but a yawning emptiness the songs call Ginnungagap, lying between the fire of Muspelheim in the south and the ice of Niflheim in the north. Where the sparks met the rime, the ice began to drip, and out of the dripping came the first life, the great frost-giant Ymir, and the cow who fed him. Odin and his brothers later slew Ymir and built the world from his body: the earth from his flesh, the sea from his blood, the mountains from his bones, and the sky from his skull, held up at its four corners by four dwarves.

What the old singers got right, and what still raises the hair on the arm, is the shape of it. The world did not begin full. It began nearly empty and nearly even, with something small at the edge of things that grew.

That is also, as nearly as anyone can tell, the shape of the real beginning. The oldest light in the sky, the faint glow left over from when the universe first became clear enough to see through, is astonishingly smooth. It is the same temperature in every direction to about one part in a hundred thousand. But not exactly the same. There are ripples in it, tiny warmer and cooler patches, and those ripples are the seeds of everything. Every galaxy, every cluster, every star and every hearth was once a slightly crowded patch in a nearly even sea.

Our box begins there. At the start of the simulation the universe is about thirty million years old. The sixteen million grains sit almost perfectly on a grid, nudged ever so slightly by those ripples, drawn from the same measured recipe the sky gives us: how much ordinary matter there is, how much unseen matter, how much of the strange push that makes space itself expand faster over time.

The simulated universe at thirty million years: almost perfectly even, with faint ripples
Thirty million years. Almost perfectly even. The faint grain you see is the starting grid and the ripples riding on it.
The same slice today: bright clusters joined by filaments around dark voids
Today, thirteen point eight billion years later. The same slice of the same box. Nothing was added but time and gravity.

Ginnungagap on the left. The world on the right.


Chapter 2: Sixteen Million Grains

The grains are not stars, and they are not galaxies. They are lumps of the unseen matter that makes up most of the mass in the universe, the stuff that does not shine, does not reflect, does not touch anything except through its weight. Nobody has caught a piece of it in a jar. We know it is there the way you know the wind is there, by what it moves: galaxies spin too fast for the matter we can see to hold them together, and light bends around clusters as if they weighed far more than their stars.

In our box, each grain stands for a cloud of that unseen matter weighing about sixty billion suns. There are sixteen million, seven hundred and seventy-seven thousand, two hundred and sixteen of them, which is two hundred and fifty-six on a side, cubed. The box is nearly a billion light-years across. Our own galaxy, by comparison, is about a hundred thousand light-years across, so you could lay nearly ten thousand of it end to end along one edge of the box.

The rule they follow is the oldest rule there is. Every grain pulls on every other grain, weaker with distance, and space itself keeps stretching underneath them all. That is it. No stars, no gas, no heat, no magnetism, no light. Just weight, and time, and the slow stretching of the sky.

The code that keeps the books on all that pulling is a well-known, freely shared program written by astronomers and used in observatories and universities around the world. Pulling sixteen million grains on each other the simple way would take forever, so it is cleverer than that: for grains far away it groups them together and treats them as one, the way you might count a distant flock of crows as one dark smudge instead of counting every bird, and for the very largest scales it hands the problem to a grid and solves it all at once with the same mathematics a radio uses to pull a station out of noise.


Chapter 3: The Cluster Wakes

The cluster at the day job keeps most of its machines switched off. When a job is sent, a few of them are woken, built fresh, and handed the work. When the job is done, they are switched off again and cost nothing. It is a good way to keep a big barn without heating it all winter.

The steward did not send the big job first. That is not how you treat a new tool, or a new horse.

The pilot. First went a small test, a box a quarter of the width with a sixty-fourth of the grains, on a single machine. Its whole purpose was to find out what would break. Something did, right away: the build stopped in four seconds, because the code’s own building scripts call for a program named one thing and the cluster’s machines call it by a slightly different name. A one-line fix. The second try built the code in eight seconds and ran the little universe from beginning to end in about nine minutes. It came back with five hundred and two halos and a growth of structure that matched what the theory said it should, to within the wobble you expect from such a small box.

That is the whole point of a pilot. It costs almost nothing, and it tells you the big run will not die in its first minute after you have committed four machines and three hours to it.

The big run. Then four machines woke together, eighty-eight cores between them, all talking to each other over a fast network as one. The steward asked for a box four times wider than the pilot and sixty-four times more grains, with the measured recipe of the real universe, and gave it a hard limit of three hours and a quarter. The helper checked the script before sending it, showed the steward the plan and the worst-case cost, and only sent it when told to.

It built the code in eight seconds. Then it began to work, and for two hours and fifty-six minutes those eighty-eight cores ran at ninety-nine percent, which is the cluster’s way of saying it was not waiting on anything. It took five thousand, three hundred and ninety-nine steps of the clock. Twelve times along the way it stopped and wrote down where every single grain was, a snapshot, so that the history could be watched afterwards. It finished nineteen minutes inside its limit, wrote its last notes, and the four machines went quietly back to sleep.

16.8 milliongrains of unseen matter
88 coreson four machines, as one
2 h 56 minwall clock, 99 percent busy
5,399steps of the clock
12snapshots of the whole box
28,213halos formed by tonight

Chapter 4: The Web That Gravity Spun

Here is what grew. Each frame below is the same slice of the box, about a hundred million light-years thick, at a different moment in the history of the universe.

Thirty million years
30 million years
almost even
About one billion years
about 1 billion years
first clumping
About three billion years
about 3.3 billion years
the threads appear
About six billion years
about 6 billion years
knots tighten
Today
today
the web

Watch what happens. The crowded patches pull in their neighbors, and the more they pull in, the harder they pull. The emptier patches lose what little they had to the crowded ones around them and grow emptier still. The rich get richer and the poor get poorer, at the scale of a billion light-years.

But it does not just clump. It spins a web. Matter falls first into flat sheets, then the sheets fold into long threads, and where the threads cross, great knots form. The astronomers call it the cosmic web, and it is not a metaphor: when they map where real galaxies sit in the real sky, this is the shape they find. Long filaments of galaxies hundreds of millions of light-years long, joined at bright clusters, wrapped around enormous voids where almost nothing lives.

The old poems have a tree for this. Yggdrasil, the world-ash, holds the nine worlds in its branches and its roots, and every world is joined to every other along its limbs. At its foot sit the three Norns, beside the well of Urd, and they lay down the threads of wyrd, the woven fate of all that is. Nobody who has watched this film will look at that image quite the same way again. The threads were laid down at the beginning, in the ripples. Gravity only pulled them tight.


Chapter 5: The Greatest Hall

Of the twenty-eight thousand halos that formed in the box, one is larger than all the rest. By tonight it weighs about two thousand eight hundred trillion suns. That is roughly the size of the great Coma Cluster in the real sky, a swarm of more than a thousand galaxies about three hundred and twenty million light-years from us, the place where astronomers first noticed, nearly a century ago, that clusters weigh far more than their stars can account for. In other words, the place where the unseen matter was first suspected.

The helper went back afterwards and followed the region where that giant ends up, all the way to the beginning, and made a second film of it.

The whole birth of it is the second film at the end of this page. Here it is in three moments.

The cluster region at thirty million years
30 million years
nothing to see yet
The cluster region at about three billion years
about 3.3 billion years
many small halls
The cluster region today
today
one great hall

It does not form all at once, the way a mountain does not rise all at once. It begins as many small halos scattered along the threads, and the threads carry them inward like rivers carrying logs to a millpond. They merge, and merge again, and by today there is one great hall at the crossing of four or five filaments, still swallowing whatever the threads bring it.

There is a picture in that, too, for anyone who keeps a household. Nothing great is built in one stroke. It is gathered, small thing by small thing, along the paths that were already there.


Chapter 6: Did It Tell the Truth?

A picture of a universe is easy to make. Anyone with a paint program can make something that looks like this. The real question, the only question that matters with any machine, is whether it told the truth.

This household has a rule about that, learned the hard way in the summer: a number is not a result until somebody has checked it against something that was not made by the same machine. So the job did not end when the clock reached tonight. It checked its own work against two things astronomers have measured and calculated independently, years ago, with no knowledge of our little box.

The first check: how fast structure grows. On the very largest scales, where gravity is still gentle, there is a precise and well-tested calculation of how much the ripples should grow between the beginning and tonight. It says they should grow about two thousand five hundred times in strength. Our box measured that growth on its largest scales and got between eighty-seven and ninety-eight percent of the predicted amount, which is as close as a single box of this size can honestly get; the biggest waves are so few in a box this small that a little scatter is expected. On smaller scales the box grew faster than the simple calculation, between one point two and one point six times, and that is right too: the simple calculation stops working where gravity gets strong, and the clumps run ahead of it. That is exactly where a full simulation earns its keep.

How clumpy the universe is at each scale, at twelve moments from the beginning to today
How clumpy the box is at each size of scale (left is the biggest scales, right the smallest), measured at all twelve snapshots. Each line sits above the one before it. Structure grows about two thousand five hundred times from the bottom line to the top one, and the late lines bend up on the right where gravity runs ahead of the simple theory. The jagged stretches are the honest noise of a single box.

The second check: how many halos of each weight. Astronomers have run many simulations far larger than ours, by people with far bigger machines, and from them have written down a formula for how many halos of each weight a universe like ours should contain in a box of any size. We counted ours and compared.

Halo weight (suns, about) Halos in our box Halos the formula expects Ratio
6 to 13 trillion 5,058 4,638 1.09
13 to 28 trillion 2,399 2,266 1.06
28 to 61 trillion 1,145 1,080 1.06
61 to 133 trillion 518 490 1.06
133 to 287 trillion 210 202 1.04
287 to 620 trillion 69 70 0.98
620 to 1,340 trillion 19 18 1.05
1,340 to 2,900 trillion 5 2.8 1.82

Across nearly a hundredfold range of weights, our box agrees with the formula to within two to nine percent. The one bin that looks far off, the very heaviest, holds only five halos against an expected three, and with numbers that small the difference is ordinary luck of the draw. Three, five, it is the same throw of the dice.

Left: halo counts against the expected formula. Right: clumpiness against simple theory.
The two checks side by side. Left: our halo counts (dots) against the expected formula (line). Right: our clumpiness tonight (dots) against the simple theory (line), agreeing on the big scales and pulling ahead on the small ones.

So the box passed. It is not proof that our universe was made this way. It is something smaller and more useful than that: proof that the machine did what we asked it to do, honestly, and that what grew in it grew the way the best measurements of the real sky say it should.


Chapter 7: What It Does Not Show

Every honest report has a section on its limits. Here is ours.

There are no stars in it. Only the unseen matter. Ordinary matter, the gas that cools and falls into the halos and lights up as stars and galaxies, was left out entirely. Real galaxies would sit in the bright knots of this web like lamps in the windows of a hall, but our box shows only the halls, not the lamps.

It cannot see small things. Each grain weighs sixty billion suns. A galaxy like our own sits in a halo about a trillion suns, so in this box it would be only about sixteen grains, too few to be counted as a halo at all; we only counted halos of about a hundred grains and up. The box is built to see the web and the clusters, not the galaxies themselves.

It is one box. The largest waves in the universe are larger than our box, so they are missing, and the few largest waves that do fit are too few to measure precisely. That is why the very largest scales scatter a little. A bigger box, or several boxes with different seeds, would tighten that.

The films are smoothed between snapshots. The simulation wrote down where every grain was twelve times. To make the films move smoothly, the helper drew the frames in between by sliding each grain in a straight line from one snapshot to the next. The real paths curve. The stills above, and every number in this post, come from the real snapshots only.

The recipe came from the sky, not from us. How much matter, how much unseen matter, how fast space stretches, how big the first ripples were: all of that came from published measurements of the oldest light. We did not discover the shape of the universe tonight. We checked that a machine at the day job, given that recipe, builds the universe the sky says we live in.


Chapter 8: Why a Household Does This

It is a fair question. Nobody on this ridge needs a cosmology. The hens do not care, and the tomatoes are done for the year.

But there were three reasons, and they are good ones.

The first is the tool. The steward builds things that let researchers use the cluster without fighting it, and the new helper was born that very afternoon. You do not know whether a tool is any good until you use it for something real and a little too big. This run turned up a handful of small faults in the helper on its way through. Some were mended the same evening; the rest are being mended now. That is worth more than a week of tests that pass.

The second is the old one. The household keeps the wheel of the year, and the wheel of the year is a small cosmology: the sun’s long walk north and south, the moon’s turning, the lean months and the fat. It is good, now and then, to step back from the wheel and look at the whole sky it turns under, and to remember how strange and how lawful it is.

The third is simply wonder. The steward sat at the kitchen table a little before midnight and watched sixteen million grains of nothing turn into the cosmic web in thirteen seconds, on a laptop, and was quiet for a while afterwards. Some things are worth doing because they make you quiet.


Troth: The Rules of the Box

  1. Ask the big question, but send the small job first.
  2. A picture is not a result. Check it against something the same machine did not make.
  3. Say what was left out. A report without limits is a story, not a measurement.
  4. Pay for what you use, and let the machines sleep when the work is done.
  5. Smooth the film if you must, but take your numbers from the real snapshots.
  6. When the dice are few, do not read meaning in the throw.
  7. The recipe is borrowed from the sky. Give the sky the credit.

What Still Sits on the Scale

  • A box with stars in it. The same code can carry gas, cooling and star formation. It costs far more, and it is not for tonight.
  • More boxes, different seeds. Several universes from different starting ripples would show which features are law and which are luck.
  • A galaxy merger. The same tool can collide two galaxies like our own and its great neighbor, which are, as it happens, falling toward each other now. That one is on the list.
  • Mending the helper. The last of the faults the run turned up are being fixed in the other room as this is written.

The Blessing

Hail the Allfather and his brothers, who took the body of the first giant and built a world from it, earth and sea and sky.

Hail the Norns at the well of Urd, who lay down the threads before anything is born, and let the years pull them tight.

Hail the land-wights of this ridge, who keep the small world under the great one, and the hearth under both.

May our questions be big, and our first jobs small. May every number we are given be one somebody checked. May the machines sleep when the work is done, and wake when they are needed. May the threads that hold this household be strong, and the knots be warm halls. May we look up on the clear cold nights and know a little better what we are looking at. May wonder keep us quiet when it should.

The leaves turn on the ridge. The dark half deepens. Above it all, the web. Ask largely. Check honestly. Look up.

Wes hal.

ᛃ ᛞ ᛇ

The Films

Fourteen billion years in thirteen seconds. A slice of the simulated universe nearly a billion light-years across, from thirty million years after the beginning to today. Every bright knot is a cluster of what would be galaxies; every dark hollow is a void.
The birth of the greatest hall. A cube about one hundred and ninety million light-years on a side, centered on where the largest cluster stands today. Watch the threads feed it.

The Files

Everything from this story, free to watch and to download:

A reader’s note: this is a dark-matter-only simulation of a modest size, run with a freely available cosmology code and the measured parameters of our universe. It is checked, but it is not new science; it is the household learning to do old science well. The twelve full snapshots, about five and a half gigabytes, are kept at home rather than published here. Ask, and they can be shared.