13–18 Oct 2019
Chattanooga Convention Center
US/Eastern timezone

Examples on using the McStas Union components

16 Oct 2019, 13:00
2h
Meeting Room 4 & 5 (Chattanooga Convention Center)

Meeting Room 4 & 5

Chattanooga Convention Center

Poster Software Poster

Speaker

Dr Mads Bertelsen (ESS)

Description

Ray-tracing simulations have been an important part of neutron scattering since the inception of the field. Although ray-tracing simulations of instrumentation came later, they are now the standard tool of the trade for design of instrumentation. Instrument simulations are, however, not yet commonly used in experiment planning or data analysis where they have obvious potential. To reach this potential, Monte Carlo Ray-tracing simulations must be flexible enough to describe the relevant science, and should integrate seamlessly into established workflows. Here we present advances within the McStas simulation package both in terms of the achievable fidelity and use in modern Python workflows.

The McStas Union components were introduced at ICANS XXII in Oxford where early work was shown. These components allow the user to describe complex geometries using combinations of simple shapes and conducts simulation of all multiple scattering between these. Each volume can be given a material definition that includes any number of user-defined scattering processes. The Union components also contains powerful visualization tools that show scattering within the model.
This presentation will provide a brief overview of the Union components, but the main focus will be examples of their application for different types of experiments.
The primary use case of the Union components is to simulate the sample environment and sample in order to investigate possible spurions from multiple scattering. We show an example featuring a cryostat with a single crystal sample and a pressure cell with a powder sample. The Union components are also well suited to imaging experiments where it is important to have different materials embedded in the overall geometry. We show a calibration sample and a model of a Viking sword, both with an emphasis on the use of Bragg edges to identify materials.
We also demonstrate the possibilities for more advanced samples with a model of a lithium battery including repeating stacks of the 5 different layers. The temperature and charge level are adjustable and affect both the lithium concentration in the layers and a few selected Bragg peaks.
In order to facilitate advanced workflows, a python API for McStas called McStasScript has been written in connection with the PaNOSC project. The API has bindings for writing McStas instruments, executing the simulations and handling data/plotting. With this tool, it is significantly easier to use McStas in python workflows that include generation of scattering patterns (e.g. based on atomic-scale simulations), fitting or optimization.

This work is part of the work package on simulation in the PaNOSC project, which has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No. 823852.

Primary author

Co-authors

Dr Kim Lefmann (University of Copenhagen) Dr Linda Udby (University of Copenhagen) Dr Anna Fedrigo (ISIS Neutron and Muon Source) Dr Thomas Holm Rod (European Spallation Source)

Presentation materials

There are no materials yet.