Geometric optimization of thermoelectric generator using genetic algorithm considering contact resistance and Thomson effect