Free energies and pseudo-elastic transitions for shape memory alloys