Optimization of parameters for gas-diffusion flow-injection systems