Numerical modelling of viscous and turbulent free-surface flows using smoothed particle hydrodynamics