Design methodology for thermal management using embedded thermoelectric devices