The entrainment of solid particles by a fluid flow is frequently found in nature and in industry. A better knowledge of this is of importance to understand the physical nature of the phenomenon and to improve industrial processes. Bed-load occurs if the shear stresses exerted by the fluid on the granular bed are bounded to some limits: a mobile granular layer takes place over the fixed part of the bed. When the fluid is a liquid, the thickness of this mobile layer is a few grain-diameters. Under these conditions, an initially flat granular bed may be unstable, giving rise to ripples and dunes. Some examples are the dunes seen in deserts, but also the ripples appearing in petroleum pipelines conveying sand. This article presents a mathematical model for the prediction of bed-load under a turbulent boundary-layer of a liquid, and its numerical implementation. The model, kept as simple as possible, focuses on the mobile layer of the granular bed, reducing then the computation domain. It is able to capture the pertinent physics involved, such as the growing of instabilities on the granular bed, so that, if employed together with the stability analysis of Franklin (2010), it selects and predicts the evolution of most unstable modes.