XRFCalc2 V1.0 (c) Pierre Caussin, May 2025
User interface: this version has 3 pages: Elements calculate the elements content of a molecule or a mixture of compounds, X-Rays calculate the absorption of X-Rays of a specified energy by the mixture (specified in the Elements page) and Help which displays the hints below. Tap anywhere in the help field if the 3 radio buttons (Elements, X-Rays and Help) are not immediately displayed at the top of this help page.
o Elements calculator
o A compound formula should be expressed like Fe or Fe2O3 or Fe2(SO4)3 or CuSO4*8H2O (* (star) can be used as a hydration indicator in lieu of the centered dot which may be hard to find), etc. The formulas are case-sensitive i.e. the first character of an element has to be upper case and the second one lower case if present. The Auto cap feature makes it possible to enter the formulas as lower case in most cases: when cu is typed, it will convert to Cu because Cu is a valid element. If the compound CO2 (carbon oxide) is required, type CO2 uppercase or o2c because Co is a valid element name. On the over hand cn will be converted to CN because Cn is not a valid element (in this restricted table that does not include Copernicium).
o A mixture of compounds should be expressed like 20%C1+80%C2 with C1 or C2 = compounds.
o In a mixture, a single concentration can be omitted; in such case it defaults to the rest e.g. 18%Cr+10%Ni+Fe implies Fe=72%.
o The total atomic mass is the mass of a single compound or the weighted average of compound masses for a mixture.
o For each element the atomic mass and the weight fraction in the mixture or compound are displayed.
o The button . . . at the right of the formula field makes it possible to display the periodic table of the elements. Tap one element to add its symbol to the formula. The button # displays a numeric keypad that allows to view and/or edit the current formula string. The button OK closes the periodic table. Note: when the device is in portrait mode, one half of the table is shown and the buttons < << > >> allow horizontally shifting the displayed part of the table. Note that the periodic table is shown in a somewhat antiquated way, with the lanthanum in a column normally used by transition metals and the lutetium displayed together with the other lanthanides, and the lightest actinides also displayed below transition metals, while the elements past Z=98 are not shown.
o Press Oxide while a single element is displayed to show the natural oxidation state.
o X-Ray absorption calculator
o The lines, absorption edges and absorption coefficients are taken from the Elam database V1.2 (Elam W.T., Ravel B.D. and Sieber J.R. A new atomic database for spectroscopic calculations. Radiat. Phys. Chem. 63 (2) 121-128, 2002).
o The energy of X-rays can be specified as a number of keV like 6.404 or a wavelength in Angstroms with a A immediately at the right of the number like 1.5406A or as an absorption edge name like Cu K or an XRF line name like Cu KA1 (Siegbahn style: the display will show Kα1 for KA1, and similarly equivalent Greek letters replace the typed Latin letters) or Cu K-L3 (IUPAC style). The line name is automatically corrected when a valid edge or line name is sensed; e.g. it is possible to type fek, the display will show Fe K after the k has been entered.
o The button . . . at the right of the energy field makes it possible to display the periodic table of elements. Tap one element to display a list of edges and lines for this element. Tapping one of the edges or lines inserts it in the energy field of the absorption calculator, Tap OK to return to the absorption calculator.
o The energy of the selected X-rays is displayed in keV and the corresponding wavelength in angstroms. If a line name has been entered, the alternate designation (IUPAC vs. Siegbahn styles) is shown first.
o The photoelectric absorption is displayed at energy - 2 eV and energy + 2 eV in case an absorption edge is selected the element of which is part of the compound or mixture; otherwise the unit cm2/g is displayed.
o The coherent and incoherent absorption factors are displayed in the same unit, so as the total absorption.
o Density field: When a single element is specified, a default density is automatically shown, for gases, the density is the gas density at normal temperature and pressure. For multi-elements compounds or mixtures, If a density has previously been indicated for the same formula, the value is automatically retrieved (based on the spelling of the formula only, e.g. CO2 and O2C are not deemed to be same), otherwise the density field is cleared. If the density of the compound is specified, it is used to display the penetration of X-Rays in the material at 90% absorption in the Path field. The specification of the density is optional. Density values shall be strictly positive and below 25; the unit is g/cm3 and cannot be changed; the dot character will automatically be replaced by the locale decimal separator string. The densities of pure elements in their normal state (0°C, 102325Pa) is tabulated in the code, the densities of other compound are stored for later use when they are given, note that the key is the text of the formula, thus the density of e.g. H2O is not necessarily the same as the one of OH2, however one single density is stored for TiO2. To overcome the latter issue, the decoding of formulas stops at the first encountered semicolon, it is possible to type e.g. TiO2;Rutile and TiO2;Anatase and store the respective densities of the allotropic varieties.