Consistent thermal stress evaluation in finite elements