Elastoplastic Analysis of Bimaterial Beams Subjected to Thermal Loads