Theoretical and numerical modeling of anisotropic damage in rock for energy geomechanics