Detailed simulation of morphodynamics: 1. Hydrodynamic model