The displacement gradient can be calculated using the following script.
Finally the coupled thermal field is computed as described bellow.
The output database can be viewed using the matplotlib library. The following script displays the displacement gradient and temperature for the same instant of time.