OpenPhysicsAI
An open-source physics lab for people and AI agents: 20+ verified solvers for flow, shocks, fire, heat, solids, sound, electromagnetism and orbits, with a…
Generative design. A titanium engine-mount bracket grown by the engine's topology optimiser on about 2 million voxels, with a multigrid solver: 25 kN on its pin, 12 % of the block's material, 2.2 times as stiff as the same material spread evenly, eight criteria written before the run and all met. Computed by OpenPhysicsAI; materials, light and camera by Blender. How it was made Printing metal, against NIST's measurement. The AM-Bench 2022 bridge in IN718, computed layer by layer and cut from its plate: free end 1.30 mm computed against 1.81 mm measured (28 % low).
Summary extracted from the README.
OpenPhysicsAI
Open-source physics simulation in C: more than twenty verified solvers, a native macOS app, and an MCP server so that AI agents can run them.
Quick start · Connect an AI agent · What it computes · The thirteen flags · For AI agents
What it is
OpenPhysicsAI is a free, open-source physics lab that runs on your own computer: flow from water to hypersonic shocks, fire, heat, sound, radar, magnetic fields, fracture, gears, orbits, and metal and plastic 3D printing. Each solver is a plain C library with a test against a closed form or an independent solution, and a page that says how far to trust it. One command runs any scenario from a JSON file and prints a JSON record; the same engine runs in a native macOS app and as an MCP server that AI agents drive. It is also an open competition: thirteen flags, measurements of the real world against which a machine scores every entry.
Quick start
You need on macOS (11 or later) the Xcode Command Line Tools: xcode-select --install. On Linux (tested on
Ubuntu 24.04): sudo apt install clang make python3 git.
git clone https://github.com/molanocortes/OpenPhysicsAI.git # about 140 MB to download
cd OpenPhysicsAI
make # about a minute on Linux; on macOS a few minutes, the app included
make smoke # five checks in about 20 seconds: the build, the doctor, a scenario, a picture, the MCP server
The CAD tool is built apart, because its libraries take about an hour and 1.7 GB once per machine: make cad build/openphysics-cad.
A first simulation: a spur gear tooth of 50 mm module pressed by an anvil, as Lisle, Shaw and Frazer loaded it and
measured its root stress with strain gauges (2017). It runs in a few seconds. At 15 kN the record gives 117.2 MPa at
the first gauge (gauge_A_agma_mpa), where the gauge read 115.7 MPa (mechanism.md).
make lab
./build/labrun examples/lab/lisle_tooth_root.json /tmp/tooth.lab # prints a JSON record of the run
./build/labfilm /tmp/tooth.lab --out /tmp/tooth --field mises --size 1200x675 # three PNGs: 5, 10 and 15 kN
Every number in a scenario carries its unit in its key (length_m, pressure_pa); a number without a unit is
refused. Copy any of the 77 examples in examples/lab/ and change it. On a Mac, ./openphysics opens
the app; type lab open /tmp/tooth.lab in its terminal panel to turn the result in 3D.
Install notes · Troubleshooting
Connect an AI agent
openphysics-mcp is an MCP server on stdio. It serves 75 typed engineering operations (geometry, meshing, materials
with sources, structural and thermal analysis, 3D printing, comparison studies with evidence records), and with
--lab also the physics lab's tools (the scenario library and lab_run). Replace /path/to/OpenPhysicsAI with the
folder of your clone.
Claude Code
claude mcp add --scope user openphysics -- /path/to/OpenPhysicsAI/openphysics-mcp --lab /path/to/OpenPhysicsAI
Claude Desktop: in claude_desktop_config.json (Settings, Developer, Edit Config; on macOS it is in
~/Library/Application Support/Claude/):
{
"mcpServers": {
"openphysics": {
"command": "/path/to/OpenPhysicsAI/openphysics-mcp",
"args": ["--lab", "/path/to/OpenPhysicsAI"]
}
}
}
Any other MCP client: start /path/to/OpenPhysicsAI/openphysics-mcp --lab /path/to/OpenPhysicsAI on stdio. It
speaks MCP 2025-11-25 and accepts 2025-06-18, 2025-03-26 and 2024-11-05. --lean (with --lab) serves 16 tools instead
of 88, for small contexts; --allow-read DIR lets it read your STL files; --embedded keeps the engine in its own
process. Every client and option
What needs macOS
Everything above runs on macOS and Linux. These parts need macOS for now:
- The app (
./openphysics) and the headset link it serves. - The GPU flow engine (Metal), which five examples choose.
cylinder_mounted_3d,sphere_wake_3dandwing_3d_10run on Linux with"engine": "cpu"added to the scenario, more slowly;flag_3dandheart_valveneed the GPU engine, because the sheet in their flow lives there. - The physics kernel and 3D magnetics, which use Apple's Accelerate: twelve examples, the nine
kernel_*,pm_motor_3d,pm_motor_3d_driveandinduction_gear.
On Linux 58 of the 77 examples run as shipped, 61 with that change. Two run nowhere for now: crossflow_fan and
seat_climate lack two fluid properties. What works where
The lab in pictures
Everything the lab computes · The physics map · What each solver was checked against
The thirteen flags
Open-source physics that gets better every time someone beats it.
Download it. Try to improve it with your own AI. Submit it. Every pull request that enters a flag is rerun and scored against the real world by a machine; what holds up is merged for everyone.
13 flags · 0 captured · 1 attempts · 1 challengers · trials: 6, 2 cleared
Each flag stands for one branch of physics, like the stones of an old legend: a simulator that holds all thirteen has mastered the building blocks most of nature is made of, and could be trusted, by people and by the AI agents that come after us, to simulate what none of us has thought of yet. They come in three tiers:
- Flags are hard problems of today. The best methods in the world, pushed hard, can capture them.
- Semi holy grails have answers that do not exist yet. Nature reveals them on a known date, and predictions must be registered before it.
- Holy grails are beyond the reach of any simulator today. They may be within reach in about ten years, and capturing one would change the world.
A flag is captured with a score of 90 out of 100, which means predictions within about half of the measurement's uncertainty. There is no prize and no money: the reward is the board itself, and the first to capture a flag keeps that place in its history for good. Every flag is open to anyone, at any time: take part.
| # | Flag | Difficulty | Attempts | Record | Status |
|---|---|---|---|---|---|
| 01 | The wake of a carturbulence · flag | ★★★☆☆ | 0 | unclaimed | in preparation |
| 02 | Re-entry from spacehypersonics · flag | ★★★★☆ | 0 | unclaimed | in preparation |
| 03 | A turbulent jet flamecombustion · flag | ★★★☆☆ | 0 | unclaimed | in preparation |
| 04 | A drop that splashes, or doesn'tinterfaces · flag | ★★★★☆ | 0 | unclaimed | in preparation |
| 05 | Printing metalphase change · flag | ★★★★☆ | 1 | 10 by @molanocortes | open |
| 06 | A metal part tearing apartsolids · flag | ★★★★☆ | 0 | unclaimed | in preparation |
| 07 | The radar signature of a stealth shapeelectromagnetic waves · flag | ★★☆☆☆ | 0 | unclaimed | in preparation |
| 08 | A spark in airelectric fields and plasma · flag | ★★★☆☆ | 0 | unclaimed | in preparation |
| 09 | Apophis passes the Earthgravity · semi holy grail | ★★★★★ | 0 | unclaimed | in preparation |
| 10 | The Sun's corona at the eclipse of 2027magnetic fields of a star · semi holy grail | ★★★★★ | 0 | unclaimed | in preparation |
| 11 | A star in a bottleenergy · holy grail | ∞ | 0 | unclaimed | in preparation |
| 12 | The storm that surprised everyonethe atmosphere and the ocean · holy grail | ∞ | 0 | unclaimed | in preparation |
| 13 | A human heartbeatlife · holy grail | ∞ | 0 | unclaimed | in preparation |
Hall of fame
| Rank | Challenger | Flags captured | Power | Flags attempted | Since |
|---|---|---|---|---|---|
| 🥇 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | 0 | 10 / 2100 | 1 | 2026-10-08 |
Flags
01 · The wake of a car
The flag. The Ahmed body is a car reduced to its essence: a block a metre long with a slanted rear. With the slant at 25 degrees the flow over it hangs between two states. Predict its drag and its wake, as measured in the wind tunnel.
Why capture it. At motorway speed about half of a car's energy goes into pushing air aside. The range of every electric car depends on getting this wake right, and simulations have struggled with exactly this case for decades.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
02 · Re-entry from space
The flag. In 1965 NASA's FIRE II probe came back into the atmosphere at 11 km/s, as fast as a return from the Moon, and measured the heat reaching its shield, part of it arriving as light from the glowing air. Predict that heat.
Why capture it. Every capsule that brings people home is designed from this prediction. Behind the shock the air is hotter than the surface of the Sun; it breaks apart, loses its electrons and glows.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
03 · A turbulent jet flame
The flag. Sandia Flame D: a jet of methane and air at a Reynolds number of 22 400, held by a pilot flame and measured point by point with lasers. Predict its temperature and the species it makes.
Why capture it. Burning still gives the world most of its energy. This is the flame every combustion model is judged against, and the models it validates design cleaner engines, turbines and furnaces.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
04 · A drop that splashes, or doesn't
The flag. A drop hits a dry, smooth plate and throws up a crown. Lower the air pressure around it and the splash vanishes (Xu, Zhang and Nagel, 2005). Predict the pressure at which it does.
Why capture it. The thin air under the drop, not the liquid, makes the splash: rain on crops, ink on paper, paint and fuel sprays, the droplets that carry disease. Capturing it means simulating a film of air thinner than a micrometre.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
05 · Printing metal
The flag. NIST's AM-Bench: a laser scans tracks on plates of nickel alloy. Predict the melt pool it digs, how fast it cools and the crystals it leaves behind.
Why capture it. Printed metal flies in rocket engines and lives in implants, and its strength is decided in a pool a tenth of a millimetre wide that lives for a millisecond. This is where this project began.
Attempts 1 · Challengers 1 · Record 10 by @molanocortes · First capture still to be won
| Rank | Challenger | Score | Date |
|---|---|---|---|
| 🥇 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | 10 | 2026-10-08 |
06 · A metal part tearing apart
The flag. Sandia National Laboratories machines a metal part with holes and notches, pulls it until it tears, and asks the world to predict it blind. Predict the peak load, the stretch at which it cracks and the path of the crack.
Why capture it. Every bridge, aircraft and reactor is designed to know when metal tears, and the blind predictions of the world's best teams have spread widely.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
07 · The radar signature of a stealth shape
The flag. The NASA almond is a metal body shaped to reflect little radar. Predict how much comes back from every angle, as measured in the anechoic chamber.
Why capture it. Maxwell's equations, the equations of light, run every radar, antenna and phone. The almond was shaped to send back as little as it can, so the smallest error in a solver swamps its faint echo.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
08 · A spark in air
The flag. Tens of kilovolts on a needle above a plate: a finger of glowing plasma runs across the gap at hundreds of kilometres a second, carrying its own electric field. Predict how fast it runs and how wide it is.
Why capture it. Every spark and every lightning bolt begins as streamers. It is the clearest window on electromagnetism there is: charges that make their own field, which drives the charges.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
Semi holy grails
Nature keeps the answer. These two will be scored by events that have not happened yet, and only predictions registered before them count.
09 · Apophis passes the Earth
The flag. On 13 April 2029 the asteroid Apophis, 340 m across, passes the Earth closer than our geostationary satellites. Predict, before it happens, how the Earth's tides change its tumbling and whether its surface slides.
Why capture it. Nobody knows the answer yet: nature scores it on the day. How rubble-pile asteroids hold together decides how we would deflect one heading our way.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
10 · The Sun's corona at the eclipse of 2027
The flag. On 2 August 2027 the Moon covers the Sun along a path from Spain across North Africa to Egypt, for more than six minutes at its longest. Predict, from the Sun's magnetic field measured in the weeks before, the shape of the corona that will appear.
Why capture it. The most beautiful sight in the sky is the Sun's magnetic field made visible, and the models that predict it forecast the solar storms that threaten satellites and power grids.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
Holy grails
Beyond the reach of any simulator today. Each would change the world; each may be within reach in about ten years.
11 · A star in a bottle
The flag. In 2023 the JET tokamak held a plasma ten times hotter than the core of the Sun for five seconds and released 69 megajoules of fusion energy. Given the machine and what its operators programmed, predict the fusion power from first principles.
Why capture it. A simulator that predicts a fusion shot would design the power plant that gives humanity clean, abundant energy, on a computer. Today no one can do it.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
12 · The storm that surprised everyone
The flag. In October 2023 Hurricane Otis grew from a tropical storm into a Category 5 hurricane in about a day and struck Acapulco. Every forecast missed it. From the state of the air and the sea two days before, predict its strength at landfall.
Why capture it. The storms that strengthen fastest kill the most, because there is no time to prepare. Capturing Otis would save lives on every coast.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
13 · A human heartbeat
The flag. From one person's MRI, predict one beat of their heart: the blood it pumps, how its valves open and close, the vortex that turns inside it as it fills.
Why capture it. Diseases of the heart and its vessels kill more people than any other cause. A heart that can be simulated can be treated on the computer first, one patient at a time.
Attempts 0 · Challengers 0 · Record none yet · First capture still to be won
Unclaimed, and opening soon. This flag is in preparation: its board opens when its cases are published and its answers sealed. The first name written here stays in its history for good.
Trials
Four smaller challenges, each scored against a real measurement just like the flags, but quicker to take on: the best place to start, and each one a step toward a flag. Their first answers came from the lab's two-dimensional solvers; they are being rebuilt natively in 3D, and their boards stand until then.
| Trial | Best | Holder | Status | |
|---|---|---|---|---|
| T1 | How often a cylinder sheds vorticesleads to flag 01, the wake of a car | 65 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | rebuilding in 3D |
| T2 | The bow shock ahead of a sphere at low supersonic speedleads to flag 02, re-entry from space | 45 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | rebuilding in 3D |
| T3 | A weak shock passes a cylinder of light or heavy gasleads to flag 04, a drop that splashes, or doesn't | 90 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | rebuilding in 3D |
| T4 | Where the planets are ten and twenty years laterleads to flag 09, Apophis passes the Earth | 100 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | rebuilding in 3D |
| T5 | The stiffness of one pair of gear teethleads to flag 06, a metal part tearing apart | · | unclaimed | in preparation |
| T6 | How four planets share the load when one pin is out of placeleads to flag 06, a metal part tearing apart | · | unclaimed | in preparation |
T1 · How often a cylinder sheds vortices
The trial. Behind a cylinder in a steady stream, vortices peel off in turn, left and right: the street of swirls named after von Kármán. Predict how often they are shed, from Reynolds number 60 to 145.
Why take it. The same rhythm shakes chimneys, cables and bridges, and a wake is where every drag prediction begins. It leads to flag 01, the wake of a car.
Attempts 3 · Challengers 1 · Record 65 by @molanocortes · First clear still to be won
| Rank | Challenger | Score | Date |
|---|---|---|---|
| 🥇 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | 65 | 2026-09-26 |
| baseline | Textbook formulasclosed-form correlations, for reference, not ranked | 0 | 2026-09-26 |
T2 · The bow shock ahead of a sphere
The trial. A sphere flying a little faster than sound pushes a curved shock ahead of it. Predict how far ahead it stands and its shape, from Mach 1.17 to 1.81.
Why take it. Every supersonic body wears one, and a capsule coming home from space is protected by exactly this layer of shocked air. It leads to flag 02, re-entry from space.
Attempts 3 · Challengers 1 · Record 45 by @molanocortes · First clear still to be won
| Rank | Challenger | Score | Date |
|---|---|---|---|
| 🥇 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | 45 | 2026-09-26 |
| baseline | Textbook formulasclosed-form correlations, for reference, not ranked | 40 | 2026-09-26 |
T3 · A shock through a bubble of gas
The trial. A weak shock, Mach 1.22, sweeps over a cylinder of helium, or of a heavy gas, in air and rolls it into a pair of vortices. Predict how the bubble moves and deforms.
Why take it. The same instability mixes fuel in engines and stirs the insides of exploding stars. It leads to flag 04, a drop that splashes.
Attempts 3 · Challengers 1 · Record 90 by @molanocortes · First clear @molanocortes, 2026-09-26
| Rank | Challenger | Score | Date |
|---|---|---|---|
| 🥇 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | 90 🏆 | 2026-09-26 |
| baseline | Textbook formulasclosed-form correlations, for reference, not ranked | 65 | 2026-09-26 |
T4 · Where the planets will be
The trial. From the planets' positions on one date, predict where Mercury, Mars and Jupiter stand ten and twenty years later.
Why take it. Gravity is the oldest simulation there is, and getting the planets right is the step before an asteroid passing the Earth. It leads to flag 09, Apophis passes the Earth.
Attempts 3 · Challengers 1 · Record 100 by @molanocortes · First clear @molanocortes, 2026-09-26
| Rank | Challenger | Score | Date |
|---|---|---|---|
| 🥇 | @molanocortesOpenPhysicsAI, using Claude Opus 5.5 | 100 🏆 | 2026-09-26 |
| baseline | Textbook formulasclosed-form correlations, for reference, not ranked | 0 | 2026-09-26 |
More from the lab
Sixteen more of the lab's films, none of them shown above. Each is a solver's own output, with its scenario, its verification and its page: the lab · the physics map. Made by mosaic.py.
Capture a flag
Anyone can take part, alone or with any AI agent: Claude, GPT, Gemini, an open model, or none. Three steps, and a machine does the rest.
- Download. Fork this repository and build it:
make && make lab(the quick start). - Make it better. Pick a flag or a trial and set your agent on it. The flag's page says what to predict and from
what; the physics map says which solver to start from. Copy
the reference entry to
flags/entries/<your GitHub name>/entry.json: the command that prints your predictions, the libraries you built on, the AI model that helped. Then improve a solver, write a new one, or wire in any open-source simulator. Each flag has practice cases whose answers are public, so you can see how close you are before you submit:python3 tools/flags.py run --entry <your GitHub name>. - Submit. Open a pull request.
Then, with no one in the loop: a clean Linux machine reruns your entry from your commit; your predictions are
scored against the sealed measurements; the scores appear on your pull request, and the attempt goes on the boards
under your GitHub name, your libraries and your AI model. Push again to do better: every push is rerun and scored,
once a day. Beside the rerun, every pull request is built and tested on Linux (make test and make smoke), and the
lab's longer suites (make test-fast) run every night. No Mac runs in CI: if you change the app, run make test-ui
on yours.
What wins, stays. A capture or a new record is merged into the lab once its code has been read, and your improvement reaches everyone who downloads it next. Built it somewhere else? Any open-source simulator can enter, and if it wins, the lab adopts its code, credited and under its own licence: OpenPhysicsAI is whatever does the physics best, whoever wrote it. Improvements that enter no flag are welcome too (a faster solver, a new one, a better film), and are built and tested the same way. How to contribute
Fair play. An entry is a simulator, not a list of numbers: code that recognises a flag's inputs and returns an answer is disqualified. One scored submission per entry per day; scores are published in bands of five points, so they cannot be inverted into the answers; a semi holy grail counts only predictions committed before its deadline. The full rules · the whole leaderboard · a well-documented measurement of your own can become a new flag: how.
For AI agents
If your task needs physics, git clone is the shortest path to it. Start at AGENTS.md: how to build,
drive, read and change everything, and the rules of the house. Then the physics map: every
solver, what it computes, how it was verified and which three files to read first, in a few thousand tokens. An agent
that only wants a result writes a scenario and runs build/labrun, which prints a JSON record with the scenario's
hash; one that wants a structural or thermal analysis uses the MCP server. Each solver is a
plain C library under Apache 2.0: take the directory you need. An agent can also compete: the
three steps are the same for it, and its pull request is scored by a machine like any other.
llms.txt says all of this in one page.
If it saved you time, give it a star.
Why
Simulation of the physical world should be open, inspectable and checked against reality, for people and for the AI agents that increasingly do engineering work. Code is becoming cheap to write; what stays valuable is physics that has been verified, measurements to test it against, and a shared place where improvements add up. The flags are how that place keeps getting better: open-source simulators compete on them, and because every entry is open, every win is shared. The vision · the plan · the history
Code: Apache 2.0. Data: CC BY 4.0. Cite with CITATION.cff.