Modelling the effect of grain size distribution on the mechanical response of metals