New software simulates granular flows and avalanches