Combustion
Particle-based fire simulation with temperature-driven color mapping. Hot particles glow white and yellow, cooling through orange and red to dark smoke that rises and dissipates. Switch between a candle’s gentle flicker, a roaring campfire, and an explosive burst. Adjust wind, gravity, and fuel rate to shape the flame.
T(t) = T₀ · e−λt ρ(T) ∝ 1/T (buoyancy) CH₄ + 2O₂ → CO₂ + 2H₂O + energy
Combustion physics
Combustion is a rapid exothermic chemical reaction between a fuel and an oxidizer, producing heat and light. The visible flame is a region of gas hot enough to emit thermal radiation — blackbody radiation at the flame temperature. The color directly encodes the temperature: white is hottest (~1500°C+), yellow (~1200°C), orange (~1000°C), red (~800°C), then invisible infrared.
Particle simulation
Each particle represents a small volume of hot gas. It is spawned at the combustion zone with high temperature and rises due to buoyancy (hot gas is less dense). Temperature decays exponentially — T(t) = T₀·e−λt — and the particle’s color and opacity are mapped from this temperature. The rate of cooling depends on the fuel type.
Fuel types
Wood burns at moderate temperatures with yellow-orange flames and heavy smoke. Natural gas burns cleaner and hotter with a blue-tinged base. Oil produces heavy, dark smoke and an orange flame. Magnesium burns white-hot (~2500°C) with intense brightness.
Buoyancy and wind
Hot gas rises because it is less dense than the surrounding air — the buoyancy force is proportional to 1/T. Turbulence introduces chaotic lateral motion, making the flame flicker. Wind tilts the entire plume by adding a constant horizontal velocity.
Smoke
As combustion products cool below visible radiation temperatures, they become smoke — fine particulate matter that scatters light. In the simulation, particles transition from fire colors to grey as they cool, then slowly fade out as they disperse.