  As a complementary tool to laboratory experiments, discrete numerical
simulation, applied to granular materials, provides valuable information on the
grain and contact scale microstructure, thereby enabling one to better
understand the microscopic origin of macroscopic mechanical behaviours. We
first introduce different simulation methods, which we regard as techniques for
numerical experimentation, in connection with micromechanical models for
intergranular contacts. We lay special emphasis on the important issue of
sample representativity and stress the usefulness of dimensional analysis in
the definition of relevant control parameters. We then apply this approach to
two important rheological regimes of granular systems: solid-like, slowly
strained granular materials, which might be ruled by elastoplastic constitutive
relations; and liquid-like, dense granular flows, either confined or with a
free surface, described by suitable friction and dilatancy laws
