Continuum model for long-wavelength optical phonons in cylinders: Application to carbon nanotubes