Thermal hydraulic model processing method and device, electronic equipment and storage medium

By converting the topological structure diagram of the thermal hydraulic model into an undirected graph and building a sparse matrix, the problem of low efficiency in handling large models by traditional thermal hydraulic simulation software is solved, and fast solution and efficient processing are achieved.

CN119692235APending Publication Date: 2025-03-25SUZHOU TONGYUAN SOFT CONTROL INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411767153.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Traditional thermal hydraulic simulation software is less efficient and takes time to process large thermal hydraulic models.

Method used

By obtaining the topological diagram of the thermal hydraulic model, converting it into an undirected graph, traversing the nodes to obtain independent connected graphs, and building sparse matrices based on these graphs, thereby decomposing the large sparse matrices into multiple small matrices for calculation.

Benefits of technology

The rapid solution of thermal hydraulic model is achieved, which significantly improves the processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119692235A_ABST
    Figure CN119692235A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a thermal hydraulic model processing method and device, electronic equipment and a storage medium. The method comprises the steps that a topological structure diagram of a first thermal hydraulic model is obtained, and the topological structure diagram is a directed diagram; converting the topological structure diagram into an undirected graph, and traversing nodes in the undirected graph to obtain at least one independent connection diagram; for each independent connection diagram, constructing a sparse matrix corresponding to the independent connection diagram based on the topological structure diagram and the independent connection diagram; and calculating the sparse matrix, and obtaining state variable information of the first thermal hydraulic model based on a calculation result of the sparse matrix. According to the technical scheme of the embodiment of the invention, the method achieves the quick solving of the artificial hydraulic model, and effectively improves the processing efficiency of the artificial hydraulic model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of thermal hydraulic technology, and in particular to a method, device, electronic device, and storage medium for processing a thermal hydraulic model. Background Art

[0002] Traditional thermal-hydraulic simulation software, especially thermal-hydraulic system safety analysis software used in the nuclear industry, is limited by the limitations of previous hardware equipment. It often takes a long time to calculate large thermal-hydraulic models, and there is a technical problem of low efficiency in processing large thermal-hydraulic models. Summary of the Invention

[0003] The present invention provides a method, device, electronic equipment and storage medium for processing a thermal hydraulic model, so as to achieve a relatively fast solution to an artificial hydraulic model, thereby effectively improving the processing efficiency of the artificial hydraulic model.

[0004] According to one aspect of the present invention, a method for processing a thermal hydraulic model is provided, the method comprising:

[0005] Obtaining a topological structure diagram of a first thermal-hydraulic model, wherein the topological structure diagram is a directed graph;

[0006] Converting the topological structure graph into an undirected graph, traversing the nodes in the undirected graph to obtain at least one independent connection graph;

[0007] For each independent connection graph, constructing a sparse matrix corresponding to the independent connection graph based on the topological structure graph and the independent connection graph;

[0008] The sparse matrix is ​​calculated, and state variable information of the first thermal-hydraulic model is obtained based on the calculation result of the sparse matrix.

[0009] According to another aspect of the present invention, a device for processing a thermal hydraulic model is provided. The device comprises:

[0010] A graph acquisition module, configured to acquire a topological structure graph of the first thermal-hydraulic model, wherein the topological structure graph is a directed graph;

[0011] A graph traversal module, configured to convert the topology graph into an undirected graph, and traverse the nodes in the undirected graph to obtain at least one independent connection graph;

[0012] a matrix construction module, configured to construct, for each independent connection graph, a sparse matrix corresponding to the independent connection graph based on the topological structure graph and the independent connection graph;

[0013] The matrix calculation module is used to calculate the sparse matrix and obtain the state variable information of the first thermal-hydraulic model based on the calculation result of the sparse matrix.

[0014] According to another aspect of the present invention, an electronic device is provided, comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the thermal-hydraulic model processing method described in any embodiment of the present invention.

[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the processing method of the thermal-hydraulic model according to any embodiment of the present invention when executed.

[0019] The technical solution of the embodiment of the present invention is to obtain a topological structure diagram of the first thermal-hydraulic model, wherein the topological structure diagram is a directed graph; convert the topological structure diagram into an undirected graph, traverse the nodes in the undirected graph, and obtain at least one independent connection graph, thereby realizing the decomposition of the topological structure diagram of the first thermal-hydraulic model; for each independent connection graph, based on the topological structure diagram and the independent connection graph, construct a sparse matrix corresponding to the independent connection graph, thereby realizing the decomposition of the large sparse matrix of the first thermal-hydraulic model into multiple small sparse matrices; thereby calculating the sparse matrix, and obtaining the state variable information of the first thermal-hydraulic model based on the calculation result of the sparse matrix. The technical solution of the embodiment of the present invention realizes a relatively fast solution of the artificial hydraulic model, effectively improving the processing efficiency of the artificial hydraulic model.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0022] Figure 1 A schematic flow chart of a method for processing a thermal hydraulic model provided by an embodiment of the present invention;

[0023] Figure 2 A schematic diagram of a graph traversal process for a processing method applicable to a thermal hydraulic model provided in an embodiment of the present invention;

[0024] Figure 3 A schematic flow chart of obtaining an independent connection diagram of a processing method applicable to a thermal hydraulic model provided in an embodiment of the present invention;

[0025] Figure 4 A schematic structural diagram of a processing device for a thermal hydraulic model provided by an embodiment of the present invention;

[0026] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only 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 making creative efforts should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0030] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0031] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0032] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0033] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0034] Figure 1 This is a flow chart of a method for processing a thermal hydraulic model provided by an embodiment of the present invention. This embodiment is applicable to the case of processing a thermal hydraulic model. The method can be executed by a processing device for a thermal hydraulic model. The processing device for a thermal hydraulic model can be implemented in the form of hardware and / or software. The processing device for a thermal hydraulic model can be configured in an electronic device such as a computer or a server. Figure 1 As shown, the method of this embodiment includes:

[0035] S110 . Obtain a topological structure diagram of a first thermal-hydraulic model, wherein the topological structure diagram is a directed graph.

[0036] Among them, the first thermal-hydraulic model can be understood as the thermal-hydraulic model that needs to be processed. In an embodiment of the present invention, the first thermal-hydraulic model can be produced based on the visual modeling thermal-hydraulic software developed in the Modelica language, and the topological structure of the first thermal-hydraulic model is automatically generated during the compilation process. It should be noted that, in an embodiment of the present invention, there is no need for the user to separately model the independent loops in the first thermal-hydraulic model when modeling. In an embodiment of the present invention, obtaining the topological structure diagram of the first thermal-hydraulic model can specifically include: first determining the first thermal-hydraulic model. Afterwards, the topological structure diagram of the first thermal-hydraulic model can be obtained.

[0037] In an embodiment of the present invention, there are multiple ways to determine the first artificial hydraulic model. For example, in response to a thermal-hydraulic model construction operation, a constructed thermal-hydraulic model can be obtained, and the constructed thermal-hydraulic model can be used as the first thermal-hydraulic model; wherein the thermal-hydraulic model construction operation can be used to construct the thermal-hydraulic model to obtain the first thermal-hydraulic model. Alternatively, a thermal-hydraulic model selection interface can be displayed, wherein the thermal-hydraulic model selection interface includes at least one thermal-hydraulic model identifier. After receiving an identifier selection operation acting on the thermal-hydraulic model identifier, the selected thermal-hydraulic model can be determined. Then, the selected thermal-hydraulic model can be used as the first artificial hydraulic model.

[0038] In an embodiment of the present invention, the topological structure of the first thermal-hydraulic model is a directed graph. Obtaining the topological structure diagram of the first thermal-hydraulic model may include: obtaining upstream and downstream connection relationships between model elements in the first thermal-hydraulic model; wherein the model elements may include control bodies and / or takeovers; and then obtaining the topological structure diagram of the first thermal-hydraulic model based on the upstream and downstream connection relationships.

[0039] Specifically, the upstream and downstream connection relationships between model elements in the first thermal-hydraulic model are obtained. For two adjacent model elements that have an upstream and downstream connection relationship, a directed edge is established for the two adjacent model elements based on the upstream and downstream connection relationship between the two adjacent model elements, thereby connecting the two adjacent model elements via the directed edge. Once the directed edges for all model elements are connected, a directed graph is obtained, i.e., the topological structure of the first thermal-hydraulic model is obtained.

[0040] S120: Convert the topology structure graph into an undirected graph, traverse the nodes in the undirected graph, and obtain at least one independent connection graph.

[0041] The independent connection graph can be a graph generated based on independent loops or independent branches in the topology graph. In embodiments of the present invention, the number of independent connection graphs generated based on the undirected graph can be one, two, or more. In other words, the topology of the first thermal-hydraulic model can generate one or more independent connection graphs. In practical applications, the number of independent connection graphs that can be generated based on the undirected graph is typically multiple.

[0042] Specifically, after obtaining the topology graph of the first thermal-hydraulic model, the topology graph can be converted into an undirected graph. After obtaining the undirected graph, a recursive algorithm can be used to repeatedly perform a breadth-first traversal on the nodes in the topology graph until all nodes have been traversed, thereby obtaining the independent connection graph included in the topology graph of the first thermal-hydraulic model. It should be understood that a single breadth-first traversal can only yield one independent connection graph.

[0043] In an embodiment of the present invention, converting the topological structure graph into an undirected graph may include: for each directed edge in the topological structure graph, adding a reverse edge corresponding to the directed edge to the topological structure graph, and obtaining an undirected graph corresponding to the topological structure graph. Specifically, for each directed edge in the topological structure graph, a reverse edge corresponding to the directed edge may be added to the topological structure graph, so that the unidirectional edge becomes a bidirectional edge, that is, the directed edge becomes an undirected edge, thereby obtaining an undirected graph corresponding to the topological structure. It should be noted that a unidirectional edge can be represented as a directed connection from one vertex to another vertex. A bidirectional edge can be represented as a mutual connection between two vertices, but without directionality.

[0044] In an embodiment of the present invention, the traversal of the nodes in the undirected graph to obtain at least one independent connection graph may include: taking any node in the undirected graph as a starting point, performing a breadth-first traversal of the undirected graph. When the traversal cannot continue, a separate independent connection graph may be obtained. Afterwards, it may be determined whether there are any untraversed nodes in the undirected graph. If so, the step of performing a breadth-first traversal of the undirected graph may be repeated with an untraversed node in the undirected graph as a starting point, and obtaining a separate independent connection graph when the traversal cannot continue, until all nodes in the undirected graph have been traversed. Thus, at least one independent connection graph may be obtained.

[0045] See also Figure 2 , a method for performing a breadth-first traversal on an undirected graph may include the following specific steps: first, any node of the undirected graph may be randomly selected and stored in a first temporary container. Then, it may be determined whether the first temporary container is empty. If the first temporary container is not empty, the first element in the first temporary container, i.e., the first node, may be obtained and marked as traversed. Then, the nodes connected to the first element among the remaining nodes other than the traversed nodes may be traversed. Thereafter, it may be determined whether the traversal is complete. If so, the first element may be deleted from the first temporary container and stored in a result container. If not, it may be determined whether the node connected to the first element is marked as traversed. If so, the operation of determining whether the traversal is complete may be returned. If the node connected to the first element is not marked as traversed, the node connected to the first element may be stored in the first temporary container, and the operation of determining whether the first temporary container is empty may be returned. The traversal is completed until the first temporary container is empty, i.e., a breadth-first traversal of the undirected graph is completed. The first temporary container may be used as a container for storing nodes of the undirected graph during a breadth-first traversal of the undirected graph.

[0046] See also Figure 3, a method for obtaining all independent connection graphs in an undirected graph, specifically comprising the following steps: first, marking all nodes in the undirected graph as untraversed and storing them in a global container as the initial formal parameter of a recursive function. Thus, all nodes in the formal parameter container of the recursive function can be traversed and marked. Afterwards, it can be determined whether all nodes in the formal parameter container are marked as traversed. If so, all nodes in the formal parameter container can be stored in a second temporary container. Then, it can be determined whether the second temporary container is empty. If not, a breadth-first traversal can be performed on the nodes in the second temporary container to obtain an independent connection graph. Afterwards, the second temporary container can be given as an actual parameter to the formal parameter of the recursive function. Then, the execution can be returned to traverse all nodes in the formal parameter container of the recursive function. The execution ends when the second temporary container is empty, thereby obtaining all independent connection graphs in the undirected graph. The second temporary container can be used to store marked nodes when obtaining the independent connection graph in the undirected graph.

[0047] S130. For each independent connection graph, construct a sparse matrix corresponding to the independent connection graph based on the topological structure graph and the independent connection graph.

[0048] In an embodiment of the present invention, constructing a sparse matrix corresponding to the independent connection graph based on the topological structure graph and the independent connection graph may include: determining the topological structure relationship between the nodes in the independent connection graph based on the topological structure graph. Thus, a sparse matrix corresponding to the independent connection graph can be constructed based on the topological structure relationship and the independent connection graph. In practical applications, the number of independent connection graphs is usually multiple. Accordingly, the number of sparse matrices is also multiple. The advantage of constructing a sparse matrix corresponding to the independent connection graph is that the large sparse matrix of the conservation equation of the first thermal-hydraulic model can be decomposed into multiple independent and small sparse matrices to reduce the time consumption of matrix solution.

[0049] S140: Calculate the sparse matrix, and obtain state variable information of the first thermal-hydraulic model based on the calculation result of the sparse matrix.

[0050] The state variable information may include at least one of temperature, pressure and flow.

[0051] Specifically, when multiple sparse matrices are obtained, each of the sparse matrices can be calculated to obtain calculation results of each of the sparse matrices, and then state variable information of the first thermal-hydraulic model can be obtained based on the calculation results of each of the sparse matrices.

[0052] Optionally, a multi-thread mechanism may be used to calculate each of the sparse matrices in parallel to further shorten the solution time.

[0053] In embodiments of the present invention, for thermal-hydraulic models that include multiple independent loops and / or independent branches, the larger the model, the larger the matrix required to solve its conservation equations. This results in a time-consuming large sparse matrix solution. In embodiments of the present invention, by decomposing the thermal-hydraulic model into multiple independent loops or branches and establishing sparse matrices for each solution, significant time savings can be achieved. For example, a conventional nuclear power plant thermal-hydraulic model includes a primary and secondary loop. If these loops are solved separately, the matrix size required for numerically solving the conservation equations for the primary loop is N, and the matrix size required for numerically solving the conservation equations for the secondary loop is M. If the matrix for the conservation equations is established uniformly, the total matrix size required for solving the primary and secondary loops is N+M. In this case, the matrix solution time complexity is at least O(n²), where n represents the matrix size. As can be seen, solving the primary and secondary loops separately consumes less time than solving them together. In particular, when multiple independent loops or branches exist in the same system model, solving them separately can save significant time.

[0054] The method may further include: displaying the first thermal-hydraulic model on a preset interface; in response to a copy operation on the first thermal-hydraulic model, copying the first thermal-hydraulic model to obtain at least one second thermal-hydraulic model; and after obtaining the first thermal-hydraulic model and the at least one second thermal-hydraulic model, displaying the first thermal-hydraulic model and the at least one second thermal-hydraulic model on the preset interface. In an embodiment of the present invention, providing a preset interface to display the first thermal-hydraulic model and allowing the user to perform a copy operation to obtain at least one second thermal-hydraulic model facilitates operations such as model copying and expansion of the thermal-hydraulic model, and the operation is simple and convenient.

[0055] The preset interface can be understood as an interface for displaying the first thermal-hydraulic model, as well as the first thermal-hydraulic model and the at least one second thermal-hydraulic model. In an embodiment of the invention, the preset interface can automatically adjust based on the size and number of displayed thermal-hydraulic models to enhance the aesthetics of the interface. The second thermal-hydraulic model can be obtained by copying the first thermal-hydraulic model. The number of second thermal-hydraulic models can be one, two, or more.

[0056] After the first thermal-hydraulic model and the at least one second thermal-hydraulic model are displayed on the preset interface, the method may further include: when there are multiple operating conditions and multiple second thermal-hydraulic models, determining the first operating condition corresponding to the first thermal-hydraulic model, and determining the second operating condition corresponding to each second thermal-hydraulic model; calculating the first operating condition through the first thermal-hydraulic model, and, for each second thermal-hydraulic model, calculating the second operating condition corresponding to the second thermal-hydraulic model through the second thermal-hydraulic model. The advantage of this process is that multiple operating condition analyses can be performed simultaneously for the same thermal-hydraulic model. Among them, the first operating condition can be understood as the operating condition that the first thermal-hydraulic model needs to execute. The second operating condition can be understood as the operating condition that the second thermal-hydraulic model needs to execute.

[0057] The technical solution of the embodiment of the present invention is to obtain a topological structure diagram of the first thermal-hydraulic model, wherein the topological structure diagram is a directed graph; convert the topological structure diagram into an undirected graph, traverse the nodes in the undirected graph, and obtain at least one independent connection graph, thereby realizing the decomposition of the topological structure diagram of the first thermal-hydraulic model; for each independent connection graph, based on the topological structure diagram and the independent connection graph, construct a sparse matrix corresponding to the independent connection graph, thereby realizing the decomposition of the large sparse matrix of the first thermal-hydraulic model into multiple small sparse matrices; thereby calculating the sparse matrix, and obtaining the state variable information of the first thermal-hydraulic model based on the calculation result of the sparse matrix. The technical solution of the embodiment of the present invention realizes a relatively fast solution of the artificial hydraulic model, effectively improving the processing efficiency of the artificial hydraulic model.

[0058] Figure 4 A schematic diagram of a processing device for a thermal hydraulic model provided by an embodiment of the present invention. Figure 4 As shown, the device includes: a graph acquisition module 210, a graph traversal module 220, a matrix construction module 230 and a matrix calculation module 240.

[0059] Among them, the graph acquisition module 210 is used to obtain the topological structure graph of the first thermal-hydraulic model, wherein the topological structure graph is a directed graph; the graph traversal module 220 is used to convert the topological structure graph into an undirected graph, traverse the nodes in the undirected graph, and obtain at least one independent connection graph; the matrix construction module 230 is used to construct a sparse matrix corresponding to each independent connection graph based on the topological structure graph and the independent connection graph; the matrix calculation module 240 is used to calculate the sparse matrix, and obtain the state variable information of the first thermal-hydraulic model based on the calculation result of the sparse matrix.

[0060] The technical solution of the embodiment of the present invention is to obtain a topological structure graph of the first thermal-hydraulic model through a graph acquisition module, wherein the topological structure graph is a directed graph; convert the topological structure graph into an undirected graph through a graph traversal module, traverse the nodes in the undirected graph, and obtain at least one independent connection graph, thereby realizing the decomposition of the topological structure graph of the first thermal-hydraulic model; construct a sparse matrix corresponding to each independent connection graph based on the topological structure graph and the independent connection graph through a matrix construction module, thereby realizing the decomposition of the large sparse matrix of the first thermal-hydraulic model into multiple small sparse matrices; and then calculate the sparse matrix through a matrix calculation module, and obtain the state variable information of the first thermal-hydraulic model based on the calculation result of the sparse matrix. The technical solution of the embodiment of the present invention realizes a relatively fast solution of the artificial hydraulic model, effectively improving the processing efficiency of the artificial hydraulic model.

[0061] Optionally, the matrix construction module 230 is specifically used to determine the topological structure relationship between the nodes in the independent connection graph based on the topological structure graph; and construct a sparse matrix corresponding to the independent connection graph based on the topological structure relationship and the independent connection graph.

[0062] Optionally, the graph traversal module 220 is specifically used to perform a breadth-first traversal on the undirected graph with any node in the undirected graph as a starting point, and when the traversal cannot continue, obtain a separate independent connection graph; determine whether there are any untraversed nodes in the undirected graph, and if so, use an untraversed node in the undirected graph as a starting point, and repeat the steps of performing a breadth-first traversal on the undirected graph, and when the traversal cannot continue, obtain a separate independent connection graph, until all nodes in the undirected graph have been traversed.

[0063] Optionally, the graph traversal module 220 is configured to add, for each directed edge in the topological structure graph, a reverse edge corresponding to the directed edge to the topological structure graph, to obtain an undirected graph corresponding to the topological structure graph.

[0064] Optionally, the graph acquisition module 210 is used to obtain the upstream and downstream connection relationship between each model element in the first thermal-hydraulic model, wherein the model elements include control bodies and / or takeovers; and obtain a topological structure graph of the first thermal-hydraulic model based on the upstream and downstream connection relationship.

[0065] Optionally, the device also includes a model copying module; wherein the model copying module is used to display the first thermal-hydraulic model on a preset interface; in response to a copy operation on the first thermal-hydraulic model, the first thermal-hydraulic model is copied to obtain at least one second thermal-hydraulic model; and the first thermal-hydraulic model and the at least one second thermal-hydraulic model are displayed on the preset interface.

[0066] Optionally, the device also includes an operating condition calculation module; wherein, the operating condition calculation module is used to determine the first operating condition corresponding to the first thermal-hydraulic model and the at least one second thermal-hydraulic model after displaying the first thermal-hydraulic model and the at least one second thermal-hydraulic model on the preset interface, when there are multiple operating conditions and multiple second thermal-hydraulic models, and determine the second operating condition corresponding to each second thermal-hydraulic model; calculate the first operating condition through the first thermal-hydraulic model, and, for each second thermal-hydraulic model, calculate the second operating condition corresponding to the second thermal-hydraulic model through the second thermal-hydraulic model.

[0067] The processing device for the thermal-hydraulic model provided in the embodiment of the present invention can execute the processing method for the thermal-hydraulic model provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.

[0068] It is worth noting that the various units and modules included in the processing device of the above-mentioned thermal-hydraulic model are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0069] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0070] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0071] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0072] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the processing method for the thermal hydraulic model.

[0073] In some embodiments, the thermal-hydraulic model processing method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the thermal-hydraulic model processing method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the thermal-hydraulic model processing method in any other appropriate manner (e.g., by means of firmware).

[0074] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0075] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0076] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0077] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0078] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0079] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0080] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0081] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A method for processing a thermal hydraulic model, characterized in that: The method comprises: Obtaining a topological structure diagram of a first thermal-hydraulic model, wherein the topological structure diagram is a directed graph; Converting the topological structure graph into an undirected graph, traversing the nodes in the undirected graph, and obtaining at least one independent connection graph; For each independent connection graph, based on the topological structure graph and the independent connection graph, construct a sparse matrix corresponding to the independent connection graph; The sparse matrix is ​​calculated, and based on the calculation result of the sparse matrix, the state variable information of the first thermal-hydraulic model is obtained.

2. The method according to claim 1, characterized in that: The step of constructing a sparse matrix corresponding to the independent connection graph based on the topological structure graph and the independent connection graph includes: Based on the topological structure graph, determining the topological structure relationship between the nodes in the independent connection graph; Based on the topological structure relationship and the independent connection graph, a sparse matrix corresponding to the independent connection graph is constructed.

3. The method according to claim 1, characterized in that The traversing of the nodes in the undirected graph to obtain at least one independent connection graph includes: Taking any node in the undirected graph as a starting point, performing a breadth-first traversal on the undirected graph, and when the traversal cannot continue, obtaining a separate independent connection graph; Determine whether there are any untraversed nodes in the undirected graph. If so, take an untraversed node in the undirected graph as a starting point and repeat the step of performing breadth-first traversal on the undirected graph. When the traversal cannot continue, obtain a separate independent connection graph until all nodes in the undirected graph have been traversed.

4. The method according to claim 1, characterized in that The step of converting the topological structure graph into an undirected graph comprises: For each directed edge in the topological structure graph, a reverse edge corresponding to the directed edge is added to the topological structure graph to obtain an undirected graph corresponding to the topological structure graph.

5. The method according to claim 1, characterized in that The obtaining of the topological structure diagram of the first thermal hydraulic model includes: Acquire upstream and downstream connection relationships between model elements in the first thermal hydraulic model, wherein the model elements include control bodies and / or connecting pipes; A topological structure diagram of the first thermal-hydraulic model is obtained based on the upstream and downstream connection relationship.

6. The method according to claim 1, characterized in that The method further comprises: Displaying the first thermal hydraulic model on a preset interface; In response to the copy operation on the first thermal-hydraulic model, copy the first thermal-hydraulic model to obtain at least one second thermal-hydraulic model; The first thermal-hydraulic model and the at least one second thermal-hydraulic model are displayed on the preset interface.

7. The method according to claim 6, characterized in that After displaying the first thermal-hydraulic model and the at least one second thermal-hydraulic model on the preset interface, the method further includes: In the case where there are multiple operating conditions and multiple second thermal-hydraulic models, determining a first operating condition corresponding to the first thermal-hydraulic model, and determining a second operating condition corresponding to each of the second thermal-hydraulic models; The first operating condition is calculated by the first thermal-hydraulic model, and, for each second thermal-hydraulic model, the second operating condition corresponding to the second thermal-hydraulic model is calculated by the second thermal-hydraulic model.

8. A processing device for a thermal hydraulic model, characterized in that: The device comprises: A graph acquisition module, used to acquire a topological structure graph of the first thermal hydraulic model, wherein the topological structure graph is a directed graph; A graph traversal module, used to convert the topological structure graph into an undirected graph, traverse the nodes in the undirected graph, and obtain at least one independent connection graph; A matrix construction module, used for constructing a sparse matrix corresponding to each independent connection graph based on the topological structure graph and the independent connection graph; The matrix calculation module is used to calculate the sparse matrix and obtain the state variable information of the first thermal-hydraulic model based on the calculation result of the sparse matrix.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the thermal-hydraulic model processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the thermal-hydraulic model processing method according to any one of claims 1 to 7 when executed.