Pellet-plasma interaction in a tokamak