  By means of two-dimensional contact dynamics simulations, we analyze the
vibrational dynamics of a confined granular layer in response to harmonic
forcing. We use irregular polygonal grains allowing for strong variability of
solid fraction. The system involves a jammed state separating passive (loading)
and active (unloading) states. We show that an approximate expression of the
packing resistance force as a function of the displacement of the free
retaining wall from the jamming position provides a good description of the
dynamics. We study in detail the scaling of displacements and velocities with
loading parameters. In particular, we find that, for a wide range of
frequencies, the data collapse by scaling the displacements with the inverse
square of frequency, the inverse of the force amplitude and the square of
gravity. Interestingly, compaction occurs during the extension of the packing,
followed by decompaction in the contraction phase. We show that the mean
compaction rate increases linearly with frequency up to a characteristic
frequency and then it declines in inverse proportion to frequency. The
characteristic frequency is interpreted in terms of the time required for the
relaxation of the packing through collective grain rearrangements between two
equilibrium states.
