Numerical simulation of dune–flat bed transition and stage‐discharge relationship with hysteresis effect