  The intensity of a monochromatic X-ray beam decreases exponentially with the
distance it has traveled inside a material; this behavior is commonly referred
to as Beer-Lambert's law. Knowledge of the material-specific attenuation
coefficient $\mu$ allows to determine the thickness of a sample from the
intensity decrease the beam has experienced. However, classical X-ray tubes
emit a polychromatic bremsstrahlung-spectrum. And the attenuation coefficients
of all materials depend on the photon energy: photons with high energy are
attenuated less than photons with low energy. In consequence, the X-ray
spectrum changes while traveling through the medium; due to the relative
increase of high energy photons this effect is called beam hardening. For this
varying spectrum, the Beer-Lambert law only remains valid if $\mu$ is replaced
by an \textit{effective} attenuation coefficient $\mu_\text{eff}$ which depends
not only on the material, but also its thickness $x$ and the details of the
X-ray setup used. We present here a way to deduce $\mu_\text{eff}(x)$ from a
small number of auxiliary measurements using a phenomenological model. This
model can then be used to determine an unknown material thickness or in the
case of a granular media its volume fraction.
