Hydrodynamic study of condensation and sublimation of ice particles in cometary atmospheres