Modeling and simulation of strain-induced phase transformations under compression in a diamond anvil cell