  The structural, dynamical, and thermodynamical properties of diamond,
graphite and layered derivatives (graphene, rhombohedral graphite) are computed
using a combination of density-functional theory (DFT) total-energy
calculations and density-functional perturbation theory (DFPT) lattice dynamics
at the GGA-PBE level. Overall, very good agreement is found for the structural
properties and phonon dispersions, with the exception of the c/a ratio in
graphite and the associated elastic constants and phonon dispersions. Both the
C_33 elastic constant and the Gamma to A phonon dispersions are brought to
close agreement with available data once the experimental c/a is chosen for the
calculations. The thermal expansion, the temperature dependence of the elastic
moduli and the specific heat have been calculated via the quasi-harmonic
approximation. Graphite shows a distinctive in-plane negative thermal-expansion
coefficient that reaches the minimum around room temperature, in very good
agreement with experiments. Thermal contraction in graphene is found to be
three times as large; in both cases, ZA acoustic modes are shown to be
responsible for the contraction, in a direct manifestation of the membrane
effect predicted by Lifshitz over fifty years ago.
