Numerical study of dam spilling water