Numerical simulation of wave breaking