CN111008070B - A fast neutron reactor core channel parallel task division method and system - Google Patents
A fast neutron reactor core channel parallel task division method and system Download PDFInfo
- Publication number
- CN111008070B CN111008070B CN201911262033.2A CN201911262033A CN111008070B CN 111008070 B CN111008070 B CN 111008070B CN 201911262033 A CN201911262033 A CN 201911262033A CN 111008070 B CN111008070 B CN 111008070B
- Authority
- CN
- China
- Prior art keywords
- sub
- channels
- channel
- subchannel
- component
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 230000008569 process Effects 0.000 claims description 7
- 238000003860 storage Methods 0.000 claims description 6
- 238000004422 calculation algorithm Methods 0.000 abstract description 9
- 239000012530 fluid Substances 0.000 abstract description 7
- 238000004088 simulation Methods 0.000 abstract description 6
- 230000000712 assembly Effects 0.000 abstract 1
- 238000000429 assembly Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 10
- 238000004590 computer program Methods 0.000 description 7
- 238000009826 distribution Methods 0.000 description 5
- 238000012545 processing Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000005192 partition Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02E—REDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
- Y02E30/00—Energy generation of nuclear origin
- Y02E30/30—Nuclear fission reactors
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Monitoring And Testing Of Nuclear Reactors (AREA)
Abstract
Description
技术领域technical field
本发明涉及高性能计算技术领域,特别是指一种快中子反应堆全堆芯子通道并行任务划分方法及系统。The invention relates to the technical field of high-performance computing, in particular to a fast neutron reactor full-core channel parallel task division method and system.
背景技术Background technique
基于核反应堆的全堆芯子通道开展全堆芯精确到每个子通道的流体模拟需要很大的计算能力支持,随着高性能计算技术和超级计算机的发展,目前得以利用高性能计算技术来实现核反应堆全堆芯的热工流体精确到每一个子通道的模拟计算。Based on the nuclear reactor's full core sub-channels, it is necessary to carry out the fluid simulation of the whole core core accurate to each sub-channel. With the development of high-performance computing technology and supercomputers, it is now possible to use high-performance computing technology to realize nuclear reactors. The thermal fluid of the whole core is accurate to the simulation calculation of each sub-channel.
使用传统的串行程序进行快堆的全堆芯子通道模拟,时间消耗是十分巨大的,解决该问题的一个有效的途径是使用并行技术在较短时间内进行快堆全堆芯的子通道模拟,而使用并行技术进行快堆全堆芯的热工流体模拟的一个重要步骤是进行并行任务划分,一般是按照空间相邻的原则将全堆芯的子通道划分为不同的求解域,将不同的求解域的计算任务划分到不同的计算单元上。但目前的任务划分方法并不适用于快中子反应堆全堆芯子通道并行任务划分。Using traditional serial programs to simulate the sub-channels of the whole core of the fast reactor consumes a lot of time. An effective way to solve this problem is to use parallel technology to perform the sub-channels of the whole core of the fast reactor in a short time An important step in the thermal fluid simulation of the whole core of a fast reactor using parallel technology is to divide parallel tasks. Generally, the sub-channels of the whole core are divided into different solution domains according to the principle of spatial adjacency. The calculation tasks of different solution domains are divided into different calculation units. However, the current task division method is not suitable for the parallel task division of the whole core subchannels of fast neutron reactors.
发明内容Contents of the invention
本发明要解决的技术问题是提供一种快中子反应堆全堆芯子通道并行任务划分方法及系统,以解决目前的任务划分方法并不适用于快中子反应堆全堆芯子通道并行任务划分的问题。The technical problem to be solved by the present invention is to provide a method and system for parallel task division of the whole core channel of a fast neutron reactor, so as to solve the problem that the current task division method is not suitable for the parallel task division of the whole core channel of a fast neutron reactor The problem.
为解决上述技术问题,本发明提供如下技术方案:In order to solve the above technical problems, the present invention provides the following technical solutions:
一种快中子反应堆全堆芯子通道并行任务划分方法,所述快中子反应堆全堆芯子通道并行任务划分方法包括:A method for dividing parallel tasks of the whole core sub-channels of a fast neutron reactor, the method for dividing parallel tasks of the whole core sub-channels of the fast neutron reactor includes:
将待划分的快中子反应堆全堆芯子通道按照预设数据结构进行存储;Store the fast neutron reactor full core sub-channels to be divided according to the preset data structure;
基于所述预设数据结构,对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中,完成当前组件的并行任务划分;Based on the preset data structure, traverse all sub-channels in the current component, divide the sub-channels in the current component into a preset number of solution domains, and complete the parallel task division of the current component;
将所述当前组件的并行任务划分结果应用于快中子反应堆全堆芯中所有组件,以完成快中子反应堆全堆芯子通道并行任务划分。The parallel task division result of the current component is applied to all components in the whole core of the fast neutron reactor, so as to complete the parallel task division of the subchannels of the whole core of the fast neutron reactor.
其中,所述预设数据结构的成员变量包括:当前子通道在组件内的编号、当前子通道在组件内所在的层数、当前子通道的元结构类型、当前子通道被划分到的求解域的编号,以及当前子通道的相邻子通道在组件内的编号。Wherein, the member variables of the preset data structure include: the number of the current subchannel in the component, the layer number of the current subchannel in the component, the metastructure type of the current subchannel, and the solution domain into which the current subchannel is divided , and the numbers of the current subpass' adjacent subpasses within the component.
其中,所述元结构类型包括上型子通道、下型子通道、角通道和边通道;Wherein, the meta-structure types include upper-type sub-channels, lower-type sub-channels, corner channels and side channels;
所述上型子通道包括三个相邻子通道,分别位于其上方、左下角以及右下角;所述下型子通道包括三个相邻子通道,分别位于其左上角、右上角以及下方;所述角通道包括两个相邻子通道;所述边通道包括三个相邻子通道。The upper-type sub-channel includes three adjacent sub-channels, which are respectively located at the top, lower left corner and lower right corner thereof; the lower-type sub-channel includes three adjacent sub-channels, which are respectively located at the upper left corner, upper right corner and lower right corner thereof; The corner channel includes two adjacent subchannels; the side channel includes three adjacent subchannels.
其中,设每一求解域中的子通道数量的上限值为n,正在遍历的当前子通道在组件内的编号为i,记为子通道i;子通道i被划分到求解域Dj中;Among them, the upper limit of the number of sub-channels in each solution domain is set to n, and the number of the current sub-channel being traversed in the component is i, denoted as sub-channel i; sub-channel i is divided into the solution domain D j ;
则所述对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中,具体为:Then traverse all the sub-channels in the current component, and divide the sub-channels in the current component into a preset number of solution domains, specifically:
按照预设顺序依次遍历子通道i的各相邻子通道,若求解域Dj中子通道的个数小于n,则将当前遍历的子通道划分到求解域Dj中;若求解域Dj中子通道的个数等于n,则将当前遍历的子通道划分到下一求解域中;Traverse the adjacent sub-channels of sub-channel i in turn according to the preset order. If the number of sub-channels in the solution domain D j is less than n, divide the currently traversed sub-channels into the solution domain D j ; if the solution domain D j If the number of neutron channels is equal to n, divide the currently traversed sub-channels into the next solution domain;
若将子通道i的相邻子通道全部划分到求解域Dj中后,求解域Dj中的子通道的个数仍小于n,则按照所述预设顺序继续遍历子通道i第一个被遍历的相邻子通道对应的各相邻子通道,并将当前遍历的子通道划分到求解域Dj中,依此类推,直到求解域Dj中的子通道个数等于n,遍历完一个组件中所有的子通道后则完成了对一个组件的并行任务的划分。If the number of sub-channels in the solution domain D j is still less than n after all the adjacent sub-channels of sub-channel i are divided into the solution domain D j , continue to traverse the first sub-channel i according to the preset order Each adjacent sub-channel corresponding to the adjacent sub-channel being traversed, and divide the currently traversed sub-channel into the solution domain D j , and so on, until the number of sub-channels in the solution domain D j is equal to n, and the traversal is completed After all sub-channels in a component complete the division of parallel tasks of a component.
其中,设每一求解域中的子通道数量的上限值为n,正在遍历的当前子通道在组件内的编号为i,记为子通道i;子通道i被划分到求解域Dj中;Among them, the upper limit of the number of sub-channels in each solution domain is set to n, and the number of the current sub-channel being traversed in the component is i, denoted as sub-channel i; sub-channel i is divided into the solution domain D j ;
则所述对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中,具体为:Then traverse all the sub-channels in the current component, and divide the sub-channels in the current component into a preset number of solution domains, specifically:
遍历与子通道i同层的下一个子通道,即子通道i+1,若子通道i+n-1与子通道i在同一层,则将子通道i至子通道i+n-1划分到求解域Dj中;Traversing the next subchannel on the same layer as subchannel i, that is, subchannel i+1, if subchannel i+n-1 is on the same layer as subchannel i, divide subchannel i to subchannel i+n-1 into In the solution domain D j ;
若子通道i+n-1与子通道i不在同一层,假设遍历到子通道i+m时,子通道i所在层的子通道全部遍历完,其中m<n-1;则寻找子通道i+m相邻的下一层子通道继续以顺时针方向进行遍历,直至求解域Dj中子通道个数为n时停止,遍历完一个组件中所有子通道后则完成了对一个组件的并行任务的划分。If the subchannel i+n-1 is not in the same layer as the subchannel i, assuming that when the subchannel i+m is traversed, all the subchannels of the layer where the subchannel i is located have been traversed, where m<n-1; then find the subchannel i+ The sub-channels of the next layer adjacent to m continue to traverse in a clockwise direction until the number of sub-channels in the solution domain Dj is n. After traversing all the sub-channels in a component, the parallel task of a component is completed. division.
相应地,为解决上述技术问题,本发明还提供如下技术方案:Correspondingly, in order to solve the above technical problems, the present invention also provides the following technical solutions:
一种快中子反应堆全堆芯子通道并行任务划分系统,所述快中子反应堆全堆芯子通道并行任务划分系统包括:A fast neutron reactor full-core sub-channel parallel task division system, said fast neutron reactor full-core sub-channel parallel task division system includes:
子通道存储模块,用于将待划分的快中子反应堆全堆芯子通道按照预设数据结构进行存储;The sub-channel storage module is used to store the sub-channels of the whole core of the fast neutron reactor to be divided according to the preset data structure;
任务划分模块,用于基于所述预设数据结构,对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中,完成当前组件的并行任务划分;将所述当前组件的并行任务划分结果应用于快中子反应堆全堆芯中所有组件,以完成快中子反应堆全堆芯子通道并行任务划分。A task division module, configured to traverse all sub-channels in the current component based on the preset data structure, divide the sub-channels in the current component into a preset number of solution domains, and complete the parallel task division of the current component; The parallel task division result of the current component is applied to all components in the whole core of the fast neutron reactor, so as to complete the parallel task division of the subchannels of the whole core of the fast neutron reactor.
其中,所述子通道存储模块所采用的预设数据结构的成员变量包括:当前子通道在组件内的编号、当前子通道在组件内所在的层数、当前子通道的元结构类型、当前子通道被划分到的求解域的编号,以及当前子通道的相邻子通道在组件内的编号。Wherein, the member variables of the preset data structure adopted by the sub-channel storage module include: the serial number of the current sub-channel in the component, the layer number of the current sub-channel in the component, the metastructure type of the current sub-channel, the current sub-channel The number of the solution domain into which the channel is divided, and the number of the adjacent subchannels of the current subchannel within the component.
其中,所述元结构类型包括上型子通道、下型子通道、角通道和边通道;Wherein, the meta-structure types include upper-type sub-channels, lower-type sub-channels, corner channels and side channels;
所述上型子通道包括三个相邻子通道,分别位于其上方、左下角以及右下角;所述下型子通道包括三个相邻子通道,分别位于其左上角、右上角以及下方;所述角通道包括两个相邻子通道;所述边通道包括三个相邻子通道。The upper-type sub-channel includes three adjacent sub-channels, which are respectively located at the top, lower left corner and lower right corner thereof; the lower-type sub-channel includes three adjacent sub-channels, which are respectively located at the upper left corner, upper right corner and lower right corner thereof; The corner channel includes two adjacent subchannels; the side channel includes three adjacent subchannels.
其中,设每一求解域中的子通道数量的上限值为n,正在遍历的当前子通道在组件内的编号为i,记为子通道i;子通道i被划分到求解域Dj中;Among them, the upper limit of the number of sub-channels in each solution domain is set to n, and the number of the current sub-channel being traversed in the component is i, denoted as sub-channel i; sub-channel i is divided into the solution domain D j ;
则所述任务划分模块对当前组件进行并行任务划分的过程,具体为:The process of the task division module performing parallel task division on the current component is specifically:
按照预设顺序依次遍历子通道i的各相邻子通道,若求解域Dj中子通道的个数小于n,则将当前遍历的子通道划分到求解域Dj中;若求解域Dj中子通道的个数等于n,则将当前遍历的子通道划分到下一求解域中;Traverse the adjacent sub-channels of sub-channel i in turn according to the preset order. If the number of sub-channels in the solution domain D j is less than n, divide the currently traversed sub-channels into the solution domain D j ; if the solution domain D j If the number of neutron channels is equal to n, divide the currently traversed sub-channels into the next solution domain;
若将子通道i的相邻子通道全部划分到求解域Dj中后,求解域Dj中的子通道的个数仍小于n,则按照所述预设顺序继续遍历子通道i第一个被遍历的相邻子通道对应的各相邻子通道,并将当前遍历的子通道划分到求解域Dj中,依此类推,直到求解域Dj中的子通道个数等于n,遍历完一个组件中所有的子通道后则完成了对一个组件的并行任务的划分。If the number of sub-channels in the solution domain D j is still less than n after all the adjacent sub-channels of sub-channel i are divided into the solution domain D j , continue to traverse the first sub-channel i according to the preset order Each adjacent sub-channel corresponding to the adjacent sub-channel being traversed, and divide the currently traversed sub-channel into the solution domain D j , and so on, until the number of sub-channels in the solution domain D j is equal to n, and the traversal is completed After all sub-channels in a component complete the division of parallel tasks of a component.
其中,设每一求解域中的子通道数量的上限值为n,正在遍历的当前子通道在组件内的编号为i,记为子通道i;子通道i被划分到求解域Dj中;Among them, the upper limit of the number of sub-channels in each solution domain is set to n, and the number of the current sub-channel being traversed in the component is i, denoted as sub-channel i; sub-channel i is divided into the solution domain D j ;
则所述任务划分模块对当前组件进行并行任务划分的过程,具体为:The process of the task division module performing parallel task division on the current component is specifically:
遍历与子通道i同层的下一个子通道,即子通道i+1,若子通道i+n-1与子通道i在同一层,则将子通道i至子通道i+n-1划分到求解域Dj中;Traversing the next subchannel on the same layer as subchannel i, that is, subchannel i+1, if subchannel i+n-1 is on the same layer as subchannel i, divide subchannel i to subchannel i+n-1 into In the solution domain D j ;
若子通道i+n-1与子通道i不在同一层,假设遍历到子通道i+m时,子通道i所在层的子通道全部遍历完,其中m<n-1;则寻找子通道i+m相邻的下一层子通道继续以顺时针方向进行遍历,直至求解域Dj中子通道个数为n时停止,遍历完一个组件中所有子通道后则完成了对一个组件的并行任务的划分。If the subchannel i+n-1 is not in the same layer as the subchannel i, assuming that when the subchannel i+m is traversed, all the subchannels of the layer where the subchannel i is located have been traversed, where m<n-1; then find the subchannel i+ The sub-channels of the next layer adjacent to m continue to traverse in a clockwise direction until the number of sub-channels in the solution domain Dj is n. After traversing all the sub-channels in a component, the parallel task of a component is completed. division.
本发明的上述技术方案的有益效果如下:The beneficial effects of above-mentioned technical scheme of the present invention are as follows:
本发明的快中子反应堆全堆芯子通道并行任务划分方法适用于快堆的堆芯结构,可以解决快堆堆芯子通道分布并非传统的矩阵结构,通过传统的数组划分方法难以实现并行任务划分的问题,本发明基于特定的数据结构和划分算法实现了快堆全堆芯的并行任务的划分,使得热工流体子通道模拟软件能够大规模并行求解快堆问题,对于提升快堆全堆芯子通道模拟效率有着重要意义。The fast neutron reactor core channel parallel task division method of the present invention is suitable for the core structure of the fast reactor, and can solve the problem that the distribution of the fast reactor core sub-channels is not a traditional matrix structure, and it is difficult to realize parallel tasks through the traditional array division method For the problem of division, the present invention realizes the division of parallel tasks of the full core of the fast reactor based on a specific data structure and a division algorithm, so that the thermal fluid subchannel simulation software can solve the fast reactor problem in parallel on a large scale. The core channel simulation efficiency is of great significance.
附图说明Description of drawings
图1为本发明的快中子反应堆全堆芯子通道并行任务划分方法流程图;Fig. 1 is the flow chart of the parallel task division method of the fast neutron reactor full core sub-channel of the present invention;
图2为快堆堆芯组件横截面示意图;Figure 2 is a schematic cross-sectional view of a fast reactor core assembly;
图3为快堆堆芯组件中子通道的元结构图;Fig. 3 is the element structure diagram of the neutron channel of the fast reactor core assembly;
图4为采用广度优先划分算法的划分结果示意图;Fig. 4 is a schematic diagram of the division results using the breadth-first division algorithm;
图5为采用层次划分算法的划分结果示意图。FIG. 5 is a schematic diagram of a division result using a hierarchical division algorithm.
具体实施方式Detailed ways
为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.
第一实施例first embodiment
请参阅图1至图5,本实施例提供一种快中子反应堆全堆芯子通道并行任务划分方法,该方法如图1所示,包括:Please refer to Fig. 1 to Fig. 5, the present embodiment provides a kind of fast neutron reactor whole reactor core channel parallel task division method, this method is shown in Fig. 1, comprises:
S101,将待划分的快中子反应堆全堆芯子通道按预设数据结构进行存储;S101, storing the fast neutron reactor core sub-channels to be divided according to a preset data structure;
其中,需要说明的是,不同于压水堆组件横切面是一个矩形,子通道的分布是矩阵式分布,可将其以二维数组进行存储,通过将二维数组进行划分很容易实现并行任务划分。快堆堆芯组件的横切面为正六边形,相应的子通道的形状为类正三角形,如图2所示,图中1-6号子通道为第一层子通道,7-24号子通道为第二层子通道,25-42号子通道为第三层子通道;可见子通道的分布并不能以二维数组来简单进行存储。Among them, it should be noted that, unlike the cross-section of the PWR component, which is a rectangle, the distribution of the sub-channels is a matrix distribution, which can be stored in a two-dimensional array, and parallel tasks can be easily realized by dividing the two-dimensional array divided. The cross-section of the fast reactor core assembly is a regular hexagon, and the corresponding sub-channels are in the shape of a regular triangle, as shown in Figure 2. In the figure, the sub-channels 1-6 are the first layer of sub-channels, and the sub-channels 7-24 Channels are sub-channels of the second layer, and sub-channels No. 25-42 are sub-channels of the third layer; it can be seen that the distribution of sub-channels cannot be simply stored in a two-dimensional array.
对此,本实施例利用快堆堆芯结构设计了用来存储子通道的数据结构,基于此可以完成面向大规模集群/超算的快堆全堆芯子通道并行任务划分。In this regard, this embodiment uses the fast reactor core structure to design a data structure for storing sub-channels. Based on this, the parallel task division of the full-core fast reactor core for large-scale clusters/supercomputing can be completed.
其中,上述预设数据结构的成员变量包括:当前子通道在组件内的编号index、当前子通道在组件内所在的层数layer、当前子通道的元结构类型type、当前子通道被划分到的求解域的编号domain,以及当前子通道的相邻子通道在组件内的编号surd_chan[0-3]。Among them, the member variables of the above-mentioned preset data structure include: the number index of the current sub-channel in the component, the layer number layer of the current sub-channel in the component, the meta-structure type type of the current sub-channel, and the current sub-channel is divided into The number domain of the solution domain, and the number surd_chan[0-3] of the adjacent subchannels of the current subchannel in the component.
其中,根据子通道在组件中不同的位置可将其分为“上”型子通道、“下”型子通道、角通道、边通道四种结构的子通道,如图3所示。由于跨组件的子通道之间不存在流体的交换,所以在划分时不考虑将跨组件的子通道划分到同一个求解域中,则在同一个组件中每个子通道最多与三个子通道相邻,用0,1,2对四种元结构中相邻子通道的位置进行编号。Among them, according to the different positions of the sub-channels in the component, it can be divided into sub-channels with four structures: "upper" type sub-channel, "downer" type sub-channel, corner channel, and side channel, as shown in Figure 3. Since there is no fluid exchange between sub-channels across components, the sub-channels across components are not considered to be divided into the same solution domain when dividing, and each sub-channel is adjacent to at most three sub-channels in the same component ,
具体地,“上”型中心通道如图3中(a)所示,包括三个相邻子通道,分别位于其左下角(0号位置)、右下角(1号位置)以及上方(2号位置);下型子通道如图3中(b)所示,包括三个相邻子通道,分别位于其左上角(0号位置)、右上角(1号位置)以及下方(2号位置);角通道如图3中(c)所示,包括两个相邻子通道,(c)图中2号和3号位置来自相邻组件;边通道如图3中(d)所示,包括三个相邻子通道,(d)图中3号位置来自相邻组件。Specifically, the "upper" type center channel is shown in (a) of Figure 3, including three adjacent sub-channels, which are located in the lower left corner (position 0), the lower right corner (position 1) and the upper (position 2) respectively. position); as shown in Figure 3 (b), the down-type sub-channel includes three adjacent sub-channels, which are respectively located in the upper left corner (position 0), the upper right corner (position 1) and the bottom (position 2) ; As shown in (c) in Fig. 3, the corner passage includes two adjacent sub-passages, and No. 2 and No. 3 positions in the figure (c) come from adjacent components; As shown in (d) in Fig. 3, the side passage includes Three adjacent sub-channels, position No. 3 in (d) comes from adjacent components.
基于上述,type可以为-1,0,1,2和3,分别表示初始化值,“上”型中心通道,“下”型中心通道,边通道和角通道;domain的初始化值为-1,surd_chan[0-3]记录当前子通道的周围子通道的组件内编号,其下标0-3分别对应子通道元结构图中0-3号子通道位置,若surd_chan[xxx]值为0,说明此位置无子通道或尚未找到对应子通道。若surd_chan[xxx]值小于0,说明此位置的子通道位于其他组件,其绝对值表示该子通道在对应组件内的全局编号。Based on the above, type can be -1, 0, 1, 2 and 3, which respectively represent the initialization value, "up" type center channel, "down" type center channel, side channel and corner channel; the initialization value of domain is -1, surd_chan[0-3] records the internal numbers of the surrounding sub-channels of the current sub-channel, and its subscripts 0-3 correspond to the positions of sub-channels 0-3 in the sub-channel element structure diagram. If the value of surd_chan[xxx] is 0, It means that there is no sub-channel at this position or the corresponding sub-channel has not been found yet. If the value of surd_chan[xxx] is less than 0, it means that the sub-channel at this position is located in another component, and its absolute value indicates the global number of the sub-channel in the corresponding component.
S102,基于预设数据结构,对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中,完成当前组件的并行任务划分;S102. Based on the preset data structure, traverse all sub-channels in the current component, divide the sub-channels in the current component into a preset number of solution domains, and complete the parallel task division of the current component;
其中,需要说明的是,本实施例的方法对全堆芯进行划分时,以组件为单位进行划分,若全堆芯共有N个组件,每个组件最终划分为n个求解域,则最终全堆芯子通道被划分为N*n个求解域。Wherein, it should be noted that when the method of this embodiment divides the whole core, the division is performed in units of components. If there are N components in the whole core, and each component is finally divided into n solution domains, the final total The core sub-channel is divided into N*n solution domains.
此处并行任务划分提供两种方式,一种是广度优先遍历优先考虑当前子通道的三个方位上相邻的子通道;另一种方式是按子通道所在层进行遍历。Two methods are provided for the parallel task division here. One is that the breadth-first traversal gives priority to the adjacent sub-channels in the three orientations of the current sub-channel; the other way is to traverse according to the layer where the sub-channel is located.
两种方式说明如下:The two methods are explained as follows:
广度优先划分算法:Breadth-first partitioning algorithm:
设每一求解域中的子通道数量的上限值为n,正在遍历的当前子通道在组件内的编号为i,记为子通道i;子通道i被划分到求解域Dj中;Assuming that the upper limit of the number of sub-channels in each solution domain is n, the number of the current sub-channel being traversed in the component is i, denoted as sub-channel i; sub-channel i is divided into the solution domain D j ;
则对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中的方式,具体为:Then traverse all sub-channels in the current component, and divide the sub-channels in the current component into a preset number of solution domains, specifically:
按照预设顺序依次遍历子通道i的各相邻子通道,若求解域Dj中子通道的个数小于n,则将当前遍历的子通道划分到求解域Dj中;若求解域Dj中子通道的个数等于n,则将当前遍历的子通道划分到下一求解域中;Traverse the adjacent sub-channels of sub-channel i in turn according to the preset order. If the number of sub-channels in the solution domain D j is less than n, divide the currently traversed sub-channels into the solution domain D j ; if the solution domain D j If the number of neutron channels is equal to n, divide the currently traversed sub-channels into the next solution domain;
若将子通道i的相邻子通道全部划分到求解域Dj中后,求解域Dj中的子通道的个数仍小于n,则按照所述预设顺序继续遍历子通道i第一个被遍历的相邻子通道对应的各相邻子通道,并将当前遍历的子通道划分到求解域Dj中,依此类推,直到求解域Dj中的子通道个数等于n,遍历完一个组件中所有的子通道后则完成了对一个组件的并行任务的划分。If the number of sub-channels in the solution domain D j is still less than n after all the adjacent sub-channels of sub-channel i are divided into the solution domain D j , continue to traverse the first sub-channel i according to the preset order Each adjacent sub-channel corresponding to the adjacent sub-channel being traversed, and divide the currently traversed sub-channel into the solution domain D j , and so on, until the number of sub-channels in the solution domain D j is equal to n, and the traversal is completed After all sub-channels in a component complete the division of parallel tasks of a component.
具体地,此处,本实施例是将子通道i划分到求解域Dj中后,若求解域Dj中子通道的个数小于n,则将子通道i的0号位置的子通道划分到求解域Dj中,之后继续判断是否将子通道i的1号位置和2号位置的子通道划分到求解域Dj中。若将子通道i三个位置的子通道划分到求解域Dj中后,求解域Dj中的子通道的个数仍小于n,则遍历子通道i的0号位置子通道的0号位置,将该子通道划分到求解域Dj,依此类推,直到求解域Dj中子通道个数等于n。Specifically, here, in this embodiment, after subchannel i is divided into solution domain D j , if the number of subchannels in solution domain D j is less than n, then the subchannel at position 0 of subchannel i is divided into into the solution domain D j , and then continue to judge whether to divide the sub-channels of the No. 1 position and No. 2 position of the sub-channel i into the solution domain D j . If the number of sub-channels in the solution domain D j is still less than n after dividing the sub-channels at the three positions of sub-channel i into the solution domain D j , then traverse the position 0 of the sub-channel i , divide the sub-channel into the solution domain D j , and so on, until the number of sub-channels in the solution domain D j is equal to n.
设定将4个子通道划分为一个求解域,采用广度优先划分算法的划分结果如图4所示,图中子通道位置的编号表示该子通道所属的求解域。It is set to divide the 4 sub-channels into a solution domain, and the division result using the breadth-first partition algorithm is shown in Figure 4. The number of the sub-channel position in the figure indicates the solution domain to which the sub-channel belongs.
层次划分算法:Hierarchy division algorithm:
设每一求解域中的子通道数量的上限值为n,正在遍历的当前子通道在组件内的编号为i,记为子通道i;子通道i被划分到求解域Dj中;Assuming that the upper limit of the number of sub-channels in each solution domain is n, the number of the current sub-channel being traversed in the component is i, denoted as sub-channel i; sub-channel i is divided into the solution domain D j ;
则对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中的方式,具体为:Then traverse all sub-channels in the current component, and divide the sub-channels in the current component into a preset number of solution domains, specifically:
遍历与子通道i同层的下一个子通道,即子通道i+1,若子通道i+n-1与子通道i在同一层,则将子通道i至子通道i+n-1划分到求解域Dj中;Traversing the next subchannel on the same layer as subchannel i, that is, subchannel i+1, if subchannel i+n-1 is on the same layer as subchannel i, divide subchannel i to subchannel i+n-1 into In the solution domain D j ;
若子通道i+n-1与子通道i不在同一层,假设遍历到子通道i+m时,子通道i所在层的子通道全部遍历完,其中m<n-1;则寻找子通道i+m相邻的下一层子通道继续以顺时针方向进行遍历,直至求解域Dj中子通道个数为n时停止,遍历完一个组件中所有子通道后则完成了对一个组件的并行任务的划分。If the subchannel i+n-1 is not in the same layer as the subchannel i, assuming that when the subchannel i+m is traversed, all the subchannels of the layer where the subchannel i is located have been traversed, where m<n-1; then find the subchannel i+ The sub-channels of the next layer adjacent to m continue to traverse in a clockwise direction until the number of sub-channels in the solution domain Dj is n. After traversing all the sub-channels in a component, the parallel task of a component is completed. division.
设定将4个子通道划分为一个求解域,采用层次划分算法的划分结果如图5所示,图中子通道位置的编号表示该子通道所属的求解域。It is set to divide the four sub-channels into a solution domain, and the division result of the hierarchical partition algorithm is shown in Figure 5. The number of the sub-channel position in the figure indicates the solution domain to which the sub-channel belongs.
S103,将当前组件的并行任务划分结果应用于快中子反应堆全堆芯中所有组件,以完成快中子反应堆全堆芯子通道并行任务划分。S103 , applying the parallel task division result of the current component to all components in the whole core of the fast neutron reactor, so as to complete the parallel task division of the sub-channels of the whole core of the fast neutron reactor.
此处,所依据的原理是堆芯中的组件具有相同的结构,当前一个组件的划分结果应用到堆芯所有组件中即可获得快堆全堆芯子通道任务划分的结果。Here, the principle is that the components in the core have the same structure, and the division result of the current component is applied to all the components of the core to obtain the result of sub-channel task division of the whole core of the fast reactor.
本实施例的快中子反应堆全堆芯子通道并行任务划分方法适用于快堆的堆芯结构,可以解决快堆堆芯子通道分布并非传统的矩阵结构,通过传统的数组划分方法难以实现并行任务划分的问题;基于特定的数据结构和划分算法实现了快堆全堆芯的并行任务的划分,使得热工流体子通道模拟软件能够大规模并行求解快堆问题,对于提升快堆全堆芯子通道模拟效率有着重要意义。The fast neutron reactor core sub-channel parallel task division method in this embodiment is applicable to the core structure of the fast reactor, and can solve the problem that the distribution of the fast reactor core sub-channels is not a traditional matrix structure, and it is difficult to achieve parallelism through the traditional array division method The problem of task division; based on the specific data structure and division algorithm, the parallel task division of the fast reactor core is realized, so that the thermal fluid subchannel simulation software can solve the fast reactor problem in parallel on a large scale, which is very important for improving the fast reactor core Subchannel simulation efficiency has important implications.
第二实施例second embodiment
本实施例提供一种快中子反应堆全堆芯子通道并行任务划分系统,所述快中子反应堆全堆芯子通道并行任务划分系统包括:This embodiment provides a fast neutron reactor core channel parallel task division system, the fast neutron reactor core channel parallel task division system includes:
子通道存储模块,用于将待划分的快中子反应堆全堆芯子通道按照预设数据结构进行存储;The sub-channel storage module is used to store the sub-channels of the whole core of the fast neutron reactor to be divided according to the preset data structure;
任务划分模块,用于基于预设数据结构,对当前组件内的所有子通道进行遍历,将当前组件内的子通道划分至预设数量的求解域中,完成当前组件的并行任务划分;将当前组件的并行任务划分结果应用于快中子反应堆全堆芯中所有组件,以完成快中子反应堆全堆芯子通道并行任务划分。The task division module is used to traverse all sub-channels in the current component based on the preset data structure, divide the sub-channels in the current component into a preset number of solution domains, and complete the parallel task division of the current component; The result of parallel task division of components is applied to all components in the whole core of the fast neutron reactor to complete the parallel task division of the whole core of the fast neutron reactor.
本实施例的快中子反应堆全堆芯子通道并行任务划分系统与上述第一实施例的快中子反应堆全堆芯子通道并行任务划分方法相对应;其中,本实施例的快中子反应堆全堆芯子通道并行任务划分系统中的各功能模块所实现的功能与上述第一实施例的快中子反应堆全堆芯子通道并行任务划分方法中的各流程步骤一一对应,故,在此不再赘述。The fast neutron reactor core channel parallel task division system of this embodiment corresponds to the fast neutron reactor core channel parallel task division method of the first embodiment above; wherein, the fast neutron reactor of this embodiment The functions realized by each functional module in the parallel task division system for full-core sub-channels correspond to each process step in the method for dividing parallel tasks for full-core sub-channels of the fast neutron reactor in the first embodiment above. Therefore, in This will not be repeated here.
此外,需要说明的是,本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。In addition, it should be noted that those skilled in the art should understand that the embodiments of the embodiments of the present invention may be provided as methods, devices, or computer program products. Accordingly, embodiments of the invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the invention may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied therein.
本发明实施例是参照根据本发明实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present invention are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, embedded processor, or other programmable data processing terminal processor to produce a machine such that instructions executed by the computer or other programmable data processing terminal processor produce instructions for A device for realizing the functions specified in one or more procedures of a flowchart and/or one or more blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram. These computer program instructions can also be loaded into a computer or other programmable data processing terminal equipment, so that a series of operational steps are performed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby The instructions executed above provide steps for implementing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。It should also be noted that in this article, relational terms such as first and second etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations Any such actual relationship or order exists between.
术语“包括”或其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或终端设备固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或终端设备中还存在另外的相同要素。The term "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or terminal equipment comprising a set of elements includes not only those elements but also other elements not expressly listed, or Yes also includes elements inherent in such a process, method, article or end-equipment. Without further limitations, an element defined by the statement "comprising..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
最后需说明的是,以上仅是本发明优选实施方式,应当指出,尽管已描述了本发明优选实施例,但对于本技术领域的普通技术人员来说,一旦得知了本发明的基本创造性概念,在不脱离本发明所述原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。Finally, it should be noted that the above are only preferred embodiments of the present invention, and it should be pointed out that although the preferred embodiments of the present invention have been described, for those of ordinary skill in the art, once they know the basic creative concepts of the present invention , under the premise of not departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the appended claims are intended to be interpreted to cover the preferred embodiment and all changes and modifications which fall within the scope of the embodiments of the present invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911262033.2A CN111008070B (en) | 2019-12-10 | 2019-12-10 | A fast neutron reactor core channel parallel task division method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911262033.2A CN111008070B (en) | 2019-12-10 | 2019-12-10 | A fast neutron reactor core channel parallel task division method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111008070A CN111008070A (en) | 2020-04-14 |
CN111008070B true CN111008070B (en) | 2023-05-12 |
Family
ID=70115797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911262033.2A Active CN111008070B (en) | 2019-12-10 | 2019-12-10 | A fast neutron reactor core channel parallel task division method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111008070B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112130998B (en) * | 2020-09-23 | 2022-02-01 | 中国核动力研究设计院 | Optimization method of nuclear reactor system analysis program suitable for multi-loop pressurized water reactor |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1083576A1 (en) * | 1999-09-10 | 2001-03-14 | General Electric Company | Nuclear reactor core performance data visualization system |
KR101797078B1 (en) * | 2016-07-15 | 2017-11-13 | 두산중공업 주식회사 | Apparatus and System for Simulating Core Protection system maintenance |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110556169B (en) * | 2019-08-23 | 2022-04-08 | 中国原子能科学研究院 | A solution domain division method for thermal-hydraulic simulation of full-core sub-channels |
CN110532093B (en) * | 2019-08-23 | 2022-05-13 | 中国原子能科学研究院 | Parallel task division method for multi-geometric-shape full core sub-channels of numerical nuclear reactor |
CN110543711B (en) * | 2019-08-26 | 2021-07-20 | 中国原子能科学研究院 | A Parallel Realization and Optimization Method for Numerical Reactor Thermal-Hydraulic Subchannel Simulation |
-
2019
- 2019-12-10 CN CN201911262033.2A patent/CN111008070B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1083576A1 (en) * | 1999-09-10 | 2001-03-14 | General Electric Company | Nuclear reactor core performance data visualization system |
KR101797078B1 (en) * | 2016-07-15 | 2017-11-13 | 두산중공업 주식회사 | Apparatus and System for Simulating Core Protection system maintenance |
Also Published As
Publication number | Publication date |
---|---|
CN111008070A (en) | 2020-04-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Zheng et al. | Real-time big data processing framework: challenges and solutions | |
US9122676B2 (en) | License reconciliation with multiple license types and restrictions | |
Yasui et al. | NUMA-optimized parallel breadth-first search on multicore single-node system | |
CN101533387A (en) | Parallel LU decomposition for corner sparse matrix based on FPGA | |
CN104375805A (en) | Method for simulating parallel computation process of reconfigurable processor through multi-core processor | |
CN103714145A (en) | Relational and Key-Value type database spatial data index method | |
CN104459781B (en) | The random noise attenuation method of three-dimensional earthquake data before superposition | |
CN106407231A (en) | A data multi-thread export method and system | |
CN111008070B (en) | A fast neutron reactor core channel parallel task division method and system | |
Mueller‐Roemer et al. | Ternary sparse matrix representation for volumetric mesh subdivision and processing on GPUs | |
CN110058882A (en) | It is a kind of for CNN accelerate OPU instruction set define method | |
CN108549582B (en) | combined geometric data structure matched with high-performance computer structure and parallel method | |
Kerbyson et al. | Codesign challenges for exascale systems: Performance, power, and reliability | |
Zhang et al. | Accelerating a three-dimensional MOC calculation using GPU with CUDA and two-level GCMFD method | |
CN110532093B (en) | Parallel task division method for multi-geometric-shape full core sub-channels of numerical nuclear reactor | |
CN104239520B (en) | A kind of HDFS data block Placement Strategies based on historical information | |
CN111814384B (en) | High-performance numerical simulation pre-and-post-processing low-overhead connection data structure and method | |
CN106096183A (en) | A kind of multiple parallel method of feature based collimation method | |
CN115186535B (en) | A Monte Carlo simulation method for atomic oxygen or ultraviolet flux on spacecraft surfaces | |
CN105306547A (en) | Data placing and node scheduling method for increasing energy efficiency of cloud computing system | |
CN113157806B (en) | Grid data distributed storage service system, method, device, device and medium | |
CN116661753A (en) | User-defined logic calculation method and system based on logic diagram configuration | |
CN110415162B (en) | Adaptive Graph Partitioning Method for Heterogeneous Fusion Processors in Big Data | |
Walter et al. | Real-time Scheduling of I/O Transfers for Massively Parallel Processor Arrays | |
Chesshire et al. | An environment for parallel and distributed computation with application to overlapping grids |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |