Geomechanical modeling of rock fracturing and associated microseismicity