CN115688617A - Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment - Google Patents

Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment Download PDF

Info

Publication number
CN115688617A
CN115688617A CN202110866815.8A CN202110866815A CN115688617A CN 115688617 A CN115688617 A CN 115688617A CN 202110866815 A CN202110866815 A CN 202110866815A CN 115688617 A CN115688617 A CN 115688617A
Authority
CN
China
Prior art keywords
hydrogen
natural gas
gas
pipeline
pressure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110866815.8A
Other languages
Chinese (zh)
Inventor
郑龙烨
刘定智
黄龑
赵忠德
陈进殿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Petrochina Co Ltd
Original Assignee
Petrochina Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Petrochina Co Ltd filed Critical Petrochina Co Ltd
Priority to CN202110866815.8A priority Critical patent/CN115688617A/en
Publication of CN115688617A publication Critical patent/CN115688617A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Pipeline Systems (AREA)

Abstract

The invention provides a method, a system, equipment and application for calculating energy flow of a hydrogen-doped natural gas pipeline, wherein the energy flow calculation method comprises the following steps: inputting basic data; initializing parameters; calculating the flow of the hydrogen-doped natural gas pipeline and the flow of the compressor; iteratively correcting the gas temperature of each node in the hydrogen-doped natural gas pipe network by a Newton method; calculating a node energy flow balance equation of the natural gas system, and performing convergence judgment: when the convergence condition is not met, the Jacobian matrix and the pressure correction quantity are calculated by the Newton method, and then the calculation program of the flow of the hydrogen-doped natural gas pipeline and the flow of the compressor is returned; and when the convergence condition is met, entering the following procedure for calculating the energy flow distribution of the natural gas system. The method adopts a Newtonian constant method to carry out iterative calculation on parameter information of each node and each pipe section of the pipe network, calculates pipeline transportation working conditions under different hydrogen concentrations by changing the hydrogen content in the gas, can compare the working conditions with the working conditions of transporting pure natural gas, and analyzes the influence of the hydrogen content on the operation parameters of the pipe network.

Description

Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment
Technical Field
The invention belongs to the technical field of steady-state energy flow calculation of natural gas systems, and particularly relates to a hydrogen-doped natural gas pipeline energy flow calculation method, a hydrogen-doped natural gas pipeline energy flow calculation system, hydrogen-doped natural gas pipeline energy flow calculation equipment and application of the hydrogen-doped natural gas pipeline energy flow calculation system.
Background
With the evolution of the industrial production flow cycle low-carbon and life consumption modes to remote intellectualization, the direct demand of fossil energy can be gradually reduced for the terminal, and a supply system mainly comprising zero-carbon and low-carbon energy such as electric power, hydrogen energy, heat, natural gas and the like is formed. Renewable energy is vigorously developed, and the expansion of power transmission networks and energy storage systems is imperative, which will focus on the sustainable energy supply of the power supply, heat supply and traffic sectors. The basis for realizing sustainable energy supply is to increase the share of renewable energy in electric power consumption and total energy consumption, however, as the share of renewable energy in power generation becomes larger and larger, the instability of wind energy and photovoltaic power generation will cause the operation of the power grid to be more variable and complex. In order to ensure a safe and stable energy supply, larger and more flexible energy storage solutions need to be developed.
Under the background of rapid expansion of wind energy and solar energy in China, the problem of power storage gradually draws attention. For decades, pumped storage power stations are vigorously developed in China for storing a large amount of electric power, but are influenced by environmental and climate factors, and the development space is limited. In recent years, new strategies and specific pilot projects are provided at home and abroad, and the effect of reducing the load of the power grid is achieved by utilizing the real-time surplus power of the power grid, producing hydrogen through water electrolysis and storing and utilizing the hydrogen. The produced hydrogen can be reused as clean energy for power generation or used in departments (such as transportation, heat supply and chemical plants) outside the power department, and makes important contribution to reducing carbon dioxide emission, reaching the carbon peak in 2030 and carbon neutralization target in 2060.
Among the transportation modes of various hydrogen gases, the pipeline transportation price is the lowest, the adaptability to the transportation distance is wide, but the construction cost of newly-built hydrogen gas special transportation pipelines is high, and the examination and approval are difficult. The total mileage of a natural gas pipe network in China breaks through 10 kilometers, and relates to thousands of direct supply user and station valve chambers, but the hydrogen transmission pipeline is only 100 kilometers at present, and the hydrogen station has 61 seats, if the existing mature natural gas pipeline facilities can be utilized, hydrogen is injected on the premise of not specially processing and transforming equipment facilities, so that large-scale hydrogen transmission is expected to be realized, the hydrogen transmission cost is greatly reduced, the economy of the natural gas pipeline is improved, and the investment for developing new transmission and distribution infrastructure is reduced.
Because the volumetric energy density of hydrogen is lower, which is about one third of that of natural gas, the gas storage capacity of the existing natural gas system (especially underground storage and high-pressure pipeline) after hydrogen loading is reduced along with the replacement of natural gas by hydrogen, so that if the total amount of energy for transportation is kept unchanged, the gas flow rate and the pipeline pressure in the natural gas pipeline are changed correspondingly. In order to consider the possible influence of hydrogen doping on the operation of a natural gas pipe network, the transportation working condition of the hydrogen doping of the natural gas pipe network needs to be simulated, a steady-state model of the operation of a natural gas pipeline is established, the operation state of natural gas supply infrastructure (such as a natural gas pipeline, a compressor and the like) under different hydrogen concentrations is calculated, the influence of the hydrogen doping is analyzed quantitatively and qualitatively, a theoretical basis is provided for the implementation of the hydrogen doping transportation of the natural gas pipeline in the future, and the effect of promoting the fusion development of natural gas and new energy is achieved.
Energy flow calculation is a basic calculation of a natural gas system and is the basis for planning and operating the natural gas system. The Newton method based traditional natural gas system steady-state model calculation can only be used for calculating energy flow distribution under an isothermal condition, if a non-isothermal steady-state model needs to be calculated, a fourth-order Runge-Kutta method is used, but the fourth-order Runge-Kutta method is only suitable for the problem of single-point boundary values and is not suitable for the problem of multi-point boundary values encountered in the operation working condition of a natural gas pipe network in reality; when hydrogen is mixed into a natural gas pipeline for transportation, the volume energy density of the hydrogen is low, and the compressibility of the hydrogen is poor, so that pipeline pressure loss and compressor power are changed when the hydrogen is mixed with natural gas and transported in a long-distance pipeline. In addition, because of the joule-thomson effect, the temperature of natural gas decreases when the pressure decreases, and the temperature of hydrogen increases when the pressure decreases, which has a large influence on the operation of pipelines. The physical characteristics of hydrogen and natural gas are different, and if a traditional steady-state model is used for simulating the pipeline transportation working condition after hydrogen loading, a large error exists, and the specific parameter difference between the hydrogen loading condition and the pure natural gas conveying condition cannot be accurately calculated.
At present, no provision related to natural gas pipeline hydrogen loading exists in China, no specific test point project exists, and the influence of hydrogen loading on pipeline operation parameters is difficult to obtain from actual data. In conclusion, the existing steady state calculation method for the natural gas system cannot solve the problem of accurately simulating the transport condition of the natural gas pipeline after hydrogen is added.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a method, a system and equipment for calculating the energy flow of a hydrogen-doped natural gas pipeline and application thereof aiming at the defects of the prior art, wherein a Newton method is adopted to calculate the parameter information of each node and each pipe section of a pipe network in an iterative way, and the parameter information comprises the pressure intensity of the hydrogen-doped natural gas at a gas source node and a user station, the gas inlet or outlet flow, the gas temperature, the gas pressure intensity before and after compression of a gas compression station, the temperature, the compressor power and the gas flow required by driving. The pipeline transportation working conditions under different hydrogen concentrations are calculated by changing the hydrogen proportion in the gas composition, and the pipeline transportation working conditions can be compared with the working conditions of pure natural gas transportation, so that the influence of the hydrogen doping concentration on the operation parameters of the pipeline network is analyzed.
In order to achieve the technical purpose, the technical scheme adopted by the invention is as follows:
a method for calculating energy flow of a hydrogen-doped natural gas pipeline adopts a Newtonian method to carry out iterative calculation on parameter information of each node and each pipe section of a hydrogen-doped natural gas pipe network, and comprises the following steps:
inputting basic data of a hydrogen-doped natural gas system;
initializing parameters: based on the basic data, calculating basic parameters of a hydrogen-doped natural gas pipe network and basic parameters of hydrogen-doped natural gas;
based on Newton's iteration method, calculating the energy flow distribution of the hydrogen-doped natural gas system, including:
calculating the flow of the hydrogen-doped natural gas pipeline and the flow of the compressor based on the parameter initialization result;
iteratively correcting the gas temperature of each node in the hydrogen-doped natural gas pipe network by a Newton method based on the obtained flow of the hydrogen-doped natural gas pipeline and the compressor;
calculating a node energy flow balance equation of the natural gas system, and performing convergence judgment:
when the convergence condition is not met, the Jacobian matrix and the pressure correction quantity are calculated by the Newton method, and then the calculation program of the flow of the hydrogen-doped natural gas pipeline and the flow of the compressor is returned;
when the convergence condition is met, entering the following procedure for calculating the energy flow distribution of the natural gas system;
calculating the energy flow distribution of the natural gas system: and calculating the gas quantity of the unknown node with the gas inflow or gas outflow according to the node balance, and calculating the flow of all the hydrogen-doped natural gas pipelines, the flow of a compressor, the gas consumption of the compressor and the pressure and temperature of all the nodes to obtain the energy flow distribution of the natural gas system.
Further, the basic data of the hydrogen-doped natural gas system is network structure data of the hydrogen-doped natural gas system, and comprises gas source parameters, gas transmission pipeline parameters, compressor parameters, gas load, known node pressure of a hydrogen-doped natural gas pipe network, known node temperature of the hydrogen-doped natural gas pipe network, unknown node rated pressure of the hydrogen-doped natural gas pipe network, unknown node rated temperature of the hydrogen-doped natural gas pipe network, address soil temperature, newton method convergence precision epsilon, maximum iteration times of the Newton method, and critical pressure, critical temperature, critical density and composition proportion of each component in natural gas.
Further, the basic parameters of the hydrogen-doped natural gas pipe network are calculated as follows:
by utilizing the thought of the graph theory, a relation matrix I of the nodes of the hydrogen-doped natural gas pipeline network and the hydrogen-doped natural gas pipeline is constructed to show the topology structure of the pipeline network, and the definition of the relation matrix I is as follows:
Figure BDA0003187585800000031
wherein I is a reduced relation matrix excluding the known pressure nodes of the hydrogen-doped natural gas pipe network.
Further, the basic parameters of the hydrogen-doped natural gas are calculated as follows: and calculating the gas constant, the molar mass, the low calorific value, the standard density, the pseudo-critical pressure, the pseudo-critical temperature and the pseudo-critical density of the hydrogen-doped natural gas.
Further, the method for calculating the flow of the hydrogen-doped natural gas pipeline comprises the following steps:
obtaining the flow of the pipeline i-j according to the pressure and the temperature of each node of the hydrogen-doped natural gas pipe network
Figure BDA0003187585800000041
The calculation formula is as follows:
Figure BDA0003187585800000042
in the formula (1), i and j are the first and last nodes of the hydrogen-doped natural gas pipeline respectively, m represents the average value of the parameters between the hydrogen-doped natural gas pipelines, n represents the value under the standard condition,
Figure BDA0003187585800000043
is the flow rate of the hydrogen-doped natural gas pipeline under standard conditions, p i And p j Respectively, the pressure of the first and last nodes of the hydrogen-doped natural gas pipeline, D ij And L ij Respectively the diameter and length of the hydrogen-doped natural gas pipeline, K m,ij Is a compressible coefficient, λ m,ij Is the friction coefficient of the hydrogen-doped natural gas pipeline, T m,ij Is the average gas temperature, p, of the natural gas pipeline n 、ρ n And T n Atmospheric pressure, gas density and temperature under standard conditions, respectively.
Further, all parameters in the pipe calculation equation shown in the formula (1) are classified into two types, which are related or not related to pressure:
constants independent of pressure, combined as a combination coefficient A ij
Temperature T m,ij Compressibility factor K m,ij And the friction coefficient lambda of the natural gas pipeline m,ij For variables directly or indirectly influenced by pressure, combined to a combined coefficient B ij
Figure BDA0003187585800000044
Figure BDA0003187585800000045
By the above simplification, the equation of equation (1) can be simplified as follows:
Figure BDA0003187585800000046
calculating the combination coefficient A of the constant independent of pressure ij : obtaining the basic parameter D of the hydrogen-doped natural gas according to calculation ij 、L ij 、p n 、 ρ n 、T n Calculating a combination coefficient A by substituting formula (2) ij
Calculating the combined coefficient B of the pressure-dependent variables ij The method specifically comprises the following steps:
when the gas pressure p is less than or equal to 150bar, the compressibility coefficient K m,ij The following is obtained by approximation equation (5):
Figure BDA0003187585800000047
in the formula (5), r represents a value where the value is a dimension-reduced value, p r,m,ij The quotient of the operating pressure of the gas divided by the pseudo-critical pressure of the gas is called the gas dimensionality reduction pressure, T r,m,ij The operating temperature of the gas divided by the gas pseudoQuotient of critical temperatures, called gas dimensionality reduction temperature, Z n The real gas coefficient under the gas standard condition;
coefficient of friction lambda of pipe m,ij The calculation method comprises the following steps:
calculating the dynamic viscosity eta according to the approximate formula (6) m,ij
Figure BDA0003187585800000051
In the formula (6), the reaction mixture is,
Figure BDA0003187585800000052
is dynamic viscosity and xi of gas under normal pressure m,ij For high-pressure correction factor, p r,m,ij The quotient of the running density of the gas divided by the pseudo-critical density of the gas is called the dimension reduction density of the gas;
by dynamic viscosity eta m,ij Reynolds number Re calculated from the pipe parameters m,ij
Figure BDA0003187585800000053
In formula (7), re m,ij Reynolds number, w, for gas flow in a conduit m,ij Is the average flow velocity in the gas pipe, p m,ij Is the average density in the gas pipeline, D ij The inner diameter, eta, of the pipe section m,ij Is the gas dynamic viscosity of the pipe section.
Using Reynolds number Re m,ij Selecting formula from Colebrook, nikurad, moody and Back-calculation to calculate the friction coefficient lambda of the pipeline m,ij
Temperature T m,ij Using a set initial value of the gas temperature in the initial iteration, and then obtaining a corrected gas temperature value;
using the three parameters lambda obtained in the above steps m,ij 、T m,ij 、K m,ij Substituting the formula (3) to calculate the combined coefficient B of the pressure related variables ij
Further, the method for calculating the flow rate of the compressor comprises the following steps: in the process of pipeline transmission, a gas compressor is used for increasing the pressure of a pipeline, and gas consumed in the operation of the gas compressor is taken from a branch and is equivalent to the load of an air inlet point of the compressor;
the compressor flow comprises a compressor compression flow and a compressor gas consumption amount;
gas flow consumed by gas compressor
Figure BDA0003187585800000054
Calculated by equations (8) and (9):
Figure BDA0003187585800000055
Figure BDA0003187585800000061
the compressor compression flow rate is calculated by equation (10):
Figure BDA0003187585800000062
the mass flow through the compressor is calculated using the calculated flow in the pipe instead of the equation (10)
Figure BDA0003187585800000063
Namely the compression flow of the compressor;
Figure BDA0003187585800000064
a node j node load;
Figure BDA0003187585800000065
is the sum of the gas mass flows from the node j to other branches;
in the formulas (8) and (9), i and j are respectively an air inlet point and an air outlet point of the compressor; p' i And p' j Respectively the pressure of the air inlet and outlet nodes of the compressor; p com,ij Electrical power consumed for the compressor;
Figure BDA0003187585800000066
mass flow through the compressor; eta com Is the isentropic efficiency of the compressor; kappa m,ij Is the isentropic index of the compressed gas; z i The actual gas system number of the gas at the gas inlet point of the compressor; r is the gas constant of the compressed gas; t is i The temperature of the gas at the inlet point of the compressor; eta T The thermal efficiency of the compressor; h i Is the lower heating value of the compressed gas;
when the gas pressure and temperature are combined with the following conditions: p is less than or equal to 100bar and T is less than or equal to 240K and less than or equal to 360K, then the isentropic index kappa m,ij The following is obtained by approximation equation (11):
Figure BDA0003187585800000067
in the formula (11), the reaction mixture is,
Figure BDA0003187585800000068
is the molar ratio of nitrogen in the hydrogen-doped natural gas; p is a radical of m,ij The gas average pressure of the hydrogen-doped natural gas pipeline is high; t is m,ij The set initial value of the gas temperature is used in the first iteration, followed by the corrected gas temperature value.
Further, the method for correcting the gas temperature of each node in the hydrogen-doped natural gas pipe network comprises the following steps:
based on the obtained flow of the hydrogen-doped natural gas pipeline, the flow of the compressor and the pressure intensity of the hydrogen-doped natural gas pipe network nodes, and taking the known temperature nodes of the hydrogen-doped natural gas pipe network as starting points, sequentially correcting the gas temperature of the adjacent nodes;
the calculation formula of the node temperature of the compressor is as follows:
Figure BDA0003187585800000071
Figure BDA0003187585800000072
in the formula, pi com Is the compressor compression ratio, T' i And T' j Respectively the inlet and outlet gas node temperature, Z, of the compressor i And Z j Respectively the actual gas coefficient, kappa, of the gas at the inlet and outlet gas nodes of the compressor m,ij Is the isentropic index, eta, of the compressed gas of the hydrogen-doped natural gas pipeline com Is the isentropic efficiency of the compressor;
according to the pipeline temperature drop formula, the calculation formula of the node temperature of the hydrogen-doped natural gas pipeline is as follows:
Figure BDA0003187585800000073
Figure BDA0003187585800000074
Figure BDA0003187585800000075
in formulae (14) to (16), μ JT Is the Joule-Thomson coefficient, Ω ij Calculating coefficients for the heat transfer correlations of the pipeline; u is the heat conduction coefficient of the pipeline; t is i And T j Respectively the temperature of the gas inlet and outlet nodes of the hydrogen-doped natural gas pipeline, pi is the circumference ratio, D ij The inner diameter of the pipeline of the pipe section; c. C p,m,ij The gas constant pressure specific heat capacity of the hydrogen-doped natural gas pipeline,
Figure BDA0003187585800000076
calculating the pipeline flow under the standard condition of the pipeline section by adopting a formula (1); rho n The gas density under the standard condition of the hydrogen-doped natural gas; t is a unit of u Is the ambient temperature, L, of the hydrogen-doped natural gas pipeline ij Length of the hydrogen-loaded natural gas pipeline, p i And p j Are respectively doped withAnd the pressure of the head node and the tail node of the hydrogen natural gas pipeline.
Joule-Thomson coefficient μ JT The calculation formula based on the basic state equation is as follows:
Figure BDA0003187585800000077
in formula (17), T m,ij Is the average gas temperature, p, of the natural gas pipeline m,ij Is the average pressure of the gas in the hydrogen-doped natural gas pipeline, c p,m,ij For the gas constant pressure specific heat capacity, Z, of the hydrogen-doped natural gas pipeline m,ij The average real gas coefficient of the gas in the hydrogen-doped natural gas pipeline is obtained; r is the gas constant of the compressed gas.
According to the known node temperature and the network structure, solving the temperature of all unknown nodes of the hydrogen-doped natural gas pipe network through formulas (12), (13) or (14) - (16); in the formulas (12) to (16), because the right parameter of the equation depends on the temperature calculated by the left side of the equation, the right parameter cannot be directly solved, and the right parameter is repeatedly iterated by a Newton method to obtain an accurate value.
Further, the method for calculating the node energy flow balance equation of the natural gas system comprises the following steps:
according to the node energy flow balance equation, the sum of all branch flows flowing into a certain node i is added with the node load of the node
Figure BDA00031875858000000813
Equal to 0, the binding relationship matrix I may represent the natural gas system by the following equation:
Figure BDA0003187585800000081
in formula (18), N represents that the system of the process has N pressure unknown nodes, M represents that the system has M pipe sections in total, and I N,M Representing a relation matrix of N nodes of the hydrogen-doped natural gas pipe network and M pipes of the hydrogen-doped natural gas,
Figure BDA0003187585800000082
representing the flow matrix of the M pieces of hydrogen-doped natural gas pipelines,
Figure BDA0003187585800000083
representing N pressure unknown node flow matrixes of the hydrogen-doped natural gas pipeline; equation (18) can be further simplified as follows:
Figure BDA0003187585800000084
in the formula (19), the gas filling at a certain node is equivalent to a negative load, and the equation (1) is substituted into the equation (19) for each node column in the hydrogen-doped natural gas system network according to the node balance, so that a nonlinear zero point solving problem consisting of unknown node pressures is obtained:
Figure BDA0003187585800000085
substituting the calculated flow of the natural gas pipeline and the compressor into a formula (20), and obtaining the unbalance amount of all nodes according to the known node load
Figure BDA0003187585800000086
The convergence criterion for calculating the energy flow of the hydrogen-doped natural gas pipeline by the Newton iteration method is as follows: when all nodes are unbalanced
Figure BDA0003187585800000087
Are all less than a given Newton method convergence accuracy epsilon, the iteration is terminated to
Figure BDA0003187585800000088
The solution as the problem is transferred into a gas quantity calculation program of a node with unknown gas inlet quantity or gas outlet quantity, otherwise, the solution enters a calculation program of a Jacobian matrix and pressure correction quantity; wherein,
Figure BDA0003187585800000089
respectively representing the pressure vector and the temperature after the kth iterationA degree vector.
Further, the method of calculating the jacobian matrix and the pressure correction amount is as follows:
for the N non-linear zero equations set forth in equation (20) with N points of unknown pressure, it is mathematically impossible to solve by analyzing the values
Figure BDA00031875858000000810
Using Newton's method at an approximate solution
Figure BDA00031875858000000811
Obtain a better solution on the basis of
Figure BDA00031875858000000812
The recursive formula of the newton method used is as follows:
Figure BDA0003187585800000091
in formula (18)
Figure BDA0003187585800000092
As jacobian matrix:
Figure BDA0003187585800000093
in the formula, matrix elements
Figure BDA0003187585800000094
A partial derivative representing the derivative of the sum of the gas flows through point N to point N pressure; in order to solve the Jacobian equation, all variables influenced by pressure change need to solve partial derivatives of all unknown pressures; coefficient A ij Is a pipeline/mass constant, as for the gas mass composition and pipeline parameter related, independent of pressure, and remains unchanged in the iterative calculation, coefficient B ij Influenced by pressure changes and recalculated in iterative calculation according to the pressure after each update, so that coefficients are mainly considered in iteration to consider the influence of hydrogen loadingB ij Calculating partial derivatives of the pressure intensity;
when p is i >p j The simplified equation (18) for the partial derivative of pressure is as follows:
Figure BDA0003187585800000095
Figure BDA0003187585800000096
the subscript tape L refers to corresponding parameters of the hydrogen-doped natural gas pipeline; then, the inverse matrix of the solved Jacobian equation and the point equation vector are used
Figure BDA0003187585800000097
Multiplying to obtain the pressure correction
Figure BDA0003187585800000098
To calculate the optimized pressure vector
Figure BDA0003187585800000099
Transferring into the flow calculation program of the hydrogen-doped natural gas pipeline for use
Figure BDA00031875858000000910
A new round of iterative computation is performed.
The invention also provides an energy flow calculation system of the hydrogen-doped natural gas pipeline, which comprises a data input module, a parameter initialization module and an energy flow calculation module;
the data acquisition module is used for inputting basic data of the hydrogen-doped natural gas system;
the parameter initialization module is used for calculating basic parameters of a hydrogen-doped natural gas pipe network and basic parameters of hydrogen-doped natural gas;
and the energy flow calculation module is used for calculating the energy flow distribution of the hydrogen-doped natural gas pipeline by utilizing a Newton iteration method according to the basic parameters of the hydrogen-doped natural gas pipeline network and the basic parameters of the hydrogen-doped natural gas.
The invention also provides energy flow calculation equipment of the hydrogen-doped natural gas pipeline, which comprises a memory and a processor;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing the calculation program in the energy flow calculation method of the hydrogen-doped natural gas pipeline according to the instructions in the program codes.
The present invention also provides a computer-readable storage medium for storing a program code for executing a calculation program in the above-described method for calculating the energy flow of a hydrogen-doped natural gas pipeline.
The invention also provides an application of the energy flow calculation system of the hydrogen-doped natural gas pipeline or the energy flow calculation equipment of the hydrogen-doped natural gas pipeline in steady-state analysis of the hydrogen-doped natural gas system.
Compared with the prior art, the invention has the following beneficial effects:
(1) The invention provides a method, a system, equipment and application thereof for calculating energy flow of a hydrogen-doped natural gas pipeline, wherein the method for calculating energy flow can iteratively calculate flow, pressure and temperature parameters of each field station and each pipe section and the compressor power of a compressor station by introducing a Newton method in a power flow algorithm of a power system and fully considering Joule-Thomson effect and pipe heat transfer in calculation, so that the parameter conditions of each node and each pipe section, such as the actual gas temperature of each node, can be accurately calculated when a natural gas pipeline is subjected to hydrogen doping planning test point, because all the node temperatures in a traditional steady-state model (isothermal model) based on the Newton method can only be given as known conditions (such as a medium-low-pressure gas distribution pipeline network modeling method disclosed by documents), the pipe heat transfer in the pipe transmission process and the temperature change caused by the Joule-Thomson effect cannot be fully considered, and the temperature change further affects the calculation of the flow, the compression coefficient, the dynamic viscosity and the like; therefore, the invention can continuously correct the node temperature in each cycle through continuous iteration, and further more accurately and practically solve the operation condition of the hydrogen-doped natural gas pipe network in a fitting manner;
(2) Compared with the prior art, the method fully considers the influence of hydrogen doping on parameters such as compression coefficient, dynamic viscosity, isentropic coefficient and the like in the calculation besides temperature parameters, uses a physical characteristic fitting formula suitable for the hydrogen-doped natural gas, and ensures the accuracy and the referential property of the calculation result;
(3) The influence of the hydrogen concentration on the operation parameters of each pipe network under different conditions is simulated by changing the proportion of hydrogen in the natural gas doped with hydrogen, and the operation critical point of each pipe network component after hydrogen doping is calculated, so that technical support is provided for future natural gas pipeline hydrogen doping.
Drawings
FIG. 1 is a technical route diagram of a method for calculating energy flow for a hydrogen loaded natural gas pipeline according to the present invention;
FIG. 2 is a flow chart of a technique for calculating the Jacobian matrix and the pressure correction amount by Newton method in the energy flow calculation method of the present invention;
fig. 3 is a network structure diagram of a power flow calculation method for a hydrogen-loaded natural gas pipeline according to an application example of the present invention.
Detailed Description
In order to clearly understand the technical features, purposes and advantages of the present invention, the technical solutions of the present invention will be described in detail below with reference to the accompanying drawings, but the present invention is not limited to the practical scope.
Referring to fig. 1, the method for calculating energy flow of a hydrogen-doped natural gas pipeline of the invention adopts a newton method to iteratively calculate parameter information of each node and each pipe section of a hydrogen-doped natural gas pipeline network, and comprises the following steps:
1. inputting basic data
Inputting the network structure data of the hydrogen-doped natural gas system: the system comprises a gas source parameter, a gas transmission pipeline parameter, a compressor parameter, a gas load, a known node pressure of a hydrogen-doped natural gas pipeline network, a known node temperature of the hydrogen-doped natural gas pipeline network, an unknown node rated pressure of the hydrogen-doped natural gas pipeline network, an unknown node rated temperature of the hydrogen-doped natural gas pipeline network, an address soil temperature, newton method convergence accuracy epsilon, the maximum iteration times of the Newton method, and critical pressure, critical temperature, critical density and composition proportion of each component in natural gas.
2. Parameter initialization
2.1, calculating basic parameters of the hydrogen-doped natural gas pipe network
By utilizing the thought of the graph theory, a relation matrix I of the nodes of the hydrogen-doped natural gas pipeline network and the hydrogen-doped natural gas pipeline is constructed to show the topology structure of the pipeline network, and the definition of the relation matrix I is as follows:
Figure BDA0003187585800000111
wherein, I is a reduced relation matrix excluding the known pressure nodes, and is clear and convenient to call in the programming process.
2.2, calculating basic parameters of the hydrogen-doped natural gas
Calculating the gas constant, the molar mass, the low calorific value, the standard density, the pseudo-critical pressure, the pseudo-critical temperature and the pseudo-critical density of the hydrogen-doped natural gas;
the pseudo critical parameters are also called dependent critical parameters or pseudo critical parameters, and each parameter is obtained by the weighted average critical value of each component in the hydrogen-doped natural gas, such as pseudo critical pressure, namely pseudo critical pressure, which is the weighted average critical pressure of each component in the mixed natural gas; the pseudo-critical temperature is the weighted average critical temperature of various components in the mixed natural gas; the pseudo-critical density is the weighted average critical density of the various components in the blended natural gas.
3. Calculating the flow of the hydrogen-doped natural gas pipeline
Obtaining the flow of the hydrogen-doped natural gas pipeline i-j according to the pressure and the temperature of each node of the hydrogen-doped natural gas pipeline network
Figure BDA0003187585800000112
The calculation formula is as follows:
Figure BDA0003187585800000121
in the formula (1), the reaction mixture is,i and j are the initial and final nodes of the hydrogen-doped natural gas pipeline respectively, m represents the average value of the parameters between the hydrogen-doped natural gas pipelines, n represents the value under the standard condition,
Figure BDA0003187585800000122
is the pipe flow under standard conditions, p i And p j Respectively representing the pressure of the head and tail nodes of the natural gas pipeline, D ij And L ij Respectively the diameter and length of the hydrogen-loaded natural gas pipeline, K m,ij Is a compressibility factor, λ m,ij Is the coefficient of friction of the pipe, T m,ij Is the average gas temperature p of the hydrogen-doped natural gas pipeline n 、ρ n And T n Atmospheric pressure, gas density and temperature under standard conditions, respectively.
As can be seen from the pipe calculation equation of equation (1), all parameters can be classified into two types, pressure-dependent or pressure-independent:
constant hydrogen-doped natural gas pipeline diameter D independent of pressure intensity ij Length L of natural gas pipeline ij Atmospheric pressure under standard conditions n Gas density under standard conditions ρ n Temperature under standard conditions T n Are combined into a combination coefficient A ij
Temperature T m,ij Compressibility factor K m,ij Coefficient of friction with pipe λ m,ij For variables directly or indirectly influenced by pressure, combined to a combined coefficient B ij
Figure BDA0003187585800000123
Figure BDA0003187585800000124
By the above simplification, the equation of equation (1) can be simplified as follows:
Figure BDA0003187585800000125
3.1, calculating the constant combination coefficient A independent of pressure ij
According to the basic parameters of the hydrogen-doped natural gas obtained in the step 2: diameter D of hydrogen-doped natural gas pipeline ij Length L of natural gas pipeline ij Atmospheric pressure p under standard conditions n Gas density under standard conditions ρ n Temperature under standard conditions T n Substituting formula (2), calculating the pressure independent constant combination coefficient A ij
3.2, calculating the combination coefficient B of the pressure-related variables ij
The model uses an approximate formula suitable for the characteristics of the hydrogen-doped natural gas so as to truly and accurately calculate the operation condition of the natural gas pipeline after hydrogen doping in the calculation process.
When the gas pressure p is less than or equal to 150bar, the compressibility coefficient K m,ij Net according to gas2energy: the approximation formula in the System growing parameters of the gas supply is found as follows:
Figure BDA0003187585800000131
in equation (5), r represents the value as a reduced dimension value, and is a quotient of a parameter running value divided by a pseudo-threshold value of the parameter, such as p r,m,ij The quotient of the operating pressure of a gas divided by the pseudo-critical pressure of the gas is called the dimensionality reduction pressure, T r,m,ij Is the operating temperature of the gas divided by
The quotient of the pseudo-critical temperature of the gas, called the gas dimensionality reduction temperature, Z n Is the real gas coefficient under the gas standard condition.
Coefficient of friction lambda of pipe m,ij Dependent primarily on Reynolds number Re m,ij Reynolds number Re m,ij Dependent on dynamic viscosity eta m,ij
Dynamic viscosity eta m,ij According to The term "The viscosity of nonopholar gas sources mixures at modulators and high pressures" (Dean D E, stiel L I. The viscosity of nonopholar gas sources mixures at modulators and high pressures [ J]Approximation in AIChE Journal,1965,4 (3): 430-436)Solving the following formula:
Figure BDA0003187585800000132
in the formula (6), the reaction mixture is,
Figure BDA0003187585800000133
is dynamic viscosity xi of gas under normal pressure m,ij For high-pressure correction factor, p r,m,ij The quotient of the operating density of the gas divided by the pseudo-critical density of the gas is called the gas dimensionality reduction density.
By reducing the dynamic viscosity eta m,ij Calculating Reynolds number Re with pipeline parameters m,ij :
Figure BDA0003187585800000134
In the formula (7), re m,ij Reynolds number, w, for gas flow in a conduit m,ij Average flow velocity in the gas pipe, p m,ij Is the average density in the gas pipeline, D ij Is the internal diameter, eta, of the pipe section m,ij The tube section gas dynamic viscosity.
Then according to Reynolds number Re m,ij The friction coefficient lambda of the pipeline is calculated by using a hydraulic calculation formula such as Colebrook, nikurad, moody, back-calculate and the like m,ij
Temperature T m,ij Using the set initial value of the gas temperature in the initial iteration, followed by the corrected value of the gas temperature in step 5;
three parameters lambda obtained according to the steps m,ij 、T m,ij 、K m,ij Substituting the formula (3), calculating the combination coefficient B of the pressure related variables ij
3.3, calculating the flow of the hydrogen-doped natural gas pipeline
A is to be ij 、B ij And node pressure p i 、p j Calculating the flow of the hydrogen-doped natural gas pipeline by the formula (4); wherein the node pressure p i And p j The set initial value of the node pressure is used in the initial iteration, followed by the node pressure corrected in step 7.
4. Calculating gas flow consumed by a gas turbine
Because the natural gas has pressure loss in the pipeline transmission process, the gas compressor is generally adopted to increase the pressure of the pipeline in consideration of the economical efficiency, and the gas consumed in the work is taken from a branch and can be equivalent to the load of the gas inlet point of the compressor.
Gas flow consumed by gas compressor
Figure BDA0003187585800000141
The calculation is disclosed as follows:
Figure BDA0003187585800000142
Figure BDA0003187585800000143
Figure BDA0003187585800000144
according to kirchhoff's node law, the flow of one node is equal to the sum of the flows of the other nodes, namely, the mass flow of the compressor is calculated by substituting the formula (10) with the pipeline flow calculated in the step 3
Figure BDA0003187585800000145
Namely the compression flow of the compressor;
Figure BDA0003187585800000146
node j is the node load;
Figure BDA0003187585800000147
is the sum of the gas mass flows from the node j to other branches;
in the formulas (8) and (9), i and j are the inlet point and the outlet point of the compressor, respectivelyAn air outlet point; p' i And p' j The pressures of the inlet and outlet gas nodes of the compressor are respectively; p com,ij Electrical power consumed for the compressor;
Figure BDA0003187585800000148
is the mass flow rate through the compressor; eta com Is the isentropic efficiency of the compressor; kappa m,ij Is the isentropic index of the compressed gas; z i The real gas coefficient of the gas at the air inlet point of the compressor; r is the gas constant of the compressed gas; t is i The temperature of the gas at the inlet point of the compressor; eta T The thermal efficiency of the compressor; h i Is the lower heating value of the compressed gas.
When the gas pressure and temperature meet the following conditions: p is less than or equal to 100bar and T is less than or equal to 240K and less than or equal to 360K, then the isentropic index kappa m,ij The expression is determined according to the approximate formula in Russian Standards and Technical Regulations, national gas:
Figure BDA0003187585800000149
in the formula (11), the reaction mixture is,
Figure BDA00031875858000001410
is the molar ratio of nitrogen in the hydrogen-doped natural gas; p is a radical of m,ij The average pressure of the gas in the hydrogen-doped natural gas pipeline is set; t is m,ij The set initial value of the gas temperature is used in the first iteration, followed by the corrected gas temperature value.
5. Correcting the gas temperature of each point in the hydrogen-doped natural gas pipe network according to the flow rate
In order to correct the temperature of each node in the hydrogen-doped natural gas pipeline network, at least one known node temperature needs to be present; and (4) sequentially correcting the gas temperature of the adjacent nodes by taking the known temperature node of the hydrogen-doped natural gas pipe network as a starting point according to the flow of the hydrogen-doped natural gas pipe and the compressor, which are obtained in the steps 3 and 4, and the unknown node pressure of the hydrogen-doped natural gas pipe.
The calculation formula of the node temperature of the compressor is as follows:
Figure BDA0003187585800000151
Figure BDA0003187585800000152
in the formula, pi com Is the compressor compression ratio, T' i And T' j Respectively the inlet and outlet gas node temperature, Z, of the compressor i And Z j Respectively the actual gas coefficient, kappa, of the gas at the inlet and outlet gas nodes of the compressor m,ij Is the isentropic index, eta, of the compressed gas of the hydrogen-doped natural gas pipeline com Is the isentropic efficiency of the compressor.
According to the pipeline temperature drop formula, the calculation formula of the node temperature of the hydrogen-doped natural gas pipeline is as follows:
Figure BDA0003187585800000153
Figure BDA0003187585800000154
Figure BDA0003187585800000155
in formulae (14) to (16), T i And T j Respectively the temperature of the gas inlet and outlet nodes of the hydrogen-doped natural gas pipeline JT Is the Joule-Thomson coefficient, Ω ij Calculating coefficients for the heat transfer of the pipe; u is the heat conduction coefficient of the pipeline; pi is the circumferential ratio, D ij The inner diameter of the pipeline of the pipe section; c. C p,m,ij The gas constant pressure specific heat capacity of the hydrogen-doped natural gas pipeline,
Figure BDA0003187585800000156
calculating the pipeline flow under the standard condition of the pipeline section by adopting a formula (1); ρ is a unit of a gradient n For natural gas loadingThe gas density under conditions; t is u Is the ambient temperature of the hydrogen-doped natural gas pipeline, L ij Length of the hydrogen-loaded natural gas pipeline, p i And p j Respectively the pressure of the head node and the tail node of the hydrogen-doped natural gas pipeline.
Joule-Thomson coefficient μ JT The influence of the Gas composition is greatly changed, and the calculation formula based on the basic state equation according to the Natural Gas Properties and Flow calculation is as follows:
Figure BDA0003187585800000157
in formula (17), T m,ij Is the average gas temperature p of the hydrogen-doped natural gas pipeline m,ij Is the average pressure of the gas in the hydrogen-doped natural gas pipeline, c p,m,ij For the gas constant pressure specific heat capacity, Z, of the hydrogen-doped natural gas pipeline m,ij The average real gas coefficient of the hydrogen-doped natural gas pipeline gas is obtained; r is the gas constant of the compressed gas.
According to the known node temperature and the network structure, all the unknown node temperatures of the hydrogen-doped natural gas can be obtained through the formulas (12), (13) or (14), (15). Equations (12) to (15) are based on the existence of the right parameter of the equation, such as the real gas coefficient Z j And mu JT The temperature is determined by the left side of the equation, so that the temperature cannot be directly solved, and the accurate value needs to be obtained through repeated iteration of a Newton method.
6. Calculating node energy flow balance equation of natural gas system
According to the node energy flow balance equation, the sum of all branch flows flowing into a certain node i is added with the node load of the node
Figure BDA00031875858000001613
Equal to 0, the binding relationship matrix I may represent the natural gas system by the following equation:
Figure BDA0003187585800000161
in the formula (18), N represents the present processThe system has N nodes with unknown pressure, M represents that the system has M pipe sections in total, I N,M Representing a relation matrix of N nodes of the hydrogen-doped natural gas pipe network and M pipes of the hydrogen-doped natural gas;
Figure BDA0003187585800000162
representing the flow matrix of the M pieces of hydrogen-doped natural gas pipelines;
Figure BDA00031875858000001614
representing N pressure unknown node flow matrixes of the hydrogen-doped natural gas pipeline; equation (18) can be further simplified as follows:
Figure BDA0003187585800000163
in equation (19), the gas filling at a certain node corresponds to a negative load. Substituting the formula (1) into the formula (19) according to the node balance to obtain a nonlinear zero solving problem consisting of unknown node pressures for each node column equation in the hydrogen-doped natural gas system network:
Figure BDA0003187585800000164
substituting the flow of the hydrogen-doped natural gas pipeline and the compressor obtained in the step 3 and the step 4 into a formula (20), and obtaining the unbalance amount of all nodes according to the known node load
Figure BDA0003187585800000165
If all the nodes are unbalanced
Figure BDA0003187585800000166
Are all smaller than the convergence precision epsilon of the given Newton method, the iteration is terminated,
Figure BDA0003187585800000167
representing the known node pressure vector of pressure after the kth iteration,
Figure BDA0003187585800000168
represents the temperature known node temperature vector after the kth iteration to
Figure BDA0003187585800000169
Figure BDA00031875858000001610
The solution as a problem proceeds to step 8, otherwise to step 7.
7. Calculating the Jacobian matrix and the pressure correction
Referring to FIG. 2, for N non-linear zero equations listed by equation (20) with N points of unknown pressure, it is mathematically impossible to solve by analyzing the values
Figure BDA00031875858000001611
Newton's method is an iterative computation method that can be performed on an approximate solution
Figure BDA00031875858000001612
Get a better solution on the basis of
Figure BDA0003187585800000171
The general recursive formula of newton's method is as follows:
Figure BDA0003187585800000172
in the above formula
Figure BDA0003187585800000173
As a jacobian matrix:
Figure BDA0003187585800000174
in the formula, matrix elements
Figure BDA0003187585800000175
Representing the sum of the flow rates of the gases flowing through the point NPoint N partial derivative of the pressure derivative. To solve the jacobian equation, all variables affected by pressure changes require a partial derivative of all unknown pressures. Coefficient A ij Is a pipeline/material constant, as for the gas-mass composition and pipeline parameter related, independent of pressure, and kept constant in the iterative calculation, coefficient B ij Is influenced by pressure change and is recalculated in iterative calculation according to the pressure after each update, so that the coefficient B is mainly considered in iteration for considering the hydrogen loading influence ij And (4) calculating partial derivatives of the pressure.
When p is i >p j The simplified equation (18) for the partial derivative of pressure is as follows:
Figure BDA0003187585800000176
Figure BDA0003187585800000177
then, the inverse matrix of the solved Jacobian equation and the point equation vector are used
Figure BDA0003187585800000178
Multiplying to obtain the pressure correction
Figure BDA0003187585800000179
To calculate the optimized pressure vector
Figure BDA00031875858000001710
Go to step 3 for use
Figure BDA00031875858000001711
A new round of iterative computation is performed.
In the formulas (23) to (24), the subscript band L refers to the corresponding parameters of the hydrogen-doped natural gas pipeline;
8. calculating energy flow distribution of natural gas system
And (3) calculating the gas amount of the unknown point of the gas inflow or the gas outflow according to the node balance, and then solving the flow of all the hydrogen-doped natural gas pipelines, the compression flow of the compressor, the consumed power of the compressor, the flow of the hydrogen-doped natural gas required by the consumed power, the pressure intensity and the temperature of all the nodes (the hydrogen-doped natural gas pipeline network nodes and the compressor nodes) and finishing the calculation.
The invention also provides an energy flow calculation system of the hydrogen-doped natural gas pipeline, which comprises a data input module, a parameter initialization module and an energy flow calculation module;
the data acquisition module is used for inputting basic data of the hydrogen-doped natural gas system;
the parameter initialization module is used for calculating basic parameters of a hydrogen-doped natural gas pipe network and basic parameters of hydrogen-doped natural gas;
and the energy flow calculation module is used for calculating the energy flow distribution of the hydrogen-doped natural gas pipeline by utilizing a Newtonian iteration method according to the basic parameters of the hydrogen-doped natural gas pipe network and the basic parameters of the hydrogen-doped natural gas.
The invention also provides energy flow calculation equipment of the hydrogen-doped natural gas pipeline, which comprises a memory and a processor;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing the calculation program in the energy flow calculation method of the hydrogen-doped natural gas pipeline according to the instructions in the program codes.
The present invention also provides a computer-readable storage medium for storing a program code for executing a calculation program in the above-described method for calculating the power flow of a hydrogen-doped natural gas pipeline.
Application example
As shown in fig. 3, taking a 3-node natural gas system as an example, steady-state analysis is performed on the working condition of the natural gas system after hydrogen loading by using a newton iteration method-based hydrogen-loaded natural gas pipeline energy flow calculation method.
Setting a scene: suppose in FIG. 3 that point 1 is the source node, points 2 and 3 are the inlet and outlet points, L, of the compressor station, respectively 12 Is a pipe section, and is characterized in that,L 23 is a compressor. Point 1 is known as the inlet point and is set at 60bar and point 2 at the end of the pipe section is connected to a gas-driven compressor to transport the gas as fuel to increase the gas pressure back to the initial value of 60bar. The initial temperature of the fuel gas at the starting point of the pipe section is assumed to be 10 ℃, and the temperature of the soil around the pipe is assumed to be 4.5 ℃ so as to consider the temperature change of the gas in the pipe conveying process. To compare the effect of hydrogen loading on the pipeline operating conditions, a constant load is set at point 3, and the load at point 3 and the energy required to drive the compressor are all provided by the gas injection at point 1. Under the condition of keeping the load power of the point 3 unchanged, the gas flow is increased if hydrogen is doped, and meanwhile, the pressure loss in pipeline transportation and the work of a compressor are changed correspondingly. And calculating the gas pressure and temperature of each node and each pipe section in the pipe network and the compressor power by using a Newton iteration method-based energy flow calculation method of the hydrogen-doped natural gas pipeline, and comparing and analyzing the influence of hydrogen-doped transportation on the operation of the natural gas pipe network according to results. In the application example, the convergence precision epsilon of the Newton method is set to 10 -6 The maximum number of iterations is 100. The pipe section parameter conditions are shown in table 1, and the critical parameters of each component of the hydrogen-loaded natural gas are shown in table 2.
TABLE 1 pipeline Preset parameters
Figure BDA0003187585800000181
Figure BDA0003187585800000191
TABLE 2 critical parameters for the gas composition of the hydrogen-blended natural gas
Name of gas Critical pressure (bar) Critical temperature (K) Critical density (kg/m) 3 )
Methane 45.99 190.56 10.33
Hydrogen gas 12.80 33.3 1.54
In order to maintain a constant load power at point 3 (i.e. taking into account the volumetric heating value difference between natural gas and hydrogen), the flow rate of the transport gas needs to be adjusted accordingly according to the loading concentration, and the calculation results are shown in table 3.
TABLE 3 gas flow rates at different hydrogen loading concentrations
Figure BDA0003187585800000192
In the context of Table 3, the following examples are,
Figure BDA0003187585800000201
is the natural gas flow rate in the natural gas with hydrogen,
Figure BDA0003187585800000202
The standard flow rate of hydrogen in the hydrogen-doped natural gas,
Figure BDA0003187585800000203
Is the total flow rate of the natural gas under the standard condition,
Figure BDA0003187585800000204
Is the energy contained in the natural gas in the hydrogen-doped natural gas under the standard condition,
Figure BDA0003187585800000205
The energy contained in the flow of the hydrogen in the hydrogen-doped natural gas under the standard condition,
Figure BDA0003187585800000206
The energy contained in the total flow under the standard condition of the hydrogen-doped natural gas.
Referring to fig. 3, in the application example, the method for calculating the energy flow of the hydrogen-doped natural gas pipeline is adopted to calculate the energy flow distribution of the hydrogen-doped natural gas system, and specifically includes the following steps:
s1, inputting the network structure data of the hydrogen-doped natural gas system: the system comprises a gas source parameter, a gas transmission pipeline parameter, a compressor parameter, a gas load, a known node pressure of a hydrogen-doped natural gas pipe network, a known node temperature of the hydrogen-doped natural gas pipe network, a rated pressure of an unknown node of the hydrogen-doped natural gas pipe network, a rated temperature of the unknown node of the hydrogen-doped natural gas pipe network, an address soil temperature, a Newton method convergence precision epsilon, a maximum iteration number of the Newton method, a critical pressure, a critical temperature, a critical density and a composition proportion of each component in natural gas; the specific application example scene settings are shown in tables 1, 2 and 3; for convenient calculation, natural gas is considered as pure methane, hydrogen is pure hydrogen in the application example, and the calculation process of the method is demonstrated by taking 20% hydrogen-doped concentration as an example in the following steps;
s2, initializing parameters, including two aspects: 1. constructing a relation matrix of the nodes of the hydrogen-doped natural gas pipeline network and the hydrogen-doped natural gas pipeline to show a topological structure of the pipeline network by utilizing the thought of graph theory; 2. calculating the gas constant, the molar mass, the low calorific value, the standard density, the pseudo-critical pressure, the pseudo-critical temperature and the pseudo-critical density of the hydrogen-doped natural gas;
the specific process of establishing the reduced incidence matrix and calculating the basic parameters of the hydrogen-doped natural gas by utilizing the graph theory idea is as follows:
Figure BDA0003187585800000207
and calculating the pseudo-critical pressure, the pseudo-critical temperature and the pseudo-critical density of the hydrogen-doped natural gas of the node 2 to be 1.54, 1.70 and 153.56 respectively according to the critical pressure, the critical temperature and the critical density of the methane and the hydrogen.
S3, calculating the flow of the hydrogen-doped natural gas pipeline: according to the pressure and the temperature of each node of the hydrogen-doped natural gas pipe network, the combination coefficient A of the constant irrelevant to the pressure is calculated ij And a combined coefficient B of pressure-dependent variables ij Substituting the flow into a flow calculation formula (1) of the hydrogen-doped natural gas pipeline to calculate the flow of the hydrogen-doped natural gas pipeline, which is as follows:
according to the obtained parameters (the diameter and the length of the hydrogen-doped natural gas pipeline are respectively 890mm and 100km, and the atmospheric pressure p under the standard condition n Gas density at standard condition ρ n Temperature under standard conditions T n Respectively at 1.01bar and 0.6487kg/m 3 273.15K) into the combination factor A ij Calculating formula (2), calculating A 12 Is equal to 1.07 x 10 12
When the gas pressure p is less than or equal to 150bar, the compressibility coefficient K m,12 The method is obtained according to an approximate formula in Gas2energy.
Figure BDA0003187585800000211
Wherein p is r,m,12 Is 1.4594,T r,m,12 Is 1.7070,Z n To 0.998, K was obtained m,12 Equal to 0.91.
Dynamic viscosity eta m,12 According to The term "The viscosity of nonpalolar gas mixures at modulators and high expressions" (Dean D E, stiel L I. The viscosity of nonpalolar gas mixures at modulators and high expressions [ J]The approximation formula in AIChE Journal,1965,4 (3): 430-436) is found:
Figure BDA0003187585800000212
wherein,
Figure BDA0003187585800000213
1.1 μ Pa · s, ξ m,12 Is 0.0531,. Rho r,m,12 To 0.2542, obtain η m,12 Equal to 11.5 (. Mu.Pa · s).
By reducing the dynamic viscosity eta m,ij Calculating Reynolds number Re with the pipeline parameters m,ij
Figure BDA0003187585800000214
In the formula, w m,12 Setting the flow speed of the hydrogen-doped natural gas pipeline in the primary iteration to be 10m/s, rho m,12 The mixed density of the natural gas mixed with hydrogen is 39.03kg/m 3 ,D 12 The inner diameter of the pipeline is 890mm, eta m,12 =11.5 (μ Pa · s), and Re was obtained m,12 Equal to 3.04X 10 7
Then according to Reynolds number Re m,12 Calculating the coefficient of friction lambda of the pipeline by applying the Nikuradse B formula lambda = -2lg (k/3.71 d), wherein k is the degree of friction of the pipeline is 0.05mm, d is the inner diameter of the pipeline is 890mm m,12 Equal to 0.011.
Temperature T m,12 The initial set gas temperature was used in the first iteration at 10 deg.C (283.15K).
Using the three parameters lambda obtained in the above steps m,12 、T m,12 、K m,12 Calculating the pressure related variable combination coefficient B by substituting formula (3) 12 Equal to 0.3487.
A is to be 12 、B 12 And node pressure p 1 (60bar)、p 2 (55 bar) is added into the formula (4), and the flow V of the hydrogen-doped natural gas pipeline is calculated 12 Is 5.34X 10 6 m 3 /d。
S4, calculating the gas flow consumed by the gas turbine: because the natural gas has pressure loss in the pipeline transmission process, a gas compressor is generally adopted to increase the pressure of the pipeline in consideration of the economical efficiency, and the gas consumed in the work is taken from a branch and can be equivalent to the load of an air inlet point of the compressor;
when the gas pressure and temperature meet the following conditions: p is less than or equal to 100bar and T is less than or equal to 240K and less than or equal to 360K, then the isentropic index kappa m,ij The following equation was obtained according to the approximate formula in Russian Standards and Technical Regulations, natural gas:
Figure BDA0003187585800000221
according to a known temperature T m,12 283.15K, the nitrogen concentration is 0 and the pressure p is high, since only methane and hydrogen are considered in this application example m,12 At 57.5bar,. Kappa. m,23 Equal to 1.3785.
Will kappa m,23 Substitution into
Figure BDA0003187585800000225
Calculation formula to find
Figure BDA0003187585800000226
Equal to 691.67m 3 /h。
S5, correcting the gas temperature of each point in the hydrogen-doped natural gas pipe network according to the flow rate obtained: in order to correct the temperature of each node in the hydrogen-doped natural gas pipe network, at least one known node temperature needs to exist, and in the application example, the temperature of a known node 1 is 10 ℃; according to the flow of the hydrogen-doped natural gas pipeline and the compressor and the unknown node pressure of the hydrogen-doped natural gas pipeline, which are obtained in the steps 3 and 4, the gas temperature of the adjacent nodes is corrected in sequence by taking the known temperature node of the hydrogen-doped natural gas pipeline network as a starting point; firstly, the temperature T of the end node 2 of the pipeline is calculated 2
Figure BDA0003187585800000222
Wherein T is u The soil temperature is 4.5 ℃ and T 1 The temperature of the initial section of the pipeline is 10 ℃ and omega 12 Coefficient of calculation for heat transfer of pipeline 1.8424X 10 -10 ,L 12 For a pipeline length of 100km, mu JT The Joule Thomson coefficient is 0.3667 ℃/bar, p 1 Node 1 pressure 60bar, p 2 For node 2 pressure 55bar, T is calculated 2 Equal to 8.17 ℃.
After the temperature of the node 2 is obtained, the temperature T of the compressed natural gas mixed with hydrogen of the compressor is calculated 3
Figure BDA0003187585800000223
Wherein, T 2 To obtain a temperature of 8.17 ℃ at node 2, Z 2 Is node 2 true gas coefficient 0.9144 3 True gas coefficient of 0.9090,. Kappa.for node 3 m,23 To obtain the isentropic index of 1.3785, pi com For the compression ratio of compressors
Figure BDA0003187585800000224
η com For compressor isentropic efficiency of 0.6538, T is calculated 3 Equal to 20.43 ℃.
S6, calculating a node energy flow balance equation of the natural gas system: according to the node energy flow balance equation (18), the air inlet or outlet flow of each node is calculated as follows:
Figure BDA0003187585800000231
it is known that
Figure BDA0003187585800000232
Known gas output of 13.9804 x 10 of node 3 6 m 3 D, the amount of unbalance from the calculated result is 0.64 multiplied by 10 6 m 3 D, greater than convergence accuracy 10 -6 m 3 Step d, the step S7 is executed;
s7, calculating a Jacobian matrix and pressure correction quantity: solving a partial derivative of all unknown pressure points, namely the pressure unknown point node 2 by using a nonlinear zero equation consisting of unknown pressure points, calculating a Jacobian matrix, calculating an optimized pressure vector by using a pressure correction quantity, and turning to a step S3 to perform a new round of iterative calculation;
wherein, the bias derivative of the pressure unknown point node 2 is:
by
Figure BDA0003187585800000233
Calculate out
Figure BDA0003187585800000234
Then substituting into the formula
Figure BDA0003187585800000235
To obtain
Figure BDA0003187585800000236
Then, the inverse matrix of the solved Jacobian equation and the point equation vector are used
Figure BDA0003187585800000237
Multiplying to obtain the pressure correction
Figure BDA0003187585800000238
At-4.55 bar using
Figure BDA0003187585800000239
Calculating the optimized pressure vector
Figure BDA00031875858000002310
56.07bar, and the optimized pressure vector
Figure BDA00031875858000002311
Step S3 is switched to for a new round of iterative calculation until the error is less than the convergence accuracy 10 -6 Until then, go to step S8;
s8, calculating the energy flow distribution of the hydrogen-doped natural gas system: calculating the gas amount of the unknown point of the gas inflow or gas outflow according to the node balance, and solving all flow, pressure and temperature parameters until the calculation is finished;
by using the same calculation method, the energy flow distribution of the natural gas pipelines with hydrogen contents of 0%, 40%, 60%, 80% and 100% can be calculated, and the results are shown in tables 4 and 5.
TABLE 4 results of pipeline hydrogen-loading transportation calculations
Figure BDA00031875858000002312
Figure BDA0003187585800000241
TABLE 5 results of compressor calculations in case of hydrogen-loaded transport
Figure BDA0003187585800000242
Figure BDA0003187585800000251
The 3-node natural gas system shown in the attached figure 3 is taken as a simulation object, and the traditional steady-state model of the natural gas pipeline based on the Newton method is compared with GasCalc gas pipeline network simulation software of SmartSim company in Germany from the aspect of the accuracy of the calculation result by using the hydrogen-doped natural gas pipeline energy flow calculation method based on the Newton iteration method under the same condition, so that the applicability and the accuracy of the method are verified.
Newton's method convergence accuracy epsilon is 10 -6 In this case, the results of the natural gas system of fig. 3 calculated by three methods are shown in table 6:
TABLE 6 accurate comparison of the three calculation methods
Figure BDA0003187585800000252
As can be seen from table 6, when the transportation condition of the natural gas pipeline under the condition of hydrogen doping is calculated by the traditional steady-state method for the natural gas pipeline based on the newton method, because only the steady-state model under the isothermal condition can be calculated, the joule-thomson effect change after hydrogen doping is ignored, the result under the condition of calculating pure natural gas is more accurate, but the calculation is not converged after the hydrogen doping ratio exceeds 5%, and the result cannot be calculated.
Compared with the result obtained by GasCalc simulation software, the result obtained by performing non-isothermal modal simulation on the pipe network by adopting the Newton iteration method-based energy flow calculation method for the hydrogen-doped natural gas pipeline has the error of 1.24bar and the maximum relative error of 2.1% under the condition of transporting pure natural gas; under the condition of transporting the hydrogen-doped natural gas, the maximum error is 1.11bar, and the maximum relative error is 2.1 percent. Generally, the deviation between the two is small, and the method, the system or the equipment for calculating the energy flow of the hydrogen-doped natural gas pipeline based on the Newton iteration method is suitable for calculating the hydrogen-doped transportation working condition of the pipeline, and the calculation result meets the precision requirement.
The method for calculating the energy flow of the hydrogen-doped natural gas pipeline based on the Newton iteration method can iteratively calculate the flow, pressure and temperature parameters of each station and each pipe section and the compressor power of the gas compression station by introducing the Newton method in the power flow algorithm of the power system, and can accurately calculate the parameter conditions of each node and each pipe section when the natural gas pipeline is subjected to hydrogen doping in a planning test point. The influence of hydrogen concentration on the operation parameters of each pipe network under different conditions is simulated by changing the proportion of hydrogen in the hydrogen-doped natural gas, the operation critical point of each pipe network component after hydrogen doping is calculated, and technical support is provided for future natural gas pipeline hydrogen doping.
The above is only a preferred embodiment of the present invention, and the scope of the present invention is not limited to the above-mentioned examples, and all technical solutions that fall under the idea of the present invention belong to the scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may be made by those skilled in the art without departing from the principle of the invention.

Claims (14)

1. A method for calculating energy flow of a hydrogen-doped natural gas pipeline is characterized in that,
the method for iteratively calculating the parameter information of each node and each pipe section of the hydrogen-doped natural gas pipe network by adopting a Newton method comprises the following steps:
inputting basic data of a hydrogen-doped natural gas system;
initializing parameters: calculating basic parameters of a hydrogen-doped natural gas pipe network and basic parameters of hydrogen-doped natural gas based on basic data;
based on a Newtonian iteration method, calculating the energy flow distribution of the hydrogen-doped natural gas system, comprising the following steps:
calculating the flow of the hydrogen-doped natural gas pipeline and the flow of the compressor based on the parameter initialization result;
iteratively correcting the gas temperature of each node in the hydrogen-doped natural gas pipe network by a Newton method based on the calculated flow of the hydrogen-doped natural gas pipeline and the flow of the compressor;
calculating a node energy flow balance equation of the natural gas system, and performing convergence judgment:
when the convergence condition is not met, the Jacobian matrix and the pressure correction quantity are calculated by the Newton method, and then the flow of the hydrogen-doped natural gas pipeline and the flow calculation program of the compressor are returned;
when the convergence condition is met, entering a natural gas system energy flow distribution calculation program;
calculating the energy flow distribution of the natural gas system: and calculating the gas quantity of the unknown node of the gas inflow or gas outflow according to the node balance, and calculating the flow of all the hydrogen-doped natural gas pipelines, the flow of a compressor, the gas consumption quantity of the compressor and the pressure and temperature of all the nodes to obtain the energy flow distribution of the natural gas system.
2. The hydrogen-loaded natural gas pipeline energy flow calculation method according to claim 1, characterized in that: the basic data of the hydrogen-doped natural gas system is the network structure data of the hydrogen-doped natural gas system, and comprises gas source parameters, gas transmission pipeline parameters, compressor parameters, gas load, the pressure of a known node of a hydrogen-doped natural gas pipe network, the temperature of a known node of the hydrogen-doped natural gas pipe network, the rated pressure of an unknown node of the hydrogen-doped natural gas pipe network, the rated temperature of an unknown node of the hydrogen-doped natural gas pipe network, the temperature of address soil, the convergence precision epsilon of a Newton method, the maximum iteration times of the Newton method, the critical pressure of each component in natural gas, the critical temperature, the critical density and the composition proportion thereof.
3. The hydrogen-doped natural gas pipeline energy flow calculation method according to claim 1, characterized in that: the basic parameters of the hydrogen-doped natural gas pipe network are calculated as follows:
by utilizing the graph theory idea, a relation matrix I of the nodes of the hydrogen-doped natural gas pipeline network and the hydrogen-doped natural gas pipeline is constructed to show the topological structure of the pipeline network, and the relation matrix I is defined as follows:
Figure FDA0003187585790000011
wherein I is a reduced relation matrix excluding the known pressure nodes of the hydrogen-doped natural gas pipe network.
4. The hydrogen-loaded natural gas pipeline energy flow calculation method according to claim 1, characterized in that: the basic parameters of the hydrogen-doped natural gas are calculated as follows: and calculating the gas constant, the molar mass, the low calorific value, the standard density, the pseudo-critical pressure, the pseudo-critical temperature and the pseudo-critical density of the hydrogen-doped natural gas.
5. The hydrogen-loaded natural gas pipeline energy flow calculation method according to claim 1, characterized in that: the method for calculating the flow of the hydrogen-doped natural gas pipeline comprises the following steps:
obtaining the flow of the pipeline i-j according to the pressure and temperature of each node of the hydrogen-doped natural gas pipe network
Figure FDA0003187585790000021
The calculation formula is as follows:
Figure FDA0003187585790000022
in the formula (1), i and j are the head and tail nodes of the hydrogen-doped natural gas pipeline respectively, m represents the average value of the parameters between the hydrogen-doped natural gas pipelines, and n represents the standard condition of the valuesThe value of (a) below (b) is,
Figure FDA0003187585790000023
is the flow rate of the hydrogen-doped natural gas pipeline under standard conditions, p i And p j Respectively, the pressure of the first and last nodes of the hydrogen-doped natural gas pipeline, D ij And L ij Respectively the diameter and length of the hydrogen-loaded natural gas pipeline, K m,ij Is a compressibility factor, λ m,ij Is the friction coefficient of the hydrogen-doped natural gas pipeline, T m,ij Is the average gas temperature p of the hydrogen-doped natural gas pipeline n 、ρ n And T n Atmospheric pressure, gas density and temperature under standard conditions, respectively.
6. The hydrogen-loaded natural gas pipeline energy flow calculation method according to claim 5, characterized in that:
all parameters in the pipe calculation equation shown in formula (1) are classified into two types, which are related or unrelated to pressure:
constants independent of pressure, combined as a combination coefficient A ij
Temperature T m,ij Compressibility factor K m,ij And friction coefficient lambda of hydrogen-doped natural gas pipeline m,ij Are directly or indirectly pressure-influenced variables and are combined into a combination coefficient B ij
Figure FDA0003187585790000024
Figure FDA0003187585790000025
By the above simplification, the equation of equation (1) can be simplified as follows:
Figure FDA0003187585790000026
calculating a pressure independent constant combination coefficientA ij : obtaining the basic parameter D of the hydrogen-doped natural gas according to calculation ij 、L ij 、p n 、ρ n 、T n Calculating a combination coefficient A by substituting formula (2) ij
Calculating the combined coefficient B of the pressure-dependent variables ij The method specifically comprises the following steps:
when the gas pressure p is less than or equal to 150bar, the compressibility coefficient K m,ij The following is obtained by approximation equation (5):
Figure FDA0003187585790000031
in the formula (5), r represents that the value is a dimension-reduced value, p r,m,ij The quotient of the operating pressure of the gas divided by the pseudo-critical pressure of the gas is called the gas dimensionality reduction pressure, T r,m,ij The quotient of the operating temperature of the gas divided by the pseudo-critical temperature of the gas is called the gas dimensionality reduction temperature, z n The real gas coefficient under the gas standard condition;
coefficient of friction lambda of pipe m,ij The calculation method comprises the following steps:
calculating the dynamic viscosity eta according to the approximate formula (6) m,ij
Figure FDA0003187585790000032
In the formula (6), the reaction mixture is,
Figure FDA0003187585790000033
is dynamic viscosity and xi of gas under normal pressure m,ij For high-pressure correction factor, p r,m,ij The quotient of the operating density of the gas divided by the pseudo-critical density of the gas is called the gas dimensionality reduction density;
by dynamic viscosity eta m,ij Reynolds number Re calculated from the pipe parameters m,ij
Figure FDA0003187585790000034
In formula (7), re m,ij Reynolds number, w, for gas flow in a conduit m,ij Is the average flow velocity in the gas pipe, p m,ij Is the average density in the gas pipe, D ij The inner diameter, eta, of the pipe section m,ij Is the gas dynamic viscosity of the pipe section.
Using Reynolds number Re m,ij Selecting formula from Colebrook, nikurad, moody and Back-calculation to calculate the friction coefficient lambda of the pipeline m,ij
Temperature T m,ij Using a set initial gas temperature value in the initial iteration, and then obtaining a corrected gas temperature value;
using the three parameters lambda obtained in the above steps m,ij 、T m,ij 、K m,ij Substituting the formula (3) to calculate the combined coefficient B of the pressure related variables ij
7. The method for calculating the energy flow of a hydrogen-doped natural gas pipeline according to claim 1, wherein:
the method for calculating the flow of the compressor comprises the following steps: in the process of pipeline transmission, a gas compressor is used for increasing the pressure of a pipeline, and gas consumed in the operation of the gas compressor is taken from a branch and is equivalent to the load of an air inlet point of the compressor;
the compressor flow comprises a compressor compression flow and a compressor gas consumption amount;
gas flow consumed by gas compressor
Figure FDA0003187585790000041
Calculated by equations (8) and (9):
Figure FDA0003187585790000042
Figure FDA0003187585790000043
the compressor compression flow rate is calculated by equation (10):
Figure FDA0003187585790000044
according to kirchhoff's node law, the flow into a node is equal to the sum of the flows out of the node, i.e. the calculated mass flow through the compressor is calculated instead of formula (10)
Figure FDA0003187585790000045
Namely the compression flow of the compressor;
Figure FDA0003187585790000046
node j is the node load;
Figure FDA0003187585790000047
is the sum of the gas mass flows from the node j to other branches;
in the formulas (8) and (9), i and j are respectively an air inlet point and an air outlet point of the compressor; p' i And p' j The pressures of the inlet and outlet gas nodes of the compressor are respectively; p is com,ij Electrical power consumed for the compressor;
Figure FDA0003187585790000048
is the mass flow rate through the compressor; eta com Is the isentropic efficiency of the compressor; kappa m,ij Is the isentropic index of the compressed gas; z i The real gas coefficient of the gas at the air inlet point of the compressor; r is the gas constant of the compressed gas; t is i The temperature of the gas at the inlet point of the compressor; eta T The thermal efficiency of the compressor; h i Is the lower heating value of the compressed gas;
when the gas pressure and temperature are combined with the following conditions: p is less than or equal to 100bar and T is less than or equal to 240K and less than or equal to 360K, then the isentropic index kappa m,ij The following is obtained by approximation equation (11):
Figure FDA0003187585790000049
in the formula (11), the reaction mixture is,
Figure FDA00031875857900000410
is the molar ratio of nitrogen in the hydrogen-doped natural gas; p is a radical of m,ij The average pressure intensity of the gas in the hydrogen-doped natural gas pipeline is obtained; t is a unit of m,ij The set initial gas temperature value is used in the initial iteration, followed by the corrected gas temperature value.
8. The method for calculating the energy flow of a hydrogen-loaded natural gas pipeline according to claim 1, wherein: the method for correcting the gas temperature of each node in the hydrogen-doped natural gas pipe network comprises the following steps:
based on the obtained flow of the hydrogen-doped natural gas pipeline, the flow of the compressor and the pressure intensity of the hydrogen-doped natural gas pipe network nodes, and taking the known temperature nodes of the hydrogen-doped natural gas pipe network as starting points, sequentially correcting the gas temperature of the adjacent nodes;
the calculation formula of the node temperature of the compressor is as follows:
Figure FDA0003187585790000051
Figure FDA0003187585790000052
in the formula, pi com Is the compressor compression ratio, T' i And T' j Respectively the inlet and outlet gas node temperature, Z, of the compressor i And Z j Respectively the actual gas coefficient, kappa, of the gas at the gas inlet and outlet nodes of the compressor m,ij Is the isentropic index, eta, of the compressed gas of the hydrogen-doped natural gas pipeline com Is the isentropic efficiency of the compressor;
according to the pipeline temperature drop formula, the calculation formula of the node temperature of the hydrogen-doped natural gas pipeline is as follows:
Figure FDA0003187585790000053
Figure FDA0003187585790000054
Figure FDA0003187585790000055
in formulae (14) to (16), μ JT Is the Joule-Thomson coefficient, Ω ij Calculating coefficients for the heat transfer correlations of the pipeline; u is the heat conduction coefficient of the pipeline; t is i And T j Respectively the temperature of the gas inlet and outlet nodes of the hydrogen-doped natural gas pipeline, pi is the circumference ratio, D ij The inner diameter of the pipeline of the pipe section; c. C p,m,ij The gas constant pressure specific heat capacity of the hydrogen-doped natural gas pipeline,
Figure FDA0003187585790000056
calculating the pipeline flow under the standard condition of the pipeline section by adopting a formula (1); rho n The gas density under the standard condition of the hydrogen-doped natural gas; t is u Is the ambient temperature, L, of the hydrogen-doped natural gas pipeline ij Length of the hydrogen-loaded natural gas pipeline, p i And p j The pressure of the first node and the pressure of the last node of the hydrogen-doped natural gas pipeline are respectively.
Joule-Thomson coefficient μ JT The calculation formula based on the basic state equation is as follows:
Figure FDA0003187585790000057
in formula (17), T m,ij Is the average gas temperature, p, of the natural gas pipeline m,ij Is the average pressure of the gas in the hydrogen-doped natural gas pipeline, c p,m,ij Is the gas constant pressure specific heat capacity, Z, of the hydrogen-doped natural gas pipeline m,ij Is a hydrogen-doped natural gas pipeMean true gas coefficient of the channel gas; r is the gas constant of the compressed gas.
According to the known node temperature and the network structure, solving the temperature of all unknown nodes of the hydrogen-doped natural gas pipe network through formulas (12), (13) or (14) - (16); equations (12) - (16) have the right parameter of the equation depending on the temperature found on the left side of the equation, and cannot be solved directly, so the precise value is obtained by repeated iteration of the newton method.
9. The method for calculating the energy flow of a hydrogen-doped natural gas pipeline according to claim 1, wherein: the method for calculating the node energy flow balance equation of the natural gas system comprises the following steps:
according to the node energy flow balance equation, the sum of all branch flows flowing into a certain node i is added with the node load of the node
Figure FDA0003187585790000061
Equal to 0, the binding relationship matrix I may represent the natural gas system by the following equation:
Figure FDA0003187585790000062
in formula (18), N represents that the system of the process has N pressure unknown nodes, M represents that the system has M pipe sections in total, and I N,M Representing a relation matrix of N nodes of the hydrogen-doped natural gas pipe network and M pipes of the hydrogen-doped natural gas,
Figure FDA0003187585790000063
representing the flow matrix of the M pieces of hydrogen-doped natural gas pipelines,
Figure FDA0003187585790000064
representing N pressure unknown node flow matrixes of the hydrogen-doped natural gas pipeline; equation (18) can be further simplified as follows:
Figure FDA0003187585790000065
in the formula (19), the gas filling at a certain node is equivalent to a negative load, and the equation (1) is substituted into the equation (19) for each node column in the hydrogen-doped natural gas system network according to the node balance, so that a nonlinear zero point solving problem consisting of unknown node pressures is obtained:
Figure FDA0003187585790000066
substituting the calculated flow of the hydrogen-doped natural gas pipeline and the compressor into a formula (20), and obtaining the unbalance amount of all nodes according to the known node load
Figure FDA0003187585790000067
The convergence criterion for calculating the energy flow of the hydrogen-doped natural gas pipeline by the Newton iteration method is as follows: when all nodes are unbalanced
Figure FDA0003187585790000068
Are all less than the given Newton's method convergence accuracy epsilon, the iteration is terminated to
Figure FDA0003187585790000069
The solution as the problem is transferred into a gas quantity calculation program of an unknown node of the gas inflow or gas outflow, otherwise, the solution enters a calculation program of a Jacobian matrix and pressure correction quantity; wherein,
Figure FDA00031875857900000610
respectively representing the pressure vector and the temperature vector after the k-th iteration.
10. The method for calculating the energy flow of a hydrogen-loaded natural gas pipeline according to claim 1, wherein: the method for calculating the Jacobian matrix and the pressure correction amount is as follows:
for N nonlinear zero point equations listed by equation (20) with N points of unknown pressure, mathematicallyCannot be obtained by methods of analyzing numerical values
Figure FDA0003187585790000071
Using Newton's method at an approximate solution
Figure FDA0003187585790000072
Obtain a better solution on the basis of
Figure FDA0003187585790000073
The recursive formula of the newton method used is as follows:
Figure FDA0003187585790000074
in formula (18)
Figure FDA0003187585790000075
As a jacobian matrix:
Figure FDA0003187585790000076
in the formula, matrix elements
Figure FDA0003187585790000077
A partial derivative representing the derivative of the sum of the gas flows through point N to point N pressure; in order to solve the Jacobian equation, all variables influenced by pressure change need to solve partial derivatives of all unknown pressures; coefficient A ij Is a pipeline/material constant, as for the gas-mass composition and pipeline parameter related, independent of pressure, and kept constant in the iterative calculation, coefficient B ij Is influenced by pressure change and is recalculated in iterative calculation according to the pressure after each update, so that the coefficient B is mainly considered in iteration for considering the hydrogen loading influence ij Calculating partial derivatives of the pressure intensity;
when p is i >p j The simplified equation (18) for the partial derivative of pressure is as follows:
Figure FDA0003187585790000078
Figure FDA0003187585790000079
wherein, the lower standard band L refers to the corresponding parameter of the hydrogen-doped natural gas pipeline; then the inverse matrix of the solved Jacobian equation and the point equation vector are used
Figure FDA00031875857900000710
Multiplying to obtain the pressure correction
Figure FDA00031875857900000711
To calculate the optimized pressure vector
Figure FDA00031875857900000712
Transferring into the flow calculation program of the hydrogen-doped natural gas pipeline for use
Figure FDA00031875857900000713
A new round of iterative computation is performed.
11. The energy flow calculation system of the hydrogen-doped natural gas pipeline is characterized by comprising a data input module, a parameter initialization module and an energy flow calculation module;
the data acquisition module is used for inputting basic data of the hydrogen-doped natural gas system;
the parameter initialization module is used for calculating basic parameters of a hydrogen-doped natural gas pipe network and basic parameters of hydrogen-doped natural gas;
and the energy flow calculation module is used for calculating the energy flow distribution of the hydrogen-doped natural gas pipeline by utilizing a Newtonian iteration method according to the basic parameters of the hydrogen-doped natural gas pipe network and the basic parameters of the hydrogen-doped natural gas.
12. The energy flow calculation equipment of the hydrogen-doped natural gas pipeline is characterized by comprising a memory and a processor;
the memory is used for storing program codes and transmitting the program codes to the processor;
the processor is used for executing a calculation program in the energy flow calculation method of the hydrogen-doped natural gas pipeline according to the instructions in the program codes.
13. A computer-readable storage medium for storing a program code for executing a calculation program in the method for calculating the energy flow of a hydrogen-loaded natural gas pipeline according to any one of claims 1 to 10.
14. Use of the power flow calculation system for a hydrogen-loaded natural gas pipeline according to claim 11 or the power flow calculation apparatus for a hydrogen-loaded natural gas pipeline according to claim 12 in steady state analysis of a hydrogen-loaded natural gas system.
CN202110866815.8A 2021-07-29 2021-07-29 Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment Pending CN115688617A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110866815.8A CN115688617A (en) 2021-07-29 2021-07-29 Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110866815.8A CN115688617A (en) 2021-07-29 2021-07-29 Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment

Publications (1)

Publication Number Publication Date
CN115688617A true CN115688617A (en) 2023-02-03

Family

ID=85058727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110866815.8A Pending CN115688617A (en) 2021-07-29 2021-07-29 Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment

Country Status (1)

Country Link
CN (1) CN115688617A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950031A (en) * 2021-03-03 2021-06-11 重庆大学 Improved iteration method for natural gas pipe network steady-state energy flow calculation
CN117235950A (en) * 2023-11-15 2023-12-15 上海叁零肆零科技有限公司 Natural gas pipe network steady-state simulation method, medium and equipment based on Newton iteration method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112950031A (en) * 2021-03-03 2021-06-11 重庆大学 Improved iteration method for natural gas pipe network steady-state energy flow calculation
CN117235950A (en) * 2023-11-15 2023-12-15 上海叁零肆零科技有限公司 Natural gas pipe network steady-state simulation method, medium and equipment based on Newton iteration method
CN117235950B (en) * 2023-11-15 2024-01-30 上海叁零肆零科技有限公司 Natural gas pipe network steady-state simulation method, medium and equipment based on Newton iteration method

Similar Documents

Publication Publication Date Title
CN107291990B (en) Energy flow simulation method based on transient model of electricity-gas interconnection comprehensive energy system
CN115688617A (en) Method, system and equipment for calculating energy flow of hydrogen-doped natural gas pipeline and application of method, system and equipment
Pellegrino et al. Greening the gas network–The need for modelling the distributed injection of alternative fuels
CN104734147B (en) A kind of integrated energy system likelihood energy stream analysis method
CN108875269B (en) Multi-period energy flow calculation method of electricity-gas interconnection system considering slow dynamic characteristics of multi-balancing machine of power system and natural gas system
CN111563315B (en) Topology analysis-based steady-state energy flow calculation method for electric-gas comprehensive energy system
CN106844895B (en) Decoupling calculation method for combined cooling heating and power micro-grid energy flow
CN110263501B (en) Simple linkage quantization calculation method for steam pipe network parameters
CN109740242B (en) Unified energy flow calculation method of electricity-gas comprehensive energy system considering natural gas thermal process
CN109800968B (en) Power-gas interconnection system probability energy flow analysis method considering natural gas system thermodynamic process
CN112257355A (en) Modeling method for medium-low pressure gas distribution pipe network of hydrogen-doped natural gas
CN110796295B (en) Energy Internet air network transmission optimization method
CN109636052A (en) A kind of collaborative planning method of gas electric system
CN115392035A (en) Improvement method for optimizing and scheduling electric-gas interconnection comprehensive energy system
CN110866213A (en) Multi-network steady-state energy flow analysis method and device for electricity-gas integrated energy system
CN111414675A (en) Double-layer robust state estimation method and system for electric heating comprehensive energy system
CN113627021A (en) Electrical interconnection system optimal energy flow calculation method based on sequence convex programming
CN112686447B (en) Multi-energy flow coupling load prediction method for offshore oil and gas field development
CN108964143B (en) Natural gas network static equivalent model of electricity-gas comprehensive energy system
CN111199012B (en) Energy internet thermodynamic network load flow calculation method
Xianxi et al. Modeling and simulation of steam pipeline network with multiple supply sources in iron& steel plants
CN105095539B (en) Include the steam power system optimization method and system of steam straight tube
Zalitis et al. A linearized numerical solution for steady-state simulations of gas networks
CN114629124A (en) Comprehensive energy system load flow calculation method based on subareas
CN114549232A (en) Hybrid energy flow calculation method for electricity-heat comprehensive energy system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination