Predicting the drag coefficient of a granular flow using the discrete element method