This is a real mass-balance integrator, not a scripted animation. Each crew member draws down cabin O2 and adds CO2 at published per-astronaut rates, and drinks/uses water that becomes reclaimable wastewater. The electrolysis unit splits water into O2 and H2 by the real reaction stoichiometry; if the Sabatier reactor is on, it recombines scrubbed CO2 with that H2 to recover water, closing part of the loop.
2H2O → 2H2 + O2 (electrolysis: 1.125 kg H2O / kg O2)
CO2 + 4H2 → CH4 + 2H2O (Sabatier: 0.818 kg H2O / kg CO2)
per crew/day: 0.84 kg O2 in, 1.00 kg CO2 out, 3.6 kg water used
Every tick, O2/CO2 masses convert to partial pressure via the ideal gas law over a 100 m³ cabin, shown as % of total cabin pressure — NASA's spacecraft limits are 0.5% CO2 for continuous exposure and 0.7% for short excursions. Whether the loop reaches a genuine steady state or drifts toward CO2 buildup, O2 depletion or water exhaustion falls out of these numbers alone — nothing is faked to force an outcome.
- Case study presets — load real historical system capacities: ISS's near-closed loop, Mir's partial recycling, Apollo/Skylab's open-loop LiOH canisters (no O2 regeneration at all), and Biosphere 2's undersized biological CO2 uptake.
- Scrubber / generator capacity — the maximum kg/day each subsystem can process; undersizing either relative to crew size is what drives drift.
- Recycling efficiency — the fraction of crew wastewater (urine, hygiene, condensate) reclaimed back into the water reserve.
Real-world relevance: this is the same steady-state mass-balance logic mission planners use to size ECLSS hardware before flight — get the capacities wrong relative to crew size and duration, and the numbers drift toward failure exactly like this model, just slower.