A finite element analysis of metal forming processes with thermomechanical coupling