An analytical solution to Li/Li+ insertion into a porous electrode