Microscale modeling of phase transformations and plasticity