Modeling method and device of nuclear energy comprehensive utilization system, equipment and medium
Through the combination of Modelica and TRNSYS simulation software, a multi-time scale nuclear energy comprehensive utilization system model is built, which solves the simulation management problems of different time scales in the nuclear energy comprehensive utilization system, and realizes high-precision dynamic characteristic description and efficient collaborative optimization of multi-energy systems.
Patent Information
- Application Number
- CN202510397676.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-18
AI Technical Summary
How to effectively manage computing resources at different time scales while ensuring model accuracy, and realize multi-time scale simulation of the nuclear energy comprehensive utilization system.
Modelica and TRNSYS simulation software are used to carry out local composition modeling, and a multi-time scale nuclear energy comprehensive utilization system model is built, and dynamic simulations at seconds and hours are realized through asynchronous data interaction. Combining Modelica's flexibility and precise simulation of TRNSYS, a multi-time scale nuclear energy comprehensive utilization system model is built.
It realizes a high-precision description of the dynamic characteristics of internal components of the nuclear energy comprehensive utilization system, simplifies annual operation simulation to the hourly level, and improves the efficiency of collaborative optimization between multi-energy systems.
Smart Images

Figure CN120337529A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of comprehensive energy utilization, and particularly to a modeling method, device, equipment and medium for a nuclear energy comprehensive utilization system. Background Art
[0002] Nuclear energy comprehensive utilization refers to the use of nuclear energy not only for power generation, but also for other fields such as heating, seawater desalination, and industrial processes. This comprehensive utilization method can improve the energy utilization efficiency, reduce energy waste, and at the same time reduce the impact on the environment. With the increasing global demand for sustainable development and clean energy, nuclear energy comprehensive utilization has become an important research direction in the energy field.
[0003] The simulation of a comprehensive energy system often needs to consider multiple time scales from seconds to years. For example, some components of a nuclear power plant may require a time resolution of seconds to accurately simulate their dynamic responses, while the annual operation simulation of the entire energy system may only require a time resolution of hours. Therefore, how to effectively manage the computing resources of different time scales while ensuring the model accuracy is a technical challenge. Summary of the Invention
[0004] In view of this, the present invention provides a modeling method, device, equipment and medium for a nuclear energy comprehensive utilization system to solve the problem of ineffective time management of the nuclear energy comprehensive utilization system.
[0005] In a first aspect, the present invention provides a modeling method for a nuclear energy comprehensive utilization system, the method comprising:
[0006] Performing first local component modeling on the nuclear energy comprehensive utilization system based on Modelica simulation software to obtain a first dynamic model, and using the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process;
[0007] Performing second local component modeling on the nuclear energy comprehensive utilization system based on TRNSYS simulation software to obtain a second dynamic model, and using the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year;
[0008] Performing data interaction between the first dynamic model and the second dynamic model to construct a multi-time scale nuclear energy comprehensive utilization system model, and simulating the system performance of the nuclear energy comprehensive utilization system based on the multi-time scale nuclear energy comprehensive utilization system model.
[0009] The modeling method of the nuclear energy comprehensive utilization system provided by the present invention respectively performs local component modeling on the nuclear energy comprehensive utilization system based on the Modelica simulation software and the TRNSYS simulation software, and uses the constructed first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process, and uses the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year. The first dynamic model and the second dynamic model are used for data interaction to construct a multi-time scale nuclear energy comprehensive utilization system model to simulate the system performance of the nuclear energy comprehensive utilization system. By constructing a multi-time scale nuclear energy comprehensive utilization system model, the present invention finds a balance between the model fineness and the calculation efficiency, can achieve a high-precision description of the dynamic characteristics of the internal components of the nuclear energy comprehensive utilization system, simplifies the annual operation simulation work of the entire energy system to the hourly level, and realizes the efficient coordination and optimization among multiple energy systems.
[0010] In an alternative embodiment, the nuclear energy comprehensive utilization system includes: a secondary nuclear power system, a renewable energy system, an energy storage system, a steam supply system, a seawater desalination system, a hydrogen production system, a heating system, and a refrigeration system. The first local component modeling of the nuclear energy comprehensive utilization system based on the Modelica simulation software includes: obtaining model parameters and input data; based on the Modelica simulation software, model parameters, and input data, modeling the transient response and nonlinear behavior of the secondary nuclear power system according to the time scale of the second-level time step.
[0011] By modeling the secondary nuclear power system of the nuclear energy comprehensive utilization system, the present invention can perform in-depth analysis and simulation on the system with a slow local dynamic process in the nuclear energy comprehensive utilization system at a fine time scale, making it possible to accurately simulate key equipment at the second-level time scale.
[0012] In an alternative embodiment, the second local component modeling of the nuclear energy comprehensive utilization system based on the TRNSYS simulation software includes: based on the TRNSYS simulation software, modeling the macroscopic dynamic changes and long-term trends of the renewable energy system, the energy storage system, the steam supply system, the seawater desalination system, the hydrogen production system, the heating system, and the refrigeration system according to the time scale of the hourly time step.
[0013] By modeling the other energy systems and the user demand supply system of the nuclear energy comprehensive utilization system, the present invention can analyze the macroscopic dynamic changes and long-term trends of the system during the entire operation cycle based on a large time scale, integrate the conversion and utilization of various energies, and achieve the coordinated optimization of multiple energy systems.
[0014] In an alternative embodiment, data interaction is performed between the first dynamic model and the second dynamic model to construct a multi-time-scale nuclear energy comprehensive utilization system model, and the system performance of the nuclear energy comprehensive utilization system is simulated based on the multi-time-scale nuclear energy comprehensive utilization system model, including: the second dynamic model calls the first dynamic model within the current hour time step, and the model parameters and input parameters of the first dynamic model are stored in a preset file in advance and read by the first dynamic model; after the first dynamic model performs energy response simulation according to the second-level time step, the output data obtained by the simulation is written into the preset file and read by the second dynamic model, and energy utilization simulation is performed according to the hour time step; the second dynamic model iterates according to the hour time step until the preset convergence condition or the preset number of iterations is met, and the annual system performance of the nuclear energy comprehensive utilization system is simulated.
[0015] In an alternative embodiment, asynchronous data interaction is performed between the first dynamic model and the second dynamic model based on OMPython.
[0016] Through asynchronous data interaction, the present invention can allow different simulation models or software to exchange data without strict synchronization requirements, improve the efficiency of simulation, and enable the model to more flexibly adapt to different simulation requirements.
[0017] In an alternative embodiment, the Modelica simulation software includes: Dymola simulation software or OpenModelica simulation software, and the second dynamic model calls the first dynamic model through the Type163 module of the TRNSYS simulation software.
[0018] Utilizing the intuitive and flexible characteristics of the Modelica simulation software, the present invention can make it extremely convenient to construct a complex system model and provide an accurate description of the behavior of the system. At the same time, by using the TRNSYS simulation software, accurate simulation of hourly operation throughout the year can be performed. By combining Modelica and TRNSYS, dynamic simulation of different time scales from second level to hour level is realized, effectively improving the fineness of the distributed energy system model.
[0019] In a second aspect, the present invention provides a modeling device for a nuclear energy comprehensive utilization system, and the device includes:
[0020] A first dynamic model construction module, configured to perform first local component modeling on the nuclear energy comprehensive utilization system based on the Modelica simulation software to obtain a first dynamic model, and use the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process;
[0021] The second dynamic model construction module is used to perform second local component modeling on the nuclear energy comprehensive utilization system based on the TRNSYS simulation software to obtain a second dynamic model, and use the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year;
[0022] The overall model construction module is used to perform data interaction between the first dynamic model and the second dynamic model, construct a multi-time scale nuclear energy comprehensive utilization system model, and simulate the system performance of the nuclear energy comprehensive utilization system based on the multi-time scale nuclear energy comprehensive utilization system model.
[0023] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the modeling method of the nuclear energy comprehensive utilization system according to the first aspect or any corresponding embodiment thereof.
[0024] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. The computer instructions are used to cause a computer to execute the modeling method of the nuclear energy comprehensive utilization system according to the first aspect or any corresponding embodiment thereof.
[0025] In a fifth aspect, the present invention provides a computer program product, including computer instructions, which are used to cause a computer to execute the modeling method of the nuclear energy comprehensive utilization system according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0027] Figure 1 is a schematic flowchart of the modeling method of the nuclear energy comprehensive utilization system according to an embodiment of the present invention;
[0028] Figure 2 is a schematic structural diagram of the nuclear energy comprehensive utilization system of the modeling method of the nuclear energy comprehensive utilization system according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of model interaction of the modeling method of the nuclear energy comprehensive utilization system according to an embodiment of the present invention;
[0030] Figure 4It is a schematic flowchart of a modeling method for another nuclear energy comprehensive utilization system according to an embodiment of the present invention;
[0031] Figure 5 It is a schematic flowchart of a modeling method for yet another nuclear energy comprehensive utilization system according to an embodiment of the present invention;
[0032] Figure 6 It is a schematic simulation flowchart of a modeling method for yet another nuclear energy comprehensive utilization system according to an embodiment of the present invention;
[0033] Figure 7 It is a structural block diagram of a modeling device for a nuclear energy comprehensive utilization system according to an embodiment of the present invention;
[0034] Figure 8 It is a schematic hardware structure diagram of a computer device according to an embodiment of the present invention. Specific Embodiments
[0035] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0036] The embodiments of the present invention are applicable to scenarios of comprehensively utilizing an energy system with nuclear energy as the base load. The embodiments of the present invention provide a modeling method for a nuclear energy comprehensive utilization system, and a multi-time-scale nuclear energy comprehensive utilization system model is obtained by constructing models with second-level step lengths and hour-level step lengths to achieve the effect of realizing efficient coordination and optimization among multiple energy systems.
[0037] According to an embodiment of the present invention, an embodiment of a modeling method for a nuclear energy comprehensive utilization system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0038] In this embodiment, a modeling method for a nuclear energy comprehensive utilization system is provided, which can be used in a mobile terminal, such as a computer, etc. Figure 1 It is a flowchart of a modeling method for a nuclear energy comprehensive utilization system according to an embodiment of the present invention, as Figure 1 shown, and this process includes the following steps:
[0039] Step S101: Based on the Modelica simulation software, perform first partial component modeling on the nuclear energy comprehensive utilization system to obtain a first dynamic model, and use the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process.
[0040] Specifically, in the embodiments of the present invention, as Figure 2 shown, the nuclear energy comprehensive utilization system includes: a secondary nuclear power system (nuclear energy unit), a renewable energy system, an energy storage system, a steam supply system, a seawater desalination system, a hydrogen production system, a heating system, and a refrigeration system. The energy storage system includes an electricity storage system and a heat storage system. The renewable energy system includes a photovoltaic array and a wind turbine. Among them, the secondary nuclear power system is a subsystem with slow dynamic response in the nuclear energy comprehensive utilization system and is the basic core of the nuclear energy comprehensive utilization system. Considering that the Modelica language is an object-based modeling tool, characterized by its intuitiveness and flexibility, it can make the construction of complex system models extremely convenient, especially good at simulating the second-level dynamic process and providing an accurate description of the system's behavior. Therefore, in the embodiments of the present invention, the secondary nuclear power system is modeled based on the Modelica simulation software to simulate the transient response and non-linear behavior of the secondary nuclear power system with a second-level time step, and to achieve in-depth analysis and simulation on a small time scale.
[0041] Step S102: Based on the TRNSYS simulation software, perform second partial component modeling on the nuclear energy comprehensive utilization system to obtain a second dynamic model, and use the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year.
[0042] Specifically, in the embodiments of the present invention, the secondary nuclear power system, the renewable energy system, and the energy storage system are the "source side" in the nuclear energy comprehensive utilization system, used to provide energy, but the secondary nuclear power system is the basic core of the nuclear energy comprehensive utilization system. The steam supply system, the seawater desalination system, the hydrogen production system, the heating system, and the refrigeration system are the "user side" in the nuclear energy comprehensive utilization system, used to meet the user's demands for electricity, steam, cold, heat, hydrogen, and fresh water. As a transient system simulation software, TRNSYS occupies a dominant position in the field of building energy systems and renewable energy. Its expertise lies in accurate simulation of hourly operation throughout the year. Therefore, in the embodiments of the present invention, the renewable energy system, the energy storage system, the steam supply system, the seawater desalination system, the hydrogen production system, the heating system, and the refrigeration system are overall modeled based on the TRNSYS simulation software. The model has a large time scale, for example, in hours. The selection of a large time scale can analyze the macroscopic dynamic changes and long-term trends of the system during the entire operation cycle. At the same time, the TRNSYS model can integrate various energy conversion and utilization technologies, such as solar collectors, heat pumps, energy storage systems, and nuclear-related cogeneration systems, to achieve the collaborative optimization of multi-energy systems.
[0043] Step S103: Perform data interaction between the first dynamic model and the second dynamic model to construct a multi-time-scale nuclear energy comprehensive utilization system model, and simulate the system performance of the nuclear energy comprehensive utilization system based on the multi-time-scale nuclear energy comprehensive utilization system model.
[0044] Specifically, in the embodiments of the present invention, in order to combine the models constructed by Modelica simulation software and TRNSYS simulation software, as Figure 3 shown, TRNSYS is responsible for calling the nuclear power module constructed by Modelica simulation software through the Type163 module, and storing all relevant model parameters and input data in a *.dat format file. Subsequently, the Python script is triggered to execute, and the function of this script is to read the information in the *.dat file to set the input conditions of the Modelica model. Next, the Modelica model is activated, and the input variables provided by TRNSYS are applied to it to start the simulation process. After the simulation is completed, the result data is saved in a *.mat file. Finally, these data are read again and written back to the *.dat file. After the Python script is executed, the Type163 module reads the data in the updated *.dat file and outputs it to other modules in the system, completing the entire process of co-simulation. In the embodiments of the present invention, the Modelica model is used to simulate the response characteristics of the second-level dynamic process, and TRNSYS is used for hourly operation simulation throughout the year. The two achieve computational data communication through the asynchronous message passing method, and establish a dynamic simulation model of a distributed energy system with multiple time resolutions. Therefore, based on the dynamic simulation method with multiple time resolutions, the dynamic modeling and coupling characteristic simulation of a multi-energy system are carried out, which can improve the fineness of the distributed energy system model while reducing the model calculation amount, so as to accurately describe the dynamic characteristics of components in the research of the system active control method.
[0045] The modeling method of the nuclear energy comprehensive utilization system provided by the present invention respectively performs local component modeling on the nuclear energy comprehensive utilization system based on Modelica simulation software and TRNSYS simulation software, uses the constructed first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process, uses the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year, performs data interaction between the first dynamic model and the second dynamic model, constructs a multi-time-scale nuclear energy comprehensive utilization system model, and simulates the system performance of the nuclear energy comprehensive utilization system. By constructing a multi-time-scale nuclear energy comprehensive utilization system model, the present invention finds a balance between the fineness of the model and the computational efficiency, can achieve a high-precision description of the dynamic characteristics of the internal components of the nuclear energy comprehensive utilization system, simplifies the annual operation simulation work of the entire energy system to the hourly level, and realizes the efficient coordination and optimization among multiple energy systems.
[0046] In this embodiment, a modeling method for a nuclear energy comprehensive utilization system is provided, which can be used for the above-mentioned mobile terminals, such as computers, etc. Figure 4 It is a flowchart of the modeling method for the nuclear energy comprehensive utilization system according to the embodiment of the present invention, as Figure 4 shown, this process includes the following steps:
[0047] Step S401, perform first local component modeling on the nuclear energy comprehensive utilization system based on Modelica simulation software to obtain a first dynamic model, and use the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process.
[0048] Specifically, the above step S401 includes:
[0049] Step S4011, obtain model parameters and input data.
[0050] Specifically, in the embodiment of the present invention, the Type163 module is pre-set in TRNSYS, and the input boundaries of this module are given, including: system parameters, output parameters, and the save file addresses of model inputs and parameters. In the embodiment of the present invention, the input parameters include: reactor thermal power, condensate temperature, condensate pressure, and main steam pressure; the system parameters include: main steam extraction flow rate, low-pressure cylinder extraction flow rate, and extraction return water flow rate; the output parameters include seven parameters of the pressure, temperature, and enthalpy values of the two extractions and the electric power. TRNSYS calls the nuclear power unit constructed by Modelica through the Type163 module. The Type163 module calls and executes the Python script for Modelica simulation in the external file IO mode to achieve co-simulation.
[0051] Step S4012, based on Modelica simulation software, model parameters, and input data, model the transient response and non-linear behavior of the nuclear power secondary loop system on the time scale of second-level time step.
[0052] Specifically, in the embodiment of the present invention, after setting the Type163 module, the construction of the nuclear power secondary loop system (nuclear power unit) is carried out in Openmodelica. At this time, the input of the Type163 module needs to be set in the nuclear power secondary loop system. The nuclear energy unit model mainly includes components such as steam generators, steam turbines, condensers, and heaters. As Figure 2As shown, in the secondary loop system of nuclear power, heat is generated in the reactor core and steam required for the steam turbine is produced through the steam generator. A part of the steam is used for the steam turbine to do work and generate electricity, and another part of the steam is extracted after partial work and serves as the main heat source of the integrated nuclear energy intelligent energy system. The exhausted steam after doing work enters the heater system through the condenser and returns to the steam generator. Since the calculation is steady-state, the model requirement is a steady-state model, and the value obtained from the initialization calculation is basically the same as the result at the last moment.
[0053] Step S402: Based on the TRNSYS simulation software, model the macroscopic dynamic changes and long-term trends of the renewable energy system, energy storage system, steam supply system, seawater desalination system, hydrogen production system, heating system, and refrigeration system on a time scale of hourly steps.
[0054] Specifically, in the embodiment of the present invention, after constructing the nuclear power model of the secondary loop system of nuclear power, construct the model of the integrated nuclear energy intelligent energy system in TRNSYS. Among them, the Type163 module acts as the module of the nuclear power unit in the model, and connects the parameters of the nuclear power module with other modules correspondingly to form a complete integrated energy system. As Figure 2As shown in the figure, the entire system includes a nuclear power unit, a renewable energy system, a power storage system, a heat storage system, a steam supply system, a seawater desalination system, a hydrogen production system, a heating system, and a refrigeration system. In the nuclear power unit, the reactor core (Component No. 1) generates heat and produces steam required by the steam turbine through the steam generator (Component No. 2). A part of the steam is used for the steam turbine (Component No. 3) to do work and generate electricity. Another part of the steam is extracted after partial work and serves as the main heat source of the integrated intelligent nuclear energy system. The exhausted steam after doing work enters the heater (Component No. 4) system through the condenser (Component No. 5) and returns to the steam generator. The extracted steam flows into the high-temperature molten salt heat storage tank (Component No. 8) and the low-temperature molten salt heat storage tank (Component No. 9) respectively for storage according to the extraction temperature, and provides heat according to the heat load demand. The photovoltaic array and the wind turbine unit (Component No. 7) and the nuclear power unit generator (Component No. 6) generate electricity together. The generator preferentially meets the user's electricity load, and a power storage system (Component No. 10) is equipped to absorb the surplus electricity. The renewable energy unit and the power storage system jointly provide electrical energy for the system operation. The steam supply system (Component No. 12) is mainly used to provide industrial steam, and the main equipment is the steam supply heat exchanger (Component No. 11). The multi-effect evaporation seawater desalination system (Component No. 14) mainly consists of a seawater desalination heat exchanger (Component No. 13), a flash tank, a multi-effect evaporator, and a seawater heater. The extracted steam heats the fresh water through the seawater desalination heat exchanger and then enters the flash tank to become steam, and evaporates the seawater into fresh water in the evaporator. A part of the fresh water is used for seawater desalination, and the other part is produced to provide water source for the hydrogen production system. The hydrogen production system uses an alkaline electrolyzer (Component No. 15). The alkaline electrolyzer consumes electrical energy and the water produced by the seawater desalination system to generate hydrogen and oxygen. The heating system (Component No. 17) mainly consists of a heating heat exchanger (Component No. 16). The extracted steam exchanges heat with the heating heat exchanger after passing through the low-temperature molten salt heat storage tank (Component No. 9). The refrigeration system (Component No. 18) mainly includes a steam-type lithium bromide absorption chiller. The extracted steam enters the generator of the steam-type lithium bromide absorption chiller through the low-temperature molten salt heat storage tank (Component No. 9) to provide a heat source for refrigeration, and flows back to the condenser (Component No. 5) after heat exchange.
[0055] In some alternative embodiments, after the construction of all models is completed, a Python script capable of performing Modelica model simulation needs to be written. The part of writing the Python script needs to focus on writing the model name and the configuration of inputs, outputs, and parameters. In the embodiments of the present invention: First, set the system input parameters and system parameters to the Modelica model. The code editing is as follows:
[0056] mod.setParameters("GW_CWS1_Valve_Ramp_Cold_HT_out5_height="+str(Pars[0]))
[0057] mod.setParameters("GW_CWS1_Valve_Ramp_Cold_HT_out1_height="+str(Pars[1]))
[0058] mod.setParameters("GW_CWS1_Valve_Ramp_Cold_HT_out2_height="+str(Pars[2]))
[0059] The above three lines of code set the system parameters as the main steam extraction flow rate, low-pressure cylinder extraction flow rate, and extraction return water flow rate.
[0060] mod.setInputs("P_steam="+str(42.3))
[0061] mod.setInputs("thermal_power="+str(385.3))
[0062] mod.setInputs("CW_P_in="+str(5))
[0063] mod.setInputs("CW_T_in="+str(15))
[0064] The above four lines of code set the input parameters as the reactor thermal power, condensate temperature, condensate pressure, and main steam pressure.
[0065] state=mod.getSolutions(["zc_sensor.P","W_elec","zc_sensor.h","zc_control_valve.T_out","dc_sensor.P","dc_sensor.h","dc_control_valve.T_out"],resultfile="D: / tm pNC.mat")
[0066] The above line of code sets the output parameters as the pressure, temperature, enthalpy values of the two extractions, and the electric power, a total of seven parameters, and the address where the result file is saved.
[0067] After completing the model construction and script writing, co-simulation is carried out. During the co-simulation process, the calculation data of the nuclear power secondary loop model and the integrated energy system model are exchanged in real time, and thus the co-simulation is achieved.
[0068] Step S403: Perform data interaction between the first dynamic model and the second dynamic model to construct a multi-time-scale nuclear energy comprehensive utilization system model, and simulate the system performance of the nuclear energy comprehensive utilization system based on the multi-time-scale nuclear energy comprehensive utilization system model. For details, please refer to Figure 1 Step S103 of the embodiment shown, which will not be elaborated here.
[0069] The modeling method of the nuclear energy comprehensive utilization system provided by the present invention respectively performs local component modeling on the nuclear energy comprehensive utilization system based on the Modelica simulation software and the TRNSYS simulation software, uses the constructed first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process, uses the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the annual hourly dynamic process, performs data interaction between the first dynamic model and the second dynamic model, constructs a multi-time-scale nuclear energy comprehensive utilization system model, and simulates the system performance of the nuclear energy comprehensive utilization system. By constructing a multi-time-scale nuclear energy comprehensive utilization system model, the present invention finds a balance between the model fineness and the calculation efficiency, can achieve a high-precision description of the dynamic characteristics of the internal components of the nuclear energy comprehensive utilization system, simplifies the annual operation simulation work of the entire energy system to the hourly level, and realizes the efficient coordination and optimization among multiple energy systems.
[0070] In this embodiment, a modeling method of a nuclear energy comprehensive utilization system is provided, which can be used for the above-mentioned mobile terminals, such as computers, etc. Figure 5 It is a flowchart of the modeling method of the nuclear energy comprehensive utilization system according to an embodiment of the present invention. As Figure 5 shown, the process includes the following steps:
[0071] Step S501: Perform first local component modeling on the nuclear energy comprehensive utilization system based on the Modelica simulation software to obtain a first dynamic model, and use the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process. For details, please refer to Figure 4 Step S401 of the embodiment shown, which will not be elaborated here.
[0072] Step S502: Perform second local component modeling on the nuclear energy comprehensive utilization system based on the TRNSYS simulation software to obtain a second dynamic model, and use the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the annual hourly dynamic process. For details, please refer to Figure 4 Step S402 of the embodiment shown, which will not be elaborated here.
[0073] Step S503: Perform data interaction between the first dynamic model and the second dynamic model to construct a multi-time-scale nuclear energy comprehensive utilization system model, and simulate the system performance of the nuclear energy comprehensive utilization system based on the multi-time-scale nuclear energy comprehensive utilization system model.
[0074] Specifically, the above step S503 includes:
[0075] Step S5031: The second dynamic model calls the first dynamic model within the current hour time step, and pre-stores the model parameters and input parameters of the first dynamic model into a preset file for the first dynamic model to read.
[0076] Step S5032: After the first dynamic model performs energy response simulation according to the second-level time step, write the simulated output data into the preset file for the second dynamic model to read and perform energy utilization simulation according to the hour time step.
[0077] Step S5033: The second dynamic model iterates according to the hour time step until the preset convergence condition or the preset number of iterations is met, and simulates the annual system performance of the nuclear energy comprehensive utilization system.
[0078] Specifically, in the embodiment of the present invention, during the process of model construction based on Modelica simulation software, after the parameters are set, first, the Type163 module saves the parameters into a *.dat file. During the simulation process, Python needs to read this file to set the model input. Secondly, the calculation results of the nuclear power unit model in Openmodelica are saved in a *.mat file. After the simulation of the model in Openmodelica is completed, click the [Tools] option at the upper end of the interface, select [Open Working Directory], and the *.mat file can be found in the pop-up window. During the co-simulation process, the Python script needs to read this file to output the result data.
[0079] In addition, the following steps are also included in the process of writing the Python script:
[0080] ① Before using the Python script, the Python environment should be configured and the dependent package OMPython should be installed. Taking pip as an example, the installation instruction is: pip install OMPython. Specific operation steps: First, install Python, and then open the command prompt in the Window system and enter the installation instruction.
[0081] ② OMPython is the Python interface of OpenModelica for communicating with the OpenModelica server. After the environment is successfully configured, use Visual Studio Code to open the Python script file saved by the Type163 module to write code. The specific code process is as follows: Define a class OpenModelicaEnv, which initializes an OpenModelica session and checks for errors. Set the input, read the input file py_inputs.dat, and set the input into the modelica model. Open the Modelica model, where model_path is the path where the model package file package.mo is located. In this example, NCEPU.Legacy.SubmitSystems.Versions.a0801.LL_direct26 is the simulation model. Use the setParameters and setInputs methods to set the parameters and inputs of the Modelica model. In this example, the above-mentioned 4 input parameters and 3 model parameters need to be set. Use the simulate method to write the code for running the model simulation and save the results to the specified file resultfile = "D: / tmpNC.mat". Use the getSolutions method to obtain the output variables of the model. Write the output results to the file py_outputs.dat. Note that resultfile is the location for temporarily saving the result data. Please ensure that the computer user has read and write permissions for this location. For the number of results to be output, configure several lines of out.append(state[1][1]), where the first square bracket represents the variable number. In the embodiment of the present invention, 0 represents time, 1 represents stress.tm, and so on, but not limited thereto. The second square bracket represents the time number. Since the model uses steady-state calculation, either 0 or 1 can be used.
[0082] In some alternative embodiments, after completing the above preparatory work, as Figure 6 shown, the overall model starts iterative simulation, and the iterative process is as follows:
[0083] ① At the starting point of the iteration cycle, the TRNSYS software starts and initializes the calculation environment to prepare for simulation;
[0084] ② TRNSYS calculates the current time step, including energy balance, system state update, etc.;
[0085] ③ According to the current state of the overall model, prepare the input data required by the sub-model (such as the Modelica model) and send the input data through the interface;
[0086] ④ After receiving the input data, the sub-model starts its internal calculations, and outputs the result data after the model reading, translation, compilation, initialization, and iterative solution process.
[0087] ⑤ Read the calculation results through the interface and set them in TRNSYS. After receiving the output of the sub-model, TRNSYS uses these data for the calculation of other related models to achieve coupling and data synchronization within the system;
[0088] ⑥ The iterative process is repeated in each time step until a specific convergence condition is met or all predetermined iterations are completed. In the embodiment of the present invention, in the main interface of the TRNSYS model, click "settings" in the left column of option buttons, and set the simulation time step to 0.125 in "simulation time", in units of h, for example only, and not limited thereto.
[0089] ⑦ After calculating one step, return to call the sub-model again and repeat the above process to calculate the next step. When the simulation process covers 8760 hours of calculation throughout the year, the calculation is completed and the results are output. Every hour is iterated to simulate the system performance of the whole year.
[0090] The modeling method of the nuclear energy comprehensive utilization system provided by the present invention is to model the local components of the nuclear energy comprehensive utilization system based on Modelica simulation software and TRNSYS simulation software, and use the constructed first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process, and use the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year, and the first dynamic model and the second dynamic model are interacted with each other to construct a multi-time scale nuclear energy comprehensive utilization system model to simulate the system performance of the nuclear energy comprehensive utilization system. The present invention can simplify the annual operation simulation work of the entire energy system to the hourly level through the iteration of the second-level duration and the hourly step length, and combine the fine modeling capabilities under different time scales with the large-scale and long-term system behavior analysis through the asynchronous message transmission method, simulate the dynamic behavior of the system within 8760 hours throughout the year, and can reduce the model calculation amount, make the simulation process more efficient, and realize efficient coordination and optimization among multiple energy systems. In addition, by accurately simulating the dynamic characteristics of key components such as nuclear power units, more accurate data support can be provided for the design and optimization of energy systems, which helps to optimize system configuration and improve energy conversion efficiency and system stability. By accurately characterizing the dynamic characteristics of components, it helps to develop and test active system control strategies, improve the response speed and regulation accuracy of the energy system, and thus enhance the overall performance and economic benefits of the system.
[0091] In this embodiment, a modeling device for a nuclear energy comprehensive utilization system is further provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0092] This embodiment provides a modeling device for a nuclear energy comprehensive utilization system. As Figure 7 shown, it includes:
[0093] A first dynamic model construction module 701, which is used to perform first local component modeling on the nuclear energy comprehensive utilization system based on Modelica simulation software to obtain a first dynamic model, and use the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process.
[0094] A second dynamic model construction module 702, which is used to perform second local component modeling on the nuclear energy comprehensive utilization system based on TRNSYS simulation software to obtain a second dynamic model, and use the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year.
[0095] An overall model construction module 703, which is used to perform data interaction between the first dynamic model and the second dynamic model, construct a multi-time-scale nuclear energy comprehensive utilization system model, and simulate the system performance of the nuclear energy comprehensive utilization system based on the multi-time-scale nuclear energy comprehensive utilization system model.
[0096] In some alternative implementation manners, the nuclear energy comprehensive utilization system includes: a secondary nuclear power system, a renewable energy system, an energy storage system, a steam supply system, a seawater desalination system, a hydrogen production system, a heating system, and a refrigeration system. The first dynamic model construction module 701 includes:
[0097] A parameter acquisition unit, which is used to acquire model parameters and input data.
[0098] A model construction unit, which is used to perform modeling on the transient response and nonlinear behavior of the secondary nuclear power system based on Modelica simulation software, model parameters, and input data according to the time scale of the second-level time step.
[0099] In some alternative implementation manners, the second dynamic model construction module 702 performs modeling on the macroscopic dynamic changes and long-term trends of the renewable energy system, the energy storage system, the steam supply system, the seawater desalination system, the hydrogen production system, the heating system, and the refrigeration system based on TRNSYS simulation software according to the time scale of the hourly time step.
[0100] In some alternative embodiments, the overall model construction module 703 includes:
[0101] A model calling unit, configured to call the first dynamic model by the second dynamic model within the current hour time step, and store the model parameters and input parameters of the first dynamic model into a preset file in advance for the first dynamic model to read.
[0102] A model interaction unit, configured to write the output data obtained from the simulation into a preset file after the first dynamic model performs energy response simulation according to the second-level time step for the second dynamic model to read and perform energy utilization simulation according to the hour time step.
[0103] A model iteration unit, configured to iterate the second dynamic model according to the hour time step until a preset convergence condition or a preset number of iterations is met, and simulate the annual system performance of the nuclear energy comprehensive utilization system.
[0104] In some alternative embodiments, asynchronous data interaction is performed between the first dynamic model and the second dynamic model based on OMPython.
[0105] In some alternative embodiments, the Modelica simulation software includes any one of Dymola simulation software or OpenModelica simulation software, and the second dynamic model calls the first dynamic model through the Type163 module of the TRNSYS simulation software.
[0106] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding foregoing embodiments, and will not be elaborated herein.
[0107] The modeling device of the nuclear energy comprehensive utilization system in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0108] The embodiment of the present invention also provides a computer device having the above-mentioned Figure 7 modeling device of the nuclear energy comprehensive utilization system shown.
[0109] Please refer to Figure 8 , Figure 8 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As shown in Figure 8As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if needed, multiple processors and / or multiple buses can be used together with multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as an array of servers, a set of blade servers, or a multi-processor system). Figure 8 In [the figure], a processor 10 is taken as an example.
[0110] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above-mentioned hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above-mentioned programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.
[0111] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0112] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0113] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.
[0114] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0115] Embodiments of the present invention also provide a computer-readable storage medium. The method according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium. Thus, the method described herein can be stored as such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0116] A part of the present invention can be applied as a computer program product, such as computer program instructions. When executed by a computer, through the operation of the computer, the methods and / or technical solutions according to the present invention can be invoked or provided. Those skilled in the art should be able to understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.
[0117] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A modeling method for a comprehensive nuclear energy utilization system, characterized in that, The method includes: Performing first local component modeling on the nuclear energy comprehensive utilization system based on the Modelica simulation software to obtain a first dynamic model, and using the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process; Performing second local component modeling on the nuclear energy comprehensive utilization system based on the TRNSYS simulation software to obtain a second dynamic model, and using the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year; Performing data interaction between the first dynamic model and the second dynamic model to construct a multi-time-scale nuclear energy comprehensive utilization system model, and simulating the system performance of the nuclear energy comprehensive utilization system based on the multi-time-scale nuclear energy comprehensive utilization system model.
2. The method according to claim 1, characterized in that, The nuclear energy comprehensive utilization system includes: a secondary nuclear power system, a renewable energy system, an energy storage system, a steam supply system, a seawater desalination system, a hydrogen production system, a heating system, and a refrigeration system. The performing first local component modeling on the nuclear energy comprehensive utilization system based on the Modelica simulation software includes: Obtaining model parameters and input data; Based on the Modelica simulation software, the model parameters, and the input data, modeling the transient response and non-linear behavior of the secondary nuclear power system according to the time scale of the second-level time step.
3. The method according to claim 2, wherein The performing second local component modeling on the nuclear energy comprehensive utilization system based on the TRNSYS simulation software includes: Based on the TRNSYS simulation software, modeling the macroscopic dynamic changes and long-term trends of the renewable energy system, the energy storage system, the steam supply system, the seawater desalination system, the hydrogen production system, the heating system, and the refrigeration system according to the time scale of the hourly time step.
4. The method according to claim 1, wherein The performing data interaction between the first dynamic model and the second dynamic model to construct a multi-time-scale nuclear energy comprehensive utilization system model, and simulating the system performance of the nuclear energy comprehensive utilization system based on the multi-time-scale nuclear energy comprehensive utilization system model includes: The second dynamic model calls the first dynamic model within the current hourly time step, and stores the model parameters and input parameters of the first dynamic model in a preset file in advance for the first dynamic model to read; After the first dynamic model performs energy response simulation according to the second-level time step, write the output data obtained from the simulation into the preset file for the second dynamic model to read, and perform energy utilization simulation according to the hourly time step; The second dynamic model iterates according to the hourly time step until a preset convergence condition or a preset number of iterations is met, and simulates the annual system performance of the nuclear energy comprehensive utilization system.
5. The method according to claim 4, characterized in that Asynchronous data interaction is performed between the first dynamic model and the second dynamic model based on OMPython.
6. The method according to claim 4, wherein The Modelica simulation software includes: Dymola simulation software or OpenModelica simulation software, and the second dynamic model calls the first dynamic model through the Type163 module of the TRNSYS simulation software.
7. A modeling device for a comprehensive nuclear energy utilization system, characterized in that The device includes: A first dynamic model construction module, configured to perform first local component modeling on the nuclear energy comprehensive utilization system based on Modelica simulation software to obtain a first dynamic model, and use the first dynamic model to simulate the energy response characteristics of the nuclear energy comprehensive utilization system in the second-level dynamic process; A second dynamic model construction module, configured to perform second local component modeling on the nuclear energy comprehensive utilization system based on TRNSYS simulation software to obtain a second dynamic model, and use the second dynamic model to simulate the energy utilization status of the nuclear energy comprehensive utilization system in the hourly dynamic process throughout the year; An overall model construction module, configured to perform data interaction between the first dynamic model and the second dynamic model, construct a multi-time-scale nuclear energy comprehensive utilization system model, and simulate the system performance of the nuclear energy comprehensive utilization system based on the multi-time-scale nuclear energy comprehensive utilization system model.
8. A computer device, characterized in that, It includes: A memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the modeling method of the nuclear energy comprehensive utilization system according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the modeling method of the nuclear energy comprehensive utilization system according to any one of claims 1 to 6.
10. A computer program product, characterized in that, It includes computer instructions, and the computer instructions are used to cause a computer to execute the modeling method of the nuclear energy comprehensive utilization system according to any one of claims 1 to 6.