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 PDFInfo
- 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
Links
- VNWKTOKETHGBQD-UHFFFAOYSA-N methane Chemical compound C VNWKTOKETHGBQD-UHFFFAOYSA-N 0.000 title claims abstract description 744
- 239000003345 natural gas Substances 0.000 title claims abstract description 368
- 238000000034 method Methods 0.000 title claims abstract description 112
- 239000007789 gas Substances 0.000 claims abstract description 266
- 238000004364 calculation method Methods 0.000 claims abstract description 93
- 239000001257 hydrogen Substances 0.000 claims abstract description 90
- 229910052739 hydrogen Inorganic materials 0.000 claims abstract description 90
- UFHFLCQGNIYNRP-UHFFFAOYSA-N Hydrogen Chemical compound [H][H] UFHFLCQGNIYNRP-UHFFFAOYSA-N 0.000 claims abstract description 86
- 239000011159 matrix material Substances 0.000 claims abstract description 41
- 238000009826 distribution Methods 0.000 claims abstract description 19
- 238000012937 correction Methods 0.000 claims abstract description 18
- 230000006835 compression Effects 0.000 claims description 17
- 238000007906 compression Methods 0.000 claims description 17
- 230000005540 biological transmission Effects 0.000 claims description 14
- 239000000203 mixture Substances 0.000 claims description 10
- 230000008569 process Effects 0.000 claims description 9
- 230000009467 reduction Effects 0.000 claims description 9
- IJGRMHOSHXDMSA-UHFFFAOYSA-N Atomic nitrogen Chemical compound N#N IJGRMHOSHXDMSA-UHFFFAOYSA-N 0.000 claims description 8
- 230000008859 change Effects 0.000 claims description 8
- 230000001419 dependent effect Effects 0.000 claims description 7
- 239000011541 reaction mixture Substances 0.000 claims description 7
- 238000003860 storage Methods 0.000 claims description 7
- 239000002689 soil Substances 0.000 claims description 6
- 238000012546 transfer Methods 0.000 claims description 6
- 238000010438 heat treatment Methods 0.000 claims description 4
- 229910052757 nitrogen Inorganic materials 0.000 claims description 4
- 238000000547 structure data Methods 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 claims description 3
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 claims description 2
- 239000000463 material Substances 0.000 claims description 2
- 239000000243 solution Substances 0.000 description 10
- 230000000694 effects Effects 0.000 description 7
- 150000002431 hydrogen Chemical class 0.000 description 6
- 229910052799 carbon Inorganic materials 0.000 description 5
- 230000007423 decrease Effects 0.000 description 3
- 230000014509 gene expression Effects 0.000 description 3
- 238000010248 power generation Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 2
- CURLTUGMZLYLDI-UHFFFAOYSA-N Carbon dioxide Chemical compound O=C=O CURLTUGMZLYLDI-UHFFFAOYSA-N 0.000 description 2
- 230000033228 biological regulation Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000004146 energy storage Methods 0.000 description 2
- 238000004088 simulation Methods 0.000 description 2
- 206010063385 Intellectualisation Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 229910002092 carbon dioxide Inorganic materials 0.000 description 1
- 239000001569 carbon dioxide Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000005868 electrolysis reaction Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 239000000446 fuel Substances 0.000 description 1
- 239000002737 fuel gas Substances 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000009776 industrial production Methods 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injection Substances 0.000 description 1
- 238000012821 model calculation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006386 neutralization reaction Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 1
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
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:
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 networkThe calculation formula is as follows:
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,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 :
By the above simplification, the equation of equation (1) can be simplified as follows:
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):
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 :
In the formula (6), the reaction mixture is,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 :
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;
the compressor compression flow rate is calculated by equation (10):
the mass flow through the compressor is calculated using the calculated flow in the pipe instead of the equation (10)Namely the compression flow of the compressor;a node j node load;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;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):
in the formula (11), the reaction mixture is,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:
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:
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,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:
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 nodeEqual to 0, the binding relationship matrix I may represent the natural gas system by the following equation:
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,representing the flow matrix of the M pieces of hydrogen-doped natural gas pipelines,representing N pressure unknown node flow matrixes of the hydrogen-doped natural gas pipeline; equation (18) can be further simplified as follows:
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:
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
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 unbalancedAre all less than a given Newton method convergence accuracy epsilon, the iteration is terminated toThe 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,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 valuesUsing Newton's method at an approximate solutionObtain a better solution on the basis ofThe recursive formula of the newton method used is as follows:
in the formula, matrix elementsA 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:
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 usedMultiplying to obtain the pressure correctionTo calculate the optimized pressure vectorTransferring into the flow calculation program of the hydrogen-doped natural gas pipeline for useA 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:
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 networkThe calculation formula is as follows:
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,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 :
By the above simplification, the equation of equation (1) can be simplified as follows:
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:
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:
in the formula (6), the reaction mixture is,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 :
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.
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 3Namely the compression flow of the compressor;node j is the node load;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;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:
in the formula (11), the reaction mixture is,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:
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:
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,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:
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 nodeEqual to 0, the binding relationship matrix I may represent the natural gas system by the following equation:
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;representing the flow matrix of the M pieces of hydrogen-doped natural gas pipelines;representing N pressure unknown node flow matrixes of the hydrogen-doped natural gas pipeline; equation (18) can be further simplified as follows:
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:
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
If all the nodes are unbalancedAre all smaller than the convergence precision epsilon of the given Newton method, the iteration is terminated,representing the known node pressure vector of pressure after the kth iteration,represents the temperature known node temperature vector after the kth iteration to 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 valuesNewton's method is an iterative computation method that can be performed on an approximate solutionGet a better solution on the basis ofThe general recursive formula of newton's method is as follows:
in the formula, matrix elementsRepresenting 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:
then, the inverse matrix of the solved Jacobian equation and the point equation vector are usedMultiplying to obtain the pressure correctionTo calculate the optimized pressure vectorGo to step 3 for useA 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
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
In the context of Table 3, the following examples are,is the natural gas flow rate in the natural gas with hydrogen,The standard flow rate of hydrogen in the hydrogen-doped natural gas,Is the total flow rate of the natural gas under the standard condition,Is the energy contained in the natural gas in the hydrogen-doped natural gas under the standard condition,The energy contained in the flow of the hydrogen in the hydrogen-doped natural gas under the standard condition,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:
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.
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:
wherein,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 :
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:
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.
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 :
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
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η 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:
it is known thatKnown 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:
Then, the inverse matrix of the solved Jacobian equation and the point equation vector are usedMultiplying to obtain the pressure correctionAt-4.55 bar usingCalculating the optimized pressure vector56.07bar, and the optimized pressure vectorStep 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
TABLE 5 results of compressor calculations in case of hydrogen-loaded transport
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
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:
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 networkThe calculation formula is as follows:
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,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 :
By the above simplification, the equation of equation (1) can be simplified as follows:
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):
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 :
In the formula (6), the reaction mixture is,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 :
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;
the compressor compression flow rate is calculated by equation (10):
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)Namely the compression flow of the compressor;node j is the node load;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;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):
in the formula (11), the reaction mixture is,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:
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:
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,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:
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 nodeEqual to 0, the binding relationship matrix I may represent the natural gas system by the following equation:
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,representing the flow matrix of the M pieces of hydrogen-doped natural gas pipelines,representing N pressure unknown node flow matrixes of the hydrogen-doped natural gas pipeline; equation (18) can be further simplified as follows:
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:
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
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 unbalancedAre all less than the given Newton's method convergence accuracy epsilon, the iteration is terminated toThe 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,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 valuesUsing Newton's method at an approximate solutionObtain a better solution on the basis ofThe recursive formula of the newton method used is as follows:
in the formula, matrix elementsA 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:
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 usedMultiplying to obtain the pressure correctionTo calculate the optimized pressure vectorTransferring into the flow calculation program of the hydrogen-doped natural gas pipeline for useA 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.
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)
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 |
-
2021
- 2021-07-29 CN CN202110866815.8A patent/CN115688617A/en active Pending
Cited By (3)
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 |