Analysis of the operation of thin nanowire photoelectrodes for solar energy conversion