Ion interactions with carbon nanotubes in dielectric media