How an Astrophysicist Uses OpenAI's Codex to Simulate Black Holes
The astrophysicist Chi-kwan Chan from the University of Arizona uses OpenAI's Codex to enhance black hole simulations and test the limits of Einstein's general theory of relativity. The artificial intelligence tool is revolutionizing the way scientists model the extreme physics of the universe.

How an Astrophysicist Uses OpenAI's Codex to Simulate Black Holes
The gravity around a black hole is so extreme that not even light can escape after getting close enough. To study these cosmic giants, astrophysicists like Chi-kwan Chan rely on sophisticated computational simulations — and now, artificial intelligence. Chan, a researcher at the University of Arizona and the Steward Observatory, is using Codex, OpenAI's code generation tool, to break barriers that once seemed insurmountable in modeling extreme astrophysical phenomena.
What Are Black Holes and Why Are They So Hard to Study?
Black holes are regions of space where the concentration of mass is so intense that it creates a gravitational curvature capable of trapping anything that crosses the so-called event horizon — a point of no return. "It's a surface with no way back," explains Chan.
Since light cannot escape from a black hole, scientists can't observe it directly. Instead, they study the area around the event horizon, where infalling matter emits intense electromagnetic radiation. This light emission can be measured, analyzed, and simulated with supercomputers.
Black holes also represent one of the best natural laboratories for testing Einstein's general theory of relativity, our current best explanation of gravity. According to this theory, gravity is not a force that attracts objects but rather the result of masses and energies curving the fabric of spacetime.
Collaboration with the Event Horizon Telescope
Chan is a member of the international collaboration of the Event Horizon Telescope (EHT), the scientific project responsible for publishing, in 2019, the first image of a black hole in human history — the supermassive black hole located at the center of the M87 galaxy.
But the EHT's work hasn't stopped there. The team is currently gathering new observations with the ambitious goal of producing the first video of a supermassive black hole, focusing on the same object in the M87 galaxy.
Chan played a key role in the development of the simulation and computing tools that the team used to interpret the 2019 observations. Since then, he and his colleagues have continued to improve the instruments and observational capabilities, advancing from static images to dynamic videos of plasma around the event horizon.
The Major Challenge: Modeling the Spiraling Plasma
One of the biggest obstacles faced by Chan and his team is modeling the plasma around black holes. Plasma is superheated matter composed of electrically charged electrons and ions.
In many simulations, scientists simplify the behavior of plasma by treating it as a fluid, using well-known equations to model its movement around the black hole. This approach works reasonably well in denser plasma regions, where electrons and ions constantly collide with each other.
However, in the regions close to the supermassive black holes studied by Chan, the plasma becomes so hot and diffuse that particles rarely meet. "They don't actually collide with each other," the researcher explains. Instead, the particles follow spiraling paths along the magnetic field lines — a behavior completely different from that of the traditional fluid model.
This phenomenon requires much more complex and sophisticated algorithms that take into account the physics of individual particles and their electromagnetic interactions. This is exactly where Codex comes into play.
How Codex Is Transforming Computational Astrophysics
Codex, developed by OpenAI, is a language model specialized in generating and understanding programming code. It allows developers and researchers to describe in natural language what they want to implement, and the tool automatically generates the corresponding code.
For Chan, this represents a qualitative leap in the simulation development process. Among the key benefits the researcher highlights are:
- Acceleration of algorithm development: tasks that previously took days of manual coding can be prototyped in hours.
- Error reduction: Codex helps identify logical flaws and suggests more efficient implementations.
- Exploration of new approaches: with AI suggesting alternative solutions, Chan can experiment with methods he might not have considered immediately.
- Democratization of research: researchers without deep programming training can implement complex algorithms with greater autonomy.
The application is especially valuable in building simulations that go beyond the fluid model, modeling the behavior of individual particles in the nearly collisionless plasma — where collisions are rare — that exists near the event horizon of supermassive black holes.
Simulations That Challenge the Limits of Known Physics
The simulations produced with the help of Codex do not merely serve to create beautiful images of space. They have a deep scientific purpose: to test the limits of known physics and verify whether Einstein's theory of general relativity remains valid under extreme conditions.
Each successful simulation can be compared with real observations from the EHT, allowing scientists to:
- Validate or refute theoretical models about the structure of spacetime near black holes.
- Map the behavior of plasma under temperature and density conditions unparalleled on Earth.
- Contribute to the creation of the first video of a supermassive black hole.
- Expand the understanding of relativistic jets — beams of matter expelled by black holes at speeds close to that of light.
AI as an Ally of Cutting-Edge Science
The partnership between Chi-kwan Chan and Codex exemplifies a growing trend in modern science: the use of artificial intelligence tools as scientific copilot, capable of enhancing human capabilities without replacing the judgment and creativity of researchers.
While supercomputers remain indispensable for running the simulations themselves, tools like Codex are transforming the development and modeling layer, making the process more agile, accessible, and innovative.
For the general public, the most visible outcome of this effort could be something truly historic: a live video of a black hole — a moving window into one of the most violent and fascinating phenomena in the cosmos.
Conclusion
The application of OpenAI's Codex in astrophysics, through the work of Chi-kwan Chan, demonstrates that artificial intelligence has already transcended the realm of commercial applications and reached the frontier of human knowledge. Simulating black holes is one of the most complex computational challenges science faces — and AI is proving to be a capable ally in meeting this challenge.
As the Event Horizon Telescope moves towards the first video of a supermassive black hole, tools like Codex will become increasingly essential for transforming raw data into scientific understanding. The future of astronomy, it seems, will be built with lines of code generated by artificial intelligence.
Consejo LatinoTech
¿Quieres crear tu propio portal de IA o SaaS sin programar? Usa la plataforma que nosotros usamos.
INFORMACIÓN META (SEO)
Master Artificial Intelligence before your competition.
Join thousands of professionals. Get the 5 best AI news and tools of the week, straight to your inbox.
Zero spam. Unsubscribe at any time.