Multiscale thermomechanical analysis of multiphase materials