Micromechanical modeling of thermal spallation in granitic rock