Dissipation-function based modeling of shape memory effects