There is existing the open-source code in C++ and Qt describing the principles of dynamic recrystallization that is rewritten code from my PhD thesis, where stress-strain oscillations and sensitivity to the initial mean brain size were explained for the first time.
Cellular Automaton Simulation of Dynamic Recrystallization: Introduction into Self-Organization and Emergence (video describing function of the program is available too):