Study of Thermoelastic Martensitic Transformations Using a Phase-Field Model