Analysis of carbon nanotube device physics