Flow and wall stress analysis of granular materials around blocks attached to a wall