  Curved single crystals are widely employed in spectrometer designs in the
hard X-ray regime. Due to their large solid angle coverage and focusing
properties, toroidally bent crystals are extremely useful in applications where
the output of photons is low. Spherically bent crystals, a subgroup of
toroidally bent crystals, particularly have found their way in many instruments
at synchtrotrons and free electron laser lightsource end-stations but also in
the re-emerging field of high-resolution laboratory-scale X-ray spectroscopy. A
solid theoretical understanding of the diffraction properties of such crystals
is essential when aiming for optimal spectrometer performance. In this work, we
present a general method to calculate the internal stress and strain fields of
toroidally bent crystals and how to apply it to predict their diffraction
properties. Solutions are derived and discussed for circular and rectangular
spherically bent wafers due to their prevalence in contemporary
instrumentation.
