Steady flow through non-uniform gauzes of arbitrary shape