Text this: A one dimensional variational model of superelasticity for shape memory alloys