Numerical simulation of flame propagation and localized preflame autoignition in enclosures