McStas logo McStas - A neutron ray-trace simulation package ILL; PSI; ESS Niels Bohr Institute DTU Physics

McStas

About McStas
 Conditions of use
 Authors/Contacts
 Project funding

Download
 Components
 Other Downloads (share)

Mailing list

Search web/mailinglist

Documentation
 Wiki (GitHub)
 McStas manual
 Publications

Links

Report bugs (GitHub)

Code-repository (GitHub)


The Union_NCrystal_material McStas Component

12.14  The Union_NCrystal_material McStas Component

Version: $Revision: 0.1 $

Identification

  • Author: Mads Bertelsen

  • Origin: ESS DMSC

  • Date: 2026-09-28

Description

Creates one NCrystal scattering process and a complete Union material. The absorption coefficient is obtained from the same NCrystal configuration, so density modifiers such as density=0.6x are applied automatically. Use NCrystal_process together with Union_make_material when NCrystal scattering must be combined with other Union processes. The user does not provide my_absorption for this component.

This component requires a Union geometry and Union_master.

Input parameters

Parameters in boldface are required; the others are optional.

Name

Unit

Description

Default

cfg

str

NCrystal material configuration string (details <a href="https://github.com/mctools/ncrystal/wiki/Using-NCrystal">on this page</a>).

""

interact_fraction

1

Fraction of scattering events assigned to this process 0-1 (default -1 lets Union assign it).

-1

include_SLD

0/1

Include the scattering length density calculated from cfg in the material refraction information.

0

init

string

Deprecated and unused. Accepted so that instruments written for McStas/McXtrace 3.8.7 and earlier, which name the Union_init component here, still compile. *******************************************************************************/

""

Links

  • Component source code found in file Union_NCrystal_material.comp.


Last Modified: Tuesday, 06-Oct-2026 21:19:11 CEST
Search website mailinglist archive GitHub repos