The invention provides a method and apparatus for determining the amount of various materials in a liquid sample. Because the apparatus is particularly resilient it can be used repeatedly with very harsh liquid samples such as boot water from an
oil refinery. The apparatus uses at least one volume and / or concentration independent optical
analysis method to determine at least one of: the pH, amount of
chloride, and / or amount of iron in the sample. The
optical property can be colorimetric, fluorescent or both and result from adding dyes, complexing agents,
turbidity inducing compounds, and other optically effecting reagents to the sample. Because the measurements are concentration and volume independent they can be done continuously, quickly, and avoid the inconvenient start and stop procedures in prior art measurement regimens. The method further includes using a BDD
cell to oxidize materials (such as sulfoxy compounds) that would otherwise interfere with the optical analysis and / or to sparge the sample with gas.