A numerical simulation of the transition to turbulence in a two-dimensional flow