An impact model of a ball bouncing on a flexible beam