Skip to content

Processing X ray diffraction data: grain centroids and volumes

Romain Quey edited this page Oct 15, 2020 · 8 revisions

Introduction

Methods such as far-field 3DXRD or Laue diffraction provides incomplete information on a grain structure, such as the grains centroids (centers of mass) and volumes. Neper can generate the optimal tessellation (made of convex cells) that corresponds to such a data set. The tessellation can be described as a raster tessellation (for FFT simulations) or can be meshed (for FEM simulations). This is described step by step in the following.

Input data

The input data are no more than what the user should know about the data set:

  • the number of grains
  • the grain centroids
  • the grain sizes (volumes in 3D, surface areas in 2D, or equivalent diameters)
  • the shape and position of the domain, i.e. of the actual specimen
  • optionally, the crystal orientations of the grains

⚠️ Neper does not "reposition" the grain centroids to properly fit in the domain; so, make sure your data are consistent.

📣 Neper "rescales" the grain sizes so that they sum out to the actual domain size. This works for all inputs (volumes in 3D, surface areas in 2D, or equivalent diameters).

📣 Providing crystal orientations is optional in the sense that they do not influence tessellation generation. However, when provided, they are copied to the tessellation (and then pushed to the mesh).

Tessellation generation

A tessellation can be generated using neper -T. The input listed above must be specified using the following options:

  • -n specifies the number of grains
  • -dim specifies the dimension
  • -morpho specifies the morphology (here, both the grain centroids and the grain surface areas / volumes)
  • -domain specifies the domain
  • -ori specifies the crystal orientations

Additional options may be useful:

  • -regularization (or -reg, for short) regularizes the tessellation (useful only if the tessellation will be meshed)

⚠️ Most options are assigned default values. -dim defaults to 3 and is therefore needed only if the actual dimension is 2.

Grain information

Grain centroids and sizes can be specified using -morpho "centroidsize:(file_name)". file_name is typically formatted by providing the grain centroids (2 entries in 2D, 3 entries in 3D) and volumes of the grains on successive lines. An example for 10 grains in 3D is

0.372 0.137 0.487 0.111
0.421 0.308 0.125 0.121
0.184 0.790 0.270 0.091
0.497 0.878 0.618 0.070
0.223 0.709 0.804 0.094
0.768 0.461 0.865 0.130
0.159 0.256 0.763 0.079
0.723 0.767 0.130 0.068
0.912 0.552 0.341 0.080
0.649 0.457 0.505 0.155

📣 The data can be space or tab delimited.

⚠️ The values of -n and -dim must be consistent with the value of -morpho. Some bash magic can be used to define them automatically (e.g. wc -l file_name | awk '{print $1}' for -n).

Sample information

The domain must be convex and can be most commonly defined as either a cuboid (using cube(...)), a cylinder or any other prism (using cylinder(...)) (use square or circle in 2D). More complex domains can be defined through a series of "cutting planes" (using planes(...)).

⚠️ By default, a domain have minimal x, y and z coordinates of 0, but the domain can also be translated, by appending :translate(...). (It can also be rotated by appending :rotate(...) or scaled by appending :scale(...).)

⚠️ The value of -dim must be consistent with the value of -domain.

Visualizing the input data set

📣 This is entirely optional and only intended to validation.

Before the tessellation is generated, it can be safe to visualize the data set. This can be done as follows:

  • Generate a 1-grain tessellation that defines the domain using, for example,
$ neper -T -n 1 -domain "cube(0.5,0.5,1)" -o domain
  • Visualize both the domain (defined in domain.tess) and the grain centroids (written in file coo_file) using, for example
$ neper -V domain.tess,coo_file -datacelltrs 0.5 -datapointrad 0.1 -print img

![image](https://user-images.githubusercontent.com/2659376/96123434-165d7f00-0ef3-11eb-9e5d-4691a2d517ec.png This example case looks properly formatted as the grain centroids lie in the domain.

⚠️ The grain centroids must be written with 3 coordinates.

  • Visualize both the domain (defined in domain.tess) and the grain centroids (written in file coo_file) and radii (written in file rad_file) using, for example
$ neper -V domain.tess,coo_file -datacelltrs 0.5 -datapointrad file (`rad_file`) -print img

image

Again, this example case looks properly formatted as the grains (visualized as spheres) fit the domain.

Clone this wiki locally