A thermo-mechanical analysis of functionally graded beams via hierarchical modelling