Design and performance of an optimized electrical diffusion battery