Modelling Regime Changes of Dunes to Upper-Stage Plane Bed in Flumes and in Rivers