Creating new simulations of black holes with Codex
A computational astrophysicist is exploring the edges of the known universe as he works to construct the first moving image of a black hole.

“These tools are changing how we do science in a very fundamental way.”
Studying the edge of the universe
Black holes exist at the edge of our universe and are difficult celestial objects for astronomers to study. They don’t emit light, they can’t be captured directly because they’re so far away—you’d need a telescope the size of earth to see one—and the physics that govern them don’t always match up with our current understanding.
None of this is news to computational astrophysicist Chi-kwan “CK” Chan. CK, a professor at the University of Arizona, has been studying black holes for over 20 years. In 2019, he was part of the Event Horizon Telescope collaboration that produced the first image of a black hole. This year, with support from the National Science Foundation(opens in a new window), they’re pursuing an even more ambitious goal: creating the first moving image of a black hole.

CK gathers data from the Arizona Radio Observatory 12m radio telescope at the Kitt Peak National Observatory.

“Black holes were originally based on theory. So it’s super exciting that we are able to observe them.” —Chi-kwan “CK” Chan
Understanding what’s missing requires building better models: mathematical approximations that describe how matter behaves under extreme conditions. But these equations are incredibly complex. Even the largest supercomputers struggle to solve them, and developing new approaches can take years of work. So CK turned to Codex to help accelerate this process.
“It would take me ten days to come up with ten new approximations. With Codex, this can be done in minutes.”

CK writing out an approximation for his students to review.

CK leads a group discussion for his students at the University of Arizona.

A handwritten mathematical approximation from CK.
New technology, new approaches
Because black holes exist so far away from earth, the only way to study them is by measuring the plasma that falls into them. CK creates simulations of the plasma and then compares that to the observational data gathered at the telescopes. “However, the simulations fall short,” says CK. “When we compare simulation with observation, we realize that the plasma around black holes is very low density, so we can’t really approximate the plasma as a fluid.” The only way CK can simulate them correctly is by following the individual electrons and ions. “And that is just a computationally intractable problem.”
CK uses Codex to find new numerical algorithms that can help him create faster, more stable simulations by implementing an agent skill he wrote. “With Codex we are now able to automatically discover new coordinate transformations and algorithms that can speed up these calculations by a factor of 1000. It allows us to do simulations that were previously not possible.”
CK still has to implement and verify each approximation Codex creates, but this approach has accelerated his workflow and allows him to focus more of his time on the research. (Go deeper on the science behind black holes and CK’s work.)
“For a very long time, astronomers and scientists needed to be excellent developers in order to solve our problems. AI allows us to focus back on the science questions instead of the coding part.”

The Kitt Peak Arizona Radio Observatory 12m radio telescope is one of eleven observatories in the Event Horizon Telescope network.

Codex helps CK review scientific code and catch mistakes with statistics and numerical methods, helping him produce more reliable results.

CK inside the control room of the Arizona Radio Observatory 12m radio telescope.
The future of discovery
CK and the Event Horizon Telescope team are currently gathering data on black holes; they hope to release the first moving image sometime in 2027. CK is excited about what he might learn. “If we successfully capture this first video of a black hole, it will open a new era of horizon-scale, time-domain, black hole astrophysics,” he says. “It will let us study how plasma behaves in some of the most extreme environments in the universe.”

“If you are curious about the world around you, you will just keep looking for new answers. And that’s how we learn. That’s how we advance our technology, advanced our civilization.” —Chi-kwan “CK” Chan

CK with Ram, Nayera, and Hayden, three of his students from the University of Arizona who also work on the analysis of black hole data and creating new simulations.

“I am from a grassroots family in Hong Kong. So I just feel incredibly lucky to be able to work at the frontier of black hole research.” —Chi-kwan “CK” Chan
“Humans are explorers. And astronomy is our ultimate frontier in exploration. So this is one way for human knowledge to reach the edge of the universe.”