Electrodiffusion and Osmotic Water Flow and its Variational Structure