Nanomechanics modeling of carbon nanotubes interacting with surfaces in various configurations