Numerical model for the electromechanical characterization of carbon nanotubes