Numerically Modeling The Evolution Of Dust Grains In Galaxy Formation Simulations