A nonlinear finite element model for the performance of thermoelectric bulk and nanostructured materials. (15th October 2019)