  The nonequilibrium Green's function method is applied to investigate the
coefficient of thermal expansion (CTE) in single-walled carbon nanotubes
(SWCNT) and graphene. It is found that atoms deviate about 1% from equilibrium
positions at T=0 K, resulting from the interplay between quantum zero-point
motion and nonlinear interaction. The CTE in SWCNT of different sizes is
studied and analyzed in terms of the competition between various vibration
modes. As a result of this competition, the axial CTE is positive in the whole
temperature range, while the radial CTE is negative at low temperatures. In
graphene, the CTE is very sensitive to the substrate. Without substrate, CTE
has large negative region at low temperature and very small value at high
temperature limit, and the value of CTE at T=300 K is $-6\times 10^{-6}$
K$^{-1}$ which is very close to recent experimental result, $-7\times 10^{-6}$
K$^{-1}$ (Nat. Nanotechnol. \textbf{10}, 1038 (2009)). A very weak substrate
interaction (about 0.06% of the in-plane interaction) can largely reduce the
negative CTE region and greatly enhance the value of CTE. If the substrate
interaction is strong enough, the CTE will be positive in whole temperature
range and the saturate value at high temperature reaches $2.0\times 10^{-5}$
K$^{-1}$.
