Analysis of the electrolyte diode. Electro-diffusion and chemical reaction within a hydrogel reactor