The stack effect or chimney effect is the movement of air into and out of buildings through unsealed openings, chimneys, flue-gas stacks, or other purposefully designed openings or containers, resulting from air buoyancy. Buoyancy occurs due to a difference in indoor-to-outdoor air density resulting from temperature and moisture differences. The result is either a positive or negative buoyancy force. The greater the thermal difference and the height of the structure, the greater the buoyancy force, and thus the stack effect. The stack effect can be useful to drive natural ventilation in certain climates, but in other circumstances may be a cause of unwanted air infiltration or fire hazard.