  Modeling layered intercalation compounds from first principles poses a
problem, as many of their properties are determined by a subtle balance between
van der Waals interactions and chemical or Madelung terms, and a good
description of van der Waals interactions is often lacking. Using van der Waals
density functionals we study the structures, phonons and energetics of the
archetype layered intercalation compound Li-graphite. Intercalation of Li in
graphite leads to stable systems with calculated intercalation energies of
$-0.2$ to $-0.3$~eV/Li atom, (referred to bulk graphite and Li metal). The
fully loaded stage 1 and stage 2 compounds LiC$_6$ and Li$_{1/2}$C$_6$ are
stable, corresponding to two-dimensional $\sqrt3\times\sqrt3$ lattices of Li
atoms intercalated between two graphene planes. Stage $N>2$ structures are
unstable compared to dilute stage 2 compounds with the same concentration. At
elevated temperatures dilute stage 2 compounds easily become disordered, but
the structure of Li$_{3/16}$C$_6$ is relatively stable, corresponding to a
$\sqrt7\times\sqrt7$ in-plane packing of Li atoms. First-principles
calculations, along with a Bethe-Peierls model of finite temperature effects,
allow for a microscopic description of the observed voltage profiles.
