This simulator models sourdough fermentation as a coupled system: a logistic yeast-growth curve limited by remaining sugar, and CO₂ bubbles that nucleate and grow inside a simulated dough cross-section. Yeast activity follows a Gaussian, Arrhenius-like response peaking near 30°C, scaled by flour type and starter percentage. As yeast consumes sugar, CO₂ bubbles are seeded, drift upward, expand or pop, and their accumulated volume drives the dough's visible rise on the canvas and in the live rise chart.
A cross-section of rising dough: tiny yellow dots represent yeast cells, translucent circles are CO₂ bubbles that nucleate, drift and grow, and the dough surface line rises as gas accumulates. A live chart below tracks dough rise percentage over simulated hours.
Drag the Temperature slider (4-40°C) to speed up, slow down or stall fermentation; adjust Hydration (60-100%) and Starter % (5-50%) to change bubble growth and initial yeast load; pick a Flour type (White, All-purpose, Wholemeal, Rye) to change maximum rise potential. Use Pause and Mix again to freeze or restart the simulation.
The reaction driving every bubble is the same one from GCSE biology: C₆H₁₂O₆ → 2 C₂H₅OH + 2 CO₂ — yeast fermenting glucose into ethanol and carbon dioxide. In this sim, yeast activity peaks around 27-32°C and effectively dies above 38-40°C, just like real Saccharomyces cerevisiae.
Above roughly 40°C the code applies a decay factor (yeast is multiplied by 0.5 raised to the elapsed simulated time each step) once T exceeds 42°C, mimicking real heat death of yeast cells. The simulation also flags "Too hot" once the slider passes 40°C, since Saccharomyces cerevisiae denatures well below boiling point.
Hydration scales two things: bubble growth rate (each bubble's radius grows proportional to hydration/75) and the maximum possible dough rise (maxRise is proportional to hydration/100). Wetter doughs let bubbles expand more freely and trap more gas before it escapes, matching how higher-hydration sourdough typically produces a more open crumb.
Rise is derived from cumulative sugar consumed: consumed = 1 - remaining sugar, then rise = min(consumed × maxRise × 1.8, maxRise), where maxRise depends on hydration and flour type. In other words, rise tracks how much sugar has been fermented into CO₂, capped by how much gas the dough structure can hold.
A bubble is removed from the simulation either when its radius exceeds 18 units (it "pops") or when it drifts upward past the dough's surface line (it "escapes"). Bubbles rise due to a constant buoyancy term subtracted from their vertical velocity each step, just as real CO₂ pockets float upward through wet dough.