dustyGadget: SPH formation of dusty galaxies