Energy theory and application of rocks