Buckling and Collapse of Embedded Carbon Nanotubes