Simulation of elastic properties of single-walled carbon nanotubes