Geochemical modelling of environmental processes in rare earth element mining