Indexing method, system and equipment for Monte Carlo feedback calculation area and medium
By generating a contiguous array storage space and reconstructing the index in the Monte Carlo model, material property values can be directly accessed, solving the problem of low efficiency in hash table mapping retrieval, realizing efficient material property information retrieval, and improving the feedback calculation efficiency of Monte Carlo software.
Patent Information
- Application Number
- CN202511618040.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-01-30
AI Technical Summary
When the number of geometric meshes in existing Monte Carlo models is too large, the retrieval efficiency of hash table mapping is low, becoming the main bottleneck affecting the efficiency of feedback calculation. This is especially true in fine simulations at the whole core pin-by-pin level, where the particle flight process requires frequent retrieval of material property information, which consumes a lot of computation time.
By obtaining the maximum value of the digital material IDs of all geometric meshes in the Monte Carlo model, a continuous one-dimensional array storage space is generated, and the index space of the material property values is reconstructed according to the IDs. The material property values can be accessed directly using the digital material IDs as array subscripts, avoiding the complex lookup of hash table mapping.
It significantly improves the retrieval efficiency of material property information, reducing it from O(log n) to O(1), greatly enhancing the feedback calculation efficiency of Monte Carlo software. It is particularly suitable for large-scale refined modeling and reduces the time required to retrieve medium information from simulated particles.
Smart Images

Figure CN121435648A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of nuclear reactor core programming technology, and more specifically, to an indexing method, system, device, and medium for Monte Carlo feedback computation regions. Background Technology
[0002] Monte Carlo simulations of nuclear reactor transport calculations, especially coupled calculations with physical-thermal feedback, require real-time acquisition of material properties such as effective fuel temperature, moderator density, and temperature. Monte Carlo software models the core of a real nuclear reactor, forming a geometry (cladding, fuel pellets, moderator, etc.). For numerical simulation, this geometry needs to be meshed. Each geometry corresponds to one or more meshes containing material property data to simulate the real physical entity. This material property data includes fuel temperature, moderator density, and moderator temperature fed back from the thermal simulation program, and is stored independently in a separate data structure. Each mesh contains a unique digital material identifier, generated during the initialization of the Monte Carlo software's geometric mesh. Each mesh generates a unique digital material identifier, used to retrieve values from the independently stored data structure to identify the material properties of that mesh. However, since global numbering is used during initialization, which means that the geometric regions of the entire core, such as the cladding, fuel pellets, and moderators, are numbered continuously, during the feedback process, only the fuel region or the moderator region may be considered. This results in sparse and discontinuous material numbering of the geometric mesh, which cannot correspond one-to-one with the independently stored data structure.
[0003] Current retrieval methods employ hash table mapping. In the initial feedback phase, a hash table is constructed using the digital material ID as the "key" and the index of the material value data structure as the "value." When a particle is transported into a geometric grid, the corresponding digital material ID is first obtained. Then, through hash mapping, the index of the material value in the independently stored data structure is retrieved. Finally, the actual material value is retrieved from the data structure using this index. This indirect indexing method based on hash mapping has an average time complexity of O(log n) per query. When the digital material IDs are sparse and discontinuous, the efficiency of this query method further decreases. Furthermore, with the increasing sophistication of reactor models, modern Monte Carlo simulations have reached the pin-by-pin level of full-core simulation, and the number of geometric grids has increased dramatically to tens of millions. In this large-scale, high-resolution modeling, the particle flight process requires frequent retrieval of material property information; each particle may require tens of thousands of retrieval operations during transport. In refined feedback calculations in physical thermodynamics, the retrieval of material property information for particle transport processes accounts for more than 30% of the total calculation time, becoming one of the main bottlenecks affecting the efficiency of feedback calculations. Summary of the Invention
[0004] The purpose of this invention is to provide an indexing method, system, device, and medium for Monte Carlo feedback computation regions, which solves the problem of low retrieval efficiency of existing indexing methods when the number of geometric meshes in a Monte Carlo model is too large.
[0005] The above-mentioned technical objective of the present invention is achieved through the following technical solution:
[0006] In a first aspect, the present invention provides an indexing method for a Monte Carlo feedback computation region, the method comprising:
[0007] Obtain the maximum value of the digital material number for all geometric meshes in the Monte Carlo model;
[0008] All digital material numbers are input into the thermal engineering program for digital material number synchronization processing, resulting in a data file output by the thermal engineering program; wherein, the data file includes digital material numbers and material property values fed back by the thermal engineering program, with one material property value corresponding to one digital material number;
[0009] Storage space is generated based on the maximum value of the digital material number;
[0010] The storage space is reconstructed based on the data files to obtain the index space;
[0011] Obtain the index number of the simulated particle entering the geometric mesh in the Monte Carlo calculation, and use the index number as the array subscript to access the index space to obtain the material property value.
[0012] In one implementation, the maximum value of the digital material number for all geometric meshes in the Monte Carlo computational model is obtained, including:
[0013] Iterate through all the digital material numbers of the geometric meshes in the Monte Carlo model and record all the digital material numbers that appear.
[0014] Sort all digital material numbers and determine the maximum value of all geometric mesh digital material numbers.
[0015] In one implementation, the storage space is a contiguous one-dimensional array.
[0016] In one implementation, a storage space for the maximum value of the digital material number is generated based on the C++ new function; wherein the size of the storage space is represented as N = MAX_ID + 1; MAX_ID is the maximum value of the digital material number.
[0017] In one implementation, the storage space is reconstructed based on the data file to obtain the index space. Specifically, the material attribute values in the data file are assigned to the corresponding storage numbers in the storage space according to the corresponding numerical material numbers to obtain the index space.
[0018] In a second aspect, the present invention provides an indexing system for Monte Carlo feedback computation regions, the system comprising:
[0019] The acquisition module is used to obtain the maximum value of the digital material number of all geometric meshes in the Monte Carlo model;
[0020] The synchronization module is used to input all digital material numbers into the thermal engineering program for digital material number synchronization processing, and obtain a data file output by the thermal engineering program; wherein, the data file includes digital material numbers and material property values fed back by the thermal engineering program, and one material property value corresponds to one digital material number;
[0021] The storage space generation module is used to generate storage space based on the maximum value of the digital material number;
[0022] The storage space reconstruction module is used to reconstruct the storage space based on the data files to obtain the index space;
[0023] The indexing module is used to obtain the index number of the simulated particle entering the geometric mesh in the Monte Carlo calculation, and to access the index space using the index number as the array subscript to obtain the material property value.
[0024] In one implementation, the acquisition module includes:
[0025] The numbering and recording unit is used to traverse the digital material numbers of all geometric meshes in the Monte Carlo model and record all the digital material numbers that appear.
[0026] The numbering and sorting unit is used to sort all digital material numbers and determine the maximum value of all geometric mesh digital material numbers.
[0027] In one implementation, the storage space is a contiguous one-dimensional array.
[0028] In one implementation, a storage space for the maximum value of the digital material number is generated based on the C++ new function; wherein the size of the storage space is represented as N = MAX_ID + 1; MAX_ID is the maximum value of the digital material number.
[0029] In one implementation, the storage space reconstruction module is specifically used to: allocate the material attribute values in the data file to the corresponding storage numbers in the storage space according to the corresponding digital material numbers, thereby obtaining the index space.
[0030] In a third aspect, the present invention provides an electronic device, including a memory and a processor;
[0031] A memory for storing computer programs, the computer programs including program instructions;
[0032] A processor is configured to execute the program instructions to cause the electronic device to perform the steps of an indexing method for a Monte Carlo feedback computation region as provided in the first aspect of the invention.
[0033] In a fourth aspect, the present invention provides a computer-readable storage medium comprising a computer program that, when executed by one or more processors, implements an indexing method for a Monte Carlo feedback computation region as provided in the first aspect of the present invention.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] This invention reconstructs the material data storage structure, directly mapping digital material numbers to material property values such as fuel temperature, moderator density, and moderator temperature fed back from the thermal program. This reduces the complexity of retrieval time, greatly reduces the time required for retrieval of medium information by simulated sampling particles, and significantly improves the feedback calculation efficiency of Monte Carlo software. Attached Figure Description
[0036] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0037] Figure 1 A flowchart illustrating an indexing method for a Monte Carlo feedback calculation region provided in an embodiment of the present invention;
[0038] Figure 2 This is a schematic diagram of the material data before and after reconstruction provided in an embodiment of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.
[0040] It should be noted that the terms "comprising" or "may include" used in the various embodiments of this application indicate the presence of the claimed function, operation, or element, and do not limit the addition of one or more functions, operations, or elements. Furthermore, as used in the various embodiments of this application, the terms "comprising," "having," and their cognates are intended only to indicate a specific feature, number, step, operation, element, component, or combination of the foregoing, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing, or adding one or more combinations of the foregoing.
[0041] It should be understood that terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0042] Current retrieval methods employ hash table mapping. In the initial feedback phase, a hash table is constructed using the digital material ID as the "key" and the index of the material value data structure as the "value." When a particle is transported into a geometric grid, the corresponding digital material ID is first obtained. Then, through hash mapping, the index of the material value in the independently stored data structure is retrieved. Finally, the actual material value is retrieved from the data structure using this index. This indirect indexing method based on hash mapping has an average time complexity of O(log n) per query. When the digital material IDs are sparse and discontinuous, the efficiency of this query method further decreases. Furthermore, with the increasing sophistication of reactor models, modern Monte Carlo simulations have reached the pin-by-pin level of full-core simulation, and the number of geometric grids has increased dramatically to tens of millions. In this large-scale, high-resolution modeling, the particle flight process requires frequent retrieval of material property information; each particle may require tens of thousands of retrieval operations during transport. In refined feedback calculations in physical thermodynamics, the retrieval of material property information for particle transport processes accounts for more than 30% of the total calculation time, becoming one of the main bottlenecks affecting the efficiency of feedback calculations.
[0043] In summary, existing retrieval methods suffer from low efficiency when the number of geometric meshes is excessive. This invention provides an indexing method for Monte Carlo feedback computation regions, addressing this issue. By reconstructing the data storage structure and implementing a direct indexing mechanism, the time spent retrieving material property information from simulated particles in Monte Carlo programs with feedback is significantly reduced, thereby improving the feedback computation efficiency of Monte Carlo software. This invention specifically addresses the physics-thermal-engineering feedback data retrieval requirements in full-core fine pin-by-pin Monte Carlo program calculations, aiming to maintain high retrieval performance even in complex models with tens of millions of meshes, providing technical support for physics-thermal-engineering coupled calculations in Monte Carlo programs.
[0044] The following will provide a detailed description of the indexing method for Monte Carlo feedback computation regions provided by this invention, with reference to specific implementation methods. Figure 1 , Figure 1 This is a flowchart illustrating an indexing method for a Monte Carlo feedback computation region provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes:
[0045] S101 retrieves the maximum value of the digital material number for all geometric meshes in the Monte Carlo model.
[0046] In this embodiment, in the field of nuclear reactor physics analysis, the Monte Carlo program transport calculation model is a core computational tool based on the principle of random sampling, used to accurately simulate the motion, collision, and energy transfer processes of particles such as neutrons and photons in nuclear materials. By reproducing the microscopic transport behavior of particles, it provides quantitative data support for key tasks such as nuclear reactor design, safety analysis, and burnup calculation, and is an indispensable numerical simulation method in modern nuclear science and engineering. Nuclear reactor Monte Carlo program transport calculations, especially coupled calculations with physical-thermal feedback, require real-time acquisition of material property information such as effective fuel temperature, moderator density, and temperature. Monte Carlo software models the core of a real nuclear reactor, forming a geometry (cladding, fuel pellets, moderator, etc.). Simultaneously, for numerical simulation, the geometry needs to be meshed. Each geometry requires corresponding material property data from one or more meshes to simulate the real physical entity. This material property data includes fuel temperature, moderator density, and moderator temperature fed back from the thermal program, and they are stored independently in an additional data structure. Each grid contains a unique digital material identifier, generated during the geometric mesh initialization in the Monte Carlo software. Each grid cell generates a unique digital material identifier, retrieved from an independently stored data structure, to identify the material properties of that grid. However, because global numbering is used during initialization—that is, the geometric regions of the entire core, such as the cladding, fuel pellets, and moderators, are uniformly and continuously numbered—during the feedback process, only the fuel or moderator region may be considered. This leads to sparse and discontinuous material identifiers within the geometric grid, making it impossible to achieve a one-to-one correspondence with the independently stored data structure.
[0047] Therefore, this embodiment adopts a traversal method to record the digital material numbers of all geometric meshes in the Monte Carlo calculation model, and then sorts all the digital material numbers to determine the maximum value of the digital material numbers of all geometric meshes.
[0048] like Figure 2 As shown in the second structure, it refers to the storage structure of digital material numbers in the geometric grid, where "mat" is the digital material number value. It can be seen that the digital material number value is discontinuous, that is, an irregular number sequence such as "3, 5, 6, 8, 11". Based on this sequence, it is impossible to directly take the value from the first structure. Therefore, due to the discontinuity of the digital material numbers, the maximum value obtained in this embodiment does not refer to the total number of digital material numbers.
[0049] S102, input all digital material numbers into the thermal engineering program for digital material number synchronization processing to obtain a data file output by the thermal engineering program; wherein, the data file includes digital material numbers and material property values fed back by the thermal engineering program, and one material property value corresponds to one digital material number.
[0050] In this embodiment, all digital material numbers from the Monte Carlo model are passed to the thermal engineering program to maintain consistency. These digital material numbers serve as identifiers for material property values within the thermal engineering program's grid, ensuring consistency between the Monte Carlo model and the thermal engineering program's numbering. When the thermal engineering program completes its calculations and stores material properties such as fuel temperature, moderator density, and moderator temperature, the digital material number is used as an index to write the data into the data file returned by the thermal engineering program, thus achieving a mapping between the Monte Carlo model and the thermal engineering program.
[0051] It should be noted that the digital material number in the geometric mesh of the thermal process involved in the feedback must be consistent with the digital material number in the Monte Carlo model.
[0052] S103, generate storage space based on the maximum value of the digital material number.
[0053] In this embodiment, in order to ensure that all possible digital material numbers can be directly mapped to a specific memory address, this embodiment requests a contiguous memory space based on the maximum value of the digital material number, and the size of this space is determined to be MAX_ID+1 (considering the 0-starting index).
[0054] like Figure 2 The first structure shown refers to the independent storage data structure for feedback data. Here, "val" represents the material property value, and "index" is the sequential storage number. The storage space is a contiguous one-dimensional array, generated using the C++ `new` function to store the maximum value of the digital material ID. The size of this storage space is represented as N = MAX_ID + 1, where MAX_ID is the maximum value of the digital material ID. Simultaneously, the attribute values at all locations are initialized to default values.
[0055] It should be noted that the overall size of the storage space should be generated based on the maximum value of the digital material number.
[0056] S104, Reconstruct the storage space based on the data file to obtain the index space.
[0057] In this embodiment, the data file returned by the thermal engineering program is read. This data file contains material numbers and attribute values. The corresponding attribute values are stored in the corresponding positions of the previously allocated storage space (i.e., the positions where the array index equals the digital material number), for example, Data[mat] = value. Since the digital material numbers are not consecutive, unused array positions retain their initial values, but incorrect access is avoided through number validity checks. The principle of data space reconstruction is: the data file provided by the thermal engineering program is reorganized into the newly generated storage space based on the corresponding digital material numbers as index addresses, establishing a direct mapping relationship between the digital material numbers and the memory addresses of the storage space.
[0058] In some embodiments, the material attribute values in the data file are assigned to the corresponding storage numbers in the storage space according to the corresponding digital material numbers, thus obtaining the index space.
[0059] Specifically, such as Figure 2 The third structure shown refers to the reconstructed direct index data structure. It uses the "mat" digital material number from the second structure as the index of the data structure, while "val" stores the actual material property value. In other words, the first two structures are merged. "index" is the reconstructed storage sequence number, which includes the "mat" digital material number. It can be seen that some index values are empty, while the areas with values overlap with the "mat" digital material number.
[0060] S105: Obtain the index number of the simulated particle entering the geometric mesh in the Monte Carlo calculation, and use the index number as the array subscript to access the index space to obtain the material property value.
[0061] Specifically, in the Monte Carlo particle transport process, when a particle enters a specific geometric grid and needs to retrieve medium properties, the index number (id) of that grid is directly obtained. The id is used as an index to directly access the pre-allocated memory array. At the same time, an index validity verification mechanism is added to ensure that the id is within the valid range and to prevent memory out-of-bounds access.
[0062] In summary, the basic principle of the method provided by this invention is based on direct address mapping technology. By reconstructing the data space of digital material numbers and corresponding material properties, it accelerates the retrieval process using a "space-for-time" strategy. In Monte Carlo calculations, each geometric grid cell has a unique digital material number. Traditional methods use these numbers as keys to look up the corresponding material properties in a hash table. This invention, however, pre-allocates a sufficiently large contiguous memory space and directly uses the digital material number as an array index, storing the property information in the corresponding fixed location. Through this direct mapping, no complex hash calculations are required, achieving instantaneous access.
[0063] This invention achieves significant results by reconstructing the storage data structure of material property values and corresponding digital material numbers, mainly reflected in: greatly improved retrieval efficiency, reducing the retrieval time in simulated transport particle calculations from O(log n) of the traditional method to O(1); significantly improved overall feedback calculation efficiency, as medium information retrieval accounts for a high proportion in Monte Carlo calculations with feedback, this method can improve the overall feedback calculation efficiency, and is particularly suitable for physical-thermal-engineering coupling calculations that require multiple iterations; at the same time, the direct indexing mechanism effectively optimizes the memory access mode, improves memory access locality, reduces CPU cache miss rate, and further improves calculation efficiency; in addition, this method is particularly suitable for full-core fine pin-by-pin Monte Carlo calculations, can effectively handle large-scale examples, and provides strong technical support for high-fidelity reactor simulation.
[0064] This invention also provides an indexing system for Monte Carlo feedback computation regions, the system comprising:
[0065] The acquisition module is used to obtain the maximum value of the digital material number of all geometric meshes in the Monte Carlo model;
[0066] The synchronization module is used to input all digital material numbers into the thermal engineering program for digital material number synchronization processing, and obtain a data file output by the thermal engineering program; wherein, the data file includes digital material numbers and material property values fed back by the thermal engineering program, and one material property value corresponds to one digital material number;
[0067] The storage space generation module is used to generate storage space based on the maximum value of the digital material number;
[0068] The storage space reconstruction module is used to reconstruct the storage space based on the data files to obtain the index space;
[0069] The indexing module is used to obtain the index number of the simulated particle entering the geometric mesh in the Monte Carlo calculation, and to access the index space using the index number as the array subscript to obtain the material property value.
[0070] In some embodiments, the acquisition module includes:
[0071] The numbering and recording unit is used to traverse the digital material numbers of all geometric meshes in the Monte Carlo model and record all the digital material numbers that appear.
[0072] The numbering and sorting unit is used to sort all digital material numbers and determine the maximum value of all geometric mesh digital material numbers.
[0073] In some embodiments, the storage space is a contiguous one-dimensional array.
[0074] In some embodiments, a storage space for the maximum value of the digital material number is generated based on the C++ new function; wherein the size of the storage space is represented as N = MAX_ID + 1; MAX_ID is the maximum value of the digital material number.
[0075] In some embodiments, the storage space reconstruction module is specifically used to: allocate the material attribute values in the data file to the corresponding storage numbers in the storage space according to the corresponding digital material numbers, thereby obtaining the index space.
[0076] An indexing system for Monte Carlo feedback computation regions in this embodiment of the invention is similar to the one described above. Figure 1 The indexing method for a Monte Carlo feedback computation region shown is a technical solution based on the same inventive concept. Through the detailed description of the indexing method for a Monte Carlo feedback computation region provided in the above embodiments, those skilled in the art can clearly understand the implementation process of each module included in the indexing system for a Monte Carlo feedback computation region in this embodiment. Therefore, for the sake of brevity, it will not be described in detail here.
[0077] Accordingly, the indexing system for the Monte Carlo feedback computation region provided in this embodiment solves the problem of low retrieval efficiency in traditional retrieval methods when the number of geometric grids is too large. By reconstructing the material data storage structure, the digital material number is directly mapped to the material property values such as fuel temperature, moderator density, and moderator temperature fed back from the thermal program, reducing the retrieval time complexity and greatly reducing the time for retrieving medium information from simulated sampled particles, thus significantly improving the feedback computation efficiency of Monte Carlo software. This invention is specifically designed for the physical-thermal feedback data retrieval needs in full-core fine pin-by-pin Monte Carlo program calculations, aiming to maintain high-efficiency retrieval performance even in complex models with tens of millions of grids, providing technical support for physical-thermal coupling calculations in Monte Carlo programs.
[0078] This invention also provides an electronic device. The electronic device includes a processor, a memory, a communication interface, and at least one communication bus for connecting the processor, the memory, and the communication interface. The memory includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (PROM), or portable read-only memory (CD-ROM), and is used for related instructions and data.
[0079] The communication interface is used to receive and send data. The processor can be one or more CPUs; if the processor is a single CPU, it can be a single-core CPU or a multi-core CPU. The processor in the electronic device is used to read one or more programs stored in memory and perform the following operations: obtain the maximum value of the digital material numbers of all geometric meshes in the Monte Carlo model; input all digital material numbers into the thermal program for digital material number synchronization processing to obtain a data file output by the thermal program; wherein, the data file includes digital material numbers and material property values fed back by the thermal program, with one material property value corresponding to one digital material number; generate storage space based on the maximum value of the digital material numbers; reconstruct the storage space based on the data file to obtain an index space; obtain the index numbers of simulated particles entering the geometric mesh in the Monte Carlo calculation, and access the index space using the index numbers as array indices to obtain the material property values.
[0080] It should be noted that the specific implementation of each operation can be described above. Figure 1 The corresponding description of the method embodiments shown indicates that the electronic device can be used to execute a Monte Carlo feedback calculation region indexing method of the above method embodiments of this application, which will not be described in detail here.
[0081] This invention also provides a computer-readable storage medium, which is a memory device in a computer device for storing programs and data. It is understood that the computer-readable storage medium here can include both built-in storage media in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the operating system of a terminal. Furthermore, the storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the indexing method for a Monte Carlo feedback computing region in the above embodiments. Those skilled in the art should understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] This invention also provides a computer program product containing program instructions. The computer program product may be software or program products containing program instructions, capable of running on a computing device or stored on any available medium. When the computer program product is run on at least one electronic device, it causes the at least one electronic device to execute a Monte Carlo feedback calculation region indexing method.
[0083] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for indexing a Monte Carlo feedback computation region, characterized in that the method... The method comprises the following steps: obtaining the maximum value of all digital material numbers of geometric grids in a Monte Carlo model; inputting all the digital material numbers into a thermal calculation program for synchronous processing of the digital material numbers, to obtain a data file output by the thermal calculation program; wherein the data file comprises digital material numbers and material property values fed back by the thermal calculation program, and one material property value corresponds to one digital material number; generating a storage space according to the maximum value of the digital material numbers; reconstructing the storage space according to the data file, to obtain an index space; obtaining a to-be-indexed number of a simulated particle entering a geometric grid in Monte Carlo calculation, and taking the to-be-indexed number as an array subscript to access the index space, to obtain a material property value.
2. The method of claim 1, wherein, The method for obtaining the maximum value of all digital material numbers of geometric grids in a Monte Carlo calculation model comprises the following steps: traversing the digital material numbers of all geometric grids in the Monte Carlo model, and recording all the digital material numbers appearing; sorting all the digital material numbers, to determine the maximum value of all the digital material numbers of the geometric grids.
3. The method of claim 1, wherein, The storage space is a continuous one-dimensional array.
4. The method of claim 3, wherein, The storage space of the maximum value of the digital material numbers is generated based on a new function of C++, and the size of the storage space is represented as N = MAX_ID + 1; MAX_ID is the maximum value of the digital material numbers.
5. The method of claim 1, wherein, The storage space is reconstructed according to the data file, to obtain the index space; specifically, the material property values in the data file are distributed to corresponding storage numbers of the storage space according to the corresponding digital material numbers, to obtain the index space.
6. An index system for Monte Carlo feedback calculation regions, characterized by, The system comprises: an obtaining module, configured to obtain the maximum value of all digital material numbers of geometric grids in a Monte Carlo model; a synchronous module, configured to input all the digital material numbers into a thermal calculation program for synchronous processing of the digital material numbers, to obtain a data file output by the thermal calculation program; wherein the data file comprises digital material numbers and material property values fed back by the thermal calculation program, and one material property value corresponds to one digital material number; a storage space generation module, configured to generate a storage space according to the maximum value of the digital material numbers; a storage space reconstruction module, configured to reconstruct the storage space according to the data file, to obtain an index space; an indexing module, configured to obtain a to-be-indexed number of a simulated particle entering a geometric grid in Monte Carlo calculation, and take the to-be-indexed number as an array subscript to access the index space, to obtain a material property value.
7. An index system for Monte Carlo feedback calculation regions according to claim 1, wherein, The obtaining module comprises: a number recording unit, configured to traverse the digital material numbers of all geometric grids in the Monte Carlo model, and record all the digital material numbers appearing; a number sorting unit, configured to sort all the digital material numbers, to determine the maximum value of all the digital material numbers of the geometric grids.
8. An index system for Monte Carlo feedback calculation regions according to claim 6, wherein, The storage space is a continuous one-dimensional array.
9. An index system for Monte Carlo feedback calculation regions according to claim 8, wherein, The storage space of the maximum value of the digital material numbers is generated based on a new function of C++, and the size of the storage space is represented as N = MAX_ID + 1; MAX_ID is the maximum value of the digital material numbers.
10. An index system for Monte Carlo feedback calculation regions according to claim 1, wherein, The storage space reconstruction module is specifically configured to distribute the material property values in the data file to corresponding storage numbers of the storage space according to the corresponding digital material numbers, to obtain the index space.
11. An electronic device, comprising: comprising a memory and a processor; a memory for storing a computer program, the computer program comprising program instructions; a processor for executing the program instructions to cause the electronic device to perform the steps of the method for indexing a Monte Carlo feedback computation region according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises a computer program which, when executed by one or more processors, implements the method for indexing a Monte Carlo feedback computation region according to any one of claims 1 to 5.
