Description
The neutron ray-tracing code SIMRES has been developed since 1990th from the program Re-sTrax for three-axis spectrometer [1] into a general instrument simulation program [2]. Its ar-chitecture is different from the versatile simulation package McStas [3]. SIMRES is a desktop application designed for interactive work with a virtual instrument constructed from a given list of beamline components. While this concept limits the program's versatility, it enables features such as reverse tracing, adaptive variance reduction and event history logging to be integrated into the core of the ray tracing code. The reverse tracing with variance reduction can speed up simulations by orders of magnitude in the case of small samples. The loggers monitor the histories of successful events, open possibilities not available in real experi-ments, such as mapping of guide reflection angles, or exporting event lists which represent sampling distributions or resolution functions.
The program development has been driven by several instrumentation projects including dif-fractometers equipped with focusing monochromators and the time-of-flight engineering diffractometer BEER@ESS. Therefore, SIMRES is best suited to simulating similar instruments and provides advanced components for this purpose. They include, focusing arrays of mosaic and elastically bent perfect crystals, realistic neutron guide models accounting for waviness and misalignment, and a stack of supermirror-coated Si blades acting as a bi-spectral switch for the BEER and DREAM instruments at ESS. SIMRES can call a McStas simulation for a part of the components sequence by sharing MCPL data [4]. This largely extends the capability of the program, for ex-ample by employing advanced sample models or the Union compo-nents available in McStas.
These advanced features will be demonstrated on two examples. The first one deals with the modelling of neutron beam attenuation in the mentioned bi-spectral switch component, which may be severely affected by diffraction in the Si blades enhanced by residual elastic strain. SIMRES provides the bent crystal component XTAL, which allows to assess this effect and predict realistic instrument spectra. The other example focuses on the problem of false strains, which affect residual stress measurements near material boundaries. Such measure-ments are often performed using a very small gauge volume of several mm³, which makes simulations of the experiment very slow. By employing the reverse tracing for higher speed and calling a McStas union model for a composite sample, SIMRES can yield the distribution of false strains to be used for subsequent treatment of experimental data.
References
[1] J. Saroun, J. Kulda, Physica B 234–236 (1997) 1102
[2] SIMRES repository, https://github.com/saroun/simres
[3] P. Willendrup, and K. Lefmann, J. Neutron Research 23 (2021) 7-27
[4] T. Kittelmann, et al., Comp. Phys. Comm. 218 (2017) 17-42