Estimation of thermoelectric and mechanical performances of segmented thermoelectric generators under optimal operating conditions