Modelling fracture propagation and failure in a rock pillar under mechanical and thermal loadings