Alfven eigenmodes driven by energetic particles are routinely observed in tokamak plasmas. These modes consist of poloidal harmonics of shear Alfven waves coupled by inhomogeneity in the magnetic field. Further coupling is introduced by 3D inhomogeneities in the ion density during the assimilation of injected pellets. This additional coupling modifies the Alfven continuum and discrete eigenmode spectrum. In JET, the frequencies of Alfven eigenmodes drop dramatically when a pellet is injected. From these observations, information about the changes in the ion density caused by a pellet can be inferred. To use Alfven eigenmodes for MHD spectroscopy of pellet injected plasmas, the 3D MHD codes Stellgap and AE3D were generalised to incorporate 3D density profiles. A model for the expansion of the ionised pellet plasmoid along a magnetic field line was derived from the fluid equations. Thereby, the time evolution of the Alfven eigenfrequency is reproduced.