Strain energy density prediction of crack initiation and direction in cracked T-beams and pipes