Analytical and numerical studies of ion mobility near the tokamak plasma edge