  We study interactions between shocks and standing-wave patterns in vertically
oscillated layers of granular media using three-dimensional, time-dependent
numerical solutions of continuum equations to Navier-Stokes order. We simulate
a layer of grains atop a plate that oscillates sinusoidally in the direction of
gravity. Standing waves form stripe patterns when the accelerational amplitude
of the plate's oscillation exceeds a critical value. Shocks also form with each
collision between the layer and the plate; we show that pressure gradients
formed by these shocks cause the flow to reverse direction within the layer.
This reversal leads to an oscillatory state of the pattern that is subharmonic
with respect to the plate's oscillation. Finally, we study the relationship
between shocks and patterns in layers oscillated at various frequencies and
show that the pattern wavelength increases monotonically as the shock strength
increases.
