Lattice-Gas Model for Energy Storage Materials: Phase Diagram and Equilibrium Potential as a Function of Nanoparticle Size