||To define the stresses in a granular medium considered as a continuum, Weber has calculated a tensor at a point by averaging the contact forces in the vicinity. However this tensor is not symmetric. Besides, the Weber formula neglects the body forces, which does not allow it to describe dynamical problems. In the present work, it is proposed to use a general expression of the mean stress tensor based not only on the contact reactions but also on the body forces. It is proved that this tensor is automatically symmetric and invariant by translation. Next, the pertinence of this approach is illustrated by an analytical example. It can be clearly ascertained that accounting for the contribution of the gravity and inertia effects is essential to ensure the symmetry of the stress tensor, according to Cauchy theory. We then propose to extend this definition of the mean stress tensor to a spacetime analysis. An average in time as well appears to be pertinent. Finally, numerical simulations with a large number of grains are performed using the software MULTICOR' developed in our laboratories and based on the contact dynamics and the bipotential approach. The attention is particularly focused on the motion of ensiled matters.