This is the Q-POP-Diffraction module, which is one of the post-processing module of the Q-POP package.

Diffraction Documentation#

Contents#

1.Purpose#

The Q-POP-Diffraction module computes the diffraction pattern of a material microstructure predicted by phase-field simulations. It takes inputs of

  • crystal cell and atomic information

  • the real-space microstructure data described by the spatial distributions of phases, structural orders, and mechanical displacements that are generated by phase-field simulations, and outputs the corresponding diffraction intensity distribution in the reciprocal space.

Formalism of the diffraction computation can be found in Ref1T. Yang et al. Computing diffraction patterns of microstructures from phase-field simulations. Acta Mater. 239, 118258 (2022)..

2.Input files#

The input of the program consists of 2 required input files including parameter.system.in and parameter.atom.in, and 4 optional input files including phaseFra.in, displace.in, strucOrd.in, and region.in. The choice of optional input file(s) to be provided depends on the type of the system considered.

2.1.paramerter.system.in#

Declares the size of the system and the number of phases. The format is as follows:

Table 1 Format of the input file parameter.system.in
Data in the file Explanation
Comment or empty line
l1 l2 l3 System size in each direction (in nm)
n1 n2 n3 Total number of simulation grids in each direction
ns nf Thickness of the substrate and the film (in grid numbers). For a bulk system, put ns = nf = 0.
Comment or empty line
N Total number of phases
H Total number of structural order parameters
Comment or empty line
ε11 ε22 ε33 Average mechanical strain of the system
ε23 ε13 ε12

2.2.parameter.atom.in#

Declares the crystal cell and atomic information. The format is as follows:

Table 2 Format of the input file parameter.atom.in
Data in the file Explanation
Comment or empty line
q10 q20 q30 Reciprocal lattice point around which the diffraction pattern will be calculated (nm-1)
a1 a2 a3 Lattice parameter a of an unstrained unit cell (nm)
b1 b2 b3 Lattice parameter b of an unstrained unit cell (nm)
N Number of atoms in a unit cell
Comment or empty line
ΔRn,1 ΔRn,2 ΔRn,3 Coordinates of the n-th atom in a unit cell (unitless). This line repeats N times, in the sequence of n=1,2,…,N.
Comment or empty line
m Phase identifier (ID)
fn,m(real) fn,m(image) Atomic form factor of the n-th atom in a unit cell of the m-th phase, real and imaginary parts (unitless). This line repeats N times, in the sequence of n=1,2,…,N. This part further repeats M times, in the sequence of m=1,2,…,M. Each repetition provides the information of one phase.
bn,m,h,1 bn,m,h,2 bn,m,h,3 Atomic-displacement-over-order-parameter coefficient bn,m,h of the n-th atom over the h-th order parameter, in the m-th phase. This line repeats N×H times, in the sequence of (n,h)=(1,1),(1,2),…,(1,H),(2,1),…,(2,H),…,(N,H). This line is removed if H=0.

We recommend the X-ray database from Lawrence Berkeley National Laboratory 2B.L. Henke, E.M. Gullikson, and J.C. Davis. X-ray interactions: photoabsorption, scattering, transmission, and reflection at E=50-30000 eV, Z=1-92, At. Data Nucl. Data Tables 54, 181 (1993). for atomic form factors.

2.3.phaseFra.in (optional)#

Stores an array of the spatial distribution of phase fraction \(η_m (r)\) (unitless) arranged in a row-major order, where m is the phase ID with m=1,2,…,M. This file should be provided for systems with multiple phases that have different chemical compositions (M≥2). It can be obtained from phase-field simulations. The format is as follows:

Table 3 Format of the input file phaseFra.in
Data in the file Explanation
n1 n2 n3 Total number of simulation grids in each direction
1 1 1 η1(1,1,1) η2(1,1,1) ... ηM(1,1,1) Phase fraction ηm of the m-th phase (m=1,2,…,M) at grid point (1,1,1)
1 1 n3 η1(1,1,n3) η2(1,1,n3) ... ηM(1,1,n3) Phase fraction ηm of the m-th phase (m=1,2,…,M) at grid point (1,1,n3)
1 n2 n3 η1(1,n2,n3) η2(1,n2,n3) ... ηM(1,n2,n3) Phase fraction ηm of the m-th phase (m=1,2,…,M) at grid point (1,n2,n3)
n1 n2 n3 η1(n1,n2,n3) η2(n1,n2,n3) ... ηM(n1,n2,n3) Phase fraction ηm of the m-th phase (m=1,2,…,M) at grid point (n1,n2,n3)

2.4.displace.in (optional)#

Stores an array of the spatial distribution of mechanical displacement u® (unit: nm) arranged in a row-major order. This file should be provided for systems that show strong mechanical deformations. It can be obtained from phase-field simulations. The format is as follows:

Table 4 Format of the input file displace.in
Data in the file Explanation
n1 n2 n3 Total number of simulation grids in each direction
1 1 1 u1(1,1,1) u2(1,1,1) ... u3(1,1,1) Displacement u at grid point (1,1,1)
1 1 n3 u1(1,1,n3) u2(1,1,n3) ... u3(1,1,n3) Displacement u at grid point (1,1,n3)
1 n2 n3 u1(1,n2,n3) u2(1,n2,n3) ... u3(1,n2,n3) Displacement u at grid point (1,n2,n3)
n1 n2 n3 u1(n1,n2,n3) u2(n1,n2,n3) ... u3(n1,n2,n3) Displacement u at grid point (n1,n2,n3)

2.5.strucOrd.in (optional)#

Stores an array of the spatial distribution of structural order parameter \(ζ_h (r)\) (unitless) arranged in a row-major order, where h is the structural order parameter ID with h=1,2,…,H. This file should be provided for systems possessing structural orders (H≥1). It can be obtained from phase-field simulations. The format is as follows:

Table 5 Format of the input file strucOrd.in
Data in the file Explanation
n1 n2 n3 Total number of simulation grids in each direction
1 1 1 ζ1(1,1,1) ζ2(1,1,1) ... ζH(1,1,1) Value of the h-th order parameter ζH (h=1,2,...,H) at grid point (1,1,1)
1 1 n3 ζ1(1,1,n3) ζ2(1,1,n3) ... ζH(1,1,n3) Value of the h-th order parameter ζH (h=1,2,...,H) at grid point (1,1,n3)
1 n2 n3 ζ1(1,n2,n3) ζ2(1,n2,n3) ... ζH(1,n2,n3) Value of the h-th order parameter ζH (h=1,2,...,H) at grid point (1,n2,n3)
n1 n2 n3 ζ1(n1,n2,n3) ζ2(n1,n2,n3) ... ζH(n1,n2,n3) Value of the h-th order parameter ζH (h=1,2,...,H) at grid point (n1,n2,n3)

2.6.region.in (optional)#

Stores an array of the spatial distribution of a weight parameter g® (unitless) arranged in a row-major order, describing the selected real-space region the diffraction of which should be computed. g=0~1, where g®=1 indicates that the spatial point r is fully inside the computed region and g®=0 indicates that the spatial point r is outside the region. A diffuse boundary of the region is allowed by using a finite g with 0<g<1, meaning that the spatial point r is partially inside the computed region with a weight of g. If this file is omitted, the program takes a default region for the diffraction computation and then stores the corresponding g® data in an output file region.00000000.dat. The format of region.in is as follows:

Table 6 Format of the input file region.in
Data in the file Explanation
n1 n2 n3 Total number of simulation grids in each direction
1 1 1 g(1,1,1) Weight parameter g at grid point (1,1,1)
1 1 n3 g(1,1,n3) Weight parameter g at grid point (1,1,n3)
1 n2 n3 g(1,n2,n3) Weight parameter g at grid point (1,n2,n3)
n1 n2 n3 g(n1,n2,n3) Weight parameter g at grid point (n1,n2,n3)

3.Output files#

The program outputs 4 files as follows.

  • I.00000000.dat : Stores an array of the diffraction intensity I(q) (unitless), arranged in a row-major order.

  • lg_{10}I.00000000.dat : Stores an array of \(log_{10}\)I(q)(unitless), arranged in a row-major order.

  • QVector.00000000.dat : Stores an array of the reciprocal space vectors \(q_1\), \(q_2\), and \(q_3\) (\(nm^{−1}\)) of the computed diffraction intensity I(q), arranged in a row-major order.

  • region.00000000.dat : Stores an array of the weight parameter g® (unitless) arranged in a row-major order. For the definition of g®, see Section 2.6. The data follow a same format with those in region.in. This output file is generated only if region.in is not provided.

Acknowledgement#

This development of the software was supported as part of the Computational Materials Sciences Program funded by the U.S. Department of Energy, Office of Science, Basic Energy Sciences, under Award No. DE-SC0020145.

References#