Direct numerical simulations of nanoparticle formation in premixed and non-premixed flame–vortex interactions