This paper proposes a description of a granular medium as a stochastic heterogeneous continuum medium. The heterogeneity of the material properties field recreates the heterogeneous stress field in a granular medium. The stochastic approach means that only statistical information, easily available, is required to construct the model. The heterogeneous continuum model is calibrated with respect to discrete simulations of a set of railway ballast samples. As they are continuum-based, the equilibrium equations can be solved on a large scale using a parallel implementation of an explicit time discretization scheme for the Finite Element Method. Simulations representative of the influence on the environment of the passage of a train on a ballasted railway track clearly show the influence of the heterogeneity. These simulations seem to correlate well with previously unexplained overly damped measurements in the free field.