Reagent

A falling-sand chemistry set that does the physics in real units.

Paint sand, water, wood, lava, thermite, uranium and about eighty other things into a box, and they do what those things do. Every material carries its real density, heat capacity, conductivity and melting point, and the whole world runs in metres, seconds and kelvin, as compute shaders on your graphics card. It runs in your browser. There is nothing to install.

WebGPU browser GPLv3 85 materials 43 reactions Private In development
Play Reagent Get in touch
The Reagent interface: a material palette down the left, tools across the top, and a room-sized world with a water tank boiling around a slug of lava, a sand pile and three wooden posts

An 8 metre room at 2048 by 1152. Lava has just landed in the tank on the left.

Things to Try

Recipes for making a mess.

None of these is scripted. There is no "lava meets water" animation anywhere in the code. There is lava at 1,500 K, water that boils at 373 K, and a pressure solve that has to find room for the steam.

Drop lava into water

Build a stone tank, fill it with water, draw a block of Lava above it.

The lava turns the water it touches to steam faster than the steam can get out of the way. The tank throws its water up both walls, the lava crusts into basalt on the bottom, and what is left of the pool boils off over the next few seconds.

A slug of lava landing in a water tank: the water is thrown up both walls in sheets while the lava spreads across the floor in an orange crust

Cut steel with thermite

A thin Iron plate on two Stone legs. Heap Thermite on it, a pinch of Gunpowder on top, and hold the Heat brush (H) on the gunpowder.

The gunpowder lights at 600 K and lights the thermite at 1,500 K. Thermite burns at 2,800 K into molten iron, which pools on the plate and cuts down through it, throwing burning droplets that trail across the room. A 1.6 cm plate goes. An 8 cm one sits at its melting point and holds, which is what real steel does too.

Thermite burning on an iron plate, white-hot molten iron running off both edges in curtains with spark trails arcing away

Light a box of hydrogen and oxygen

Seal a Stone box. Fill it with Hydrogen and Oxygen, two parts to one, in thin alternating layers. Touch it with the Heat brush.

The flame front crosses the box in a fraction of a second at up to 3,500 K and leaves it full of steam. Leave the lid off and it throws whatever is on top.

A sealed box of hydrogen and oxygen mid-detonation, an orange flame front sweeping through a pale pink gas mix

Forget the control rods

Thin rods of Reactor Fuel, close together, in a pool of Water, with a speck of Neutron Source in the middle.

Water slows neutrons enough for uranium to catch them, so the wet core goes critical where the same rods dry do nothing. With Control Rods between them it holds steady. Without, it runs away, boils its water off and slumps into corium. Neutron view (N) shows the flux, and the water glows Cherenkov blue while it runs.

Pour sand through smoke

Fill the bottom of the room with Carbon Dioxide, hang a cloud of Smoke above it, then drop a block of Sand through both.

The air has momentum. The sand drags it down, the smoke tears into eddies around the hole it punches, and the heavy gas rolls away across the floor in waves. Hot air rises the same way: a Heater grows a plume you can see in Heat view.

Leave out ice and a pan of water

A block of Ice and a shallow tray of Water at room temperature. Then set Heat speed to 1000x.

At 1x the room is real, and real ice takes hours. Sped up, room air rolls over the ice and melts it from the outside in, and the pan dries down a row at a time, sitting a degree below the room as evaporation cools it.

Drop sodium in water

A pool of Water, a lump of Sodium above it.

It floats, because sodium is lighter than water, and fizzes itself away into hydrogen and steam. The hydrogen comes off hot enough to catch.

Make it rain indoors

A Heater under a pool of Water, with a Stone ceiling well above.

The water boils, the steam rises, meets the cold ceiling, condenses and falls back as rain. Heat view (T) shows the whole cycle in colour.

Set wood alight without touching it

A Heater, a few centimetres of air, then a post of Wood. Put a Stone wall in front of a second post.

Radiant heat crosses the gap and the first post catches in a few seconds. The one behind the wall stays cold, because walls cast heat shadows.

Give a fire oxygen

Light some Wood, then put an Oxygen Tank beside it.

Wood burns at about 1,200 K in air. In oxygen it burns four times as fast at about 1,900 K, and uses the oxygen up doing it.

Grow a garden, then salt it

A layer of Dirt, Water to turn the top to Mud, a row of Seed.

Roots grow down into the soil and stems branch up into leaves. Pour Brine on one end and that end dies back to dead plant, which burns like tinder.

Watch radium decay

A lump of Radium, Half-life speed set to 10^9, Dose view on (D).

Radium turns to radon gas, which drifts off and decays down the chain to lead. Put a wall in the way: lead cuts the gamma dose about 25-fold, the same thickness of concrete about 3-fold.

Teach a Source something

Paint a Source, then touch it with anything.

A Source becomes whatever touches it first and pours that out forever after. Water makes a spring. Lava makes a volcano. Hydrogen makes a problem.

Under the Hood

What it actually simulates.

Every pass is a WebGPU compute shader. The CPU reads the mouse and decides how many steps to run. Everything else happens on the card.

Liquids
FLIP particles on a coarse grid with a multigrid pressure solve, so water sloshes, finds its level, and pushes back on whatever falls into it. Lava and molten glass are viscous, implicitly.
Powders and gases
Sand, gravel and smoke move cell by cell on a Margolus block grid, with velocities, so a blast throws debris and a dropped bucket of sand splashes rather than teleporting.
Heat
Conduction between every pair of neighbouring cells from real conductivities and heat capacities, convection by air that keeps its momentum, radiant heat traced between hot surfaces with shadows, and evaporation at the real rate.
Phase changes and fire
Melting, freezing, boiling and condensing at the real temperatures, with latent heat. Ignition from contact, from a neighbouring flame, or from radiant heat alone.
Reactions
One table of 43: acids on metals and stone, sodium in water, rust, setting cement, dissolving salt, plants growing and dying, and hydrogen meeting oxygen.
Radiation
Real specific activities. Gamma and beta traced and attenuated through what they cross. Neutrons as a two-group diffusion solve with fission, moderation, activation and fuel burnup.
Scale

A beaker is not a small room.

You pick how big the world is and how fine the grid is, separately. Physics follows the size: sand falls a beaker in a fraction of a second and takes its time across a bunker, and a lump of uranium that sits quietly in a beaker can go critical in a room.

Worlds
Beaker 12 cm, Bench 2 m, Room 8 m, Bunker 30 m, Silo 20 m wide
Grids
Probed on your GPU on first run, smallest first, and marked realtime, usable or slow
Speed
Auto runs at real time when the card can, and otherwise as fast as it can at 60 fps
Controls
Left drag paints, right drag erases, wheel zooms, middle drag pans, 1 to 9 for the common materials, H and C to heat and cool
Views
Temperature T, radiation dose D, neutron flux N, velocity V
Requirements
A browser with WebGPU: Chrome or Edge on Windows, macOS or ChromeOS. A discrete GPU helps a great deal.

Where it falls short

Play

It is already running.

Free, in the browser, with nothing to install and nothing to sign up for. The source is private for now.