In this research, a continuum-based model is presented to explore potential energy, force distribution and oscillatory motion of ions, and in particular chloride ion, inside carbon nanotubes (CNTs) decorated by functional groups at two ends. To perform this, van der Waals (vdW) interactions between ion and nanotube are modeled by the 6-12 Lennard-Jones (LJ) potential, whereas the electrostatic interactions between ion and functional groups are modeled by the Coulomb potential and the total interactions are analytically derived by summing the vdW and electrostatic interactions. Making the assumption that carbon atoms and charge of functional groups are all uniformly distributed over the nanotube surface and the two ends of nanotube, respectively, a continuum approach is utilized to evaluate the related interactions. Based on the actual force distribution, the equation of motion is also solved numerically to arrive at the time history of displacement and velocity of inner core. With respect to the proposed formulations, comprehensive studies on the variations of potential energy and force distribution are carried out by varying functional group charge and nanotube length. Moreover, the effects of these parameters together with initial conditions on the oscillatory behavior of system are studied and discussed in detail. It is found out that chloride ion escapes more easily from negatively charged CNTs which is followed by uncharged and positively charged ones. It is further shown that the presence of functional groups leads to enhancing the operating frequency of such oscillatory systems especially when the electric charges of ion and functional groups have different signs. [ABSTRACT FROM AUTHOR]