A detailed framework to incorporate dust in hydrodynamical simulations uri icon