Optimal control of diffuser shapes for non-uniform flow