Simulations of pattern formation in vibrated granular media