Finite element model of thermoelastic damping in MEMS