Gas pipe network odorizing agent concentration simulation and regulation method, device, equipment and medium

By acquiring topology and flow data of the gas pipeline network, dividing the area, and using a one-dimensional concentration transport equation, the computational complexity and detection cost of odorant concentration simulation in urban gas pipeline networks were solved, achieving efficient odorant concentration control and improved stability.

CN123028305APending Publication Date: 2026-11-03SHANGHAI THREE ZERO FOUR ZERO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611519721.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively and scientifically simulate large-scale odorant concentrations in urban gas pipeline networks. The computational complexity is high, the detection costs are high, and the control is not timely, resulting in poor reliability and convenience in odorant concentration control.

Method used

By acquiring topological and pressure/flow data of the gas pipeline network, dividing it into mainstream and stagnant areas, and employing a one-dimensional pipeline concentration transport equation and different solution strategies, combined with diffusion coefficient and flow velocity to determine the area type, the odorant concentration distribution of the urban gas pipeline network is simulated, and control instructions are generated based on the simulation results.

Benefits of technology

It enables efficient and scientific simulation of odorant concentration in urban gas pipeline networks, reduces computational complexity and cost, improves the reliability and convenience of odorant concentration control, and enhances the stability of pipeline network operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123028305A_ABST
    Figure CN123028305A_ABST
Patent Text Reader

Abstract

The application discloses a gas pipe network odorant concentration simulation and regulation method, device, equipment and medium, relates to the underground pipe network technical field, and includes: acquiring topological data and pressure flow data of a town gas pipe network; determining a pipe diffusion coefficient based on the pressure flow data, determining a regional type of the pipe in combination with a pipe flow rate, including a main flow region and a static stagnation region; determining whether the current is a simulation initial moment or a missing previous moment historical simulation result, obtaining a regional solution strategy, and determining first node concentration data of the main flow region in combination with the topological data; determining second node concentration data of the static stagnation region based on the regional solution strategy, the first node concentration data and a connection relationship between the main flow region and the static stagnation region; summarizing the first and second node concentration data, and determining a pipe odorization station regulation instruction based on the obtained current simulation result and a preset concentration threshold value. The application improves the reliability, convenience and pipe network operation stability of the odorant concentration regulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underground pipeline technology, and in particular to a method, apparatus, equipment and medium for simulating and controlling the concentration of odorant in gas pipelines. Background Technology

[0002] Urban gas transmission and distribution networks connect gas sources and terminals, covering a large area, operating continuously, and requiring high safety standards. However, methane (the basic component of natural gas) is colorless and odorless, making leaks difficult to detect. Tetrahydrothiophene (THT) is known to be a highly stable odorant that does not fade and is non-corrosive to materials.

[0003] However, the urban pipeline network topology encountered in actual operation is complex, with numerous end users and significant differences in monitoring locations. Current research on odorant concentration primarily focuses on the adsorption and chemical effects of odorant in gas pipelines, or on single pipes or even simple networks. While these scenarios have been extensively analyzed, the simulation methods used are mostly commercial software. This involves processing the pipelines in three-dimensional or two-dimensional form and then performing computational modeling, resulting in computationally intensive work. Furthermore, simulation studies on odorant concentration in large-scale urban pipeline networks are still relatively scarce.

[0004] Meanwhile, current technologies for detecting odorant concentrations primarily rely on electrochemical methods or gas chromatography. Gas chromatography is expensive, requires significant space, and incurs high operating costs. Electrochemical methods, due to their principles and lifespan, are difficult to implement multiple daily measurements (generally suitable only for measurements every 1-2 days). Even placing portable electrochemical instruments near end-users in the pipeline network cannot fully track the entire network's status and is limited by sampling frequency and asynchronous sampling time. Furthermore, the distance between odorization points and detection points can be tens of kilometers of pipeline, requiring 0.5-2 hours to reach even at a flow rate of 30 m / s. If the odorant concentration is found to be below standard, changing the odorization dosage may not immediately result in an improvement at the end-user. In summary, odorant regulation currently faces a complex and challenging dilemma. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a method, apparatus, equipment, and medium for simulating and controlling the concentration of odorant in gas pipeline networks. This solution addresses the problems existing in current related solutions, effectively, scientifically, and accurately simulating the odorant concentration in large-scale gas pipeline networks such as those in urban areas. It reduces computational complexity and cost, thereby improving the reliability, convenience, and operational stability of the pipeline network as well as the control of odorant concentration. The specific solution is as follows: In a first aspect, this application provides a method for simulating and controlling the concentration of odorant in a gas pipeline network, including: Obtain the network topology data and pressure and flow data of the urban gas pipeline network; the pressure and flow data includes pressure and flow data of pipelines and nodes; The diffusion coefficient of each pipe is determined based on the pressure and flow rate data, and the region type of each pipe is determined based on the diffusion coefficient and the flow velocity of each pipe; the region type includes a convection-dominated mainstream region and a diffusion-dominated stagnant region. Determine whether the current moment is the initial moment of the simulation or whether the historical odorant concentration distribution simulation results from the previous moment are missing, and determine the region solution strategy based on the corresponding determination results; the region solution strategy includes a steady-state solution strategy or a transient solution strategy; Based on the regional solution strategy, the pipeline topology data, and the objective equation, the concentration data of the first node corresponding to each pipeline in the mainstream region is determined; the objective equation is the odorant concentration transport equation in a one-dimensional pipeline. Based on the region solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region, the second node concentration data corresponding to each pipeline in the stagnant region is determined. The concentration data of the first node and the concentration data of the second node are aggregated into the mainstream area to obtain and output the simulation results of the current odorant concentration distribution of the urban gas pipeline network; Based on the simulation results of the current odorant concentration distribution of the urban gas pipeline network and the preset concentration threshold, the control instructions for the current odorization stations of several pipelines are determined.

[0006] Optionally, determining the diffusion coefficient of each of the pipes based on the pressure and flow rate data includes: The flow state of each pipe is determined based on the pressure and flow rate data. If the flow state is laminar flow, then the preset molecular diffusion coefficient is determined as the diffusion coefficient of the pipe; If the flow state is turbulent, the turbulent viscosity is determined based on the friction coefficient of the pipe and the turbulence model, the turbulent diffusion coefficient is determined based on the turbulent viscosity and the turbulent Schmidt number, and the turbulent diffusion coefficient is determined as the diffusion coefficient of the pipe.

[0007] Optionally, determining the region type of each pipe based on the diffusion coefficient and the flow velocity of each pipe includes: The Peckley number of each of the pipes is determined based on the flow velocity, pipe inner diameter, and diffusion coefficient. If the Peckley number is less than a preset threshold, the pipe is classified into the stasis region. If the Peckley number is not less than the preset threshold, then the pipeline is classified into the mainstream region; Analyze the connection points between each stasis region and the mainstream region to determine the connection relationship between the mainstream region and the stasis region.

[0008] Optionally, the step of determining whether the current time is the initial moment of the simulation or whether the historical odorant concentration distribution simulation results from the previous moment are missing, and determining the regional solution strategy based on the corresponding determination results, includes: Determine whether the current moment is the initial simulation time or whether the historical odorant concentration distribution simulation results from the previous moment are missing, in order to determine the judgment result; If the judgment result is yes, then the steady-state solution strategy will be used as the domain solution strategy; If the judgment result is negative, then the transient solution strategy will be used as the domain solution strategy.

[0009] Optionally, determining the first node concentration data corresponding to each pipeline in the mainstream region based on the regional solution strategy, the pipeline topology data, and the objective equation includes: The objective equation is determined based on a one-dimensional flow network hydraulic model and the flow velocity. The objective equation includes a convection term, a diffusion term, and a source term. The source term is used to simultaneously describe the forward process of odorant mass transfer from the gas phase to the pipe wall and the reverse process of its release back into the gas phase from the pipe wall. When the region solution strategy is a steady-state solution strategy, the source terms in the objective equation are ignored to convert the objective equation into a steady-state equation. Based on the pipeline topology data, the diffusion coefficient, the first-order upwind scheme, and the steady-state equation, the simultaneous solution of each pipeline in the mainstream region is performed to determine the concentration field of the mainstream region. The concentration data of the first node is then determined based on the concentration field. When the region solution strategy is a transient solution strategy, the pipelines in the mainstream region are solved simultaneously based on the pipeline topology data, the first-order upwind scheme and the objective equation to determine the concentration field of the mainstream region, and the concentration data of the first node is determined based on the concentration field.

[0010] Optionally, determining the second node concentration data corresponding to each pipe in the stagnant region based on the region solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region includes: Based on the first node concentration data, the node concentration of each connection point in the connection relationship between the mainstream region and the stagnant region is determined, and the node concentration is used as the boundary condition of each stagnant region. When the region solution strategy is a steady-state solution strategy, the source term and time term in the objective equation are ignored to convert the objective equation into an ordinary differential equation, and the first pipeline node flux balance equation of each stagnant region is determined based on the pipeline topology data, the diffusion coefficient, the boundary conditions, the pipeline length, and the ordinary differential equation. When the region solution strategy is a transient solution strategy, the objective equation is discretized based on the pipeline topology data, the diffusion coefficient, the boundary conditions, and the pipeline length, using a time backward difference scheme and a spatial center difference scheme, in order to determine the second pipeline node flux balance equation for each of the stagnant regions. The node concentration in the current stagnant region is obtained based on the flux balance equation of the first pipeline node or the flux balance equation of the second pipeline node. Based on the node concentrations at each pipeline endpoint, the concentration distribution of all discrete nodes within the pipeline is recovered to obtain the second node concentration data.

[0011] Optionally, the step of determining the current odorant concentration distribution control instructions for several pipelines based on the simulation results of the current odorant concentration distribution of the urban gas pipeline network and a preset concentration threshold includes: The simulation results of the current odorant concentration distribution of the urban gas pipeline network are compared with the preset concentration threshold to determine the comparison results; Based on the comparison results, a target pipeline with a concentration lower than the preset concentration threshold is identified, and a control command for the odorization station corresponding to the target pipeline is generated.

[0012] Secondly, this application provides a device for simulating and controlling the concentration of odorant in a gas pipeline network, comprising: The data acquisition module is used to acquire the pipeline topology data and pressure and flow data of the urban gas pipeline network; the pressure and flow data includes the pressure and flow data of pipelines and nodes; The region type determination module is used to determine the diffusion coefficient of each of the pipes based on the pressure and flow data, and to determine the region type of each pipe according to the diffusion coefficient and the flow velocity of each pipe; the region type includes a convection-dominated mainstream region and a diffusion-dominated stagnant region; The strategy judgment module is used to determine whether the current moment is the initial moment of the simulation or whether the historical odorant concentration distribution simulation results from the previous moment are missing, and to determine the region solution strategy based on the corresponding judgment results; the region solution strategy includes a steady-state solution strategy or a transient solution strategy; The first region solution module is used to determine the first node concentration data corresponding to each pipeline in the mainstream region based on the region solution strategy, the pipeline topology data, and the objective equation; the objective equation is the odorant concentration transport equation in a one-dimensional pipeline. The second region solution module is used to determine the second node concentration data corresponding to each pipe in the stagnant region based on the region solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region. The simulation result determination module is used to aggregate the concentration data of the first node and the concentration data of the second node into the mainstream area to obtain and output the simulation results of the current odorant concentration distribution of the urban gas pipeline network; The control instruction determination module is used to determine the current control instructions for several odorant stations in the urban gas pipeline network based on the simulation results of the current odorant concentration distribution and the preset concentration threshold.

[0013] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the aforementioned method for simulating and controlling the concentration of odorant in gas pipeline networks.

[0014] Fourthly, this application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of the aforementioned method for simulating and controlling the concentration of odorant in a gas pipeline network.

[0015] As can be seen, in this application, the pipeline topology data and pressure-flow data of the urban gas pipeline network are obtained; the pressure-flow data includes pressure-flow data of pipes and nodes; the diffusion coefficient of each pipe is determined based on the pressure-flow data, and the region type of each pipe is determined according to the diffusion coefficient and the flow velocity of each pipe; the region type includes convection-dominated mainstream regions and diffusion-dominated stagnant regions; it is determined whether the current time is the initial time of the simulation or whether the historical odorant concentration distribution simulation results of the previous time are missing, and the region solution strategy is determined according to the corresponding judgment result; the region solution strategy includes a steady-state solution strategy or a transient solution strategy; the region solution strategy, the pipeline topology data, and the objective equation are used to determine the... The first node concentration data corresponding to each pipeline in the mainstream region; the objective equation is the odorant concentration transport equation in a one-dimensional pipeline; based on the regional solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region, the second node concentration data corresponding to each pipeline in the stagnant region is determined; the first node concentration data and the second node concentration data are aggregated into the mainstream region to obtain and output the current odorant concentration distribution simulation result of the urban gas pipeline network; based on the current odorant concentration distribution simulation result of the urban gas pipeline network and the preset concentration threshold, the current odorant station control instructions for several pipelines are determined.

[0016] In other words, this application first obtains the pipeline topology data and pressure-flow data of the urban gas pipeline network, and determines the diffusion coefficient of the pipeline based on the pressure-flow data, and determines the region type of the pipeline based on the flow velocity of the pipeline; the region type includes mainstream region and stagnant region; then, it determines whether the current time is the initial time of the simulation or whether the historical odorant concentration distribution simulation results of the previous time are missing, so as to determine the region solution strategy; then, according to the region solution strategy, pipeline topology data and objective equation, the first node concentration data of each pipeline in the mainstream region is determined, and on this basis, the second node concentration data of each pipeline in the stagnant region is determined using the objective equation and the connection relationship between the mainstream region and the stagnant region; the first node concentration data and the second node concentration data are summarized into the mainstream region to obtain and output the current odorant concentration distribution simulation result; based on the current odorant concentration distribution simulation result and the preset concentration threshold, the current odorant station control instructions for several pipelines are determined. In this way, the problems existing in the existing related solutions can be solved, and the odorant concentration simulation of large-scale gas pipeline networks such as urban areas can be effectively, scientifically and accurately realized, reducing the computational complexity and cost, thereby improving the reliability, convenience and stability of odorant concentration control and pipeline operation. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0018] Figure 1 A flowchart of a method for simulating and controlling the concentration of odorant in a gas pipeline network is provided in this application; Figure 2 A flowchart illustrating a specific method for simulating and controlling the concentration of odorant in a gas pipeline network, as provided in this application; Figure 3 A schematic diagram of a three-pipe connection is provided for this application; Figure 4 A schematic diagram of a small-scale pipeline network structure is provided for this application; Figure 5 A schematic diagram of a high-pressure and sub-high-pressure gas pipeline network topology provided for this application; Figure 6 A schematic diagram illustrating the time-series variation of standard odorant concentration at five representative boundary nodes, provided for this application; Figure 7 A schematic diagram of a gas pipeline odorant concentration simulation and control device is provided for this application; Figure 8 This application provides a structural diagram of an electronic device. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] The urban pipeline network topology encountered in actual operation is complex, with numerous end users and significant differences in monitoring locations. Current research on odorant concentration mainly focuses on the adsorption and chemical effects of odorant in gas pipelines, or on single pipes or even simple pipeline networks. While these situations have been extensively analyzed, the simulation methods used are mostly commercial software. These methods process the pipelines in three-dimensional or two-dimensional form and then perform computational modeling, which is computationally intensive. Furthermore, there is still relatively little simulation research on odorant concentration in large-scale pipeline networks such as urban areas.

[0021] Meanwhile, current technologies for detecting odorant concentrations primarily rely on electrochemical methods or gas chromatography. Gas chromatography is expensive, requires significant space, and incurs high operating costs. Electrochemical methods, due to their principles and lifespan, are difficult to implement multiple daily measurements (generally suitable only for measurements every 1-2 days). Even placing portable electrochemical instruments near end-users in the pipeline network cannot fully track the entire network's status and is limited by sampling frequency and asynchronous sampling time. Furthermore, the distance between odorization points and detection points can be tens of kilometers of pipeline, requiring 0.5-2 hours to reach even at a flow rate of 30 m / s. If the odorant concentration is found to be below standard, changing the odorization dosage may not immediately result in an improvement at the end-user. In summary, odorant regulation currently faces a complex and challenging dilemma.

[0022] To address this, this application provides a simulation and control scheme for odorant concentration in gas pipeline networks. This scheme solves the problems existing in the current related schemes, effectively, scientifically and accurately simulates the odorant concentration in large-scale gas pipeline networks such as urban areas, reduces computational complexity and cost, and thus improves the reliability, convenience and stability of odorant concentration control as well as pipeline network operation.

[0023] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for simulating and controlling the concentration of odorant in a gas pipeline network, comprising: Step S11: Obtain the pipeline topology data and pressure and flow data of the urban gas pipeline network; the pressure and flow data includes the pressure and flow data of pipelines and nodes.

[0024] This embodiment takes an existing pipeline network simulation as its starting point and only considers the case of a one-dimensional model. Therefore, in addition to the pipeline topology data related to the existing pipeline network simulation, it also requires the pressure and flow data of all pipes and nodes in the existing gas pipeline network simulation.

[0025] It is important to understand that, due to the complex adsorption and chemical reactions of various odorants in pipelines, and combined with a hydraulic model of actual one-dimensional gas pipeline flow, given the key hydraulic and thermodynamic parameters such as flow rate and pressure in each pipeline of the network, the following differential equation is used to simulate the odorant concentration: (1); This equation represents the odorant concentration transport equation in a one-dimensional pipeline. In the equation, Odorant concentration, unit is mg / m³ 3 ; Time, in seconds; The distance along the pipe is in meters (m). Gas flow velocity, in m / s; This refers to the inner diameter of the pipe, in meters (m). This is the diffusion coefficient, in units of m. 2 / s; The surface reaction rate is expressed in m / s. This represents the existing adsorption capacity on the pipeline, expressed in mg / m³. 2 .

[0026] Step S12: Determine the diffusion coefficient of each pipe based on the pressure and flow rate data, and determine the region type of each pipe according to the diffusion coefficient and the flow velocity of each pipe; the region type includes a convection-dominated mainstream region and a diffusion-dominated stagnant region.

[0027] In this embodiment, the flow conditions of the various pipe sections involved in the gas pipeline network vary considerably. Some pipe sections have high flow velocities, where convection is the primary mode of odorant transport; others have low flow velocities or are essentially stationary, requiring diffusion as the transport mechanism. Therefore, this embodiment divides the pipeline network according to flow velocity and diffusion coefficient, separating the convection-dominated mainstream region (i.e., the mainstream area) from the diffusion-dominated stagnant region (i.e., the stagnant area). That is: the flow state of each pipe is determined based on the pressure and flow rate data; if the flow state is laminar, a preset molecular diffusion coefficient is used as the diffusion coefficient of the pipe; if the flow state is turbulent, the turbulent viscosity is determined based on the pipe's friction coefficient and turbulence model, and the turbulent diffusion coefficient is determined based on the turbulent viscosity and the turbulent Schmidt number, and then used as the diffusion coefficient of the pipe. The Peckley number of each pipe is determined based on the flow velocity, pipe inner diameter, and diffusion coefficient of each pipe; if the Peckley number is less than a preset threshold, the pipe is classified into a stagnant region; if the Peckley number is not less than the preset threshold, the pipe is classified into a mainstream region; the connection points between each stagnant region and the mainstream region are analyzed to determine the connection relationship between the mainstream region and the stagnant region.

[0028] It should be understood that in this embodiment, the diffusion coefficient is calculated separately for both turbulent and laminar flow scenarios. (Schmidt number) , The fluid's kinematic viscosity (unit: m) 2 / s). In laminar flow, molecular diffusion is generally considered to be... ≈1, at which point the diffusion rates of momentum and mass are essentially the same, therefore the diffusion coefficient is... D= 1.45e-5 (m) 2 / s). In turbulent flow, both molecular and turbulent diffusion occur. The turbulent diffusion coefficient is several orders of magnitude higher than that of the molecular diffusion coefficient, so the molecular part can be neglected. The Schmidt number in turbulent flow. In general flow, the value is typically between 0.7 and 1.0, while the default value in Fluent (a commercial computational fluid dynamics software) is 0.9. Turbulent viscosity (m) 2 / s), Let be the turbulent diffusion coefficient. Based on studies of pipe flow, the relationship between friction coefficient and turbulence intensity is shown in equation (2); according to the k–ε turbulence model, the relationship between turbulence intensity and turbulent viscosity is shown in equations (3) to (5). From equations (2) to (5), we can derive... Then substitute The turbulent diffusion coefficient can then be obtained.

[0029] (2); (3); (4); (5); In the formula, I is the turbulence intensity; λ is the friction coefficient, which is calculated by simulation. It is recommended to use the Colebrook formula for calculation. This is the empirical constant for the k–ε turbulence model, with a value of 0.09; The characteristic average velocity is the average velocity across the pipe cross section, expressed in m / s. l For turbulent length scales, 0.07 times the pipe inner diameter is used for fully developed pipe flow, with units in meters; The turbulent kinetic energy per unit mass is expressed in J / kg. It represents the turbulent kinetic energy dissipation per unit mass, expressed in J / kg.

[0030] Furthermore, the mainstream and stagnant regions should be determined according to flow velocity, using the pipe velocity as the standard. The Peckley number used is Pe = The diffusion coefficient is a characterization of the relative intensity of convection and diffusion. If Pe < 1, it can be considered a diffusion-dominant region. For laminar flow, the diffusion coefficient and kinematic viscosity are roughly equal, and since the pipe diameters involved in real-world urban pipe networks are mostly less than 1 m, this is used... The flow velocity in the pipe is used to divide the region into mainstream and stagnant areas. Wherever the velocity in the pipe is less than or equal to this value, it belongs to the stagnant region; the rest is the mainstream region. Furthermore, it is reasonable to expect that the stagnant region consists of several disconnected subgraphs (composed of flow velocities below 1 × 10⁻⁶ m / s). -5 A local set of pipe networks, often topologically disconnected, consisting of pipes (edges) with a speed of m / s and their connected nodes (points), can be called a static subgraph. A survey and statistical analysis of the connection points between each static subgraph and the main region is conducted, and the simulation results of nodes in the main region can be used to define the boundaries of the static subgraph.

[0031] Furthermore, the source term in equation (1) is This section characterizes the loss / addition term along the path. Regarding the adsorption term involved in the source term, the concentration of the odorant on a gas-proportion basis is very small (e.g., 20 mg / Nm³). 3 Its molecular weight is only about 1.41 ppm. When the total pressure is 4 MPa, the partial pressure of the odorant is only 5.64 Pa, which is obviously not large. The entire adsorption equilibrium can be calculated according to Henry's Law, as shown in Equation (6). Based on this, it can be assumed that the adsorption rate has a linear relationship with the difference between the current adsorption amount and the saturated adsorption amount, that is, the first-order adsorption model is adopted, as shown in Equation (7).

[0032] (6); (7); In the formula, To determine the equilibrium adsorption capacity, the unit is mg / m³. 2 ; This represents the amount of adsorption already present on the tube wall, in mg / m³. 2 ; The partial pressure of the odorant is expressed in Pa. This is the coefficient of adsorption equilibrium according to Henry's law, with units of mg / (Pa·m). 2 ); The macroscopic adsorption rate is expressed in s⁻¹. -1 .

[0033] Meanwhile, during preprocessing, in addition to splitting the pipeline network, in this embodiment, after excluding pipelines with extremely low flow rates in the mainstream area, the flow direction of all pipelines within the area can be determined based on the sign of the flow velocity. The default start and end points of these pipelines are then corrected according to the flow direction, and relevant physical quantity results are processed to adapt to the modification of the default flow direction.

[0034] In addition, since the standard concentration is generally used as the basis for odorization and measurement of natural gas, it is necessary to convert the standard concentration to the concentration under the operating pressure in the pipeline before calculation. The specific formula is as follows: (8); In the formula, This represents the concentration of the odorant under standard conditions, in mg / Nm³. 3 ; This refers to the density of the gas under operating conditions, expressed in kg / m³. 3 ; This refers to the density of natural gas under standard conditions, expressed in kg / m³. 3 .

[0035] Step S13: Determine whether the current time is the initial moment of the simulation or whether the historical odorant concentration distribution simulation results of the previous moment are missing, and determine the region solution strategy according to the corresponding judgment result; the region solution strategy includes a steady-state solution strategy or a transient solution strategy.

[0036] In this embodiment, as Figure 2As shown, before the formal calculation, it is necessary to determine whether the current calculation is the initial simulation. If it is the first moment of the calculation, a steady-state initial calculation is required, and subsequent calculations ignore the time term, assuming that adsorption and desorption are in equilibrium at this point. Similarly, if the simulation results data saved from the previous moment are missing, it is also considered an initial calculation. That is, it is necessary to determine whether the current moment is the initial moment of the simulation or whether the historical simulation results of the odorant concentration distribution from the previous moment are missing, in order to determine the result. If the result is yes, the steady-state solution strategy is used as the domain solution strategy; if the result is no, the transient solution strategy is used as the domain solution strategy. It can be understood that the transient solution requires an initial moment value before starting the time-by-time calculation. The entire scheme is a transient solution scheme, except that the initial moment solution for the first moment is obtained using steady-state calculation.

[0037] Step S14: Based on the regional solution strategy, the pipeline topology data, and the objective equation, determine the first node concentration data corresponding to each pipeline in the mainstream region; the objective equation is the odorant concentration transport equation in a one-dimensional pipeline.

[0038] In this embodiment, the mainstream region is first solved according to the region solution strategy and the objective equation shown in equation (1), that is: the objective equation is determined based on the one-dimensional flow network hydraulic model and the flow velocity; the objective equation includes convection term, diffusion term and source term; the source term is used to simultaneously describe the forward process of odorant mass transfer from the gas phase to the pipe wall and the reverse process of re-release from the pipe wall back to the gas phase; when the region solution strategy is a steady-state solution strategy, the source term in the objective equation is ignored to convert the objective equation into a steady-state equation, and the pipelines in the mainstream region are solved simultaneously based on the network topology data, the diffusion coefficient, the first-order upwind scheme and the steady-state equation to determine the concentration field of the mainstream region, and the first node concentration data is determined based on the concentration field; when the region solution strategy is a transient solution strategy, the pipelines in the mainstream region are solved simultaneously based on the network topology data, the first-order upwind scheme and the objective equation to determine the concentration field of the mainstream region, and the first node concentration data is determined based on the concentration field. It is understandable that solving the problem involves spatial discretization, dividing each pipe into multiple nodes (including the start and end points) and solving for the concentration of all sub-nodes, i.e., the odorant concentration distribution of all nodes in the entire pipe network.

[0039] It is important to understand that the solution for the mainstream region in this embodiment is divided into two cases: transient solution and steady-state solution. In the transient solution, time is processed using backward difference and space is considered using the first-order upwind method, solving for all pipes involved in the mainstream region simultaneously. In the steady-state solution, the time term or adsorption term is not used, and the solution is obtained using the first-order upwind method in space.

[0040] Furthermore, regarding the transient solution for the mainstream region, since convection dominates in the mainstream region, downstream physical quantities are entirely determined by upstream factors. Therefore, a first-order upwind difference scheme is used spatially. A backward difference solution method is used temporally to ensure the stability of the entire difference scheme. According to the difference scheme, governing equations (hereinafter referred to as pipeline equations) can be formed on all pipelines, but they lack boundary conditions at the starting point, thus preventing calculation. Additional governing equations for pipeline connections and boundary equations for gas source points need to be added. The boundary equations for gas source points are the gas source odor concentration setpoints or collected values. The pipeline connection equations are handled using a mixed-flow model, assuming that the upstream gases are uniformly mixed at the nodes before flowing downstream. Thus, the following equations are formed at the nodes: (9); In the formula, Odorant concentration at any downstream pipeline initiation point, in mg / Nm³ 3 ; Odorant concentration at any upstream pipeline endpoint, in mg / Nm³. 3 ; The standard volumetric flow rate of any upstream pipeline, in Nm³. 3 .

[0041] For the steady-state solution of the mainstream region, the partial derivative of Equation (1) with respect to time is ignored based on the transient solution, and it is assumed that adsorption has reached a steady state. The specific calculation formula is shown in Equation (10). A first-order upwind difference scheme is adopted in space. Similarly, after supplementing the boundary equations of the mixed flow of the pipeline connection and the gas source point, a positive definite linear equation system is formed. The direct solution is the overall result of the mainstream region.

[0042] (10).

[0043] Step S15: Based on the region solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region, determine the second node concentration data corresponding to each pipeline in the stagnant region.

[0044] In this embodiment, after solving the mainstream region, the results for each pipe in the mainstream region are summarized, and the boundary conditions (i.e., boundary values) of the corresponding stagnant region are determined using the concentration at its connection points to solve the stagnant region. That is, based on the first node concentration data, the node concentrations of each connection point in the connection relationship between the mainstream region and the stagnant region are determined, and the node concentrations are used as the boundary conditions for each stagnant region. When the region solving strategy is a steady-state solving strategy, the source term and time term in the objective equation are ignored to convert the objective equation into an ordinary differential equation, and based on the pipeline topology data, the diffusion coefficient, the boundary conditions, the pipe length, and... The ordinary differential equations determine the first pipeline node flux balance equations for each of the stagnant regions. When the region solution strategy is a transient solution strategy, based on the pipeline topology data, the diffusion coefficient, the boundary conditions, and the pipeline length, the objective equations are discretized using a backward time difference scheme and a central spatial difference scheme to determine the second pipeline node flux balance equations for each of the stagnant regions. The node concentrations of the current stagnant region are obtained based on the first or second pipeline node flux balance equations. The concentration distribution of all discrete nodes within the pipeline is recovered based on the node concentrations at each pipeline endpoint to obtain the second node concentration data. It is understood that when solving stagnant regions, backward time difference and central spatial difference are generally used, and each stagnant region is calculated separately. The calculation results for each stagnant region are then compiled and summarized. However, if a steady-state solution is used, the time term and adsorption term need to be ignored, and the objective equation degenerates into an ordinary differential equation, which can be directly solved by relating it to each pipeline.

[0045] It is important to understand that for pipelines with extremely low flow rates (flow velocity less than...), the flow rate is... Pipes with flow rates of m / s are considered to be in a stagnant region. Due to the extremely low flow velocity, diffusion is the dominant behavior, and therefore the solution scheme for this region differs significantly from that for the mainstream region.

[0046] In the main flow region, the odorant concentration is calculated using a directional convection-diffusion-reaction equation, while at nodes, a mixed-flow relationship-based equation is used. This approach assumes a sufficiently clear flow direction in the pipeline, with the convection term playing a dominant role in the governing equations. When the pipeline flow rate drops to zero or a minimum, this assumption no longer holds; at this point: (1) The convection term degenerates or nearly disappears; (2) The source and target ends of the pipeline are more suitable as topological indexes than physical upstream and downstream; (3) The coupling between pipes is no longer dominated by mixing, but by diffusion and reaction.

[0047] Therefore, a more suitable approach for handling zero-flow regions is to treat each zero-flow pipe as a 'diffusion-reaction edge', formulate equations only for the node concentrations, and then recover the continuous distribution within the pipe from the node concentrations at both ends.

[0048] In this embodiment, when performing transient solutions in the stagnant region, the convection velocity v approaches zero. Considering the time term, the transient governing equations degenerate into: (11); Among them, record A backward difference scheme is used in time and a central difference scheme is used in space to ensure the stability of the difference scheme and accurately reflect the symmetry of the diffusion flux.

[0049] For any internal node in the zero-flow subgraph of the stasis subgraph n The following conditions must be met: (a) the node concentration is unique; (b) the algebraic sum of the diffusion flux into all edges connected to the node is zero. Let node _____ be a node. n The set of connected edges is E ( n If ), then the nodal equilibrium equations are: (12).

[0050] In the formula, for n At the node, e Pipeline flow direction n Node concentration; E ( n )for n All pipes connected to the node; e for n Pipes connected by nodes.

[0051] This step differs from the flow-weighted mixing in the mainstream region. Instead of upstream-downstream relationships, it uses flux balancing at the nodes of the diffusion-reaction edge.

[0052] Furthermore, in this embodiment, the time term is ignored during the steady-state solution of the stasis region. When the flow rate is zero, the flow velocity... v =0, the objective equation shown in equation (1) degenerates into the following ordinary differential equation: (13).

[0053] In the formula, This indicates that the definition is equal to (defined as). For a length of... L A single zero-flow pipe, in local coordinates x ∈[0, L The general solution can be written in hyperbolic form as shown in equation (14). If the concentrations at the two end nodes are respectively and The coefficients can be determined. α and β The general solution is written in the form of endpoint interpolation as shown in equation (15).

[0054] Furthermore, for the zero-flow subgraph, node coupling is not mixing coupling, but rather diffusion flux coupling. (Pipe cross-sectional area) Then the diffusion flux along the pipe axis can be seen in equation (16), which is the formula for calculating the flux at each point on the pipe.

[0055] (14); (15); (16).

[0056] Express the flow relationships between the endpoints of each pipe in matrix form. Define the local parameters for each pipe: .

[0057] The equation assembly process is illustrated using a typical three-pipe connection scenario as an example. Figure 3 As shown. Consider the following zero-flow scenario, with known boundary conditions: , and All are end caps, satisfying the zero-flux boundary condition. For the connecting nodes... Due to the diffusion flux equilibrium condition Substituting the values ​​into the flux calculation formulas for each pipe endpoint and simplifying, we get: (17).

[0058] End of plug and The zero flux boundary conditions are satisfied respectively, as shown in equations (18-1) and (18-2): (18-1); (18-2).

[0059] Rearrange the above system of equations into matrix form. ,in Coefficient matrix Diffusion parameters of each pipe and attenuation parameters Composition, right-hand vector Determined by the known boundary concentration. Solving for the nodes reveals... concentration for: .

[0060] From the above formula, it can be seen that the shorter tube A is, the weaker the attenuation. The closer the value is to 10; the longer tubes B and C are, or the stronger the reaction, the stronger their ability to dissipate heat at the node. The lower.

[0061] In addition, concentration back-substitution within the tube is required. Once the nodal concentrations are calculated, the concentration distribution on each edge can be recovered analytically. For example, the concentration distribution of tube A... for: .

[0062] Step S16: Summarize the concentration data of the first node and the concentration data of the second node into the mainstream area to obtain and output the simulation results of the current odorant concentration distribution of the urban gas pipeline network.

[0063] In this embodiment, in addition to summarizing the first node concentration data of the mainstream region and the second node concentration data of the stagnant region, the relevant pressure, mass flow rate, temperature, and enthalpy values ​​of each pipeline involved should also be compiled. For areas without gas sources and therefore not simulated, default values ​​should be used to fill in the gaps, ensuring the results are complete. At the same time, information on the main problems encountered in the calculation (such as excessive flow velocity or calculation non-convergence) should be listed. This information, along with the results, should be summarized to obtain and output the simulation results of the current odorant concentration distribution of the urban gas pipeline network. At this point, the odorization simulation at the current time t is complete. If necessary, the simulation calculation for the next time step can be continued.

[0064] It should be noted that this embodiment establishes data transfer rules between two types of regions: after the mainstream region is solved, the concentration values ​​of the connection points with each stasis region are extracted as boundary conditions for the stasis region; after the stasis region is calculated, the results are summarized into the mainstream region to form a complete network concentration distribution. This coupling mechanism ensures the continuity and consistency of the overall concentration field after partitioned solving.

[0065] Step S17: Based on the simulation results of the current odorant concentration distribution of the urban gas pipeline network and the preset concentration threshold, determine the current odorant station control instructions for several pipelines.

[0066] In this embodiment, the simulation results of odorant concentration distribution can be used for odorization station control to generate control instructions for timely odorization. That is, the simulation results of the current odorant concentration distribution of the urban gas pipeline network are compared with a preset concentration threshold to determine the comparison results; based on the comparison results, the target pipeline with a concentration lower than the preset concentration threshold is determined, and the control instructions for the odorization station corresponding to the target pipeline are generated.

[0067] In summary, this embodiment proposes a simulation scheme for odorant concentration in gas pipeline networks based on flow regime partitioning. This scheme has the following beneficial effects: (1) It reduces computational complexity. Many literatures have mentioned two-dimensional or three-dimensional models, which generally use a lot of radial meshes for pipelines, making the calculations quite cumbersome. However, if we are to deal with large-scale gas problems at the town level, one-dimensional simulation is the main approach. In this case, using a one-dimensional method greatly simplifies the calculation, so there will not be too much difficulty in engineering for odor concentration analysis of large-scale pipeline networks.

[0068] (2) The convection and diffusion regions are divided into regions according to the flow velocity and diffusion coefficient. The mainstream region and the stagnant region are considered separately. Numerical method suggestions are given for each region: the mainstream region adopts the first-order upwind scheme to adapt to the characteristics of material transport along the flow direction, ensure numerical stability, and avoid non-physical oscillations; the stagnant region adopts the central difference scheme to adapt to the symmetry of the diffusion process and satisfy the boundary condition that the terminal diffusion flux is zero. The turbulent diffusion coefficient under turbulent conditions and the molecular diffusion coefficient under laminar conditions are significantly different in order of magnitude. This scheme distinguishes between the two to avoid introducing errors by mixing them.

[0069] (3) Obtaining the concentration distribution across the entire network: Existing odorant concentration detection schemes mainly rely on end-point sampling, resulting in concentration data limited to individual points. This scheme proposes a method that supplements the gas pipeline network hydraulic model with transport analysis of odorant concentration, providing a complete picture of odorant concentration within the network based on both time and location. During operation scheduling, this information can be used to determine the concentration status at various points, identifying areas of deficiency or excess, without over-reliance on hardware to ensure effective concentration monitoring across the entire space.

[0070] (4) Reverse calculation of odorization dosage: In the past, the dosage used at odorization stations was basically determined based on experience. However, this scheme starts from the minimum concentration that should be met at the end of the pipeline network and works backward to calculate the optimal dosage for the odorization station. If too little is added, there will not be enough margin for odor safety, and problems will occur in actual use; if too much is added, it will waste the reagent and may also cause corrosion of the pipeline system. After obtaining specific values ​​through simulation, the decision on dosage is more certain and easier to arrange, and the reagent cost is more likely to be controlled.

[0071] (5) Reversible treatment of adsorption and desorption processes: The concentration of odorant in the pipeline is not constant. Studies have shown that odorant is absorbed by the polyethylene (PE) pipe wall and also adheres to the pipe wall surface, and this process is reversible: when pressure, temperature, or gas phase concentration changes, some of the adsorbed odorant can be released back into the gas phase. This scheme introduces adsorption and desorption source terms into the governing equations, incorporating this reversible process into the calculation. This makes the dynamic simulation results, especially long-term simulations, closer to actual physical laws.

[0072] (6) Automatic processing of initial conditions: If the simulation system has just started running or lacks historical data from the previous period, this scheme automatically converts the calculation to a steady-state form, without using the time term or considering adsorption phenomena, and only uses the steady-state concentration distribution as the starting point before performing unsteady-state analysis. This processing method eliminates the need for preheating data to prepare the state for the simulation, allowing it to run under various actual working conditions, which is of great help to engineering.

[0073] Therefore, in this embodiment, the pipeline topology data and pressure-flow data of the urban gas pipeline network are first obtained. The diffusion coefficient of the pipeline is determined based on the pressure-flow data, and the pipeline region type is determined by combining the pipeline flow velocity. The region type includes mainstream regions and stagnant regions. Then, it is determined whether the current time is the initial simulation moment or whether the historical odorant concentration distribution simulation results from the previous moment are missing, in order to determine the region solution strategy. Next, based on the region solution strategy, pipeline topology data, and objective equation, the first node concentration data of each pipeline in the mainstream region is determined. Based on this, the second node concentration data of each pipeline in the stagnant region is determined using the objective equation and the connection relationship between the mainstream region and the stagnant region. The first node concentration data and the second node concentration data are summarized into the mainstream region to obtain and output the current odorant concentration distribution simulation result. Based on the current odorant concentration distribution simulation result and a preset concentration threshold, the odorant station control instructions for several pipelines are determined. This approach solves the problems existing in current related solutions, effectively, scientifically, and accurately realizing the simulation of odorant concentration for large-scale urban gas pipeline networks, reducing computational complexity and cost, and thus improving the reliability, convenience, and stability of odorant concentration control and pipeline operation.

[0074] The following is combined with Figures 4 to 6 The schematic / timing diagrams disclosed herein provide a detailed description of the technical solutions of the embodiments of this application.

[0075] In one specific implementation, based on the scheme proposed in the foregoing embodiments, the steady-state calculation results are adjusted as follows: Figure 4 The simulation of odorant concentration in the small-scale pipe network shown is illustrated in Table 1 below. Figure 4 The pipes in the diagram are divided into flowing pipes represented by solid lines and stagnant pipes represented by dashed lines. Arrows are used at the end of the solid or dashed lines to indicate the flow direction. P1, P2, P3, P4, P5, P6, P7, P8, P9, and P10 are pipe numbers. Figure 4 The nodes are further divided into gas source nodes represented by black-filled spheres, branching / merging nodes represented by black lines and no filling spheres, and end nodes represented by black-filled squares. Nodes 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10 are node numbers.

[0076] Table 1 Concentration simulation results .

[0077] In another specific implementation, based on actual operating data of a city's high-pressure and sub-high-pressure gas pipeline network, the transient odorant concentration simulation was conducted using the scheme described in the aforementioned embodiments. Basic pipeline network information is shown in Table 2 below.

[0078] Table 2 Basic Information of Pipeline Network .

[0079] Pipeline topology such as Figure 5 As shown, Figure 5 In the diagram, dots represent boundary nodes (end / inlet of the pipeline network), triangles represent internal nodes (pipeline junctions), and lines between nodes represent pipelines. The width of the pipeline lines reflects the pipe diameter, and the shade of color reflects the flow velocity.

[0080] The pipeline network comprises 302 pipes and 296 nodes, with a complex topology including multiple loops and branches. It includes 7 gas source points, all equipped with odorization devices, although some gas sources are not in use. The remaining 58 boundary nodes include plugs and end-users. The five representative boundary nodes with the highest standard condition concentrations were selected, and their standard condition concentration variation curves over the entire simulation period were plotted, as shown below. Figure 6 As shown.

[0081] See Figure 7 As shown in the embodiments, this application also discloses a device for simulating and controlling the concentration of odorant in a gas pipeline network, comprising: Data acquisition module 11 is used to acquire pipeline topology data and pressure and flow data of urban gas pipeline network; the pressure and flow data includes pressure and flow data of pipelines and nodes; The region type determination module 12 is used to determine the diffusion coefficient of each of the pipes based on the pressure and flow data, and to determine the region type of each pipe according to the diffusion coefficient and the flow velocity of each pipe; the region type includes a convection-dominated mainstream region and a diffusion-dominated stagnant region. The strategy judgment module 13 is used to determine whether the current time is the initial moment of the simulation or whether the historical odorant concentration distribution simulation results of the previous moment are missing, and to determine the region solution strategy based on the corresponding judgment results; the region solution strategy includes a steady-state solution strategy or a transient solution strategy; The first region solution module 14 is used to determine the first node concentration data corresponding to each of the pipelines in the mainstream region based on the region solution strategy, the pipeline topology data, and the objective equation; the objective equation is the odorant concentration transport equation in a one-dimensional pipeline. The second region solving module 15 is used to determine the second node concentration data corresponding to each pipe in the stagnant region based on the region solving strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region. The simulation result determination module 16 is used to aggregate the concentration data of the first node and the concentration data of the second node into the mainstream area to obtain and output the simulation results of the current odorant concentration distribution of the urban gas pipeline network; The control instruction determination module 17 is used to determine the current control instructions for several odorant stations in the urban gas pipeline network based on the simulation results of the current odorant concentration distribution and the preset concentration threshold.

[0082] For more detailed information on the working process of each of the above modules, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0083] Furthermore, embodiments of this application also disclose an electronic device, Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0084] Figure 8 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the gas pipeline odorant concentration simulation and control method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be a computer.

[0085] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0086] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0087] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the gas pipeline odorant concentration simulation and control method disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0088] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for simulating and controlling the concentration of odorant in a gas pipeline network. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0089] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0090] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0091] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0092] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0093] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for simulating and controlling the concentration of odorant in a gas pipeline network, characterized in that, include: Obtain network topology data and pressure / flow data of urban gas pipeline networks; The pressure and flow data includes pressure and flow data for pipelines and nodes; The diffusion coefficient of each pipe is determined based on the pressure and flow rate data, and the region type of each pipe is determined based on the diffusion coefficient and the flow velocity of each pipe; the region type includes a convection-dominated mainstream region and a diffusion-dominated stagnant region. Determine whether the current moment is the initial moment of the simulation or whether the historical odorant concentration distribution simulation results from the previous moment are missing, and determine the region solution strategy based on the corresponding determination results; the region solution strategy includes a steady-state solution strategy or a transient solution strategy; Based on the regional solution strategy, the pipeline topology data, and the objective equation, the concentration data of the first node corresponding to each pipeline in the mainstream region is determined; the objective equation is the odorant concentration transport equation in a one-dimensional pipeline. Based on the region solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region, the second node concentration data corresponding to each pipeline in the stagnant region is determined. The concentration data of the first node and the concentration data of the second node are aggregated into the mainstream area to obtain and output the simulation results of the current odorant concentration distribution of the urban gas pipeline network; Based on the simulation results of the current odorant concentration distribution of the urban gas pipeline network and the preset concentration threshold, the control instructions for the current odorization stations of several pipelines are determined.

2. The method for simulating and controlling the concentration of odorant in a gas pipeline network according to claim 1, characterized in that, Determining the diffusion coefficient of each of the pipes based on the pressure and flow rate data includes: The flow state of each pipe is determined based on the pressure and flow rate data. If the flow state is laminar flow, then the preset molecular diffusion coefficient is determined as the diffusion coefficient of the pipe; If the flow state is turbulent, the turbulent viscosity is determined based on the friction coefficient of the pipe and the turbulence model, the turbulent diffusion coefficient is determined based on the turbulent viscosity and the turbulent Schmidt number, and the turbulent diffusion coefficient is determined as the diffusion coefficient of the pipe.

3. The method for simulating and controlling the concentration of odorant in a gas pipeline network according to claim 1, characterized in that, The step of determining the region type of each pipe based on the diffusion coefficient and the flow velocity of each pipe includes: The Peckley number of each of the pipes is determined based on the flow velocity, pipe inner diameter, and diffusion coefficient. If the Peckley number is less than a preset threshold, the pipe is classified into the stasis region. If the Peckley number is not less than the preset threshold, then the pipeline is classified into the mainstream region; Analyze the connection points between each stasis region and the mainstream region to determine the connection relationship between the mainstream region and the stasis region.

4. The method for simulating and controlling the concentration of odorant in a gas pipeline network according to claim 1, characterized in that, The process of determining whether the current moment is the initial simulation time or whether the historical odorant concentration distribution simulation results from the previous moment are missing, and determining the regional solution strategy based on the corresponding determination results, includes: Determine whether the current moment is the initial simulation time or whether the historical odorant concentration distribution simulation results from the previous moment are missing, in order to determine the judgment result; If the judgment result is yes, then the steady-state solution strategy will be used as the domain solution strategy; If the judgment result is negative, then the transient solution strategy will be used as the domain solution strategy.

5. The method for simulating and controlling the concentration of odorant in a gas pipeline network according to claim 1, characterized in that, The determination of the first node concentration data corresponding to each pipeline in the mainstream region based on the regional solution strategy, the pipeline topology data, and the objective equation includes: The objective equation is determined based on a one-dimensional flow network hydraulic model and the flow velocity. The objective equation includes a convection term, a diffusion term, and a source term. The source term is used to simultaneously describe the forward process of odorant mass transfer from the gas phase to the pipe wall and the reverse process of its release back into the gas phase from the pipe wall. When the region solution strategy is a steady-state solution strategy, the source terms in the objective equation are ignored to convert the objective equation into a steady-state equation. Based on the pipeline topology data, the diffusion coefficient, the first-order upwind scheme, and the steady-state equation, the simultaneous solution of each pipeline in the mainstream region is performed to determine the concentration field of the mainstream region. The concentration data of the first node is then determined based on the concentration field. When the region solution strategy is a transient solution strategy, the pipelines in the mainstream region are solved simultaneously based on the pipeline topology data, the first-order upwind scheme and the objective equation to determine the concentration field of the mainstream region, and the concentration data of the first node is determined based on the concentration field.

6. The method for simulating and controlling the concentration of odorant in a gas pipeline network according to claim 5, characterized in that, The determination of the second node concentration data corresponding to each pipe in the stagnant region, based on the region solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region, includes: Based on the first node concentration data, the node concentration of each connection point in the connection relationship between the mainstream region and the stagnant region is determined, and the node concentration is used as the boundary condition of each stagnant region. When the region solution strategy is a steady-state solution strategy, the source term and time term in the objective equation are ignored to convert the objective equation into an ordinary differential equation, and the first pipeline node flux balance equation of each stagnant region is determined based on the pipeline topology data, the diffusion coefficient, the boundary conditions, the pipeline length, and the ordinary differential equation. When the region solution strategy is a transient solution strategy, the objective equation is discretized based on the pipeline topology data, the diffusion coefficient, the boundary conditions, and the pipeline length, using a time backward difference scheme and a spatial center difference scheme, in order to determine the second pipeline node flux balance equation for each of the stagnant regions. The node concentration in the current stagnant region is obtained based on the flux balance equation of the first pipeline node or the flux balance equation of the second pipeline node. Based on the node concentrations at each pipeline endpoint, the concentration distribution of all discrete nodes within the pipeline is recovered to obtain the second node concentration data.

7. The method for simulating and controlling the concentration of odorant in a gas pipeline network according to any one of claims 1 to 6, characterized in that, The method of determining the current odorant concentration distribution control instructions for several pipelines based on the simulation results of the current odorant concentration distribution of the urban gas pipeline network and the preset concentration threshold includes: The simulation results of the current odorant concentration distribution of the urban gas pipeline network are compared with the preset concentration threshold to determine the comparison results; Based on the comparison results, a target pipeline with a concentration lower than the preset concentration threshold is identified, and a control command for the odorization station corresponding to the target pipeline is generated.

8. A device for simulating and controlling the concentration of odorant in a gas pipeline network, characterized in that, include: The data acquisition module is used to acquire network topology data and pressure and flow data of urban gas pipeline networks; The pressure and flow data includes pressure and flow data for pipelines and nodes; The region type determination module is used to determine the diffusion coefficient of each of the pipes based on the pressure and flow data, and to determine the region type of each pipe according to the diffusion coefficient and the flow velocity of each pipe; the region type includes a convection-dominated mainstream region and a diffusion-dominated stagnant region; The strategy judgment module is used to determine whether the current moment is the initial moment of the simulation or whether the historical odorant concentration distribution simulation results from the previous moment are missing, and to determine the region solution strategy based on the corresponding judgment results; the region solution strategy includes a steady-state solution strategy or a transient solution strategy; The first region solution module is used to determine the first node concentration data corresponding to each pipeline in the mainstream region based on the region solution strategy, the pipeline topology data, and the objective equation; the objective equation is the odorant concentration transport equation in a one-dimensional pipeline. The second region solution module is used to determine the second node concentration data corresponding to each pipe in the stagnant region based on the region solution strategy, the pipeline topology data, the first node concentration data, the objective equation, and the connection relationship between the mainstream region and the stagnant region. The simulation result determination module is used to aggregate the concentration data of the first node and the concentration data of the second node into the mainstream area to obtain and output the simulation results of the current odorant concentration distribution of the urban gas pipeline network; The control instruction determination module is used to determine the current control instructions for several odorant stations in the urban gas pipeline network based on the simulation results of the current odorant concentration distribution and the preset concentration threshold.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method for simulating and controlling the concentration of odorant in a gas pipeline network as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the method for simulating and controlling the concentration of odorant in a gas pipeline network as described in any one of claims 1 to 7.