A fractal model for current generation in porous electrodes