Understanding the mechanism of nanoparticle formation in wire explosion process