Katballe Studio Writing Projects About

Dry Ice Simulator

active
Vanilla JSCanvasCloudflare WorkersSafetySimulation

Dry ice is frozen CO₂, and a kilogram of it turns into more than half a cubic metre of gas. In a small storeroom, an elevator or an airlock that adds up quickly — but "quickly" is hard to judge by feel. This simulator makes it visible: pick a room size, an amount of ice and a ventilation rate, and watch the level rise and settle.

The Room sizer covers one room from 4 to 60 m³. The ice can lie as open pellets, sit in insulated boxes, or be in boxes that someone opens and works with for a while. A side view of the room fills from the floor up as the hours play back in seconds, a graph follows the level against the limits, and a second graph shows the highest level for every room size at once — so the question "how big does the room need to be?" has a direct answer.

The Workflow view follows a whole job: boxes are filled in one room, wait, travel down the corridor and are opened in another room, by durations or by clock times. It tracks what the person breathes rather than what one room holds — in the filling room while filling, in the use room while working, fresh air in between — and reports the worst 15-minute and 8-hour averages against the limits.

Under the hood it is a well-mixed box model: what the ice releases, minus what the ventilation and the displaced air carry away, stepped every two seconds. Open ice sublimates in proportion to its surface, a closed box loses about 2 % per hour, and taking a lid off lets out a puff of cold gas. Every assumption is written out at the bottom of the page, including the one the model cannot show: real CO₂ pools near the floor, so close to the ice it is higher than the room average.

It started as three separate single-file pages and is now one static site — two HTML pages, two scripts and a stylesheet, no framework and no build step — served from a Cloudflare Worker.