Vibration damping through phase transformation is one major area of application of shape memory alloys in smart systems and structures. The authors of this study have shown in earlier publications, how damping of vibrating rods can be accomplished. This paper is an extension and generalization. On the one side it uses the proper description of the stress-wave phenomenon instead of a quasi-static approximation, on the other side it describes, how the damping could be optimized. The basic equations of the underlying mathematical model are the stress-wave equation, the heat conduction equation, a kinetic and a constitutive law as well as a condition to ensure maximal damping. The major results are the heating history, which governs the phase transformation, and the domain splitting along the rod into elastic and inelastic regions.