A numerical model of the vertical distribution of longshore currents on a plane beach