Modelling dust processing and the evolution of grain sizes in the ISM using the method of moments