Design optimization of thermoelectric devices for solar power generation