Structural and electrochemical study of the reaction of lithium with silicon nanowires