Discrete event simulation-based rapid dynamic simulation method for regional heat supply dendritic pipe network
Through a fast dynamic simulation method based on discrete event simulation, the existing heating network simulation methods have solved the problems of high computational complexity and low simulation efficiency, and achieved rapid simulation and accurate prediction of complex heating networks, supporting real-time optimization and scheduling.
Patent Information
- Application Number
- CN202510173504.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-05-16
AI Technical Summary
When the existing dynamic simulation method of heating networks is used to deal with large-scale complex heating networks, the calculation complexity is high, the simulation efficiency is low, and it is difficult to effectively deal with time and space changes.
A fast dynamic simulation method based on discrete event simulation (DES) is adopted to optimize the calculation process and introduce efficient algorithms to establish an object-oriented heating network model, dynamically adjust the time step, and improve simulation efficiency.
It realizes rapid simulation and accurate prediction of complex heating networks, supports real-time optimization and scheduling, and improves simulation efficiency and accuracy.
Smart Images

Figure CN120012657A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a fast dynamic simulation method system of a regional heating branch network based on discrete event simulation. Specifically, it relates to a method for solving a dynamic thermal model of a regional heating network accurately and efficiently using discrete event simulation with a variable time step for different complex regional heating branch networks. It belongs to the field of heating system optimization and simulation. Background Art
[0002] With the acceleration of urbanization, district heating (DH) networks have gradually become an important means of energy conservation, emission reduction and energy utilization. Modern urban heating systems require highly accurate dynamic thermal simulation models in design and operation to optimize energy efficiency. However, existing simulation methods have the problems of high computational complexity and low simulation efficiency, especially when dealing with large-scale and complex heating networks, the simulation calculation time is too long. Traditional fixed time step simulation methods cannot effectively cope with complex temporal and spatial changes, and lack flexibility and scalability.
[0003] In recent years, Discrete Event Simulation (DES), as an event-driven modeling technology, has significantly improved computational efficiency and reduced unnecessary computational overhead due to its ability to dynamically adjust the time step. The DES model has been applied in many fields, but in the dynamic simulation of heating networks, especially for complex branched network structures, there is still a trade-off between model accuracy and simulation speed.
[0004] Therefore, how to improve simulation efficiency, maintain high accuracy, and solve the time and space complexity in large-scale heating network simulation requires the development of a fast and efficient dynamic simulation method to meet the actual needs of optimized operation of modern heating systems. Summary of the invention
[0005] The purpose of the present invention is to propose a fast dynamic simulation method system for a dendritic heating network based on discrete event simulation. By optimizing the calculation process and introducing efficient algorithms, fast simulation and accurate prediction of complex heating networks are achieved, which can support real-time optimization and scheduling.
[0006] The technical solution of the present invention:
[0007] A fast dynamic simulation method for a branched heating network based on discrete event simulation, the steps are as follows:
[0008] S1. Heat transfer calculation between supply and return pipes
[0009] The heat loss of three different types of pipes, single pipe, parallel single pipe and double pipe, is calculated to determine the heat transfer between water supply pipes. The differential equations between water temperature change, heat loss rate and outlet temperature parameters are as follows. Solving the differential equations, we can get the functional relationship between temperature and travel time:
[0010]
[0011]
[0012] Where ρ represents the density of water, c p represents the total number of energy-consuming devices, A represents the total number of energy-consuming devices, T represents the water temperature, t represents the arrival time, q s→g represents the heat loss rate from the pipe wall to the ground; τ represents the travel time, T 0 represents the inlet temperature at the moment the water boundary is created, k 1 , k 2 Represent the coefficients of each pipeline respectively;
[0013] S2. District heating network modeling
[0014] S2.1. Modeling of district heating network based on discrete event simulation (DES)
[0015] For the district heating network of the research object, an object-oriented framework is used to model the water supply and return network. Pipes, nodes, and heat source components are defined as independent objects, each of which contains its specific physical properties and thermodynamic characteristics. By establishing the connection relationship between pipes and nodes, the flow and heat transfer process of the heat medium in the network is accurately described to clarify the thermodynamic characteristics between each pipe and node. The district heating network is dynamically simulated based on discrete event simulation.
[0016] Discrete event simulation DES represents the change of system state through a series of events arranged in time order. These events are managed by a common event queue and sorted by activation time. The earliest events are processed one by one according to the order of the event queue. In the regional heating DH network, each pipeline contains three key events: inlet temperature change, flow rate change, and water boundary arrival at the end of the pipeline. Among them, the inlet temperature change event is triggered by the change of the outlet state of the upstream object, and the change time is predetermined by the input data. The flow rate change event occurs after the mass flow of the entire network is updated. The pipeline flow rate is determined by hydraulic calculation, and the water boundary arrival at the end of the pipeline event is further arranged. The water boundary arrival at the end of the pipeline event is generated by the pipeline itself and is triggered when the water boundary propagates from the pipeline inlet to the outlet. During the simulation process, each pipeline has a first-in-first-out FIFO queue to manage its own water boundary. When the queue is not empty and the flow rate is non-zero, a new water boundary arrival at the end of the pipeline event is arranged.
[0017] In the discrete event simulation process, the inlet temperature change is triggered by the change of the outlet state of the upstream object, and a new water boundary is generated in the queue of the pipeline's FIFO; in the mass flow change event, the mass flow of each pipeline in the entire network is calculated and updated through the flow balance relationship of the node; the flow velocity of the pipeline determines the propagation speed of the water boundary. When the water boundary reaches the outlet, a new outlet temperature or flow change event is triggered, and the subsequent water boundary arrives at the end of the pipeline event is arranged; when this method is used to simulate the district heating network, thermal calculation and hydraulic calculation are performed independently. The temperature change in the pipeline is simulated by thermal calculation, while the hydraulic calculation determines the pipeline flow rate through pressure propagation. Because the water parameters related to pressure propagation change little within the working temperature range, the hydraulic calculation can be completed independently;
[0018] S2.2. Calculation inside each pipeline
[0019] The Lagrangian method is used to simulate the heat transfer process in the pipeline by dynamically tracking the water boundary. The dynamic adjustment of the water boundary can accurately simulate the changes in time and space. The calculation equations for the time when the water boundary reaches the inlet and outlet of the pipeline and the travel time are as follows:
[0020]
[0021] Among them, t out represents the exit arrival time, t represents the current simulation time, and t in represents the inlet arrival time, v represents the flow velocity, and v in represents the inlet flow rate, τ represents the travel time, the superscript (k) represents the current moment, and the superscript (k+1) represents the next moment;
[0022] S2.3. Water boundary propagation calculation for district heating networks
[0023] In the district heating network, assuming there is no water leakage, the mass flow conservation calculation equation for each node is as follows:
[0024] ∑m i =0
[0025] Among them, m i represents the mass flow rate of each pipeline at node i;
[0026] S3. Implementation of simulation optimization method
[0027] S3.1. Lazy evaluation method
[0028] Lazy evaluation is used to calculate travel time, outlet temperature and outlet energy, and the outlet and inlet conditions of each pipeline are updated simultaneously only when the pipeline mass flow rate changes;
[0029] S3.2. Custom priority queue
[0030] Using a custom priority queue approach:
[0031] 1) Sort simulation events by priority to ensure that key events are handled first;
[0032] 2) Reduce the number of updates by customizing three optimization strategies, including ignoring the temperature change events of the pipe inlet whose entrance is an internal node; updating the event queue only once when two water boundaries arrive at the same time; and processing customer demand changes at the same time to improve the efficiency of managing the priority event queue;
[0033] 3) To solve the problem of re-arranging the order of events in the priority event queue, a minimum heap-based implementation method is adopted;
[0034] S3.3. Tolerance threshold method for eliminating redundant water boundaries
[0035] By setting the tolerance threshold required to create a new water boundary, the temperature change of the historical water boundary and the expected temperature change of the future water boundary are calculated respectively. If the temperature change difference is less than the preset tolerance threshold, the creation of a new water boundary in the downstream pipeline is omitted, thereby effectively reducing the amount of calculation and improving the simulation speed.
[0036] Furthermore, in step S1, the k of different pipelines 1 and k 2 The coefficients are as follows:
[0037] (1) Single tube:
[0038]
[0039] k 2 =T g
[0040] Where C represents the total heat capacity of water, R represents the thermal resistance of the pipe, and T g represents the surface temperature;
[0041] (2) Parallel single tube:
[0042]
[0043]
[0044] Where C represents the total heat capacity of water, R s The pipe thermal resistance, R, represents the symmetric problem a The pipe thermal resistance, T, represents the asymmetric problem p The temperature of the outer surface of the pipe, T g represents the surface temperature;
[0045] (3) Double tube
[0046]
[0047] Where C represents the total heat capacity of water, λ i represents the thermal conductivity of the pipe insulation layer, h s represents the convection heat transfer coefficient for the symmetric problem, h a The convective heat transfer coefficient, T, represents the asymmetric problem p The temperature of the outer surface of the pipe, T g Represents the surface temperature.
[0048] Furthermore, in step S2.3, the specific calculation method of water boundary propagation between connected pipes in the district heating network is as follows:
[0049] 1) At the diversion node in the pipe network, when the water boundary of the upstream pipe arrives, a new water boundary will be generated at the inlet of all downstream branch pipes, and its inlet temperature is equal to the outlet temperature of the upstream pipe; the water temperature at the diversion node remains consistent in each downstream pipe, and the generation of the downstream pipe water boundary is related to the characteristics of the diversion node;
[0050] 2) At the flow-dividing node in the pipe network, when the mass flow rate of the upstream pipe changes, a new water boundary will be generated at the inlet of the downstream pipe even if the mass flow rate of the downstream branch pipe itself does not change. This is because the change in the outlet flow rate of the upstream pipe will introduce a breakpoint in the piecewise function of the outlet temperature curve; this discontinuity must be monitored to ensure the accuracy of the linear interpolation of the outlet temperature;
[0051] 3) At the confluence node in the pipe network, when the water boundary of any upstream pipe reaches the outlet, a new water boundary will be generated in the downstream pipe, and its temperature is the mass flow weighted average of the outlet temperatures of all upstream pipes. This represents the mixed outlet temperature of the confluence node. The calculation equation for the outlet temperature of all upstream pipes of a single confluence node j that are completely mixed is as follows:
[0052]
[0053] Among them, m i represents the mass flow of each node, represents the outlet temperature of all upstream pipes of node j when they are completely mixed, represents the current outlet temperature of pipe i, represents the set of all pipes flowing into node j;
[0054] 4) At the confluence node in the pipe network, when the mass flow rate of any upstream pipe changes, two new water boundaries with different inlet temperatures will be created in the downstream pipe. The temperatures of the two water boundaries are calculated based on the mass flow rates before and after the change, representing the temperature segments before and after the change, respectively, and the distance between the two is set to zero to represent the discontinuity point of the temperature curve;
[0055] These methods dynamically calculate the position, temperature and quantity of water boundaries, accurately capturing the temperature changes and dynamic changes in mass flow at the diversion and confluence nodes, ensuring high accuracy and reliability of heating network simulation.
[0056] Furthermore, in the step S3.2, a customized minimum heap structure is introduced on the basis of the standard minimum heap, and the performance is improved through the following improvements: ① Efficiently handle event rescheduling, and support rapid adjustment of the heap structure to maintain its minimum heap properties when the event priority changes; ② High-speed search is achieved through an indexing scheme, and any element can be quickly located in the heap, thereby avoiding the inefficiency of the standard minimum heap in search operations; ③ Dynamically allocate the heap size, by pre-allocating the heap size and maintaining a constant maximum number of active events, the memory allocation overhead is reduced, and the stability and operation efficiency of the system are improved.
[0057] Beneficial effects of the present invention: The present invention realizes rapid simulation and accurate prediction of complex heating networks by optimizing calculation processes and introducing efficient algorithms, and can support real-time optimization and scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 Schematic diagram of the process flow of the fast dynamic simulation method based on discrete event simulation for district heating branched pipe networks.
[0059] Figure 2 Flowchart for modeling a district heating network based on discrete event simulation, showing the specific steps of event generation, processing and queue management.
[0060] Figure 3 Schematic diagram of water boundary propagation between pipes at flow diversion and confluence nodes when the water boundary reaches the upstream pipe outlet or the mass flow rate changes. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is described in detail below with reference to the accompanying drawings and examples. Figure 1 , the present invention mainly comprises the following steps:
[0062] A fast dynamic simulation method for a branched heating network based on discrete event simulation is proposed. Aiming at different scenarios of district heating branched pipe networks, a heating network model with an object-oriented framework is established through discrete event simulation, and simulation optimization technology is applied to propose a fast dynamic simulation method for a district heating network based on discrete event simulation. The steps are as follows:
[0063] S1. Heat transfer calculation between supply and return pipes
[0064] The heat loss of three different types of pipes, single pipe, parallel single pipe and double pipe, is calculated to determine the heat transfer between water supply pipes. The differential equations between water temperature change, heat loss rate and outlet temperature parameters are as follows. Solving the differential equations, we can get the functional relationship between temperature and travel time:
[0065]
[0066]
[0067] Where ρ represents the density of water, c p represents the total number of energy-consuming devices, A represents the total number of energy-consuming devices, T represents the water temperature, t represents the arrival time, q s→g represents the heat loss rate from the pipe wall to the ground; τ represents the travel time, T 0 represents the inlet temperature at the moment the water boundary is created, k 1 , k 2 Represents the coefficient of each pipeline, k of different pipelines 1 and k 2 The coefficients are as follows:
[0068] (1) Single tube:
[0069]
[0070] k 2 =T g
[0071] Where C represents the total heat capacity of water, R represents the thermal resistance of the pipe, and T g represents the surface temperature;
[0072] (2) Parallel single tube:
[0073]
[0074] Where C represents the total heat capacity of water, R s The pipe thermal resistance, R, represents the symmetric problem a The pipe thermal resistance, T, represents the asymmetric problem p The temperature of the outer surface of the pipe, T g represents the surface temperature;
[0075] (3) Double tube
[0076]
[0077] Where C represents the total heat capacity of water, λ i represents the thermal conductivity of the pipe insulation layer, h s represents the convection heat transfer coefficient for the symmetric problem, h a The convective heat transfer coefficient, T, represents the asymmetric problem p The temperature of the outer surface of the pipe, T g represents the surface temperature;
[0078] S2. District heating network modeling
[0079] S2.1. Modeling of district heating network based on discrete event simulation (DES)
[0080] For the district heating network of the research object, an object-oriented framework is used to model the water supply and return network. Pipes, nodes, and heat source components are defined as independent objects, and each object contains its specific physical properties and thermodynamic characteristics. By establishing the connection relationship between pipes and nodes, the flow and heat transfer process of the heat medium in the network is accurately described to clarify the thermodynamic characteristics between each pipe and node. Dynamic simulation of the district heating network is performed based on discrete event simulation.
[0081] Discrete event simulation (DES) represents the change of system state through a series of events arranged in time order. These events are managed by a common event queue and sorted by activation time. The earliest events are processed one by one according to the order of the event queue. In the district heating DH network, each pipeline contains three key events: inlet temperature change, flow rate change, and water boundary arrival at the end of the pipeline. Among them, the inlet temperature change event is triggered by the change of the outlet state of the upstream object (such as the heating plant, user or upstream pipeline), and the change time is predetermined by the input data. The flow rate change event occurs after the mass flow of the entire network is updated. The pipeline flow rate is determined by hydraulic calculation, and the water boundary arrival at the end of the pipeline event is further arranged. The water boundary arrival at the end of the pipeline event is generated by the pipeline itself and is triggered when the water boundary propagates from the pipeline inlet to the outlet. During the simulation process, each pipeline has a first-in-first-out (FIFO) queue to manage its own water boundary. When the queue is not empty and the flow rate is non-zero, a new water boundary arrival at the end of the pipeline event is arranged.
[0082] In the discrete event simulation process, the inlet temperature change is triggered by the change in the outlet state of the upstream object, and a new water boundary is generated in the queue of the pipeline's FIFO; in the mass flow change event, the mass flow of each pipeline in the entire network is calculated and updated through the flow balance relationship of the node; the flow rate of the pipeline determines the propagation speed of the water boundary. When the water boundary reaches the outlet, a new outlet temperature or flow change event is triggered, and subsequent water boundaries arrive at the end of the pipeline event. When this method is used to simulate the regional heating network, thermal calculations and hydraulic calculations are performed independently. The temperature change in the pipeline is simulated by thermal calculations, while the hydraulic calculation determines the pipeline flow rate through pressure propagation. Because the water parameters related to pressure propagation change little within the working temperature range, the hydraulic calculation can be completed independently;
[0083] S2.2. Calculation inside each pipeline
[0084] The Lagrangian method is used to simulate the heat transfer process in the pipeline by dynamically tracking the water boundary. The dynamic adjustment of the water boundary can accurately simulate the changes in time and space. The calculation equations for the time when the water boundary reaches the inlet and outlet of the pipeline and the travel time are as follows:
[0085]
[0086] Among them, t out represents the exit arrival time, t represents the current simulation time, and t in represents the inlet arrival time, v represents the flow velocity, and v in represents the inlet flow rate, τ represents the travel time, the superscript (k) represents the current moment, and the superscript (k+1) represents the next moment;
[0087] S2.3. Water boundary propagation calculation for district heating networks
[0088] In the district heating network, assuming there is no water leakage, the mass flow conservation calculation equation for each node is as follows:
[0089] ∑m i =0
[0090] Among them, m i represents the mass flow rate of each pipeline at node i;
[0091] The specific calculation method for water boundary propagation between connected pipes in a district heating network is as follows:
[0092] 1) At the diversion node in the pipe network, when the water boundary of the upstream pipe arrives, a new water boundary will be generated at the inlet of all downstream branch pipes, and its inlet temperature is equal to the outlet temperature of the upstream pipe. The water temperature at the diversion node remains consistent in each downstream pipe, and the generation of the downstream pipe water boundary is related to the characteristics of the diversion node;
[0093] 2) At the flow-dividing node in the pipe network, when the mass flow rate of the upstream pipe changes, even if the mass flow rate of the downstream branch pipe itself does not change, a new water boundary will be generated at the inlet of the downstream pipe. This is because the change in the outlet flow rate of the upstream pipe will introduce a breakpoint in the piecewise function of the outlet temperature curve. This discontinuity must be monitored to ensure the accuracy of the linear interpolation of the outlet temperature;
[0094] 3) At the confluence node in the pipe network, when the water boundary of any upstream pipe reaches the outlet, a new water boundary will be generated in the downstream pipe, and its temperature is the mass flow weighted average of the outlet temperatures of all upstream pipes. This represents the mixed outlet temperature of the confluence node. The calculation equation for the outlet temperature of all upstream pipes of a single confluence node j that are completely mixed is as follows:
[0095]
[0096] Among them, m i represents the mass flow of each node, represents the outlet temperature of all upstream pipes of node j when they are completely mixed, represents the current outlet temperature of pipe i, represents the set of all pipes flowing into node j;
[0097] 4) At the confluence node in the pipe network, when the mass flow rate of any upstream pipe changes, two new water boundaries with different inlet temperatures will be created in the downstream pipe. The temperatures of the two water boundaries are calculated based on the mass flow rates before and after the change, representing the temperature segments before and after the change, respectively, and the distance between the two is set to zero to represent the discontinuity point of the temperature curve.
[0098] These methods dynamically calculate the position, temperature and quantity of water boundaries, accurately capturing the temperature changes and dynamic changes in mass flow at the diversion and confluence nodes, ensuring high accuracy and reliability of heating network simulation.
[0099] Furthermore, if Figure 2 As shown in the figure, the district heating network based on discrete event simulation is modeled and simulated. First, the event queue is initialized using mass flow change and inlet change events. The event queue is judged, and when the event queue is not empty, it is processed and deleted according to the type of the first event in the event queue.
[0100] (1) When the first event in the queue is a mass flow change event, the mass flow of the entire network is updated first, and then the loop is started. The flow rate of each pipeline is iteratively calculated according to the heat transfer order to determine whether the flow rate has changed. If the flow rate does not change, it returns to the previous step. If the flow rate changes, it determines whether to cancel the water boundary arrival event or reschedule the water boundary arrival event based on whether the flow rate is zero. After updating the pipeline outlet temperature, the inlet temperature change event of the downstream pipeline is triggered, and then the loop is returned to the start step. If there is a next change, the mass flow change event is rescheduled, and finally the event queue judgment step is returned;
[0101] (2) When the first event in the queue is a water boundary arrival event, the pipe outlet temperature is first updated, and then the arrived water boundary is removed from the FIFO queue. The FIFO queue is then judged. If the FIFO queue is not empty, the inlet temperature change event of the downstream pipe is triggered after the water boundary arrival event is rearranged. If the FIFO queue is empty, the inlet temperature change event of the downstream pipe is directly triggered, and finally the event queue judgment step is returned;
[0102] (3) When the first event in the queue is the inlet temperature change event, a new water boundary is first created in the pipe, and then the FIFO queue is judged. If the FIFO queue is not empty, the event queue judgment step is returned. If the FIFO queue is empty, the event queue judgment step is returned after the water boundary arrival event is rearranged;
[0103] Repeat the above steps until the event queue is empty and the simulation ends.
[0104] S3. Implementation of simulation optimization method
[0105] Due to its event-driven nature, the computational cost of DES can be high, especially when processing a large number of events and frequently updating the event queue. This is a severe challenge for the simulation speed of large-scale DH networks. Therefore, efficient simulation optimization techniques are needed to improve the simulation performance of DH network models;
[0106] S3.1. Lazy evaluation method
[0107] The lazy evaluation strategy is conducive to improving the calculation speed and memory usage. The lazy evaluation is used to calculate the travel time, outlet temperature and outlet energy. The outlet and inlet conditions of each pipeline are updated simultaneously only when the pipeline mass flow changes, which effectively reduces the complexity of each calculation step and greatly improves the simulation efficiency.
[0108] S3.2. Custom priority queue
[0109] In order to efficiently manage simulation events, a custom priority queue method is used:
[0110] 1) Sort simulation events by priority to ensure that key events are handled first;
[0111] 2) Reduce the number of updates by customizing three optimization strategies, including ignoring the temperature change events of the pipe inlet whose entrance is an internal node; updating the event queue only once when two water boundaries arrive at the same time; and processing customer demand changes at the same time to improve the efficiency of managing the priority event queue;
[0112] 3) Aiming at the problem of re-arranging the order of events in the priority event queue, an efficient implementation method based on the minimum heap (Min-Heap) is adopted. The minimum heap is a special binary tree data structure that can quickly obtain and remove the highest priority event. It is usually used to implement the priority queue and supports efficient event insertion, deletion of minimum value, and dynamic adjustment of event order. In order to further optimize the efficiency of event processing, the present invention introduces a custom minimum heap structure on the basis of the standard minimum heap. In order to further optimize the efficiency of event processing, the present invention introduces a custom minimum heap structure on the basis of the standard minimum heap, and significantly improves the performance through the following improvements: ① Efficiently handle event re-arrangement, support rapid adjustment of the heap structure to maintain its minimum heap property when the event priority changes; ② High-speed search is achieved through the index scheme, and any element can be quickly located in the heap, thereby avoiding the inefficiency of the traditional minimum heap in the search operation; ③ Dynamic allocation of heap size, by pre-allocating the heap size and maintaining a constant maximum number of active events, the memory allocation overhead is reduced, and the stability and operation efficiency of the system are improved. These improvements not only solve the problem of event re-arrangement in the priority event queue, but also significantly improve the performance of the custom minimum heap in terms of element search, dynamic adjustment and memory management. Through the above optimization, an efficient and reliable event scheduling solution is provided for discrete event simulation, which is suitable for the simulation and optimization of large-scale complex district heating networks;
[0113] S3.3. Tolerance threshold method for eliminating redundant water boundaries
[0114] Ignore water boundaries that have no significant impact on the temperature curve. Eliminating redundant water boundaries can reduce temperature calculations and reduce the management of event queues, thereby increasing simulation speed. By setting the tolerance threshold required to create new water boundaries, calculate the temperature changes of historical water boundaries and the expected temperature changes of future water boundaries respectively. If the temperature change difference is less than the preset tolerance threshold, omit the creation of new water boundaries in the downstream pipe, thereby effectively reducing the amount of calculation and increasing simulation speed;
[0115] S4. Model Validation
[0116] S4.1. District heating network survey and measurement
[0117] The structure of the district heating branch network of the research object was investigated, and the outdoor air temperature, network supply and return water temperature and flow parameters were measured;
[0118] S4.2. Model parameter setting
[0119] The user-side flow and temperature drop as well as the measured values of the water supply temperature of the heating plant are used as the input data of the model, and the relevant parameters required in the simulation process are set and evaluated and analyzed to further improve the simulation accuracy and stability;
[0120] S4.3. Comparison and verification of simulation results
[0121] Output hourly node temperature and heat loss data, and evaluate the accuracy of the model by comparing the simulation results with the measured data to ensure the validity of the simulation results. According to the simulation results, provide corresponding references for improving district heating network parameters, recalibrating measurement equipment, and optimizing the network.
[0122] A dynamic simulation test was conducted on a district heating network as an example. The network consists of a central heat exchange station, 52 nodes, and 24 users, including commercial buildings, apartments, and single-family homes. The length of the supply and return water pipes in the network ranges from 732 meters to 1,368 meters.
[0123] The specific accuracy indicators of the temperature simulation results of some nodes of the pipe network model are shown in Table 1 below. Table 2 shows the dynamic simulation performance indicators of the district heating network model using different temperature thresholds.
[0124] Table 1 Accuracy index of node temperature simulation results
[0125]
[0126] Table 2 Comparison of model settings and performance
[0127]
[0128] The example results show:
[0129] In this case, the measured data for 72 days from January 1 to March 14 was used as the simulation input, including the flow and temperature changes of the customer heat exchanger. The simulation is based on the discrete event simulation method, which dynamically simulates the heat transfer and heat loss of the water supply and return pipes of the pipe network, and generates the hourly node temperature distribution and pipe heat loss.
[0130] The results show that, using the dynamic thermal simulation method of district heating branched pipe network based on discrete event simulation, the weighted average error WAE of the temperature simulation results of each node is -2.30℃–2.86℃ (the average value is 0.43℃), the mean absolute error MAE is 0.38℃–2.86℃ (the average value is 0.87℃), the Pearson correlation coefficient PCC is 0.76–0.99 (the average value is 0.97), and the standard deviation STD is 11.71℃–22.58℃ (the average value is 0.61℃).
[0131] The average error between the simulated node temperature and the measured data is less than 1°C, and the simulated heat loss is close to the actual observed value. The test run was carried out on a laptop equipped with an Intel Core i7-1185G7 CPU@3.00GHz processor, and the simulation calculation took less than 0.7 seconds for 72 days, which fully verified the fast and efficient characteristics of this method.
Claims
1. A fast dynamic simulation method for district heating branch network based on discrete event simulation, characterized in that: Here are the steps: S1. Heat transfer calculation between supply and return pipes The heat loss of three different types of pipes, single pipe, parallel single pipe and double pipe, is calculated to determine the heat transfer between water supply pipes. The differential equations between water temperature change, heat loss rate and outlet temperature parameters are as follows. Solving the differential equations, we can get the functional relationship between temperature and travel time: Where ρ represents the density of water, c p represents the total number of energy-consuming devices, A represents the total number of energy-consuming devices, T represents the water temperature, t represents the arrival time, q s→g represents the heat loss rate from the pipe wall to the ground; τ represents the travel time, T0 represents the inlet temperature at the time when the water boundary is created, and k1 and k2 represent the coefficients of each pipe respectively; S2. District heating network modeling S2.
1. Modeling of district heating network based on discrete event simulation (DES) For the district heating network of the research object, an object-oriented framework is used to model the water supply and return network. Pipes, nodes, and heat source components are defined as independent objects, each of which contains its specific physical properties and thermodynamic characteristics. By establishing the connection relationship between pipes and nodes, the flow and heat transfer process of the heat medium in the network is accurately described to clarify the thermodynamic characteristics between each pipe and node. The district heating network is dynamically simulated based on discrete event simulation. Discrete event simulation DES represents the change of system state through a series of events arranged in time order. These events are managed by a common event queue and sorted by activation time. The earliest events are processed one by one according to the order of the event queue. In the regional heating DH network, each pipeline contains three key events: inlet temperature change, flow rate change, and water boundary arrival at the end of the pipeline. Among them, the inlet temperature change event is triggered by the change of the outlet state of the upstream object, and the change time is predetermined by the input data. The flow rate change event occurs after the mass flow of the entire network is updated. The pipeline flow rate is determined by hydraulic calculation, and the water boundary arrival at the end of the pipeline event is further arranged. The water boundary arrival at the end of the pipeline event is generated by the pipeline itself and is triggered when the water boundary propagates from the pipeline inlet to the outlet. During the simulation process, each pipeline has a first-in-first-out FIFO queue to manage its own water boundary. When the queue is not empty and the flow rate is non-zero, a new water boundary arrival at the end of the pipeline event is arranged. In the discrete event simulation process, the inlet temperature change is triggered by the change of the outlet state of the upstream object, and a new water boundary is generated in the queue of the pipeline's FIFO; in the mass flow change event, the mass flow of each pipeline in the entire network is calculated and updated through the flow balance relationship of the node; the flow velocity of the pipeline determines the propagation speed of the water boundary. When the water boundary reaches the outlet, a new outlet temperature or flow change event is triggered, and the subsequent water boundary arrives at the end of the pipeline event is arranged; when this method is used to simulate the district heating network, thermal calculation and hydraulic calculation are performed independently. The temperature change in the pipeline is simulated by thermal calculation, while the hydraulic calculation determines the pipeline flow rate through pressure propagation. Because the water parameters related to pressure propagation change little within the working temperature range, the hydraulic calculation can be completed independently; S2.
2. Calculation inside each pipeline The Lagrangian method is used to simulate the heat transfer process in the pipeline by dynamically tracking the water boundary. The dynamic adjustment of the water boundary can accurately simulate the changes in time and space. The calculation equations for the time when the water boundary reaches the inlet and outlet of the pipeline and the travel time are as follows: Among them, t out represents the exit arrival time, t represents the current simulation time, and t in represents the inlet arrival time, v represents the flow velocity, and v in represents the inlet flow rate, τ represents the travel time, the superscript (k) represents the current moment, and the superscript (k+1) represents the next moment; S2.
3. Water boundary propagation calculation for district heating networks In the district heating network, assuming there is no water leakage, the mass flow conservation calculation equation for each node is as follows: ∑m i =0 Among them, m i represents the mass flow rate of each pipeline at node i; S3. Implementation of simulation optimization method S3.
1. Lazy evaluation method Lazy evaluation is used to calculate travel time, outlet temperature and outlet energy, and the outlet and inlet conditions of each pipeline are updated simultaneously only when the pipeline mass flow rate changes; S3.
2. Custom priority queue Using a custom priority queue approach: 1) Sort simulation events by priority to ensure that key events are handled first; 2) Reduce the number of updates by customizing three optimization strategies, including ignoring the temperature change events of the pipe inlet whose entrance is an internal node; updating the event queue only once when two water boundaries arrive at the same time; and processing customer demand changes at the same time to improve the efficiency of managing the priority event queue; 3) To solve the problem of re-arranging the order of events in the priority event queue, a minimum heap-based implementation method is adopted; S3.
3. Tolerance threshold method for eliminating redundant water boundaries By setting the tolerance threshold required to create a new water boundary, the temperature change of the historical water boundary and the expected temperature change of the future water boundary are calculated respectively. If the temperature change difference is less than the preset tolerance threshold, the creation of a new water boundary in the downstream pipeline is omitted, thereby effectively reducing the amount of calculation and improving the simulation speed.
2. According to claim 1, a fast dynamic simulation method for a district heating branch network based on discrete event simulation is characterized in that: In step S1, the k1 and k2 coefficients of different pipelines are as follows: (1) Single tube: k2=T g Where C represents the total heat capacity of water, R represents the thermal resistance of the pipe, and T g represents the surface temperature; (2) Parallel single tube: Where C represents the total heat capacity of water, R s The pipe thermal resistance, R, represents the symmetric problem a The pipe thermal resistance, T, represents the asymmetric problem p The temperature of the outer surface of the pipe, T g represents the surface temperature; (3) Double tube Where C represents the total heat capacity of water, λ i represents the thermal conductivity of the pipe insulation layer, h s represents the convection heat transfer coefficient for the symmetric problem, h a The convective heat transfer coefficient, T, represents the asymmetric problem p The temperature of the outer surface of the pipe, T g Represents the surface temperature.
3. The fast dynamic simulation method of a district heating branch network based on discrete event simulation according to claim 1 is characterized in that: In step S2.3, the specific calculation method of water boundary propagation between connected pipes in the district heating network is as follows: 1) At the diversion node in the pipe network, when the water boundary of the upstream pipe arrives, a new water boundary will be generated at the inlet of all downstream branch pipes, and its inlet temperature is equal to the outlet temperature of the upstream pipe; the water temperature at the diversion node remains consistent in each downstream pipe, and the generation of the downstream pipe water boundary is related to the characteristics of the diversion node; 2) At the flow-dividing node in the pipe network, when the mass flow rate of the upstream pipe changes, a new water boundary will be generated at the inlet of the downstream pipe even if the mass flow rate of the downstream branch pipe itself does not change. This is because the change in the outlet flow rate of the upstream pipe will introduce a breakpoint in the piecewise function of the outlet temperature curve; this discontinuity must be monitored to ensure the accuracy of the linear interpolation of the outlet temperature; 3) At the confluence node in the pipe network, when the water boundary of any upstream pipe reaches the outlet, a new water boundary will be generated in the downstream pipe, and its temperature is the mass flow weighted average of the outlet temperatures of all upstream pipes. This represents the mixed outlet temperature of the confluence node. The calculation equation for the outlet temperature of all upstream pipes of a single confluence node j that are completely mixed is as follows: Among them, m i represents the mass flow of each node, represents the outlet temperature of all upstream pipes of node j when they are completely mixed, represents the current outlet temperature of pipe i, represents the set of all pipes flowing into node j; 4) At the confluence node in the pipe network, when the mass flow rate of any upstream pipe changes, two new water boundaries with different inlet temperatures will be created in the downstream pipe. The temperatures of the two water boundaries are calculated based on the mass flow rates before and after the change, representing the temperature segments before and after the change, respectively, and the distance between the two is set to zero to represent the discontinuity point of the temperature curve; These methods dynamically calculate the position, temperature and quantity of water boundaries, accurately capturing the temperature changes and dynamic changes in mass flow at the diversion and confluence nodes, ensuring high accuracy and reliability of heating network simulation.
4. The fast dynamic simulation method of a district heating branch network based on discrete event simulation according to claim 1 is characterized in that: In the step S3.2, a customized minimum heap structure is introduced on the basis of the standard minimum heap, and the performance is improved through the following improvements: ① Efficiently handle event rescheduling, and support rapid adjustment of the heap structure to maintain its minimum heap properties when the event priority changes; ② High-speed search is achieved through an indexing scheme, and any element can be quickly located in the heap, thereby avoiding the inefficiency of the standard minimum heap in search operations; ③ Dynamically allocate the heap size, by pre-allocating the heap size and maintaining a constant maximum number of active events, the memory allocation overhead is reduced, and the stability and operation efficiency of the system are improved.