Nuclear energy system distributed simulation method and system based on alternative implicit algorithm and ZeroMQ

Through the nuclear energy system distributed simulation method based on the alternating implicit algorithm and ZeroMQ, the simulation performance bottleneck and cross-platform joint simulation problems in traditional simulation technology are solved, and efficient nuclear energy system distributed simulation calculation is realized, which is suitable for the simulation of complex nuclear energy systems. need.

CN118536293APending Publication Date: 2024-08-23XI AN JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410640873.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Traditional nuclear energy system simulation technology has simulation performance bottlenecks and difficulty in cross-platform joint simulation, and cannot meet the needs for efficient simulation calculations of complex nuclear energy systems.

Method used

A distributed simulation method for nuclear energy systems based on the alternating implicit algorithm and ZeroMQ is adopted. By building a distributed simulation platform based on the TCP standard and ZeroMQ messaging system, the integrated model is disassembled to generate a distributed subsystem model, and the alternating implicit algorithm is used. Perform heavy coupling and scheduling between models to achieve distributed simulation calculations.

Benefits of technology

It improves the performance and efficiency of nuclear energy system simulation calculations, supports cross-platform joint simulation, breaks the performance bottlenecks and platform limitations of traditional simulation tools, and provides a high-performance distributed simulation solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536293A
    Figure CN118536293A
Patent Text Reader

Abstract

The invention discloses a nuclear energy system distributed simulation method and system based on an alternative implicit algorithm and ZeroMQ, and an integrated model disassembly algorithm and a distributed model recoupling algorithm are used for carrying out distributed simulation calculation on a nuclear energy system model, so that the limitation of a nuclear energy system modeling and simulation mode based on a single platform or tool is broken through; a Socket network communication technology based on a transmission control protocol and a message transmission system mechanism based on a zero message queue are utilized to construct a distributed simulation platform capable of providing parallel computing service for a nuclear energy system distributed simulation model. The distributed co-simulation among the subsystem models based on the same platform and the cross-platform distributed co-simulation among the subsystem models based on different platforms can be realized. According to the method, high-performance parallel computing and cross-platform joint simulation of the nuclear energy simulation system can be realized by utilizing a distributed simulation technology, and an effective implementation scheme is provided for the distributed simulation technology of the nuclear energy system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of distributed simulation of nuclear energy systems, and in particular relates to a distributed simulation method and system of nuclear energy systems based on an alternating implicit algorithm and ZeroMQ. Background Art

[0002] Simulation platform technology can be used to build a tool that simulates a real system or process. It can be tested and analyzed before the actual system or process is built, providing a safe and repeatable operating environment. Compared with traditional experimental methods, it greatly reduces the cost of development, testing and operation. It can also generate a large amount of data in a short period of time, thereby accelerating the design, optimization and decision-making process. Due to the complex composition structure and safe operation and maintenance requirements of nuclear energy systems, it has high requirements for the selection of simulation technology and simulation tools. Traditional simulation tools and technologies are often limited by the performance and storage capacity of local computers, and sometimes cannot meet the system's accuracy, efficiency requirements and operating conditions.

[0003] Distributed simulation technology has the advantage of collaborative resource computing. It can use the computing resources of multiple nodes to execute nuclear energy system simulation tasks in parallel. At the same time, it can coordinate multi-source platforms through scheduling strategies to perform cross-platform joint simulation, thereby supporting efficient simulation calculations of large-scale and complex nuclear energy systems.

[0004] In addition, the distributed system has a flexible architecture and is easy to expand. The system scale and configuration can be dynamically adjusted according to actual simulation needs, making it convenient to apply to simulation systems of different sizes.

[0005] In short, the combination of distributed technology and nuclear energy simulation technology can effectively solve the performance bottlenecks in the field of nuclear energy simulation, the effective reuse of classic simulation tools, and the cross-platform collaborative interaction problems, and provide certain technical guidance and ideas for the research on modern complex nuclear energy system simulation. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a nuclear energy system distributed simulation method and system based on an alternating implicit algorithm and ZeroMQ in response to the above-mentioned deficiencies in the prior art, so as to solve the technical problems of simulation performance bottleneck and difficulty in cross-platform joint simulation in traditional nuclear energy system simulation technology.

[0007] The present invention adopts the following technical solutions:

[0008] The distributed simulation method of nuclear energy system based on alternating implicit algorithm and ZeroMQ includes the following steps:

[0009] S1. Build a distributed simulation platform based on TCP standard and ZeroMQ messaging system;

[0010] S2, applying an integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain a subsystem model for distributed simulation;

[0011] S3, generating a corresponding model file for the distributed subsystem model obtained in step S2 according to the original modeling platform type;

[0012] S4, embedding the model file in step S3 into the distributed simulation platform obtained in step S1, applying the alternating implicit algorithm to recouple the models and waiting for subsequent scheduling;

[0013] S5, setting simulation tasks and working condition parameters at the top level of the distributed simulation platform obtained in step S4 and starting the simulation process, receiving the tasks and working condition parameters issued at the middle level of the distributed simulation platform, and performing transfer and scheduling processing; then receiving the tasks and working condition parameters issued at the bottom level of the distributed simulation platform, and performing actual simulation calculations;

[0014] S6. After the simulation calculation in step S5 is completed, the middle layer of the distributed simulation platform returns the calculation results and status of the bottom layer of the distributed simulation platform to the top layer of the distributed simulation platform, completing the distributed simulation calculation process.

[0015] Preferably, in step S1, a distributed simulation platform based on TCP standard and ZeroMQ messaging system is constructed by using Python programming language and distributed technology concepts and principles.

[0016] More preferably, the distributed simulation platform specifically includes:

[0017] The top-level client cluster of the distributed simulation platform can dynamically expand on demand based on the various forms of user terminals developed according to actual usage requirements;

[0018] The top-level proxy transfer station of the distributed simulation platform is used to transfer data between the internal client cluster and the lower-level functional interval;

[0019] The middle-level task pool cluster of the distributed simulation platform pre-stores specific simulation task content and corresponding initialization data, and has a built-in database for simulation data management, which can be dynamically expanded as needed;

[0020] The middle-level dispatching center of the distributed simulation platform is used for forwarding simulation tasks, data scheduling and management of the simulation process, load balancing, and fault recovery;

[0021] The underlying computing node cluster of the distributed simulation platform is used to schedule model files to execute the functional nodes of the simulation calculation process, and is dynamically expanded on demand.

[0022] Preferably, in step S2, a forward difference strategy is adopted for the time term to discretize the continuity equation of the nuclear energy system pipeline model, and then the discretized pipeline model is disassembled based on the Ghost-point method to obtain a subsystem model that can be used for distributed simulation.

[0023] Preferably, in step S3, based on the characteristics of the original model building tool or software, an independent model file is generated accordingly to be called.

[0024] Preferably, in step S4, the distributed subsystem model file obtained in step S3 is dynamically loaded into a corresponding number of computing nodes according to actual usage requirements, the path where the file is located can be freely modified, and the re-coupling of the distributed subsystem model in an independent state is achieved by an alternating implicit algorithm, thereby completing the preparations before subsequent distributed simulation scheduling.

[0025] More preferably, the dynamic loading method is implemented by calling the corresponding Python tool library function according to the file type.

[0026] Preferably, in step S5, a specific simulation task is selected in the user-customized client interface and the working condition initialization parameters are input, and then the distributed simulation platform is started and the simulation is officially started after the task is issued by the agent transfer station;

[0027] After receiving the simulation tasks and specific parameters sent by the top layer, the platform's middle-layer task pool publishes specific simulation tasks and initialization parameters to the dispatch center. After receiving them, the dispatch center forwards and allocates the tasks to the appropriate platform's underlying computing nodes according to the task scheduling algorithm and load balancing strategy, and prepares the data scheduling status of the corresponding tasks.

[0028] The computing nodes at the bottom of the platform receive specific simulation tasks and initialization data to perform distributed simulation calculations. The scheduling center monitors the simulation status of the computing node cluster in real time to enable timely management and scheduling.

[0029] Preferably, in step S6, after completing the task, the computing node returns the final result or status to the scheduling center, which reorganizes and packages it and then feeds it back to the client layer by layer for display.

[0030] In a second aspect, an embodiment of the present invention provides a distributed simulation system for a nuclear energy system based on an alternating implicit algorithm and ZeroMQ, comprising:

[0031] Platform module, building a distributed simulation platform based on TCP standard and ZeroMQ messaging system;

[0032] The disassembly module uses the integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain the subsystem model for distributed simulation, and generates the corresponding model file for the distributed subsystem model according to the original modeling platform type;

[0033] The coupling module embeds the model file into the distributed simulation platform, applies the alternating implicit algorithm to recouple the models and waits for subsequent scheduling;

[0034] The simulation module sets simulation tasks and working condition parameters at the top level of the distributed simulation platform and starts the simulation process. It receives the tasks and working condition parameters sent down at the middle level of the distributed simulation platform and performs transfer and scheduling. It then receives the tasks and working condition parameters sent down at the bottom level of the distributed simulation platform and performs actual simulation calculations.

[0035] Output module, after the simulation calculation is completed, the middle layer of the distributed simulation platform returns the calculation results and status of the bottom layer of the distributed simulation platform to the top layer of the distributed simulation platform, completing the distributed simulation calculation process.

[0036] In a third aspect, a computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned distributed simulation method of a nuclear energy system based on an alternating implicit algorithm and ZeroMQ when executing the computer program.

[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, comprising a computer program, which, when executed by a processor, implements the steps of the above-mentioned distributed simulation method of a nuclear energy system based on an alternating implicit algorithm and ZeroMQ.

[0038] Compared with the prior art, the present invention has at least the following beneficial effects:

[0039] The distributed simulation method of nuclear energy system based on alternating implicit algorithm and ZeroMQ uses the matching algorithm to disassemble the integrated model of nuclear energy system to generate a distributed model, and then the distributed simulation calculation can be carried out in the platform. In this method, users can disassemble the original integrated nuclear energy system simulation model into a distributed model that can perform parallel simulation calculations, and at the same time, reconnect the distributed simulation model using the alternating implicit coupling algorithm according to the simulation task requirements; then, according to the characteristics of the original system model construction tool or modeling platform, generate a model file in the corresponding format; embed the model file into the simulation platform, and wait for the formal simulation to start when the scheduling center of the platform will uniformly perform scheduling management; after the top-level client of the platform starts the simulation, it sends simulation instructions and initialization data to start the simulation; the top-level proxy transfer station of the platform passively receives the information and data sent by the upper and lower layers, and performs internal confidential transfer; the middle-level task pool of the platform receives the simulation instructions After the data is initialized, tasks are allocated and published, and passed to the dispatch center for unified management, and the final results of each task are saved as needed; the dispatch center allocates computing nodes according to the task scheduling algorithm and load balancing strategy, forwards tasks and prepares the corresponding simulation task scheduling logic, and monitors the health status of nodes in real time; after the computing nodes assigned tasks have completed subscription and obtained the initialization data, they start calling the dynamically loaded model files for simulation calculations, and the simulation process is managed and controlled by the dispatch center; after all computing nodes complete the tasks, they upload the final results, which are unified and integrated by the dispatch center, and fed back to the corresponding clients layer by layer for display, completing a distributed simulation calculation process of the nuclear energy system.

[0040] Further, based on the TCP standard and ZeroMQ messaging system, different tools or software can be used to construct the client interaction program at the top level of the platform; for example, by using the Qt tool based on the C++ language or the PyQt tool based on the Python language, .exe human-computer interaction software suitable for Windows computer systems can be developed; or using the Unity tool based on the C# language and the Android Studio tool based on the Java language, an APP for smart mobile devices suitable for the Android system can be developed; professional tools can also be used to develop industrial control host computer interface programs based on other special systems; this customized development method with good compatibility is conducive to the promotion and application of the distributed simulation platform designed in the present invention, which can meet the simulation requirements of nuclear energy systems in different scenarios, and the "three-layer five-zone" functional structure of the distributed simulation platform constructed using the Python language is conducive to the subsequent optimization, expansion and operation and maintenance of the platform. The structure of each functional area of ​​the platform is independent and closely connected, and can be developed using appropriate technical means according to the characteristic requirements of different functional areas, which greatly improves the convenience of development and enhances the overall robustness of the platform.

[0041] Furthermore, a forward difference strategy is used for the time term to discretize the continuity equation of the nuclear energy system pipeline model, and then the discretized pipeline model is disassembled based on the Ghost-point method to obtain a subsystem model that can be used for distributed simulation. This strategy has good universality and is relatively applicable to most nuclear energy system simulation models based on integrated modeling. The alternating implicit interaction strategy is used as a heavy coupling algorithm between distributed models, which can effectively guarantee the accuracy of simulation results in actual simulations and has good applicability and accuracy.

[0042] Furthermore, according to the tool or software characteristics of the obtained distributed model, the distributed model files of the corresponding formats (such as .fmu and .dll) can be compiled according to some commonly used independent file generation standards and methods (such as FMI and DLL). The use of these common standards and methods greatly enhances the compatibility of the distributed simulation platform for model import files and the ease of use during scheduling, which is very convenient for expanding the cross-platform joint simulation capabilities of the distributed model of the nuclear energy system.

[0043] Furthermore, since the simulation platform uses Python as the main development tool, it can call various distributed model files through Python's powerful and rich tool library, making the file management and data processing process in the simulation calculation process simple and convenient, which helps to improve development efficiency and reduce maintenance costs; and due to the "glue" characteristics of Python language, it has a good coupling with program codes implemented in other languages, further enhancing the platform's compatibility with different types of model files.

[0044] Furthermore, during simulation, the scheduling module searches for the storage path of the distributed model file and dynamically loads and calls it, which greatly enhances the freedom of model file calling. Users can replace or change files and file paths at any time according to their needs, which is very suitable for various mainstream computing terminals nowadays.

[0045] Furthermore, due to the layered structure defined at the beginning of the platform design, each functional layer performs its own duties and has good security isolation. The failure of a certain layer will not cause the entire platform to crash. The robustness of the platform is sufficiently guaranteed. The database function has been added to the middle layer of the platform, which can well preserve historical simulation data and result status information, and make long-term data reserves for subsequent simulation tasks or working condition analysis. It has long-term practicality. Based on the cluster design characteristics of the underlying platform, the simulation computing power can be dynamically expanded according to actual simulation needs. It is suitable for various complex nuclear energy system simulation tasks, and due to the characteristics of multi-node parallel computing, it will also greatly enhance the simulation computing capability, improve computing efficiency, and break through the original performance bottleneck.

[0046] Furthermore, since the dispatch center uniformly manages the final status or results of each computing node, the target results to be analyzed can be returned in an orderly manner as needed, avoiding the problem of communication congestion caused by the overall feedback of a large number of invalid results. In addition, the layer-by-layer feedback mechanism also allows the task pool to obtain the final simulation results and store them in the database, which is convenient for subsequent reference and analysis. In addition, because the proxy transfer station may be connected to multiple clients, the dispatch center returns the target results in a targeted manner, which can ensure that the current task results are correctly fed back to the corresponding client.

[0047] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0048] In summary, the present invention can utilize distributed simulation technology to provide high-performance computing services and cross-platform joint simulation solutions for nuclear energy system models, and provide practical solutions and tool platforms for complex simulation tasks of nuclear energy systems.

[0049] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a schematic diagram of the principle architecture of the distributed simulation platform of the present invention;

[0051] Figure 2 Schematic diagram of the principle of the loosely coupled algorithm for distributed simulation models, where (a) is a schematic diagram of the disassembly of the integrated pipeline model of the nuclear energy system, and (b) is a schematic diagram of the alternating implicit algorithm;

[0052] Figure 3 This is a diagram of the functional structure of the client cluster at the top level of the platform;

[0053] Figure 4 This is a diagram of the functional structure of the proxy transfer station at the top level of the platform;

[0054] Figure 5 This is a diagram of the functional structure of the task pool cluster in the middle layer of the platform;

[0055] Figure 6 This is a diagram of the functional structure of the dispatch center in the middle layer of the platform;

[0056] Figure 7 This is a diagram of the functional structure of the computing node cluster at the bottom layer of the platform;

[0057] Figure 8The simulation results of the CPR1000 nuclear power plant from 100% to 90% power level step load reduction based on the distributed simulation platform, including (a) the core relative power simulation result, (b) the coolant average temperature simulation result, (c) the steam generator narrow range relative liquid level simulation result, and (d) the steam generator feed water flow simulation result;

[0058] Fig. 9 A schematic diagram of a computer device provided by an embodiment of the present invention;

[0059] Fig.10 The block diagram of a chip provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0061] In the description of the present invention, it should be understood that the terms “include” and “comprises” indicate the presence of described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or collections thereof.

[0062] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0063] It should be further understood that the term "and / or" used in the present specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present invention generally indicates that the associated objects are in an "or" relationship.

[0064] It should be understood that, although the terms first, second, third, etc. may be used to describe preset ranges, etc. in the embodiments of the present invention, these preset ranges should not be limited to these terms. These terms are only used to distinguish preset ranges from each other. For example, without departing from the scope of the embodiments of the present invention, the first preset range may also be referred to as the second preset range, and similarly, the second preset range may also be referred to as the first preset range.

[0065] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0066] Various structural schematic diagrams of the embodiments disclosed in the present invention are shown in the accompanying drawings. These figures are not drawn to scale, and some details are magnified and some details may be omitted for the purpose of clear expression. The shapes of various regions and layers shown in the figures and the relative sizes and positional relationships therebetween are only exemplary, and may deviate in practice due to manufacturing tolerances or technical limitations, and those skilled in the art may additionally design regions / layers with different shapes, sizes, and relative positions according to actual needs.

[0067] The present invention provides a distributed simulation method for nuclear energy systems based on an alternating implicit algorithm and ZeroMQ, which performs distributed simulation calculations on nuclear energy system models, making full use of the parallelism, strong computing power, and scalability of distributed technology, and provides a method and tool for system simulation calculations in the nuclear energy field that can effectively solve performance bottlenecks, reuse classic simulation tools, and cross-platform joint simulation problems.

[0068] See also Figure 1 The present invention provides a distributed simulation method for a nuclear energy system based on an alternating implicit algorithm and ZeroMQ, comprising the following steps:

[0069] S1. Based on the concept of distributed technology, a distributed simulation platform with a "three-layer five-zone" functional structure is constructed by using the Python programming language, the Transmission Control Protocol (TCP) and the Zero Message Queue (ZeroMQ or ZMQ);

[0070] See also Figure 2, which is the principle of the integrated model disassembly algorithm and distributed model re-coupling algorithm used by the user in the actual use of the present invention to obtain a distributed simulation model suitable for the distributed simulation platform; the original system model to be simulated is disassembled, and the distributed model is obtained and then connected using the re-coupling algorithm to ensure the integrity of the system. Then, according to the tool or software characteristics of the original model, a model file of the corresponding format is generated and embedded in the distributed simulation platform for use.

[0071] Through Python programming language, the distributed technology concepts and principles are used to build a distributed simulation platform based on TCP standard and ZeroMQ messaging system.

[0072] The distributed simulation platform is designed with a functional structure of "three layers and five areas". Each functional area is designed separately and managed in a unified manner, using TCP and ZeroMQ to implement the communication mechanism and data scheduling throughout the entire platform.

[0073] The distributed simulation platform of nuclear energy system based on alternating implicit algorithm and ZeroMQ includes:

[0074] The top-level client cluster of the distributed simulation platform can be dynamically expanded as needed, with various forms of user terminals (APP, EXE, upper computer teaching and control interface, etc.) developed according to actual usage needs;

[0075] The top-level proxy transfer station of the distributed simulation platform is a module used for data interaction between the internal transfer client cluster and the lower-level functional interval, which has the characteristics of ensuring data security;

[0076] The middle-level task pool cluster of the distributed simulation platform pre-stores specific simulation task content and corresponding initialization data, and has a built-in database for simulation data management, which can be dynamically expanded as needed;

[0077] The middle-level dispatching center of the distributed simulation platform is the core functional hub of the platform, responsible for forwarding simulation tasks, data scheduling and management of the simulation process, as well as load balancing, fault recovery and other functions;

[0078] The underlying computing node cluster of the distributed simulation platform is actually used to schedule model files to execute the functional nodes of the simulation calculation process, which can be dynamically expanded as needed.

[0079] S2, using an integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain a subsystem model that can be used for distributed simulation;

[0080] The forward difference strategy is used for the time term to discretize the continuity equation of the nuclear energy system pipeline model. Then the discretized pipeline model is disassembled based on the Ghost-point method to obtain a subsystem model that can be used for distributed simulation.

[0081] S3, generating a model file in a corresponding FMU or DLL format according to the type of the original modeling platform for the distributed subsystem model obtained in step S2, so that it can be used in the distributed simulation platform constructed in step S1;

[0082] Based on the characteristics of the original model building tool or software, an independent model file is generated accordingly for calling, such as: a MATLAB / Simulink platform or a Modelica platform that supports the FMI standard can generate an FMU file, and a Fortran code program or a C / C++ code program can generate a DLL file.

[0083] S4, embedding the model file in step S3 into the distributed simulation platform in step S1, applying the alternating implicit algorithm to perform re-coupling between models and waiting for subsequent scheduling;

[0084] The distributed subsystem model file obtained in step S3 is dynamically loaded into the corresponding number of computing nodes according to actual usage requirements. The path where the file is located can be modified freely, and the re-coupling of the distributed subsystem model in an independent state is realized by an alternating implicit algorithm to complete the preparation work before the subsequent distributed simulation scheduling.

[0085] The dynamic loading method will vary depending on the file type, and different Python tool library functions need to be called to implement it.

[0086] See also Figure 3 and Figure 4 According to the client interface built on the current platform, select the task to be simulated and enter the relevant initialization parameters, click the simulation button to start the simulation calculation, the simulation content and data are packaged into JSON format data packets and securely sent by the proxy transfer station, and finally the simulation results are collected and fed back to the client.

[0087] S5, setting simulation tasks and working condition parameters at the top level of the distributed simulation platform in step S4 and starting the simulation process; receiving the tasks and parameters issued at the middle level of the distributed simulation platform, and performing transfer and scheduling processing; then receiving the tasks and parameters issued at the bottom level of the distributed simulation platform, and performing actual simulation calculations;

[0088] In the user-customized client interface, select a specific simulation task and enter the working condition initialization parameters, then start the distributed simulation platform and the simulation will officially begin after the agent transfer station issues the task.

[0089] See also Figure 5 and Figure 6After receiving the simulation instruction, the task pool sets the specific task content and other related data, merges and repackages them with the received data packets, and forwards them to the scheduling center. The scheduling center allocates specific computing nodes and publishes them. Finally, the returned simulation results and status information are stored in the database for subsequent retrieval and analysis. After obtaining the simulation task, the scheduling center performs task scheduling and load balancing according to the status of the current computing node cluster, selects appropriate computing nodes for task forwarding, monitors the health status of the node cluster during simulation in real time, and finally integrates the simulation results and feeds them back to the upper layer.

[0090] After receiving the simulation tasks and specific parameters sent by the top layer, the platform's middle-level task pool publishes the specific simulation tasks and initialization parameters to the scheduling center. After receiving them, the scheduling center forwards the tasks to the appropriate platform's underlying computing nodes based on the task scheduling algorithm and load balancing strategy, and prepares the data scheduling status of the corresponding tasks.

[0091] See also Figure 7 After the assigned computing node subscribes to the task, it receives the task content data packet transmitted by the upper layer, performs JSON data parsing to obtain the specific task content and initial value data, and then dynamically loads the model file to start the simulation calculation. The data exchange during the calculation process is uniformly managed by the scheduling center, and finally the calculation results and completion status information are uploaded to the scheduling center for unified processing.

[0092] The computing nodes at the bottom of the platform receive specific simulation tasks and initialization data to perform distributed simulation calculations. The scheduling center monitors the simulation status of the computing node cluster in real time to enable timely management and scheduling.

[0093] S6. After the simulation calculation in step S5 is completed, the middle layer of the distributed simulation platform returns the calculation results and status of the bottom layer of the platform to the top layer of the platform, thus completing a distributed simulation calculation process.

[0094] After completing the task, the computing node returns the final result or status to the scheduling center, which reorganizes and packages it and then feeds it back to the client layer by layer for display.

[0095] See also Figure 8 The distributed joint simulation calculation results of subsystem models constructed from different source tools in the platform are good. The overall change trend of key parameters under the adjustment of the control system is consistent, and the steady-state error is basically zero. The final simulation results are basically consistent with the reference value, which proves the applicability and accuracy of the distributed simulation method proposed in the present invention in the nuclear energy system model.

[0096] In another embodiment of the present invention, a distributed simulation system for a nuclear energy system based on an alternating implicit algorithm and ZeroMQ is provided. The system can be used to implement the above-mentioned distributed simulation method for a nuclear energy system based on an alternating implicit algorithm and ZeroMQ. Specifically, the distributed simulation system for a nuclear energy system based on an alternating implicit algorithm and ZeroMQ includes a platform module, a disassembly module, a coupling module, a simulation module and an output module.

[0097] Among them, the platform module builds a distributed simulation platform based on TCP standard and ZeroMQ messaging system;

[0098] The disassembly module uses the integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain the subsystem model for distributed simulation, and generates the corresponding model file for the distributed subsystem model according to the original modeling platform type;

[0099] The coupling module embeds the model file into the distributed simulation platform, applies the alternating implicit algorithm to recouple the models and waits for subsequent scheduling;

[0100] The simulation module sets simulation tasks and working condition parameters at the top level of the distributed simulation platform and starts the simulation process. It receives the tasks and working condition parameters sent down at the middle level of the distributed simulation platform and performs transfer and scheduling. It then receives the tasks and working condition parameters sent down at the bottom level of the distributed simulation platform and performs actual simulation calculations.

[0101] Output module, after the simulation calculation is completed, the middle layer of the distributed simulation platform returns the calculation results and status of the bottom layer of the distributed simulation platform to the top layer of the distributed simulation platform, completing the distributed simulation calculation process.

[0102] In another embodiment of the present invention, a terminal device is provided, the terminal device includes a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement corresponding method flows or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of a distributed simulation method for a nuclear energy system based on an alternating implicit algorithm and ZeroMQ, including:

[0103] Construct a distributed simulation platform based on TCP standard and ZeroMQ messaging system; apply integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain the subsystem model for distributed simulation; generate corresponding model files for the distributed subsystem model according to the original modeling platform type; embed the model file into the distributed simulation platform, apply the alternating implicit algorithm to recouple the models and wait for subsequent scheduling; set simulation tasks and operating parameters at the top level of the obtained distributed simulation platform and start the simulation process, receive the tasks and operating parameters issued at the middle level of the distributed simulation platform, and perform transfer and scheduling; then receive the tasks and operating parameters issued at the bottom level of the distributed simulation platform and perform actual simulation calculations; after the simulation calculations are completed, the middle level of the distributed simulation platform returns the calculation results and status of the bottom level of the distributed simulation platform to the top level of the distributed simulation platform to complete the distributed simulation calculation process.

[0104] In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory.

[0105] The processor may load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the distributed simulation method of a nuclear energy system based on an alternating implicit algorithm and ZeroMQ in the above embodiment; the processor may load and execute the following steps of one or more instructions in the computer-readable storage medium:

[0106] Construct a distributed simulation platform based on TCP standard and ZeroMQ messaging system; apply integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain the subsystem model for distributed simulation; generate corresponding model files for the distributed subsystem model according to the original modeling platform type; embed the model file into the distributed simulation platform, apply the alternating implicit algorithm to recouple the models and wait for subsequent scheduling; set simulation tasks and operating parameters at the top level of the obtained distributed simulation platform and start the simulation process, receive the tasks and operating parameters issued at the middle level of the distributed simulation platform, and perform transfer and scheduling; then receive the tasks and operating parameters issued at the bottom level of the distributed simulation platform and perform actual simulation calculations; after the simulation calculations are completed, the middle level of the distributed simulation platform returns the calculation results and status of the bottom level of the distributed simulation platform to the top level of the distributed simulation platform to complete the distributed simulation calculation process.

[0107] See also Fig. 9, the terminal device is a computer device, and the computer device 60 of this embodiment includes: a processor 61, a memory 62, and a computer program 63 stored in the memory 62 and executable on the processor 61. When the computer program 63 is executed by the processor 61, the method for calculating the composition of fluid in the reservoir transformation wellbore in the embodiment is realized. To avoid repetition, it is not described one by one here. Alternatively, when the computer program 63 is executed by the processor 61, the functions of each model / unit in the calculation system for the composition of fluid in the reservoir transformation wellbore in the embodiment are realized. To avoid repetition, it is not described one by one here.

[0108] The computer device 60 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The computer device 60 may include, but is not limited to, a processor 61 and a memory 62. Those skilled in the art will appreciate that Fig. 9 This is only an example of the computer device 60 and does not constitute a limitation of the computer device 60. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the computer device may also include input and output devices, network access devices, buses, etc.

[0109] The processor 61 may be a central processing unit (CPU), or other general-purpose processors, central processing units, graphics processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, data processing logic based on quantum computing, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0110] The memory 62 may be an internal storage unit of the computer device 60, such as a hard disk or memory of the computer device 60. The memory 62 may also be an external storage device of the computer device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the computer device 60.

[0111] Furthermore, the memory 62 may include both an internal storage unit of the computer device 60 and an external storage device. The memory 62 is used to store computer programs and other programs and data required by the computer device. The memory 62 may also be used to temporarily store data that has been output or is to be output.

[0112] Any reference to memory, database or other media used in the embodiments provided in the present application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0113] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0114] See also Fig.10 , the terminal device is a chip, and the chip 600 of this embodiment includes a processor 622, which may be one or more, and a memory 632 for storing a computer program executable by the processor 622. The computer program stored in the memory 632 may include one or more modules, each corresponding to a set of instructions. In addition, the processor 622 may be configured to execute the computer program to execute the above-mentioned generalizable monocular absolute depth map estimation method.

[0115] In addition, the chip 600 may further include a power supply component 626 and a communication component 650, wherein the power supply component 626 may be configured to perform power management of the chip 600, and the communication component 650 may be configured to implement communication, for example, wired or wireless communication, of the chip 600. In addition, the chip 600 may further include an input / output interface 658. The chip 600 may operate based on an operating system stored in the memory 632.

[0116] The present invention provides a general design scheme for a distributed simulation platform for a nuclear energy system. According to the scheme, a dynamically scalable, highly robust distributed simulation platform with a "three-layer five-zone" functional structure can be realized. At the same time, an adaptation algorithm for transforming the original integrated system model into a distributed simulation model is provided. The algorithm is easy to implement and has excellent performance, and is very suitable for popularization and use. Users can apply this method to perform distributed simulation calculations of nuclear energy system models, breaking the limitations of traditional nuclear energy system simulation methods based on a single platform or tool, effectively solving the problems of simulation performance bottlenecks, reuse of classic simulation tools, and cross-platform joint simulation, and providing new ideas and reference directions for simulation research in the nuclear energy field.

[0117] Since the client application at the top of the platform is built, highly human-friendly visual simulation can be achieved. Users can select simulation tasks and set simulation parameters in the interface and perform simulation calculations anytime and anywhere without being affected by time and location, which greatly improves the convenience of using the distributed simulation platform. At the same time, since the middle and lower layers of the platform are transparent to users and adopt a data transmission mechanism with a high safety factor, the security of the simulation process and data is guaranteed to a large extent, and the structure of the simulation model is hidden, which is naturally applicable to the nuclear energy industry, which has extremely high requirements for data sensitivity and model security.

[0118] In summary, the present invention provides a distributed simulation method and system for nuclear energy systems based on an alternating implicit algorithm and ZeroMQ. The tool is developed in Python language. Based on the connection-oriented, reliable, and universal network communication protocol TCP and the lightweight, multi-socket mode, and easily extensible ZeroMQ message queue, the overall information transmission mechanism of the platform is realized, and a simulation platform system with a "three-layer and five-zone" dynamic expansion structure is constructed. The high concurrency, strong computing power of distributed technology and the reliability and stability of the communication mechanism are utilized to complete the distributed simulation calculation of the nuclear energy system model, breaking the traditional nuclear energy system simulation mode, and effectively solving the performance bottleneck, the reuse of classic tools, and the cross-platform collaborative simulation problems in the field of nuclear energy simulation. It provides certain technical guidance and ideas for the research on modern complex nuclear energy system simulation.

[0119] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0122] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0123] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0124] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0125] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0126] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0129] The above contents are only for explaining the technical idea of ​​the present invention and cannot be used to limit the protection scope of the present invention. Any changes made on the basis of the technical solution in accordance with the technical idea proposed by the present invention shall fall within the protection scope of the claims of the present invention.

Claims

1. A distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ, characterized in that: The following steps are involved: S1. Build a distributed simulation platform based on TCP standard and ZeroMQ messaging system; S2, applying an integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain a subsystem model for distributed simulation; S3, generating a corresponding model file for the distributed subsystem model obtained in step S2 according to the original modeling platform type; S4, embedding the model file in step S3 into the distributed simulation platform obtained in step S1, applying the alternating implicit algorithm to recouple the models and waiting for subsequent scheduling; S5, setting simulation tasks and working condition parameters at the top level of the distributed simulation platform obtained in step S4 and starting the simulation process, receiving the tasks and working condition parameters issued at the middle level of the distributed simulation platform, and performing transfer and scheduling processing; Then, the distributed simulation platform receives the tasks and working condition parameters issued and performs actual simulation calculations; S6. After the simulation calculation in step S5 is completed, the middle layer of the distributed simulation platform returns the calculation results and status of the bottom layer of the distributed simulation platform to the top layer of the distributed simulation platform, completing the distributed simulation calculation process.

2. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 1, characterized in that: In step S1, a distributed simulation platform based on TCP standard and ZeroMQ messaging system is constructed by using Python programming language and distributed technology concepts and principles.

3. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 2, characterized in that: The distributed simulation platform specifically includes: The top-level client cluster of the distributed simulation platform can dynamically expand on demand based on the various forms of user terminals developed according to actual usage requirements; The top-level proxy transfer station of the distributed simulation platform is used to transfer data between the internal client cluster and the lower-level functional interval; The middle-level task pool cluster of the distributed simulation platform pre-stores specific simulation task content and corresponding initialization data, and has a built-in database for simulation data management, which can be dynamically expanded as needed; The middle-level dispatching center of the distributed simulation platform is used for forwarding simulation tasks, data scheduling and management of the simulation process, load balancing, and fault recovery; The underlying computing node cluster of the distributed simulation platform is used to schedule model files to execute the functional nodes of the simulation calculation process, and is dynamically expanded on demand.

4. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 1, characterized in that: In step S2, a forward difference strategy is used for the time term to discretize the continuity equation of the nuclear energy system pipeline model, and then the discretized pipeline model is disassembled based on the Ghost-point method to obtain a subsystem model that can be used for distributed simulation.

5. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 1, characterized in that: In step S3, based on the characteristics of the original model building tool or software, an independent model file is generated to be called.

6. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 1, characterized in that: In step S4, the distributed subsystem model file obtained in step S3 is dynamically loaded into the corresponding number of computing nodes according to actual usage requirements. The path where the file is located can be modified freely, and the re-coupling of the distributed subsystem model in an independent state is achieved by an alternating implicit algorithm to complete the preparation work before the subsequent distributed simulation scheduling.

7. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 6, characterized in that: The dynamic loading method is implemented by calling the corresponding Python tool library function according to the file type.

8. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 1, characterized in that: In step S5, a specific simulation task is selected in the user-customized client interface and the working condition initialization parameters are input, and then the distributed simulation platform is started and the simulation is officially started after the agent transfer station issues the task; After receiving the simulation tasks and specific parameters sent by the top layer, the platform's middle-layer task pool publishes specific simulation tasks and initialization parameters to the dispatch center. After receiving them, the dispatch center forwards and allocates the tasks to the appropriate platform's underlying computing nodes according to the task scheduling algorithm and load balancing strategy, and prepares the data scheduling status of the corresponding tasks. The computing nodes at the bottom of the platform receive specific simulation tasks and initialization data to perform distributed simulation calculations. The scheduling center monitors the simulation status of the computing node cluster in real time to enable timely management and scheduling.

9. The distributed simulation method for nuclear energy system based on alternating implicit algorithm and ZeroMQ according to claim 1, characterized in that: In step S6, after completing the task, the computing node returns the final result or status to the scheduling center, which reorganizes and packages it and then feeds it back to the client layer by layer for display.

10. A distributed simulation system for nuclear energy system based on alternating implicit algorithm and ZeroMQ, characterized in that: include: Platform module, building a distributed simulation platform based on TCP standard and ZeroMQ messaging system; The disassembly module uses the integrated model disassembly algorithm to disassemble the nuclear energy system simulation model to obtain the subsystem model for distributed simulation, and generates the corresponding model file for the distributed subsystem model according to the original modeling platform type; The coupling module embeds the model file into the distributed simulation platform, applies the alternating implicit algorithm to recouple the models and waits for subsequent scheduling; The simulation module sets simulation tasks and working condition parameters at the top level of the distributed simulation platform and starts the simulation process. It receives the tasks and working condition parameters issued at the middle level of the distributed simulation platform and performs transfer and scheduling. Then, the distributed simulation platform receives the tasks and working condition parameters issued and performs actual simulation calculations; Output module, after the simulation calculation is completed, the middle layer of the distributed simulation platform returns the calculation results and status of the bottom layer of the distributed simulation platform to the top layer of the distributed simulation platform, completing the distributed simulation calculation process.