Xraytrace documentation

raytracing software for x-ray standing wave calculations

User Tools

Site Tools


material_parameters

Material parameters

The materials used within the calculation are represented by materials table, which is supplied as a an input file, defined at the same moment as the data are loaded (see the computational domain section).

This file has a simple structure - a set of entries for individual material indices, defining how the system should get the material data. Each row starts by material index (to match the indices in the VTK file or vector file defining the sample geometry). Then, material type is listed (0 for direct definition of n, k, density and attenuation, 99 for use of the Xraylib database). For material type = 0 the further four values are real and imaginary part of the refractive index, density (in g/cm3) and attenuation coefficient. For material type = 99 the element or compound chemical formula is written and everyting is obtained from Xraylib database on basis of the source energy and default material density as provided in Xraylib. Moreover we have two parameters that can be used to force the system to use different values of density and attenuation coefficient than those obtained from the Xraylib database. This is most usually not needed and can be left zero to get the values from Xraylib.

An example of the materials file entries is shown below:

0 0 1 0 0 0
1 0 0.9999 0 5 0
2 99 Si 0 0
3 99 Cr 0 0

A second option how to override the density of the material loaded from library is to use the following directive in the main parameter file:

OVERRIDE_XRAYLIB_DENSITY
index value

which uses the supplied density for the particular index, but calculates everything using Xraylib as usual based on this density.

Note that at present the compound parser does not work properly for density of compounds (only elements).

The density itself affects refractive index, however sometimes it is desirable to keep it and affect only attenuation length. This can be done by altering its value in the material table (fourth material constant).

material_parameters.txt · Last modified: 2019/02/21 23:44 by pklapetek