Coder-Physicists Are Simulating the Universe to Unlock Its Secrets

In the early 2000s, a small community of coder-cosmologists set out to simulate the 14-billion-year history of the universe on a supercomputer. They aimed to create a proxy of the cosmos, a Cliffs Notes version in computer code that could run in months instead of giga-years, to serve as a laboratory for studying the real universe. The simulations failed spectacularly. Like mutant cells in a petri dish, mock galaxies grew all wrong, becoming excessively starry blobs instead of gently rotating spirals. When the researchers programmed in supermassive black holes at the centers of galaxies, the black holes either turned those galaxies into donuts or drifted out from galactic centers like monsters on the prowl. But recently, the scientists seem to have begun to master the science and art of cosmos creation. They are applying the laws of physics to a smooth, hot fluid of (simulated) matter, as existed in the infant universe, and seeing the fluid evolve into spiral galaxies and galaxy clusters like those in the cosmos today. Photo of Tiziana Di Matteo Tiziana Di Matteo, a professor of physics at Carnegie Mellon University, co-developed the MassiveBlack-II and BlueTides cosmological simulations. Carnegie Mellon University “I was like, wow, I can’t believe it!” said Tiziana Di Matteo, a numerical cosmologist at Carnegie Mellon University, about seeing realistic spiral galaxies form for the first time in 2015 in the initial run of BlueTides, one of several major ongoing simulation series. “You kind of surprise yourself, because it’s just a bunch of lines of code, right?” With the leap in mock-universe verisimilitude, researchers are now using their simulations as laboratories. After each run, they can peer into their codes and figure out how and why certain features of their simulated cosmos arise, potentially also explaining what’s going on in reality. The newly functional proxies have inspired explanations and hypotheses about the 84 percent of matter that’s invisible — the long-sought “dark matter” that seemingly engulfs galaxies. Formerly puzzling telescope observations about real galaxies that raised questions about the standard dark matter hypothesis are being explained in the state-of-the-art facsimiles. The simulations have also granted researchers such as Di Matteo virtual access to the supermassive black holes that anchor the centers of galaxies, whose formation in the early universe remains mysterious. “Now we are in an exciting place where we can actually use these models to make completely new predictions,” she said. Black Hole Engines and Superbubble Shockwaves Until about 15 years ago, most cosmological simulations didn’t even attempt to form realistic galaxies. They modeled only dark matter, which in the standard hypothesis interacts only gravitationally, making it much easier to code than the complicated atomic stuff we see. The dark-matter-only simulations found that roundish “halos” of invisible matter spontaneously formed with the right sizes and shapes to potentially cradle visible galaxies within them. Volker Springel, a leading coder-cosmologist at Heidelberg University in Germany, said, “These calculations were really instrumental to establish that the now-standard cosmological model, despite its two strange components — the dark matter and the dark energy — is actually a pretty promising prediction of what’s going on.” Researchers then started adding visible matter into their codes, stepping up the difficulty astronomically. Unlike dark matter halos, interacting atoms evolve complexly as the universe unfolds, giving rise to fantastic objects like stars and supernovas. Unable to code the physics in full, coders had to simplify and omit. Every team took a different approach to this abridgement, picking and programming what they saw as the key astrophysics. Then, in 2012, a study by Cecilia Scannapieco of the Leibniz Institute for Astrophysics in Potsdam gave the field a wake-up call. “She convinced a bunch of people to run the same galaxy with all their codes,” said James Wadsley of McMaster University in Canada, who participated. “And everyone got it wrong.” All their galaxies looked different, and “everyone made too many stars.” Share this article Newsletter Get Quanta Magazine delivered to your inbox Subscribe now Most recent newsletter Photo of the Superbubble Henize 70 is a superbubble of hot expanding gas about 300 light-years across that is located within the Large Magellanic Cloud, a satellite of the Milky Way galaxy. FORS Team, 8.2-meter VLT, ESO Scannapieco’s study was both “embarrassing,” Wadsley said, and hugely motivational: “That’s when people doubled down and realized they needed black holes, and they needed the supernovae to work better” in order to create credible galaxies. In real galaxies, he and others explained, star production is diminishing. As the galaxies run low on fuel, their lights are burning out and not being replaced. But in the simulations, Wadsley said, late-stage galaxies were “still making stars like crazy,” because gas wasn’t getting kicked out. The first of the two critical updates that have fixed the problem in the latest generation of simulations is the addition of supermassive black holes at spiral galaxies’ centers. These immeasurably dense, bottomless pits in the space-time fabric, some weighing more than a billion suns, act as fuel-burning engines, messily eating surrounding stars, gas and dust and spewing the debris outward in lightsaber-like beams called jets. They’re the main reason present-day spiral galaxies form fewer stars than they used to. The other new key ingredient is supernovas — and the “superbubbles” formed from the combined shockwaves of hundreds of supernovas exploding in quick succession. In a superbubble, “a small galaxy over a few million years could blow itself apart,” said Wadsley, who integrated superbubbles into a code called GASOLINE2 in 2015. “They’re very kind of crazy extreme objects.” They occur because stars tend to live and die in clusters, forming by the hundreds of thousands as giant gas clouds collapse and later going supernova within about a million years of one another. Superbubbles sweep whole areas or even entire small galaxies clean of gas and dust, curbing star formation and helping to stir the pushed-out matter before it later recollapses. Their inclusion made small simulated galaxies much more realistic. Photo of Jillian Bellovary Jillian Bellovary, a numerical cosmologist at Queensborough Community College and the American Museum of Natural History in New York, put black holes into the GASOLINE simulation code. H.N. James Jillian Bellovary, a wry young numerical cosmologist at Queensborough Community College and the American Museum of Natural History in New York, coded some of the first black holes, putting them into GASOLINE in 2008. Skipping or simplifying tons of physics, she programmed an equation dictating how much gas the black hole should consume as a function of the gas’s density and temperature, and a second equation telling the black hole how much energy to release. Others later built on Bellovary’s work, most importantly by figuring out how to keep black holes anchored at the centers of mock galaxies, while stopping them from blowing out so much gas that they’d form galactic donuts. Simulating all this physics for hundreds of thousands of galaxies at once takes immense computing power and cleverness. Modern supercomputers, having essentially maxed out the number of transistors they can pack upon a single chip, have expanded outward across as many as 100,000 parallel cores that crunch numbers in concert. Coders have had to figure out how to divvy up the cores — not an easy task when some parts of a simulated universe evolve quickly and complexly, while little happens elsewhere, and then conditions can switch on a dime. Researchers have found ways of dealing with this huge dynamic range with algorithms that adaptively allocate computer resources according to need. They’ve also fought and won a variety of logistical battles. For instance, “If you have two black holes eating the same gas,” Bellovary said, and they’re “on two different processors of the supercomputer, how do you have the black holes not eat the same particle?” Parallel processors “have to talk to each other,” she said. Saving Dark Matter The simulations finally work well enough to be used for science. With BlueTides, Di Matteo and collaborators are focusing on galaxy formation during the universe’s first 600 million years. Somehow, supermassive black holes wound up at the centers of dark matter halos during that period and helped pull rotating skirts of visible gas and dust around themselves. What isn’t known is how they got so big so fast. One possibility, as witnessed in BlueTides, is that supermassive black holes spontaneously formed from the gravitational collapse of gargantuan gas clouds in over-dense patches of the infant universe. “We’ve used the BlueTides simulations to actually predict what this first population of galaxies and black holes is like,” Di Matteo said. In the simulations, they see pickle-shaped proto-galaxies and miniature spirals taking shape around the newborn supermassive black holes. What future telescopes (including the James Webb Space Telescope, set to launch in 2020) observe as they peer deep into space and back in time to the birth of galaxies will in turn test the equations that went into the code. Another leader in this back-and-forth game is Phil Hopkins, a professor at the California Institute of Technology. His code, FIRE, simulates relatively small volumes of the cosmos at high resolution. Hopkins “has pushed the resolution in a way that not many other people have,” Wadsley said. “His galaxies look very good.” Hopkins and his team have created some of the most realistic small galaxies, like the “dwarf galaxy” satellites that orbit the Milky Way. Video: The formation of a Milky Way-size disk galaxy and its merger with another galaxy in the IllustrisTNG simulation. Video: The formation of a Milky Way-size disk galaxy and its merger with another galaxy in the IllustrisTNG simulation. Shy Genel/IllustrisTNG These small, faint galaxies have always presented problems. The “missing satellite problem,” for instance, is the expectation, based on standard cold dark matter models, that hundreds of satellite galaxies should orbit every spiral galaxy. But the Milky Way has just dozens. This has caused some physicists to contemplate more complicated models of dark matter. However, when Hopkins and colleagues incorporated realistic superbubbles into their simulations, they saw many of those excess satellite galaxies go away. Hopkins has also found potential resolutions to two other problems, called “cusp-core” and “too-big-to-fail,” that have troubled the cold dark matter paradigm. With their upgraded simulations, Wadsley, Di Matteo and others are also strengthening the case that dark matter exists at all. Arguably the greatest source of lingering doubt about dark matter is a curious relationship between the visible parts of galaxies. Namely, the speeds at which stars circumnavigate the galaxy closely track with the amount of visible matter enclosed by their orbits — even though the stars are also driven by the gravity of dark matter halos. There’s so much dark matter supposedly accelerating the stars that you wouldn’t expect the stars’ motions to have much to do with the amount of visible matter. For this relationship to exist within the dark matter framework, the amounts of dark matter and visible matter in galaxies must be fine-tuned such that they are tightly correlated themselves and galactic rotation speeds track with either one. RELATED: A Digital Copy of the Universe, Encrypted Hidden Supercluster Could Solve Milky Way Mystery The Case Against Dark Matter Discoveries Fuel Fight Over Universe’s First Light An alternative theory called modified Newtonian dynamics, or MOND, argues that there is no dark matter; rather, visible matter exerts a stronger gravitational force than expected at galactic outskirts. By slightly tweaking the famous inverse-square law of gravity, MOND broadly matches observed galaxy rotation speeds (though it struggles to account for other phenomena attributed to dark matter). The fine-tuning problem appeared to sharpen in 2016, when the cosmologist Stacy McGaugh of Case Western Reserve University and collaborators showed how tightly the relationship between stars’ rotation speeds and visible matter holds across a range of real galaxies. But McGaugh’s paper met with three quick rejoinders from the numerical cosmology community. Three teams (one including Wadsley; another, Di Matteo; and the third led by Julio Navarro of the University of Victoria) published the results of simulations indicating that the relation arises naturally in dark-matter-filled galaxies. Making the standard assumptions about cold dark matter halos, the researchers simulated galaxies like those in McGaugh’s sample. Their galaxies ended up exhibiting linear relationships very similar to the observed one, suggesting dark matter really does closely track visible matter. “We essentially fit their relation — pretty much on top,” said Wadsley. He and his then-student Ben Keller ran their simulation prior to seeing McGaugh’s paper, “so we felt that the fact that we could reproduce the relation without needing any tweaks to our model was fairly telling,” he said. Photo of Volker Springel Volker Springel, a professor at Heidelberg University, developed the simulation codes GADGET and AREPO, which is used in the state-of-the-art IllustrisTNG simulation. HITS In a simulation that’s running now, Wadsley is generating a bigger volume of mock universe to test whether the relation holds for the full range of galaxy types in McGaugh’s sample. If it does, the cold dark matter hypothesis is seemingly safe from this quandary. As for why dark matter and visible matter end up so tightly correlated in galaxies, based on the simulations, Navarro and colleagues attribute it to angular momentum acting together with gravity during galaxy formation. Beyond questions of dark matter, galactic simulation codes continue to improve, and reflect on other unknowns. The much-lauded, ongoing IllustrisTNG simulation series by Springel and collaborators now includes magnetic fields on a large scale for the first time. “Magnetic fields are like this ghost in astronomy,” Bellovary explained, playing a little-understood role in galactic dynamics. Springel thinks they might influence galactic winds — another enigma — and the simulations will help test this. A big goal, Hopkins said, is to combine many simulations that each specialize in different time periods or spatial scales. “What you want to do is just tile all the scales,” he said, “where you can use, at each stage, the smaller-scale theory and observations to give you the theory and inputs you need on all scales.” With the recent improvements, researchers say a philosophical debate has ensued about when to say “good enough.” Adding too many astrophysical bells and whistles into the simulations will eventually limit their usefulness by making it increasingly difficult to tell what’s causing what. As Wadsley put it, “We would just be observing a fake universe instead of a real one, but not understanding it.”