  A method based on the simple shear flow modified by the introduction of a
deterministic non-conservative force and a stochastic process is proposed to
measure the Navier-Stokes shear viscosity in a granular fluid described by the
Enskog equation. The method is implemented in DSMC simulations for a wide range
of values of dissipation and density. It is observed that, after a certain
transient period, the system reaches a hydrodynamic stage which tends to the
Navier-Stokes regime for long times. The results are compared with theoretical
predictions obtained from the Chapman-Enskog method in the leading Sonine
approximation, showing quite a good agreement, even for strong dissipation.
