A method and apparatus for analyzing fluids by means of x-ray
fluorescence. The method and apparatus are applicable to any fluid,
including liquids and gases, having at least one component that emits
x-ray fluorescence when exposed to x-rays. The apparatus includes an
x-ray source (82) including an x-ray tube (64) having improved heat
dissipating properties due to the thermal coupling of the x-ray tube with
a thermally-conductive, dielectric material (70, 1150). The x-ray tube
also includes means for aligning (100, 2150, 2715) the x-ray tube with
the x-ray source housing whereby the orientation of the x-ray beam
produced by the x-ray source can be optimized, and stabilized various
over operating conditions. The method and apparatus may also include an
x-ray detector having a small-area, for example, a PIN-diode type
semiconductor x-ray detector (120), that can provide effective x-ray
detection at room temperature. One aspect of the disclosed invention is
most amenable to the analysis of sulfur in petroleum-based fuels.