Optimizing pneumatic conveying