Model study on gas exchange and diffusion in legume nodules