When power is generated in a solar cell, it is because of irradiance of radiation on a pn-junction. But in which part of the junction are the electron-hole pairs created? Is it just the depleted region or are they also created in the n- and p-type semiconductors? An engineer's response would be for me to consider a current source in parallel with a diode but I need a physicists response. What the heck is going on in a solar cell? I'd be grateful for any help, thanks.