Xraytrace documentation

raytracing software for x-ray standing wave calculations

User Tools

Site Tools


sample_geometry

This is an old revision of the document!


Sample geometry

As mentioned in the computational domain section, everything is computed on rectangular domain consisting of rectangular voxels. Ways of loading medium data from different input file types are described there as well.

Here we describe more in detail how to prepare these input files. If VTK file input is used, the files are typically prepared using some script, directly writing the regular unstructured mesh VTK file (ASCII format). This is the simplest 3D input format possible. Every voxel is addressed by an integer, which should correspond to entries in the materials file. Material with index 0 is always vacuum, the others can be defined freely in the materials file. The total span of integer values in the VTK file should match (or be smaller) than the number material file entries.

In case of vector file input, the information is provided in a form of simple geometric entities (e.g. a sphere) that are placed to the computational domain and interpreted by the software. In general, object entries are composed from the object type (integer), positions and sizes (doubles). The last entry is always the material index, which again should match the materials file. Object type numbers and related syntax is the same like for the Gsvit software, so some of the conventions might look unusual from Xraytrace perspective and are used only for compatibility purposes. The following rules are used in the data interpretation:

  • When we specify the vector file input, we also give the voxel size of the rectangular box on which the vector inputs will be interpreted. It is not necessary for the objects to be fully within this rectangular box, however only the data that are inside box are used for the computation.
  • The objects are interpreted in the order as they are listed in the file. In the overlapping areas the information is replaced while adding next object, this can be used e.g. to create a hole within an object.
  • All object positions and sizes are given in voxel coordinates. They don't need to be entered as integers (which is important e.g. for a sphere radius). However, they are evaluated on a voxel mesh, so using a vector input does not prevent to the staircasing effect.

The following examples of the vector file input lines show the objects that can be entered:

A sphere (object type==4) is set by its center coordinates followed by radius and material index as shown in the following example:

4 100 100 100 20 2

This puts a sphere to the voxel position of 100,100,100, with radius of 20 voxels and filled by material index equal to 2.

A rectangular box (object type==8) is set by its bottom-left-front and top-right-back voxel positions followed by the material index:

8 0 0 0 400 400 100 2

If our computational domain is a box of 400x400x200 voxels, this fills half of it (e.g. providing a substrate for further calculations), with material of index equal to 2.

sample_geometry.1516803007.txt.gz · Last modified: 2018/01/24 15:10 by 185.62.108.185