Numerical experiments on the transient motions of a flapping foil