We model dust evolution in Milky Way-like galaxies by post-processing the IllustrisTNG cosmological hydrodynamical simulations in order to predict dust-to-gas ratios and grain size distributions. We treat grain-size-dependent dust growth and destruction processes using a 64-bin discrete grain size evolution model without spatially resolving each galaxy. Our model broadly reproduces the observed dust--metallicity scaling relation in nearby galaxies. The grain size distribution is dominated by large grains at $z\gtrsim 3$ and the small-grain abundance rapidly increases by shattering and accretion (dust growth) at $z\lesssim 2$. The grain size distribution approaches the so-called MRN distribution at $z\sim 1$, but a suppression of large-grain abundances occurs at $z<1$. Based on the computed grain size distributions and grain compositions, we also calculate the evolution of the extinction curve for each Milky Way analogue. Extinction curves are initially flat at $z>2$, and become consistent with the Milky Way extinction curve at $z\lesssim 1$ at $1/\lambda < 6~\rm \mu m^{-1}$. However, typical extinction curves predicted by our model have a steeper slope at short wavelengths than is observed in the Milky Way. This is due to the low-redshift decline of gas-phase metallicity and the dense gas fraction in our TNG Milky Way analogues that suppresses the formation of large grains through coagulation.
Comment: 16 pages, 14 figures (13 in the main text, 1 in the appendix). Accepted for publication on MNRAS