Calculation of stored energy from broadening of X-ray diffraction lines