{'fraction_non_alphanumeric': 0.030867178924259057, 'fraction_numerical': 0.012733260153677277, 'mean_word_length': 4.6996996996997, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Monte Carlo simulations of the S-shaped neutron guide

Neutron transport along guides is governed by the Liouville theorem and the technology involved has advanced in recent decades. Computer simulations have proven to be useful tools in the design and conception of neutron guide systems in facilities. In this study, we use a Monte Carlo method to perform simulations for an S-shaped neutron guide with different dimensions for a Small-Angle Neutron Scattering (SANS) instrument, through the MCSTAS software. A wavelength cutoff is observed and shown to be dependent on the geometrical parameters of the guide. Results for the neutron flux at sample position are presented and a greater sensitivity of cutoffs concerning the curvatures of the guides than to their lengths is noticed. Our results are in agreement with those obtained from the Acceptance Diagram method and we analyze the beam divergence behavior along the S-shaped guide.


Introduction
The project of neutron facilities and instruments are usually complex and expensive. The development of detailed study of the neutron instrumentation necessarily requires a previous description of the neutron beam properties. Monte Carlo (MC) simulation is an essential tool for defining instrument components and their operational limitations (e.g., the wavelength operational range) as much as guide geometrical definition, which implies in wavelength profile at instrument entrance. MCSTAS is a software that uses the MC method to simulate neutron scattering for various configurations, including different sources, samples and components [1].
The neutron transportation is ruled by the Liouville theorem [2], which states that the neutron phase-space volume of moments and positions is conserved. Therefore, the optimization of facility neutrons transport systems and instruments, frequently achieved with MC simulations, is necessary to obtain a fine resolution and high intensity, which provide high performance to neutron instruments. In the last two decades, neutron engineering has been improved in the optimization of large nuclear installations [3]. In this scenario, there are many studies in literature that analyse the relation between the neutron guides, flux intensity, divergence and wavelength resolution at facilities instruments [4,5].
In the optimization of neutrons guides, there are some basic distinctions between straight and curved guides that are related to neutron transmission based on their wavelength. According to literature is observed an asymmetry of neutron distribution along with the curved guide, in opposition to straight guide. The geometry of a curved guide is crucial for determining the way neutrons transported along guide by multiple reflections in its inner walls, which are divided into two possible regimes, namely Garland and Zigzag. Here, the Garland regime consists of neutron hitting just outer guide mirror reflections and the Zigzag regime, in opposition, described neutron transportation considering reflections in both walls. In these terms, both regimes of reflection are responsible for bringing asymmetries in neutron flux distributions as much as the change of initial wavelength profile distribution (that enter in the guide system) [6,7].
A well-established way to theoretically study the neutron flux behavior conducted by a curved guide is through the Acceptance Diagrams (AD) [7,8]. In this study is proposed to investigate the relation of curved guides dimensions and the intensity, spatial and angular distribution of transmitted neutrons by employing AD. After this analysis, distribution results are related to the number of reflections according to each regime (Garland or Zigzag) that the transported neutron flux belongs.
From curvature (R) and width (w) of the guide, we can predict that neutrons are transmitted more efficiently and also study specific neutron trajectory inside the guide. Curved guide systems are generally designed to avoid the direct length of sight, which mandatorily excludes unwanted neutrons and gamma to fly directly to the instrument entrance position. For this purpose, curved guides possess a minimum length given by L ds = √ 8Rw [7]. Nevertheless, there are also studies for AD of the called "short" guides, where their length is less than L ds , where other guide segments connected after system allow avoiding the direct sight [9].
According literature [3,6,7,9], we observe that the definition of a guide system is crucial for fulfilling the demand for a specific flux profile at each neutron instrument. In this context, the reallocation of instruments could be a puzzle situation from a engineering point of view. This occurred at the Forschungs-Neutronenquelle Heinz Maier-Leibnitz (FRM-II, Germany) that received eight instruments of FRJ-2 reactor from the JÃĳlich (Germany), which was decommissioned by the time. Besides the limited area for new instrument installation, the FRM-II team also dealt with a 1.2 m displacement between instruments and beam hole planes. To solve these problems, the scientific facility team started studying the application of the named "S-Shaped Guide", which consists of a curved guide followed by another similar curved guide in the opposite sense (forming a guide shaped like a letter "S") [10].
Additional studies that exploit properties of these S-shaped guides have also been done. By using MC simulations, Gilles and collaborators were able to determine a nominal wavelength cutoff for neutrons transmitted through guides [11]. This property has shown itself a useful way to reduce instrument background in addition to displace guide entrance and exit planes (vertically or horizontally). There is still inside AD theory a study of neutron behaviour passing through S-shaped guides [7], where the authors found a wavelength cutoff utilizing its geometry and correspondent diagram. The concept of a S-shaped guide was also applied in the SAFARI reactor in South Africa in a way to circumvent the natural asymmetry that a curved guide imposes to the neutron flux [12,13].
We believe that a better understanding of S-shaped guide could open news possibilities of instrument installations in operating facilities and the redistribution of some instruments to other ones. Recently, the Helmholtz Zentrum Berlin (HZB) Supervisory Board decided for shutting down and dismantling the German reactor BER-II until the end of 2019. From this decommissioning came the agreement between ANSTO and HZB for the installation of the reflectometer SPATZ at Australian reactor OPAL [14], which is an example of instrumentation adaptation where beforehand planning and studies are necessary. In this sense, we also observe a problem similar to FRM-II in a previous examination of SANS installation at the Brazilian reactor IEA-R1, where there is a space limitation for allocating this instrument close to beam holes. Thus, an alternative to alleviate this problem could be to displace SANS to the upper floor with an S-shaped guide.
Considering the properties of wavelength cutoff and the geometrical versatility in adapting instruments in real facilities, as describe above, the motivation of this study is to investigate neutron transportation through different S-shaped guide configurations by using MCSTAS simulations. In this paper we study the dependence of wavelength cutoff and S-shaped guide curvature and length, once this cutoff is independent on the initial flux specter (facility source) [15]. Moreover, we study the influence of collimator length on the final detected flux divergence as much as the correlation between Mildner cutoff [7] and simulated wavelength cutoff. This paper is organized as follows: Section 2 contains a basic configuration of an S-shaped guide and the MCSTAS simulation description; Section 3 describes simulation results and respective discussions; Section 4 shows our final conclusions and some future perspectives of application and studies.

S-shaped guide and MCSTAS simulations
The S-shaped guide provides a vertical displacement z of position of the sample in relation to the beam hole, ideal for different sample environments. The dependence of vertical displacement (z) as a function of the radius (R i ) and lengths (L i ) of S-shaped guide parts are presented below We can observe that in the limit L i /R i 1, the vertical displacement takes the form z = L 2 1 /2R 1 + L 2 2 /2R 2 , which provides a zero displacement for a straight guide (R −→ ∞). All carried out MCSTAS simulations are based on Figure 1 basic sketch. Here, the studied system is composed of a straight primary guide with a fixed length (L P ). This guide is followed by a vertical curved guide connected to another curved guide in the opposite sense, forming themselves an S-shaped guide. Their lengths and curvatures are L 1 and L 2 and R 1 and R 2 as also shown in Figure 1. This S-shaped guide is plugged into a straight secondary guide with variable length (L S ), which is in sequence followed by a collimation system composed of a velocity selector and a collimator. The S-shaped guide can be symmetric (R 1 = R 2 and L 1 = L 2 ) or asymmetric Figure 1. Side-view sketch of S-shaped guide. The system is sequentially composed of a primary guide with length L P , two curved guides with length and curvature of L 1 , L 2 and R 1 ,R 2 , respectively, a secondary guide with length L S , a velocity selector and a collimator with length L C . The S-shaped guide system provides a vertical displacement of z.
. Additionally, gravity is not considered in our simulations and it is physically expected that the results are invariant by the exchange R 1 and L 1 by R 2 and L 2 , respectively, since they provide in the same value of z.
This work presents five different types of simulation (1)(2)(3)(4)(5), each one of them with distinct cases. To study the geometric dependence of the system, we have chose different cases of simulation with The last set of simulations (Simulation 5) consisted of investigating how a straight guide after the S-shaped guide contributes to a homogeneous vertical distribution intensity at instrument entrance. This case have been carried out by fixing the instrument configuration of R 1 = R 2 = 250 m, L 1 = L 2 = 16 m and L C = 1 m for a variable secondary guide length with three different values, namely L S = 1, 2 and 20 m .
The MCSTAS components Source_gen(), Guide(), Guide_curved(), V_selector() and slit() form, in sequence, the main structure of simulations. Reference systems (Arm()) and monitors (Monitor_nD()) are allocated all over the code to respectively relate components and verify flux behavior along with guides. The first component (Source_gen()) has been modeled to emulate the FRM-II cold source utilizing Maxwellian parameters intensity (I 1 , I 2 and I 3 ) and temperature (T 1 , T 2 and T 3 ) [16]. Straight guides are described with Guide() and the S-shaped guide is constructed with two Guide_curved() components. The most important flux measurements are performed with a detector before the first guide (S-shaped guide entrance), in the connection of both curved guides (in the middle of S-shaped guide), between the last guide and velocity selector (S-shaped guide exit) and after the collimator, which is constructed with two slits and one guide in simulations. Parameters and specifications of MCSTAS components are described in Table 1.

Results and discussions
The parameters used in our simulations (see Table 1) provide values of z found between 0.25 m and 39 m. Figure 2, which corresponds to Simulation 1 results, shows a decrease of λ c , according to the increase of curvature of the guides, as well as the increase of the peak of the flux, i.e., more neutrons are absorbed (transmitted) as R decreases (increase). The dependence of wavelength cutoff is shown in Figure 3. From data, we have been able to fit a curve with square correlation factor of 0.9991. In addition, this curve is given by λ c (R) = 102 × R −0.6060 , where λ c −→ 0 to R −→ ∞, i.e., straight guides allow the passage of neutrons from all accessible energies.
The convergence of all curves in Figure 2 in λ = 14 Å shows an expected physical result since the slower neutron conduction has a very efficient transport, not being directly affected by the S-shaped guide. Figure 3 shows the behavior of cutoff wavelength (triangles) as a function of R. The red curve is a fit of the simulation results, while the blue curve represents the results extracted from analytical study of Mildner [7] through AD. We can observe a good agreement between the two studies for smaller R values, while both curves diverge as much as R increases. The percentage deviation between the two approaches can be found in Table 2, which shows a maximum divergence of 24.11%. The criteria to define the cutoff wavelength is based on picking a λ c value with correspondent neutron flux less than 0.1 a.u.. We verified that our results could show better convergence to the results of the analytical study if taken in neutron fluxes of the order of 10 3 a.u., i.e., much larger than our criteria.
By considering the criteria to state a wavelength cutoff, we have verified the difference between intensities at theoretical cutoff values and the peak intensity of distribution in simulation results. In other words, we have checked how large is the intensity of theoretical wavelength cutoff next to the highest intensity value in profile (peak). Results show that a difference between 0.1% for R = 1000 m and 0.002% for R = 75 m. In these terms, we could consider a good agreement between simulation and the Mildner results. This kind of result is already expected since associated  errors in MCSTAS simulations with ray count 10 7 could roughly vary between 0.1% and 10% depending on the wavelength detector bin. The dependence of the neutron flux with the length of the guides is found in Figure 4 (Simulation 2). A weak dependence of the wavelength cutoff with the length of the guides (λ c = 3-4 Å) is observed for R 1 = R 2 = 250 m ( Figure 5). We have also been able, with additional simulations with guides length longer than 32 m, to fit the data by an adjusted equation λ c (L) = ln(L 0.51 ) + 2.15, where we find a small cutoff wavelength variation between 3.1 Å and 4.4 Å (square correlation factor of 0.9162). AD method reveals a dependence between the cutoff wavelength and the radius of curvature, but shows independence of the guide length. Therefore, there is no comparative analysis between our results and the paper of Mildner [7]. According to AD theory, it is given that the only relation between wavelength cutoff and S-shaped guide length is the necessity to avoid direct sight from the neutron source and instrument entrance once this is the main purpose of any curved guide. Taking this into account, we can state that values of characteristic guide length (L * ) are minimal limits to guarantee wavelength cutoff. In other words, simulated cases of Table 2 could have L 1 = L 2 = L * instead of L 1 = L 2 = 16 m, which in some cases could shorten guides and increase flux at their exits1. The results for asymmetric S-shaped guides have curves with same behavior shown in 1Values of L * are avoiding the direct sight for each curved guide of an S-shaped guide individually (i.e., L 1 > L * and L 2 > L * ). In this sense, we probably verify the cutoff process for L * > 16 m because the direct sight of the whole  Figures 2 and 4, locating in the adopted intervals 75 m < R < 1000 m and 8 m < L < 32 m. Figure 6, correspondent to Simulation 3 results, shows the flux along with the vertical position at the sample place for different values of collimator length (L C ), namely 1, 2 and 20 m for a guide of R 1 = R 2 = 250 m and L 1 = L 2 = 16 m, which is the standard case. From these results, we observe that there is no significant variation in detected flux for longer values of collimation length than 2 m. Such results are possibly explained by the fact that the velocity selector has already filtered well-collimated neutrons, for cases where L C > 2 m, that pass through both collimator slits without reflecting in its internal coat.
According to literature and the study of AD, there is a natural inhomogeneous distribution of neutrons in the guide section depending on its curvature. This process, which depends on neutron wavelength, also generates in inhomogeneous patterns of neutron distribution in S-shaped guides since it is built by two curved guides. By checking Figures 7 -9, we observe the neutron distribution behavior in three different points of a standard S-shaped guide case utilizing MCSTAS position S-shaped guide is guaranteed. However, additional simulations have to be performed to better understand the relation between the cutoff and guide length.  Figure 4 with two extra points obtained from additional simulations for L = 50 and 100 m. The red line curve represents the fit of these data. detectors (Simulation 4). These three detectors have been allocated at the entrance (Figure 7), in the middle (Figure 8) and at the end of the S-shaped guide (Figure 9).
At the entrance of the S-shaped guide, we observe a homogeneous distribution of neutron all over the detector (Figure 7). After being transmitted along with the first curved guide, neutrons distribution displace a larger quantity of neutron to the outer side of the guide (which is at the bottom of the Figure 8) according to the Garland reflection regime. On the other hand, the last detector, which is at the end of the S-shaped guide, shows an inhomogeneous distribution, but symmetrically better-distributed concerning the detector center. Besides, we observe that angular divergence naturally follows the same inhomogeneous behavior, which implies that a homogeneous neutron distribution is desired at the instrument entrance. Simulations have shown us that most of the transmitted neutrons are confined into a divergence "area" of ∆θ h = 2 • per ∆θ v = 2 • , where subscribed letters "h" and "v" stand for horizontal and vertical angular divergence, respectively. However, the curvature of the S-shaped guide imposes asymmetries in distribution inside this "area", which has to be turned to homogeneous patterns before entering into the instrument.
To circumvent both divergence and neutron distribution problems, some authors analyzed different methods to smooth neutron distributions after a simple curved guide for instance. In publications [12,13], the authors used another curved guide and obtain, consequently an S-shaped guide.     However, it is common to proceed by utilizing a straight guide segment to turn neutron distribution homogeneous even for curved or S-shaped guides. In this sense, by considering that neutron flux of the S-shaped guide configuration does not result in a homogeneous vertical distribution of neutrons intensity, we have tested three different secondary guides length to investigate distribution behavior. Our simulations on this matter consist of verifying the vertical distribution intensity relation at the end of the S-shaped guide for three different length values of the secondary guide (Simulation 5).
Simulations have been carried out with L S of 1, 2 and 20 m and also for the S-shaped guide standard case (i.e., R 1 = R 2 = 250 m and L 1 = L 2 = 16 m).
Simulation results are presented in Figure 10, where black squares, red circles and blue triangles stand for flux values for L S = 1, 2 and 20 m , respectively. From such results, we observe that it is necessary larger values than L S = 2 m for imposing a homogeneous distribution after an S-shaped guide system. We also observe in Figure 10 that there is no significant loss of flux for distributions with L S = 1 and 2 m, and for L S = 20 m (i.e., with same order of magnitude). In this sense, a long collimation system (if there is available space at the facility) could be applied without a high cost of intensity.
It is worth to note that each configuration of the S-shaped guide posses its own values of collimation to guarantee a low divergence and homogeneous flux distribution. In this scenario, individual simulations are then necessary to find the proper secondary guide length. By comparing Figures 6 and 10, it is possible to check that a velocity selector plays an important role in divergence and distribution homogeneity since all distribution in Figure 6 have the same "regular" shape, differently than Figure 10.

Conclusions
The use of an S-shaped guide is an available possibility in instrument adaptation and installation at reactor facilities. In this study, we explore other aspects of S-shaped guides related to their geometry and the transmitted neutron flux. Even under rigid criteria of wavelength cutoff determination in simulation, we observe that there is a good agreement between simulation results and analytical values obtained via AD. We are also able to verify a weak relation between S-shaped guides length and wavelength cutoff, differently from its dependence on guides curvature, which is proportional to R −0.5 and R −0.6060 for the analytical and simulation approach, respectively.
Results for different collimation lengths (i.e., for different L C and L S ) are also considered. Simulations indicate a small dependence between collimator length and intensity (and angular divergence) for collimators longer than 2 m. By comparing these results with simulations with different secondary guide lengths, we check that the velocity selector plays an important influence in divergence and neutron position distribution results. This happens since only the case of L S = 20 m demonstrates a homogeneous angular divergence and position distribution in opposition to collimator simulations, where all three results attend these properties. These results accordance with literature and reassure the need of utilizing straight guide after curved ones to improve system outcoming flux.
Our results show that the geometrical aspect of the S-shaped guide is a more important achievement than the wavelength cutoff process itself. For modeling the instrument incoming neutron flux profile, other optical components, like filters and benders, would be desirable. In this scenario, there is current and initial speculation of the installation of a SANS instrument at Brazilian reactor IEA-R1. Nevertheless, a lack of space at the reactor neutron hall opened a possibility of displacing instrument installation from ground stage through an S-shaped guide. The vertical displacement (z) between 3 m and 4 m could provide a neutron flux at the upper floor of the neutron instrument hall, however a detailed study of flux wavelength cutoff and profile next to S-shaped guide geometry is planned for future works.