## 2 Simulation Setup  
The modeling of the detection system in this study was performed through version X of Monte Carlo N-Particle Code (MCNPX) [17]. The schematic view of the mentioned detection system is shown in Figure 2. As is apparent, the two-phase flow and the scale formed inside the steel pipe are in the middle, and the dual-energy source and two NaI detectors at a 45-degree angle to each other are on the other side. In this schematic, the stratified flow is considered as an example.  
In the source part, a dual-energy gamma source, including radioisotopes of Cesium-137 and Barium-133 was used, which radiate 0.662 MeV and 0.356 MeV, respectively. In the proposed structure, scattered and transmitted photons are received by two 25.4 mm \(\times\) 25.4 mm NaI detectors. The detector, which is responsible for recording transmitted photons, was located on the other side of the pipe just opposite the photon transmitter source. The  
Figure 1: An example of a scale formed in a pipeline.  
Figure 2: Simulated detection system: 1—shield, 2—dual energy source, 3—steel pipe, 4—scale layer, 5—liquid phase, 6—gas phase, 7—transmission detector, 8—scattering detector.  
other detector, which is responsible for receiving the scattered photons, was located at a 45-degree angle with the hypothetical line connecting the center of the pipe to the transmission detector. The pipe was considered in this simulation is made of steel with an inner diameter of 20 cm. The scale on the inner wall of the pipe was intended as a circular symmetrical layer of BaSO\({}_{4}\) with different thicknesses. Three types of flow regimes with annular, stratified, and homogeneous names were simulated in volume percentages between 10% to 85% with steps of 15% and in seven different scale thicknesses. In our previous work [18], the structure discussed in this article had been validated by several experiments. The obtained detector responses were compared in experimental and simulation. The results showed a good agreement between the simulated results and the experimental data. The uttermost relative difference between the experimental data and simulated data for the detector response was 2.2%. The actual working conditions were dynamic; however, the reference points for flowmeter training were fixed and can be considered static, so experiments and simulations were performed in static conditions. These fixed points were used for flowmeter training to determine the volume fraction and to detect flow regimes in multiphase flowmeters in real conditions. Swift gamma-ray neutron active analysis was considered for quantitative analysis for swift, non-intrusive and online measurements of multiphasic seawater/gas/oil flows in [19]. In this research, all simulations have been considered in static conditions but have been used in real conditions. In [20], conceivable use of transmitted and scattered gamma radiation detection for the characterization of produced water from offshore oil wells has been evaluated. The simulated flow regimes are illustrated in Figure 3. Figure 4 depicts the spectra recorded for three flow regimes with a scale thickness of 2 cm and a void fraction of 55% in both detectors.