Mechanistic Analysis of Sodiation in Electrodes