Bulk and wall flame quenching in nonuniform concentration fields