VITESS Module sample_nxs

Author: Mirko Boin

The sample_nxs module describes a polycrystalline sample based on its unit cell definition and was originally developed to simulate Bragg edge neutron transmission experiments. The module handles coherent and incoherent scattering, as well as absorption and transmission. The individual probabilities for those events are determined using the calculation of wavelength-dependent neutron cross sections (nxs). These cross sections are computed for each atom contributing to a unit cell, such that complex material compositions can be simulated. The nxs concept is briefly described.

CONTENT

1. Simulation description
   1.1 Unit cell initialisation
   1.2 Neutron cross section calculation
   1.3 Neutron-sample interactions
2. Module parameters
3. Input files
   3.1 Sample geometry file
   3.2 NXS parameter file
4. Further developments
5. References

1. Simulation description

1.1 Unit cell initialisation

Prior to any wavelength-dependent neutron cross section calculation, the crystal properties are initialised at first. Therefore, a unit cell is virtually composed using the existing routines of the SgInfo library [Grosse-Kunstleve, 1995]. The permission to use SgInfo is granted by the following copyright and permission notice:

Space Group Info (c) 1994-96 Ralf W. Grosse-Kunstleve

Permission to use and distribute this software and its documentation for noncommercial use and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in the supporting documentation. It is not allowed to sell this software in any way. This software is not in the public domain.

The unit cell initialisation requires a number of input parameters: Each of these parameters is served by an nxs parameter file (see §3.2 for details). A unit cell is composed and the present lattice reflections and symmetry equivalent lattice planes are determined. As part of the initialisation of the virtual sample, the lattice distances d, structure factors F for all hkl Miller indices and the unit cell volume are calculated to provide the necessary parameters for the neutron cross section calculation.

1.2 Neutron cross section calculation

The fraction of neutrons performing different neutron-matter interactions can be quantified by means of cross sections, given in barns (1 barn=10-24 cm2). Following the descriptions of Granada [1984] and Vogel [2000], the total neutron cross section is given by:
σtotal(λ) = σcoh ( Scoh_el(λ) + Scoh_inel(λ) ) + σinc ( Sinc_el(λ) + Sinc_inel(λ) ) + σabs(λ)


where, σabs is the absorption cross section and σ describes the average coherent and incoherent scattering contributions, which are computed by the scattering length b. The functions S describe the neutron energy influence as well as the effect of the spatial nuclei arrangement to the elastic and inelastice parts of the cross sections.

The structural parameters of the sample material are accounted in the description of the coherent elastic part Scoh_el. Here σcoh_el(λ) can be calculated for any type of crystal structure.

σcoh_el(λ) = λ2 / (2V0) Σ |Fhkl|2 dhkl


The summation Σ runs over all sets of lattice planes, indicated by hkl, with a lattice spacing dhkl smaller than half the size of the selected wavelength λ. V0 is the unit cell volume.

The fraction of neutrons that scatter elastically is also influenced by incoherent scattering. The definition of the incoherent elastic component is based on the assumption of thermal motion of the nuclei. Therefore, an isotropic atomic displacement factor Biso was introduced to include the Debye temperature of an atom.

Sinc_el(λ) = λ2 / (2Biso,n) ( 1 - exp( -2Biso,n / λ2) )


For the purpose of a unit cell calculation, the contributions are simply added for each atom n inside the unit cell as they do not depend on the crystal structure.

The inelastic contributions to the neutron cross section calculation describe the probabilities for a neutron to lose or gain energy when interacting with the sample. However, although these probabilities will be determined during the simulation, neutron energy (or wavelength) changes are not considered in the present sample module. Consequently, the author refers to the comprehensive presentations made by Binder [1970], Granada [1984] and Vogel [2000] for the descriptions of the inelastic cross sections.

The absorption cross section is determined by the neutron velocity v. Most reference absorption cross section datasets have been measured and stored in terms of a standard neutron velocity of v = 2200 m/s, which is used to compute the absorption cross section for another velocity (and wavelength).

σabs(λ) = σ2200_abs / 1.798 Å * λ


In the following the total and individual neutron cross sections are used to calculate the probabilities for absorption, transmission and scattering of each neutron intersecting with the sample.

1.3 Neutron-sample interactions

After the wavelength-dependent neutron cross section is completed a transmission probability for the actual neutron is determined to account for the exponential attenuation:

ptransmit = exp( - σtotal / V0 * l)


where l is the neutron transmission path length through the sample (i.e. the sample thickness).
The following propagation depends on a command option provided as a module parameter. Here, the 'transmission_only' switch (see §2) is used to divide between to different simulation modes. If the option is yes, all neutrons hitting the sample will be transmitted and their weighting factor is attenuated by multiplication with ptransmit. Thus, wavelength-dependent neutron transmission including the effects of the crystallographic structure is simulated. This is useful in order to quickly simulated Bragg edge neutron transmission spectra, for example.
In order realise neutron scattering, the 'transmission_only' switch should be set to no (default). Then, neutron transmission s performed only, if ptransmit > a random number between 0 and 1. Otherwise, another random number (Monte Carlo number) will be created to decide between absorption and coherent and incoherent scattering. The latter is only possible if the module parameter '-I' is activated (see §2). For the coherent scattering the available lattice planes, their distances and structure factors are used to determine the Bragg angles and their individual probalities for coherent scattering along the Debye Scherrer cones. The angular range in both directions (Bragg angle and vertical scattering angle) can be restricted to focus on a smaller region as reported in the following section. If it turns out that the neutron is to be absorbed due to the Monte Carlo choice, the neutron is simply not written to the output of the sample_nxs module.

2. Module parameters

The sample_nxs module povides a number of options to be used from the GUI as well as from the commandline.

Parameter
Unit
Description Command option
sample file The sample file describes the geometry and properties of the sample.  -S
Theta, dTheta, 
Phi, dPhi
[deg]
These parameters describe the solid angle covered by the detector. The direction (q,f) points to the middle of the covered area, which extends from [q-Dq, q+Dq] and [f-Df, f+Df]. 
q is defined as the angle between +x-axis (main flight direction of the neutrons) and the Vector R to be described. f is the angle between the +y-axis and the projection of R to the yz-plane. x,y and z form a right-handed system.
 !!!Note: If you specify any parameter of Dq, q, Df, f, you must specify all of them.!!!
 The default is a coverage of 4π
 -D, -d,
 -P,-p
repetitions 'repetitions' specifies the number of data sets (trajectories) generated for each scattered trajectory. A larger number of repetitions enriches the population on the detector and gives therefore better statistics in the spectrum.  -A
treat all
neutrons
yes: treats neutrons not hitting the sample.
no: removes neutrons not hitting the sample from the trajectory.
 -a
transmission
only
'transmission only' specifies the simulation mode:
yes: only wavelength dependent neutron transmission is handled. Neutrons hitting the sample will be attenuated by I/I0 = exp(-μ(λ)*transmission_length). The neutron flight direction is not changed.
no: transmission, absorption and coherent and incoherent scattering are simulated.
 -T
incoherent scattering yes: neutrons are additionally scattered incoherently.
no: incoherent scattering is omitted.
!!!Note: This option is not considered if 'transmission only' = yes.
 -I

3. Input files

3.1 Sample geometry file

The sample geometry, placement within the instrument and orientation are summarised by an input file. An example:

nxs_sample.par
10.0 0.0 0.0    # sample position relative in [cm] to the coordinate system defined by the preceding module
cub             # sample geometry (cyl, bal or cub)
2.0 1.0	2.3     # thickness or radius, width and height of the sample in [cm]
1.0 0.0 0.0     # orientation of the cylinder (does not need not be normalised)
Fe.nxs          # nxs parameter file to describe the unit cell composition

The sample_nxs module provides three geometry to be simulated (cylinder, sphere (ball), cuboid). Depending on the selected shape, thickness, height and width and/or radius need to be defined. The sample orientation is given by vector components:
Another input file (nxs parameter file) is used to define a unit cell. If no input file is assigned or the path the file cannot be found, the sample_nxs module uses a fallback solution. By default an alpha-Fe (bcc) unit cell will be created and used for the simulation. Anything after the # character is interpreted as a comment.

The sample geometry file is assigned by the command line parameter -S. This option is mandatory. The VITESS GUI provides input fields to edit the described parameters.

3.2 NXS parameter file

The parameters to define a unit cell are assigned by means of another input file, whose structure is as follows:

Al.nxs
# define the unit cell parameters:
#   space_group                      - the space group number or Hermann or Hall symbol [string]
#   lattice_a, ...b, ...c            - the lattice spacings a,b,c [angstrom]
#   lattice_alpha, ...beta, ...gamma - the lattice angles alpha,beta,gamma [degree]
#   debye_temp                       - the Debye temperature [K]

space_group    = -F 4 2 3 # space group number is also allowed (= 225)
lattice_a = 4.049
lattice_b = 4.049
lattice_c = 4.049
lattice_alpha = 90
lattice_beta = 90
lattice_gamma = 90
debye_temp = 429.0

# add atoms to the unit cell:
# notation is "atom_number = name b_coh sigma_inc sigma_abs_2200 molar_mass x y z"
#   name           - labels the current atom/isotope  [string]
#   b_coh          - the coherent scattering length [fm]
#   sigma_inc      - the incoherent scattering cross section [barns]
#   sigma_abs_2200 - the absorption cross sect. at 2200 m/s [barns]
#   molar_mass     - the Molar mass [g/mol]
#   debye_temp     - the Debye temperature [K]
#   x y z          - the Wyckoff postion of the atom inside the unit cell

[atoms]
add_atom = Al 3.449 0.008 0.23 26.98 0.0 0.0 0.0

4. Further developments

The first official sample_nxs module was release with Vitess 2.11. This sample_nxs version 1.1 was created to take advantage of an updated nxs library. Besides the implementation into Vitess, a sample module for McStas has been realised and is available from the McStas repository. Furthermore, a Geant4 module, called NXSG4, for proper simulations of thermal and cold neutrons through crystalline matter was developed. Last but not least, a number of users have successfully applied the nxs routines for their research activities. The list below references publications about the development and applications of nxs:

It is further planned to continue the development of the Vitess module to provide additional capabilities such as strain, texture and multiple scattering as it has been done for McStas [e.g. Boin et al., 2011]. More up-to-date information is posted on http://www.helmholtz-berlin.de/people/boin/nxs_en.html.

5. References


Back to VITESS overview
vitess@helmholtz-berlin.de