Speaker
Description
Initially born out of the needs of the ESS Detector Group to enhance the realism of thermal neutron scattering in Geant4-based detector design studies, the NCrystal project has grown into a generic backend for such modelling -- which is both flexible, efficient, and available under a liberal open source license. In this contribution we present the project, including both design philosophy, an overview of the physics modelling capabilities of the software, the material database, and the current and planned possibilities for using it.
From the beginning, the aim has been to provide a common physics modelling engine, which can then be used either as a standalone toolkit (which includes command-line tools and Python/C++/C APIs), to enable neutron physics in custom domain-specific simulation applications (like ANTS2), or as a backend to an existing Monte Carlo code like Geant4, McStas, or OpenMC. This approach enables collaborators from a range of communities to pool their efforts in terms of code development (possibly taking advantage of NCrystal's plugin mechanism), physics validation, and material database maintenance. Not only is such a project an obvious advantage for users of a code like Geant4 where thermal neutron scattering has not traditionally been a strong focus, but also more neutron-focused codes like McStas, OpenMC, or even MCNP, are able to benefit from the physics models and material database of NCrystal. In addition to discussing the physics capabilities, we will accordingly also provide an overview of the various options for deploying and accessing NCrystal. As part of this overview, we will discuss efforts to expand these options further, in particular to traditional nuclear radiation codes via direct hooks or through conversions to existing formats (e.g. ENDF) via the NJOY-NCrystal project.
The physics capacity of the software currently includes modelling of both elastic (Bragg diffraction and incoherent-elastic) and inelastic scattering components, and supports materials which are crystalline solids (isotropic or single-crystal including HOPG), amorphous solids, or even liquids. Multiphase materials and related effects (SANS) are also supported. We will discuss how materials are mostly defined in terms of crystal structure and/or phonon density distributions, and how the ever growing NCrystal Data Library provides an unusually large number (>130) of relevant and validated material definitions for users to access out of the box. Notably, the focus on computational efficiency in all code, means that this large amount of material definitions is provided without the need for pre-processing of data, and the associated hassle of large storage requirements normally associated with thermal scattering libraries. Instead, derived data such as inelastic scattering kernels or lists of Bragg reflection planes, are calculated automatically on-the-fly at initialisation time with highly optimised algorithms (~100ms/material), from the provided phonon density of state curves and crystal structures. Finally, we will also discuss the universal configuration mechanism of NCrystal, which aims to enable users to reliably configure a material in a consistent fashion across the different codes and APIs.
NCrystal is currently heavily used at the European Spallation Source ESS, in particular when it comes to the design of moderators, beam extraction, and detector systems, and the development has been supported by the European Union’s Horizon 2020 research and innovation programme under grant agreement No 676548 (the BrightnESS project) and 951782 (the HighNESS project).