**5.2 2D MOC**

The KYLIN2 program carries out the 2D neutron transport calculation by MOC over the assembly region. In the condition of steady situation, multigroup neutron


**Table 4.** *Abstract components in CORTH.*

**Figure 2.** *Time statistics of model ACP1000 for CORTH.*

transport equation could be expressed by the ODE along the characteristic ray. We can obtain the direct analytical solution of the ODE as in Eq. (7):

$$\boldsymbol{\Psi}\_{out,m,i,k} = \boldsymbol{\Psi}\_{in,m,i,k} \mathbf{e}^{-\sum\_{i} \mathbf{S}\_{m,i}} + \frac{\mathbf{Q}\_i}{\sum\_{i}} \left(\mathbf{1} - \mathbf{e}^{-\sum\_{i} \mathbf{S}\_{m,i}}\right) \tag{7}$$

where P *<sup>i</sup>* and *Qi* denote the macro-transport cross section and the neutron source, respectively. The length *Sm*,*i*,*<sup>k</sup>* is the segment that is truncated with the position m-th azimuth angle, k-th characteristic ray, and the i-th mesh. When source iterative method is used, the iterative procedure will repeat the above calculation process after assigning initial guess values to the flux. As shown in **Table 5**, sample program KYLIN2 could be abstracted into different parts.

Sweep computation follows the loop structure, with each characteristic ray, neutron groups, azimuth angles, and polar angles. Moreover, the intermediate solution of KYLIN2 is related to the angular direction so that the structure can be described as follows.



#### **Table 5.** *Abstract components in KYLIN2.*

The above components are redeveloped in NAC4R, and the features of the algorithm are listed here:


Here OpenMP guide sentences are utilized to implement parallelism based on loop structure. The critical operation exists in the cumulative sum of forward and backward sweep when each ray is accessed. C5G7-MOX assembly and ACP1000- UO2 assembly examples are used to test, and more than five times better performance are expected. The statistical calculation time is shown in **Table 6**.

Performance conclusion: OpenMP parallelism (multi-threads) can achieve the rational accelerated effect and meet the expectation. There are more speedup ratios for the ACP1000-UO2 as the neutron group parallelism strategy is used, and some fluctuation exists in the performance gain of shared memory parallelism since there are some management overheads by multi-threads.
