A model of the morphological behaviour and stability of channels and flats in tidal basins