Photovoltaic Effect Derived from the Carnot Cycle