A three phase thermo-mechanical constitutive model for shape memory alloys