Method for quickly calculating physical simulation program of reactor core by using deep learning method
By generating sample data through deep learning methods and integrating machine learning models, the problem of balancing computational efficiency and simulation fidelity in core physics simulation software has been solved, realizing the real-time or ultra-real-time requirements of core physics simulation calculations, significantly improving computational speed and stability.
Patent Information
- Application Number
- CN202410623283.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-11-21
AI Technical Summary
Existing real-time simulation software for reactor core physics struggles to balance computational efficiency and simulation realism, failing to meet real-time or ultra-real-time computational requirements, and its high iteration count leads to excessively long computation times.
Deep learning methods are used to accelerate the calculation of reactor core physics simulation programs. By generating sample data, designing deep learning networks and integrating machine learning models, and using deep learning models as input to diffusion solvers, the number of iterations is reduced and the calculation speed is improved.
It achieves the real-time or ultra-real-time requirements of core physics simulation calculations without sacrificing simulation accuracy, with improved calculation speed and high stability, and is not affected by accidental mutations in deep learning models.
Smart Images

Figure CN120995822A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of nuclear power plant reactor numerical calculation, and particularly relates to a deep learning method for fast calculation of a core physics simulation program. BACKGROUND
[0002] In the whole reactor numerical calculation process, solving the diffusion or transport problem is the most time-consuming. In the research of reactor numerical calculation methods, reactor physics scientists have done a lot of work around accelerating the calculation, and have achieved certain results, developing many core physics calculation programs with engineering applications.
[0003] The core physics real-time simulation software is a branch of reactor numerical calculation. However, the core physics real-time simulation software has more stringent requirements for calculation efficiency. A time step of 1 second means that the program needs to be completed within 1 second for a physical process of 1 second. The actual engineering requirement is a time step of about 0.1 seconds or 0.05 seconds; currently, users require the core physics real-time simulation model to have super-real-time operation capability. If the core physics model has 5 times faster calculation capability, the physical process of 0.1 seconds needs to be completed within 0.02 seconds to meet the demand.
[0004] The core physics real-time simulation software takes real-time as the first element, and usually sacrifices simulation fidelity (such as introducing simplification or assumption to reduce the theoretical model, and reducing the iteration convergence condition) to ensure the calculation efficiency of the core physics real-time simulation program. SUMMARY
[0005] The application aims to provide a deep learning method for fast calculation of a core physics simulation program, which can realize three-dimensional core real-time simulation calculation with the calculation precision of a core design analysis program and meet the real-time or super-real-time requirements, and is used for simulation of neutron behavior in the active region of a nuclear power reactor.
[0006] The technical scheme of the application is as follows: a deep learning method for fast calculation of a core physics simulation program, comprising the following steps:
[0007] Step 1: sample data generation based on a core calculation program;
[0008] Step 2: deep learning network design and training;
[0009] Step 3: integration of the machine learning model and the core calculation program.
[0010] The step 1 is to associate the sample data generation mode with the core calculation program flow, to accumulate sample data while performing core problem calculation by using the core calculation program, to write the required data for training into a file or a database by embedding a file writing or database writing mode in the program, and to directly write the data into the database through parallel processes.
[0011] The process of solving the diffusion equation in step 1 by using the nonlinear iterative semi-analytical nodal method includes writing the required information, including nodal group cross-section data, keff, nodal flux, and coupling correction factor, as samples into a database in a multi-thread parallel manner, wherein keff, nodal flux, and coupling correction factor are used as sample tags of the record, the value ranges of fuel temperature, coolant density, boron concentration, burnup, and the depth of the control rod inserted into the core are determined according to the simulation range of the reference object, the range of the sample space is determined based on this, random sampling from the sample space is realized through programming, and the sampling results are converted into corresponding input cards, the input cards are read into the core calculation program, and the calculation is completed to obtain the tag data of the sample: the two-group flux of each nodal, the fission rate, the nodal coupling coefficient, and the reactivity of the entire reactor, and a sample data is formed after each calculation, and the sample data generated when the calculation program is tested in a single system is used for training of the deep learning model.
[0012] The step 2 is to adjust the network according to the reference core data, to train the deep learning model based on the obtained sample data to obtain a data-driven diffusion solver, to use the data-driven diffusion solver as the first step of the core calculation model diffusion solver, to use the result as the input of the diffusion solver in the core calculation model, and to realize the fast solution of the diffusion equation.
[0013] In step 2, the sample data with tag data is normalized before training to ensure that all quantities are between 0 and 1, and the max-min normalization method is used, and the actual value is restored after the output result of the neural network is processed by inverse normalization, and the max-min normalization calculation formula is as follows:
[0014]
[0015] Pi is the i-th quantity in the sample, Pi-min is the minimum value of the i-th quantity, and Pi-min is the maximum value of the i-th quantity. According to the above formula, the inverse normalization calculation formula can be obtained by simple transformation;
[0016] The three-dimensional flux distribution, the node block coupling factor and the effective multiplication factor output by the trained neural network model are consistent with the flux distribution, the node block coupling factor and the effective multiplication factor given by the original diffusion solver after being inversely normalized, the original diffusion solver reconstructs the matrix coefficient with the output of the neural network, ensures that the calculation meets the convergence condition only after 1-2 iterations, thereby realizing the acceleration of the core calculation.
[0017] The VGG deep model is selected as the deep learning model in step 2, the convolution kernel is 3*3, and the pooling kernel is 2*2,
[0018]
[0019] In step 3, the mechanism solver is used to calculate once for each calculation result, the deep learning model is generated as dll based on CPYTHON, and the dll is integrated into the simulation platform, in the three-dimensional core simulation program, the machine learning model in the dll is called, the cross-section data of each node block is passed to the deep learning model as an argument, and the normalized calculation result is passed back to the three-dimensional core simulation program after the deep learning model is calculated.
[0020] The beneficial effects of the present application are that, before acceleration, the diffusion program needs to be iterated multiple times. When the diffusion solver is based on the output of the deep learning model, the calculation result meets the convergence criterion after only 1 iteration, thereby greatly improving the calculation speed; at the same time, the whole program has high stability and will not be affected by accidental mutations of the deep learning model. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 It is a core calculation flowchart after data driving and mechanism coupling;
[0022] Figure 2 It is a sample data generation schematic diagram taking the NLSAM diffusion solver as an example;
[0023] Figure 3 It is a diffusion solving acceleration principle diagram after data driving and mechanism coupling;
[0024] Figure 4 It is a sample data generation flowchart. DETAILED DESCRIPTION
[0025] The present application will be further described in detail below in combination with the drawings and specific embodiments.
[0026] The present application is based on a three-dimensional core physical calculation program and deep learning technology, and uses a trained deep learning model to generate the relative flux distribution and effective multiplication factor in the current state as the input of the diffusion solver for iteration, thereby realizing the fast solving of the diffusion equation by reducing the number of iterations.
[0027] The method for fast calculation of core physics simulation program by using deep learning method comprises the following steps:
[0028] Step 1: sample data generation based on core calculation program;
[0029] The sample data generation based on core calculation program is to fully utilize the characteristics of core calculation program and data management platform to realize automatic recording of required sample data in the calculation process of core calculation program.
[0030] The generation mode of sample data is associated with the flow of core calculation program, and sufficient sample data is accumulated while the core calculation program is used to carry out core problem calculation. The required data for training is written into a file or a database by embedding a file writing or database writing mode in the program. The data is directly written into the database through parallel processes, so that the efficiency of the core calculation program is not affected.
[0031] The following will take the process of solving diffusion equation by nonlinear iterative semi-analytical nodal method as an example for illustration. For other nodal methods, even if the idea is applied to the acceleration of transport equation or time-space dynamic equation, those skilled in the art should easily associate the slightly different mode from the present example.
[0032] Figure 2 is the calculation flow of the diffusion solver drawn by ignoring part of the calculation details of NLSAM; the required information (nodal few-group cross section data, keff, nodal flux, coupling correction coefficient as sample written into the database, wherein keff, nodal flux, coupling correction coefficient as sample tag of the record) is written into the database by using multi-thread parallel mode.
[0033] The user needs to determine the value range of fuel temperature, coolant density, boron concentration, burnup, and control rod insertion depth in the simulation range of the reference object, and determine the range of the sample space based on this. Random sampling is realized by programming from the sample space, and the sampling results are converted into corresponding input cards. The core calculation program reads the input card, completes the calculation, and obtains the sample tag data: two-group flux, fission rate, nodal coupling coefficient of each nodal, and reactivity of the whole reactor.
[0034] Each calculation forms a sample data. When the single system test is performed by using the calculation program, sufficient sample data can be generated for the training of the deep learning model.
[0035] Step 2: design and training of deep learning network;
[0036] The deep learning network design and training need to refer to the existing and relatively familiar deep neural network, such as AlexNet, VGG and the like, the network is adjusted according to the reference core data, and the data-driven diffusion solver is obtained based on the obtained sample data.
[0037] The data-driven diffusion solver is used as the first step of the diffusion solver of the core calculation model, and the result is used as the input of the diffusion solver of the core calculation model, so that the diffusion equation is quickly solved.
[0038] Considering the input data and label data in the sample data, the numerical difference between the quantities is large, for example, the fast group diffusion coefficient is generally 1.0+, and the microscopic interface of the samarium poison is about E+5 target. Before training, the sample data with label data needs to be normalized to ensure that all quantities are between 0 and 1, and the max-min normalization method is recommended. For the output result of the neural network, the actual value is restored after inverse normalization. The max-min normalization calculation formula is as follows:
[0039]
[0040] Pi is the i-th quantity in the sample, Pi-min is the minimum value of the i-th quantity, and Pi-min is the maximum value of the i-th quantity. According to the above formula, the inverse normalization calculation formula can be obtained by simple transformation.
[0041] After sufficient training, the three-dimensional flux distribution, the block coupling factor and the effective multiplication factor output by the neural network model are the same as the flux distribution, the block coupling factor and the effective multiplication factor given by the original diffusion solver after inverse normalization. The original diffusion solver reconstructs the matrix coefficient with the output of the neural network, which can ensure that the calculation meets the convergence condition only after 1-2 iterations, so as to realize the acceleration of the core calculation.
[0042] The classical VGG deep model is selected as the deep learning model, the convolution kernel is 3*3, and the pooling kernel is 2*2.
[0043]
[0044] It is proved by experiment that it is also feasible to use other mature deep learning models.
[0045] Step 3: Machine learning model and core calculation program integration
[0046] Still taking the process of solving the diffusion equation based on the nonlinear iterative semi-analytical block method as an example to illustrate the integration of the deep learning model and the mechanism core calculation solver.
[0047] In the present application, in order to avoid the power mutation caused by the accidental jump of deep learning, the mechanism solver needs to be calculated once for each calculation result. Considering that the three-dimensional core simulation program is generally integrated into the simulation platform, the three-dimensional core simulation program and the machine learning model are managed under the simulation platform, and the data exchange is based on the memory.
[0048] In the present application, the deep learning model will be generated as dll based on CPYTHON, and the dll will be integrated into the simulation platform. In the three-dimensional core simulation program, the machine learning model in the dll is called, and the cross-section data of each bin is passed to the deep learning model as an argument. After the deep learning model is calculated, the de-normalized calculation result is passed back to the three-dimensional core simulation program through the parameter.
[0049] The present application is only applicable to the case where the user has the core calculation source code himself. Without the source code, only the deep learning model can be used to replace the whole core calculation, and the idea is similar. The present application is mainly aimed at accelerating the core physical data calculation and is suitable for all core calculation acceleration.
[0050] The present application is based on the trained deep learning model with the characteristics of fast calculation speed and high calculation accuracy, consumes millisecond-level time, and generates corresponding relative flux distribution and effective multiplication factor based on the cross-section data corresponding to the current core state. In order to reduce the influence of accidental mutation in deep learning on the calculation result, the deep learning model output is taken as the input of the mechanism-based diffusion solver, which can greatly reduce the iteration number and realize the acceleration of core physical calculation. In order to make the purpose, technical scheme and advantages of the present application more clear and obvious, the present application is further described in detail.
[0051] The present application is described according to specific embodiments, but those skilled in the art should understand that various changes and equivalent replacements can be made without departing from the scope of the present application. Therefore, the present application is not limited to the specific embodiments disclosed herein, but includes all embodiments falling within the scope of the claims.
Claims
1. A method for fast calculation of a core physics simulation program using a deep learning method, characterized by, The method comprises the following steps: Step 1: sample data generation based on a core calculation program; Step 2: deep learning network design and training; Step 3: integration of the machine learning model and the core calculation program.
2. The method for fast calculation of core physics simulation programs using deep learning method according to claim 1, wherein: The step 1 is to associate the sample data generation mode with the core calculation program flow, to accumulate sample data by using the core calculation program to carry out core problem calculation, to write the required data into a file or a database by embedding a file writing or a database writing mode in the program, and to directly write the data into the database through parallel processes. 3.The method for fast calculation of core physics simulation program using deep learning method according to claim 1, wherein: The process of solving the diffusion equation by using the nonlinear iterative semi-analytical nodal method in the step 1 comprises the following steps: the required information, including nodal group cross-section data, keff, nodal flux and coupling correction coefficient, is written into the database in a multi-thread parallel mode, wherein the keff, the nodal flux and the coupling correction coefficient are used as sample tags of the record, the value ranges of fuel temperature, coolant density, boron concentration, burnup and the depth of the control rod inserted into the core are determined according to the simulation range of the reference object, the range of the sample space is determined based on this, random sampling from the sample space is realized through programming, and the sampling results are converted into corresponding input cards, the input cards are read into the core calculation program, and the calculation is completed to obtain the tag data of the sample: the two-group flux of each nodal, the fission rate, the nodal coupling coefficient and the reactivity of the whole reactor, and a sample data is formed after each calculation, and the sample data generated when the calculation program is tested in a single system is used for training the deep learning model. 4.The method for fast calculation of core physics simulation program using deep learning method according to claim 1, wherein: The step 2 is to adjust the network according to the reference core data, to train the deep learning model based on the obtained sample data to obtain a data-driven diffusion solver, to use the data-driven diffusion solver as the first step of the core calculation model diffusion solver, to use the result as the input of the diffusion solver in the core calculation model, and to realize the fast solving of the diffusion equation.
5. The method for fast calculation of core physics simulation programs using deep learning method according to claim 4, characterized in that: In the step 2, the sample data with tags is normalized before training to ensure that all quantities are between 0 and 1, the max-min normalization method is adopted, the actual value is restored after the output result of the neural network is processed through the inverse normalization, and the max-min normalization calculation formula is as follows: Pi is the i th quantity in the sample, Pi-min is the minimum value of the i th quantity, and Pi-max is the maximum value of the i th quantity. According to the above formula, the inverse normalization calculation formula can be obtained by simple transformation; The three-dimensional flux distribution, the nodal coupling factor and the effective multiplication factor output by the trained neural network model are consistent with the flux distribution, the nodal coupling factor and the effective multiplication factor given by the original diffusion solver after inverse normalization, the matrix coefficient is reconstructed by using the output of the neural network in the original diffusion solver, the calculation only needs to be iterated for 1-2 times to meet the convergence condition, and the core calculation is accelerated.
6. The method for fast calculation of core physics simulation programs using deep learning method according to claim 5, characterized in that: In the step 2, the VGG deep model is selected as the deep learning model, the convolution kernel adopts 3*3, and the pooling kernel adopts 2*2.
7. The method for fast calculation of core physics simulation programs using deep learning method according to claim 1, wherein: The step 3 is to calculate once by using a mechanism solver for each calculation result, to generate a deep learning model into a dll based on CPYTHON, and to integrate the dll into a simulation platform, in a three-dimensional core simulation program, to call a machine learning model in the dll, to pass cross-section data of each bin to the deep learning model as an argument, to pass the post-normalized calculation result back to the three-dimensional core simulation program through a parameter after the deep learning model is calculated.