Xraytrace documentation

raytracing software for x-ray standing wave calculations

User Tools

Site Tools


source_regimes

Source regimes

To create the X-ray standing wave field we need to let the incoming rays to be totally reflected and get interfered with other incoming rays. We have different ways how the rays can be sourced:

Rays can be simply casted from a plane outside of the computational volume, hitting some interface in the computational volume where the total reflection condition is met and create the standing wave field. For small angles this however means to have really large computational volume. This is the simple source method and can be set by using the directive

SOURCE_METHOD
0

If we use this source method, we can play with the size of the incident beam. To increase or shrink the size of plane from which the rays are casted (i.e. to change the beam shape), the command like this can be used

SOURCEMULT
0.1 0.1 10

which here shrinks the beam in x and y and increases its size in z. The default beam size in source method 0 is governed by the COMP command (see Running the computation section).

An alternative source method is to cast rays from whole computational boundary at once, already assuming that it was totally reflected outside of it - so casting both rays propagating towards sample and mirrored rays. This is done in source method = 1.

We can also use only the top boundary for casting the rays and let them to periodically repeat. This is the source method 2. In this case we artificially create the periodic boundary near to the computational domain boundary, on basis of the source wavelength. All the rays incoming to this boundary are transversed back to the start of the computational domain. Obviously, this case is suitable only for periodic samples. On the other hand, for such samples it is the only method that can reproduce the realistic behavior of the incoming rays.

Finally, source method 3 means casting rays only from top, but not doing any periodical repetition. This is usefull namely for debugging the method 2 or when we don't want to have something periodic in our computational domain.

The different source methods are illustrated on the figure below:

There are more aspects that need to be controlled for the source. First of all, it is the direction, that is again set within the COMP command (see Running the computation section), using the following angles definition:

Then, rays can be coherent or incoherent. To set the coherence and to set the rays phase to 0, you can use this command:

COHERENCE
1 0

If coherence is switched on, all the rays have the same phase at the beginning and amplitudes are summed instead of intensities. Second parameter is the phase itself, in degrees.

Running computation for a single phase might be not enough. We might be interesting on getting a sum output for many different phases. This can be done automatically by command like this:

PHASES
2

which sets number of phases to use in calculation, directly prolongs the process. Here only two phases would be used, but any number, equally distributed along 0-PI region could be used. Multiple phases evaluation is important namely in case when the voxel size is larger or similar to wavelength which leads to a moire effect. By using multiple phases evaluation, this effect can be removed as shown below:

If we have only single object in the computational domain we might be interested in using only subset of rays that have chance to intersect with it. To search for material with index of 2 and illuminate only areas where it can be reached we can run

SOURCE_MATCUT
2

If the parameter is 0, everything is illuminated, otherwise the boundaries of the particular material are found.

Finally, we list here two simple evaluation techniques that are not related to raytracing. Using the simple regime

SIMPLE
1

we run a simple analytical calculation assuming that material 2 is the reflecting one, and the XSW orientation is in z. Material and data below surface plane have no meaning and are not evaluated. This method still uses the complete voxel geometry.

Even simpler approach is

MEGASIMPLE
1 material_index

where only a single material with given index is evaluated without really creating any mesh (only from vector data entries). This is used mostly for some debugging purposes.

An alternative to all the raytracing is use of the matrix method. This is implemented in z (so the computational volume is sliced in z automatically) and can be called as

MATRIXBASED
1
source_regimes.txt · Last modified: 2019/03/13 21:21 by pklapetek