A stack can also be considered a buffer, an accumulator, and a regulator. Stacks typically have some variable restriction, which can be modulated to control internal pressures, mostly that of combustion chambers. Controlling these pressures translates into manipulation of combustion, and subsequently heating of the chamber. I believe chimneys are meant to carry away byproducts of combustion.