Next Article in Journal
Concept of a Dual Energy Storage System for Sustainable Energy Supply of Automated Guided Vehicles
Next Article in Special Issue
The Study of Soil Temperature Distribution for Very Low-Temperature Geothermal Energy Applications in Selected Locations of Temperate and Subtropical Climate
Previous Article in Journal
Does ESG Reporting Relate to Corporate Financial Performance in the Context of the Energy Sector Transformation? Evidence from Poland
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Selected Mathematical Models Describing Flow in Gas Pipelines

by
Andrzej J. Osiadacz
1,* and
Marta Gburzyńska
2
1
Department of Building Installations, Hydrotechnics and Environmental Engineering, Warsaw University of Technology, 20, Nowowiejska Street, 00-653 Warsaw, Poland
2
“I. Mościcki” State Vocational College in Ciechanów, 9 Gabriela Narutowicza Street, 06-400 Ciechanów, Poland
*
Author to whom correspondence should be addressed.
Energies 2022, 15(2), 478; https://doi.org/10.3390/en15020478
Submission received: 5 November 2021 / Revised: 4 January 2022 / Accepted: 7 January 2022 / Published: 10 January 2022

Abstract

:
The main aim of simulation programs is to study the behavior of gas pipe networks in certain conditions. Solving a specified set of differential equations describing transient (unsteady) flow in a gas pipeline for the adopted parameters of load and supply will help us find out the value of pressure or flow rate at selected points or along selected sections of the network. Transient gas flow may be described by a set of simple or partial differential equations classified as hyperbolic or parabolic. Derivation of the mathematical model of transient gas flow involves certain simplifications, of which one-dimensional flow is most important. It is very important to determine the conditions of pipeline/transmission network operation in which the hyperbolic model and the parabolic model, respectively, should be used. Parabolic models can be solved numerically in a much simpler way and can be used to design simulation programs which allow us to calculate the network of any structure and any number of non-pipe elements. In some conditions, however, they describe the changes occurring in the network less accurately than hyperbolic models do. The need for analysis, control, and optimization of gas flows in high-pressure gas pipelines with complex structure increases significantly. Very often, the time allowed for analysis and making operational decisions is limited. Therefore, efficient models of unsteady gas flows and high-speed algorithms are essential.

1. Introduction

Nowadays, gas transmission networks require computer calculation programs to operate reliably or to be extended. Reliable operation of gas networks is based first and foremost on supplying gas in accordance with the provisions of gas supply contracts made with gas users, and on minimizing broadly understood operating costs. On the other hand, proper network expansion depends on the choice of a variant which will meet the adopted criterion of operating and construction costs.
Therefore, the services responsible for gas transmission should use the software based on mathematical models of network elements as a basic work tool.
A mathematical model is a set of equations which represent the real system in a certain way and with a specified degree of accuracy. Naturally, a mathematical model is a simplification of the real system as it includes only these aspects of the system which meet the requirements set for the model.
The models can be classified according to the criteria adopted by those who designed them. If a system involves variables which are changing continuously in time, then dynamic models described by ordinary differential equations should be used. If the variables are not a function of time, static models described by algebraic equations should be applied. The choice of a model depends on the situation. For instance, in a low-pressure gas network, changes of pressure and flow rate are very fast. They are omitted in most of the cases under consideration, hence the application of steady-state models, i.e., algebraic equations. In the case of high-pressure networks, the dynamics of the gas flow rate are much slower due to large volumes of gas stored in the pipelines. Its omission would lead to major errors in the description of this phenomenon. Therefore, it is necessary to use mathematical models such as differential equations.
The main aim of simulation programs is to study the behavior of gas networks in specified conditions. Solutions to a set of algebraic or differential equations describing the gas for the adopted parameters of gas network load and supply will give us the value of pressure or flow rates at the selected points or along the selected sections of the network. Thanks to simulation algorithms, the cost of measurement equipment for the gas networks can be substantially diminished, and—assuming the models are correct—complete and accurate information about the system can be obtained.
Unsteady gas flow may be described by a set of ordinary or partial differential equations classified as hyperbolic or parabolic. The mathematical model of unsteady gas flow involves certain simplifications, of which one-dimensional flow is most important. It is reasonable to assume one-dimensional gas flow if the length of the pipeline is several times greater than its diameter, and the pace of change of such parameters as pressure, density, temperature, or speed in the direction normal to the streamline is negligible compared to the pace of change of the parameters along the streamline. This means that the gas flow parameters at any cross-section of the pipeline are treated as constant and the flow—as homogenous. In addition, it is assumed that the radius of curvature of the pipeline is long when compared to its diameter, the cross-section of the pipeline is constant (at fixed intervals), the pipeline is rigid (it does not deform under internal pressure in the pipeline), and the shape of speed and temperature profiles (in the case of nonisothermal flow) are approximately constant along the pipeline. In the case of isothermal flow, for the simulation of unsteady state in the gas pipeline, both parabolic and hyperbolic/quasi-hyperbolic models are used. Basic information about the models used for the description of the unsteady state in the pipeline can be found in [1,2,3].
There are numerous publications on the problems of simulation or optimization of gas networks, in which the authors use different models describing the unsteady gas flow in the pipeline, that do not always explain why a given model was chosen.
In [4], where the aim of the test was to find an effective numerical simulation method for unsteady gas flow in horizontal pipelines, it was assumed that the mathematical model used for the simulation should be an isothermal–hyperbolic model. In [5], the derived model of unsteady state for a nonplanar gas pipeline—represented in the form of equations of state—was based on a set of hyperbolic equations. In [6], the hyperbolic model, which was used in the gas network control algorithm, was proposed to describe the dynamics of the pipeline. In [7], the efficiency of the solution of a linearized hyperbolic equation describing unsteady gas flow in terms of basic variables and of the effectiveness of the linearization method was tested. In [8], simulation of an unsteady state gas network was discussed, using the hyperbolic model and taking into account the compressors characteristics.
Application of a decomposition method in [9], on the basis of a hyperbolic model, helped us develop a very effective algorithm of simulation of a gas network of any structure. Hyperbolic models were also used in [10,11,12]. A comparative analysis of the three gas pipeline models which describe unsteady gas flow was carried out in [13]. Hyperbolic and parabolic models, as well as a model described by means of a transfer function, were tested. Verification was carried out along a straight pipeline section. A comparative analysis of a hyperbolic and parabolic model for a specific case was performed in [14]. On the other hand, in [15], the developed simulators based on a nonlinear and linearized parabolic–isothermal model were discussed. The tests showed that the linearized model is much faster than the nonlinear model; however, the differences between the obtained results are rather insignificant. In [16], a mathematical model and its numerical implementation to the simulations of complex gas networks in unsteady state was presented, including a mathematical formula, experimental validation, and application in relevant case studies for the Portuguese natural gas transmission network. Parabolic models were used in [17] to assess the effect produced by the pipeline slope on simulation results. A simplified nonlinear parabolic model was used in [18] to develop an algorithm of natural gas transmission system control as a tool to assist the network operator. In [19], we discussed a package for simulation of gas networks in unsteady state, using a parabolic–linearized flow model, used for simulation of a gas network in Great Britain. The parabolic model was also applied in [20], where a numerical analysis was carried out and the structure of a package for high-pressure gas network simulation was discussed.
Another very important problem is to define the gas pipeline/transmission system operating conditions for which the hyperbolic model should be used and those for which the parabolic model should be applied. As we know, due to its structure, the hyperbolic model describes the quickly changing gas parameters triggered by the abrupt changes of boundary conditions more accurately. This means that there is a certain boundary frequency of changes of boundary conditions above which it is recommended to use the hyperbolic model due to the accuracy of description. It should be also remembered that the gas pipeline reaction to the disturbance depends not only on the quality of disturbance but also on the gas pipeline accumulation capacity or on the average pressure in the pipeline. It is very important to formulate clear criteria for the choice of models to meet the gas pipeline operating conditions. As it is easier to solve a parabolic model numerically, there are many numerical algorithms which are effective in terms of calculation. Last, but not least, it is much easier to formulate a simulation algorithm for a network of any structure, containing non-pipe elements of different operating variants.
Although they are much easier to be solved numerically and to be used to design simulation programs calculating networks of any structure and any number of non-pipe elements, in certain situations, parabolic models less accurately describe the changes occurring in the pipeline compared to hyperbolic models. The latter, on the other hand, are more demanding in terms of calculation and more difficult to use to create an effective simulator of a network of any structure.
Simplified lumped models of unsteady gas flow have emerged as a tool to speed up computations over partial differential equations (PDE) models. In simplified models, pressure and mass flow values are analyzed only at the ends of the pipe segments. For many tasks of analysis, optimization of gas flows, and their control, this is accurate enough. Such models for a gas pipeline can be described by linear or nonlinear ordinary differential equations or transfer functions [13,21,22,23,24,25,26].
In this article, a comparative analysis of simplified parabolic and hyperbolic models described by transfer functions is carried out for different boundary conditions and different states of the pipeline, based on the frequency analysis and time response.
At the same time, using the state-space method, the calculation results of the hyperbolic and parabolic models are compared.
The paper is structured as follows: Section 1 provides basic information concerning transient simulation of gas networks and a brief literature review. A mathematical model of transient gas flow is explained in Section 2. In Section 3, examples of simplified models of unsteady gas flow are characterized. The simplified lumped model is described in detail in Section 4, while in Section 5, the frequency response analysis for hyperbolic and parabolic models is characterized. Section 6 contains time response analysis for both simplified models. The results of simulation using the state-space method are discussed in Section 7. The last section presents the conclusions of this paper.

2. Mathematical Model of Transient Gas Flow

The following equations are used to create a mathematical model of isothermal transient (unsteady) gas flow in the pipeline [3]:
  • Continuity equation.
  • Equation of motion.
  • Equation of state.
(a)
Continuity equation
The continuity equation is a principle of mass conservation with reference to the phenomenon of liquid flow. Mass, which is a measure of quantity of matter, cannot arise or disappear; therefore, a change of mass in control volume may be caused only by a difference between inflow to, and outflow from, the volume. Equation (1) represents a law of mass conservation in a differential form:
ρ t = ( ρ w ) x
  • Ρ —gas density (kg/m3)
  • w —speed of gas stream (m/s)
When both sides of the equation are multiplied by cross-sectional area A , taking into account that M = ρ · w · A , where; M —mass flow [kg/s], the following result is obtained:
( ρ A ) t = M x
(b)
Equation of motion
According to the equation of motion (Newton’s second law of motion), the algebraic sum of forces acting on a fluid element of certain mass at a certain moment equals the change of momentum of that element at that moment.
d ( Mw ) dt = F x
The left-hand side of Equation (3) may be expressed as follows:
d ( Mw ) dt = ( Mw ) t + ( Mw · w ) x = t ( ρ Aw · dx ) + x ( ρ Aw 2 ) · dx
In the case of gas transmission in a pipeline, there are three components of the force acting on the gas element:
F x = F 1 + F 2 + F 3 = g ρ A · dx · sin α + ( ρ Aw 2 2 D λ · dx ) + ( p x A ) · dx
  • F 1 —force exerted by the weight of gas located inside the control surface (kgm/s2).
  • F 2 —force exerted by hydraulic resistance (kgm/s2).
  • F 3 —force exerted by gas pressure (kgm/s2).
Where:
  • α —angle of inclination of pipeline axis to the horizontal.
  • λ —hydraulic resistance coefficient.
The following formula is obtained after transformations:
t ( ρ w ) + x ( ρ w 2 ) + p x + λ ρ w 2 2 D ρ gA sin α = 0
Equation (6) is a general form of Newton’s dynamic equation of motion for one-dimensional isothermal gas flow.
In the above continuity equations and in the equations of motion, there are three variables, i.e., pressure, density, and flow, which are functions of time and of a spatial variable. It will be possible to determine their values when we add an additional equation, i.e., equation of state.
(c)
Equation of state
Equation of state describes mutual relations between the parameters of gas state (pressure, density, and temperature):
p ρ = zRT
where
  • R —universal gas constant (J/kgK).
  • z —coefficient of compressibility, which depends on the critical values of temperature and pressure and their real values.
  • T —gas temperature (K).
In isothermal transformation ( T = const ), relationship between gas and density has the following form:
p ρ = c 2
where
  • c —speed of sound in gas (m/s).
  • p —gas pressure (Pa).
When Equation (8) is substituted into Equation (1), the following formula is obtained:
M x + A c 2   p t = 0

3. Examples of Simplified Models of Unsteady Gas Flow

A detailed mathematical model [3] of unsteady isothermal gas flow in the pipeline has the following form:
{ M x + A c 2   p t = 0 p x + t ( ρ w ) + x ( ρ w 2 ) + λ ρ w 2 2 D = 0
or, after transformation:
{ A c 2 p t + M x = 0 ( ρ w ) t + p x + x ( 1 A 2   M 2 ρ ) + λ 2 DA 2 | M | M ρ = 0
Assuming that we deal with a flat pipeline, and changes of the gas flow rate are slow, the equation of motion can be simplified as follows:
p x + λ 2 DA 2 | M | M ρ = 0
In the case of quick changes of the gas flow rate caused by, e.g., significant changes in the gas pipeline load or by sudden changes in gas supply, the equation of motion must include the inertial component. Then, the following equation is obtained:
p x + t ( ρ w ) + λ 2 DA 2 | M | M ρ = 0
After integrating Equation (12) with continuity Equation (9), a model of unsteady isothermal gas flow described by a set of two partial differential equations of parabolic type is obtained:
{ A c 2 p t + M x = 0 p x + λ 2 DA 2 | M | M ρ = 0
On the other hand, the equation of motion, Equation (12), in combination with continuity Equation (9), forms the following set of two quasi-linear partial differential equations of hyperbolic type:
{ A c 2 p t + M x = 0 ( ρ w ) t + p x + λ 2 DA 2 | M | M ρ = 0
where terms ( ρ w ) t , λ 2 DA 2 | M | M ρ characterize gas inertia and flow resistance.
Both the parabolic model, Equation (14), and hyperbolic models, Equations (11) and (15), are nonlinear. In practice, to simplify mathematical description, they are linearized in order to formulate an approximate linear description of the phenomenon, which is important in the area of the chosen point of work on static characteristics (this point usually corresponds to the nominal and average system operating conditions). Study of linear systems is carried out for two reasons. Firstly, many systems maintain their linearity in useful working ranges. Secondly, precise mathematical analysis of linear systems is much simpler than a more general analysis. Let us observe the behavior of model variables around steady state, i.e., let us analyze variable deviations from their values in steady state. As the model variables are x and t functions, their deviation from the values in steady state are also x and t functions, according to the following equation:
u ( x , t ) =   u s + u ( x , t )
These deviations are called incremental variables and are denoted as u ( x , t ) , while u s denotes the value of steady state. It is assumed that incremental variables meet the condition | u u | 1 .
Values of incremental variables should be small enough for the terms of equation including these values to be omitted, i.e.,
u u x = ( u s + u ) x ( u s + u ) = u s u x + u u x
which means that the last term in Equation (17) can be omitted as insignificant.
Using Equation (17), let us present values of pressure p ( x , t ) and of mass flow M ( x , t ) in the pipeline, in the following form:
p ( x , t ) =   p s ( x ) + p ( x , t )
M ( x , t ) =   M s + M ( x , t )
where   p ( x , t ) and M ( x , t ) denote minor deviations from steady state of pressure   p s ( x )   and flow M s , respectively.
The nonlinear terms in Equation (11) are linearized by expanding the equation into the Taylor series around the point of steady state with M s , ρ s coordinates. In result of linearization, the following was obtained:
| M | M ρ = | M s | M s ρ s { 1 + [ 2 M M s ρ ρ s ] + [ ( M M s ) 2 2 M M s ρ ρ s + ( ρ ρ s ) 2 ] + 0 · ( M 3 , ρ 3 ) }
Substituting the values of density and speed (   ρ s ( x ) ,   w s ( x ) ) with average values along lengths ( ρ s ,   w s ) , after transformation, we have
1 A M t + p x 1 A 2 M s M s ρ s 2 c 2 p x + 2 A 2 M s ρ s M x λ DA 2 | M s | M s ρ s 2 c 2 p + λ DA 2 | M s | ρ s M = 0  
Finally, the equation of motion has the following form:
p x 1 A 2 M s M s ρ s 2 c 2 p x = 1 A M t 2 A 2 M s ρ s M x + λ DA 2 | M s | M s ρ s 2 c 2 p λ DA 2 | M s | ρ s M
Equations (4) and (21), for minor deviations with insignificant terms removed, can be presented as the following set of equations:
  C p t + M x = 0
p x +   S M x   T p x   P p L   M t + R M = 0
where
  • C = A c 2 —capacitive reactance per unit of length.
  •   L = 1 A —inductance per unit of length.
  • T = 1 A 2   M s M s ρ s 2 c 2   —constant of the convective term depending on pressure per unit of length.
  •   R = λ D · A 2   | M s | ρ s   —constant of the hydraulic resistance term depending on flow per unit of length.
  •   P = λ 2 D · A 2   | M s | M s ρ s 2 c 2   —constant of the hydraulic resistance term depending on pressure per unit of length.
  •   S = 2 A 2   M s ρ s   —constant of the convective term depending on flow per unit of length.
Equations (23) and (24) are partial linear differential equations of constant coefficients.

4. Simplified Lumped Models

The transfer function is a compact description of the input–output relation linear time-invariant dynamical system. Transfer functions appear as relevant mathematical tools because they are usually easy for modification and easy for solution. They need only dynamics input–output data to represent even complex systems. They can be applied to different systems; however, they are most often employed to estimate the response of dynamical systems and analysis of control systems. Mathematically, the transfer function is a function of complex variables. Using the Laplace transform, a set of partial differential equations is approximated by a set of ordinary differential equations. The following set of equation is obtained:
M ε =   C   s · p ( s )
p ε = ( S   C   s   +   P ) ( 1   T ) p ( s ) ( L   s   R ) ( 1   T ) M ( s )
where
ε = x l
Equations (25) and (26) can be formulated as follows:
[ p ε M ε ] = [ γ 1 γ 2 γ 3 0 ] · [ p ( s ) M ( s ) ]
where
γ 1 =   S   C   s + P 1 T ,   γ 2 =   L   s   R 1   T ,   γ 3 = C s γ 1 = ϑ 1 + ϑ 2 s γ 2 = ϑ 3 + ϑ 4 s γ 3 = ϑ 5 s ϑ 1 = 1 2 λ   l | w s | w s Dc 2 ϑ 2 = 2 w s   l c 2 ϑ 3 = λ   l | w s | DA ϑ 4 = l A ϑ 5 = A   l c 2 α = 1 2 γ 1 β = 1 2 γ 1 2 + 4 γ 2 γ 3 .
or in the form of the following equation:
d   y _ d ε =   A _ ·   y _ ( ε )
where
  A _ = [ γ 1 γ 2 γ 3 0 ] ,     y _ ( ε ) = [ p ( s ) M ( s ) ] .
Equation (28) for ε   0 , with initial condition   y _ ( ε ) =   y _ ( ε 0 ) is solved as follows:
  y _ ( ε ) = e   A _ ( ε ε 0 ) ·   y _ ( ε 0 )
To determine e   A _ ( ε ε 0 ) , Sylwester interpolation formula [27] was used; in the case of exponential function, i.e., f ( A ) =   e   A _ ( ε ε 0 ) , it has the following form:
e   A _ ( ε ε 0 ) = i = 1 n e λ i ( ε ε 0 ) j i ( λ j I   A _ ) j i ( λ j λ i )
where
  • I —identity matrix.
Calculating eigenvalues λ i of matrix A   _ , we obtain
| γ 1 λ γ 2 γ 3 λ | = λ 2 γ 1 λ γ 2 γ 3
λ 1 ,   2 = α ± β ,
where
λ 1 = α + β = 1 2 ( γ 1 + γ 1 2 + 4 γ 2 γ 3 ) ,   λ 2 = α β = 1 2 ( γ 1 γ 1 2 + 4 γ 2 γ 3 )
however,
α = 1 2 γ 1 ,   β = 1 2 γ 1 2 + 4 γ 2 γ 3 .
Therefore, e   A _ ( ε ε 0 ) = e λ 1 ( ε ε 0 ) ( λ 2 I   A _ λ 2 λ 1 ) + e λ 2 ( ε ε 0 ) ( λ 1 I   A _ λ 1 λ 2 ) , and after transformations,
e   A _ ( ε ε 0 ) = e α ( ε ε 0 ) [ α β sin h β ( ε ε 0 ) + cos h β ( ε ε 0 ) γ 2 β sin h β ( ε ε 0 ) γ 3 β sin h β ( ε ε 0 ) α β sin h β ( ε ε 0 ) + cos h β ( ε ε 0 ) ] =   B _
Taking into account Equation (32), Equation (29) has the following form:
  y _ ( ε ) =   B _   y _ ( ε 0 )
Next, we take into account boundary conditions. For x = 0 ( ε 0 ) we have pressure at the beginning of the gas pipeline: p ( 0 , s ) = p 1 ( s ) and flow at the beginning of the gas pipeline: M ( 0 , s ) = M 1 ( s ) , i.e.,
  y _ ( ε 0 )   [ p 1 ( s ) M 1 ( s ) ]
and for x = l ; pressure at the end of the gas pipeline: p ( l , s ) = p 2 ( s ) and flow at the end of the gas pipeline: M ( l , s ) = M 2 ( s ) , i.e.,
  y _ ( ε ) = [ p 2 ( s ) M 2 ( s ) ]
Taking into account Equations (32), (34), and (35), after transformations, Equation (33) has the following form:
[ p 2 ( s ) M 2 ( s ) ] = e α [ cos h β + α β sin h β Z w sin h β 1 Z w ( 1 α 2 β 2 ) sin h β cos h β l α β sin h β ] · [ p 1 ( s ) M 1 ( s ) ]
or:
[ p 1 ( s ) M 1 ( s ) ] = e α [ cos h β α β sin h β Z w sin h β 1 Z w ( 1 α 2 β 2 ) sin h β cos h β + α β sin h β ] · [ p 2 ( s ) M 2 ( s ) ]
where Z w = γ 2 β = R + sL ( 1 T ) β .
The following relations result from a set of Equations (36) and (37):
p 2 ( s ) = e α ( cos h β + α β sin h β ) p 1 ( s ) + e α ( Z w sin h β ) M 1 ( s )
M 2 ( s ) = e α ( 1 Z w ( 1 α 2 β 2 ) sin h β ) p 1 ( s ) + e α ( cos h β α β sin h β ) M 1 ( s )
p 1 ( s ) = e α ( cos h β α β sin h β ) p 2 ( s ) + e α ( Z w sin h β ) M 2 ( s )
M 1 ( s ) = e α ( 1 Z w ( 1 α 2 β 2 ) sin h β ) p 2 ( s ) + e α ( cos h β + α β sin h β ) M 2 ( s )
After transformations of Equations (38)–(41), the following is obtained:
p 2 ( s ) = e α 1   cos h β α β   sin h β p 1 ( s ) Z w   sin h β l cos h β α β   sin h β M 2 ( s )
and
M 1 ( s ) = 1 Z w ( 1 α 2 / β 2 ) sin h β cos h β α β · sin h β   p 1 ( s ) + e α 1 cos h β α β   sin h β M 2 ( s )
In their transfer function, Equations (42) and (43) have the following form:
p 2 ( s ) = H 1 ( s )   p 1 ( s ) + H 2 ( s )   M 2 ( s )
M 1 ( s ) = H 3 ( s )   M 2 ( s ) + H 4 ( s )   p 1 ( s )
where
H 1 ( s ) = p 2 ( s ) p 1 ( s ) = e α cos h β α β · sin h β
  H 3 ( s ) = M 1 ( s ) p 1 ( s ) = 1 Z w ( 1 α 2 / β 2 ) sin h β cos h β α β · sin h β
assuming that M 2 ( s ) = 0 , and
H 2 ( s ) = p 2 ( s ) M 2 ( s ) = Z w sin h β cos h β α β sin h β ,
  H 4 ( s ) = M 1 ( s ) M 2 ( s ) = e α cos h β α β · sin h β
assuming that p 1 ( s ) = 0 .

5. Frequency Response Analysis

The steady-state response of a system to a purely sinusoidal input is defined as the frequency response of a system. Frequency response of the system is defined as the response of the system when standard sinusoidal signals are applied to it with constant amplitude over a range of frequencies. The frequency response analysis of a model is used to determine the model gain and phase angle at different frequencies. In order to obtain frequency characteristics of the analyzed models, analytical versions of the transfer function should be transformed into their operator forms. In order to do so, expression cos h β α β · sin h β is transformed by expanding functions sin h β and cos h β into a power series:
sin h β = n = 0 ( β ) 2 n + 1 ( 2 n + 1 ) ! = β + 1 3 ! ( β ) 3 + 1 5 ! ( β ) 5 + 1 7 ! ( β ) 7 + cos h β l = n = 0 ( β ) 2 n ( 2 n ) ! = 1 + 1 2 ! ( β ) 2 + 1 4 ! ( β ) 4 + 1 6 ! ( β ) 6 +
Denominator of H 1 ( s ) function can be formulated as follows:
β cos h β α sin h β = = β ( 1 + 1 2 ! ( β ) 2 + 1 4 ! ( β ) 4 + 1 6 ! ( β ) 6 + ) α ( β + 1 3 ! ( β ) 3 + 1 5 ! ( β ) 5 + 1 7 ! ( β ) 7 + )
Finally, after transformations, the following formula is obtained:
H 1 ( s ) = k 1 1 +   a ˜ 1 s +   a ˜ 2 s 2
where
k 1 = e   ϑ 1 a ˜ 1 = a 1 1 2 ϑ 2 a ˜ 2 = a 2 + 1 8 ϑ 2 2 1 2 ϑ 2 a 1
Analogously, for H 4 ( s ) function,
H 4 ( s ) = 1 1 + a = 1   s + a = 2   s 2
where
a = 1 =   a ¯ 1 + ϑ 2 , a = 2 =   a ¯ 2 + ϑ 2 a ¯ 1   .
For H 2 ( s ) function,
H 2 ( s ) = k 2 1 + b 1 s + b 2 s 2 1 + a 1 s + a 2 s 2
where
b 1 = ϑ 4 ϑ 3 + 1 6 ϑ 3 ϑ 5 ( 1 + 1 40 ϑ 1 2 ) + 1 12 ϑ 2 ϑ 1 ( 1 + 1 40 ϑ 1 2 ) 1 + 1 24 ϑ 1 2 + 1 + 1 1920 ϑ 1 4 b 2 = ϑ 4 ϑ 3 1 6 ϑ 3 ϑ 5 1 + 1 40 ϑ 1 2 + 1 12 ϑ 2 ϑ 1 1 + 1 40 ϑ 1 2 + 1 120 ϑ 2 2 ϑ 1 2 + 1 6 ϑ 4 ϑ 5 1 + 1 40 ϑ 1 2 + 1 120 ϑ 3 ϑ 5 ϑ 2 + 1 4 ϑ 2 2 1 6 + 1 80 ϑ 1 2 · 1 1 + 1 24 ϑ 1 2 + 1 + 1 1920 ϑ 1 4 k 2 = e 1 2 ϑ 1 ϑ 3 ( 1 + 1 24 ϑ 1 2 + 1 + 1 1920 ϑ 1 4 )
For H 3 ( s ) function,
H 3 ( s ) = c 1 s + c 2 s 2 1 + a 1 s + a 2 s 2
where
c 1 = e 1 2 ϑ 1 ϑ 5 ( 1 + 1 24 ϑ 1 2 + 1 + 1 1920 ϑ 1 4 + ) c 2 = e 1 2 ϑ 1 ϑ 5 ( 1 6 ϑ 3 ϑ 5 + 1 12 ϑ 2 ϑ 1 ) ( 1 + 1 40 ϑ 1 2 )
In each of the transmittances Equations (46)–(49), coefficient values depend on the type of equation.
In the case of hyperbolic equation, it was assumed (see [1]) that
T = 1 A 2   M s M s ρ s 2   c 2 = 0 δ = S 2 C L = 0
which triggers a change of α and β (see Equation (27))     α and β .
In the case of parabolic equation, it was assumed (see [1]) that
T = S = 0 and   ( ω * ) 2 = ( ω ω G ) 2 = 0
which triggers a change of α and β   (see Equation (27))     α and β .
A Bode plot is a standard format for plotting frequency response of linear time-invariant systems. Bode Plot deals with the frequency response of a system simultaneously in terms of magnitude and phase. Such plots are useful among others for system identification from the frequency response. Plotting the two lines, i.e., one for amplitude changes, the other for phase shift, we can determine the change of the input signal frequency, amplitude, and phase shift between the input and output signal in certain conditions.
In Figure 1, Figure 2, Figure 3 and Figure 4, logarithmic amplitude and logarithmic phase characteristics of spectral transmittances for the hyperbolic and parabolic models are presented.
The following are the Bode plots of transfer function Equation (47) for a pipeline with D = 0.7 m, D = 1.0 m, and L = 50 km assuming different values of mass flow rate.
(a) For L = 50 km, D = 0.7 m, and mass flow = 60 kg/s:
Hyperbolic model:
H 1 ( s ) = 1.016 13554.98 s 2 + 169.86 s + 1
Parabolic model:
  H 1 ( s ) = 1.016 4607 s 2 + 169.86 s + 1
(b) For L = 50 km, D = 0.7 m, and mass flow = 120 kg/s:
Hyperbolic model:
  H 1 ( s ) = 1.08 32540   s 2 + 386.1   s + 1
Parabolic model:
H 1 ( s ) = 1.08 23410 s 2 + 386.1 s + 1
(c) For L = 50 km, D = 1.0 m, and mass flow = 120 kg/s:
Hyperbolic model:
H 1 ( s ) = 1.01 10980 s 2 + 114.2 s + 1
Parabolic model:
H 1 ( s ) = 1.01 2049 s 2 + 114.2 s + 1
(d) For L = 50 km, D = 1.0 m, and mass flow = 240 kg/s:
Hyperbolic model:
H 1 ( s ) = 1.048 18560 s 2 + 247.3 s + 1
Parabolic model:
H 1 ( s ) = 1.048 9514 s 2 + 114.2 s + 1
The parabolic model is plotted in red, while the hyperbolic model—in blue.
The graphs show that for very low frequencies of the input signal, for both models, practically no change in the amplitude is observed. The higher the frequency growth, the more the input signal is suppressed. In the phase graphs, it can be observed that the delay of input signal grows as frequency increases.
Comparing the hyperbolic and parabolic models, it can be noted that for low frequencies and high flow rates (large diameters), the differences between models are quite insignificant.
Significant differences between models can be observed in the case of smaller diameters (lower flow rates) and higher frequencies. The greater the flow rates and the lower the frequencies of input signal change, the less significant the differences between the models. The simpler parabolic model seems to be sufficiently accurate to be applied.

6. Time Response Analysis

The standard test signal is used to know the performance of the hyperbolic and parabolic models using time response of the output. The inverse Laplace transform can be described as the transformation into a function of time. In the Laplace inverse formula, X(s) is the transform of x(t). The solution to the following differential equation, which involves finding a real variable function x ( t ) at given function X ( s ) ,
X ( s ) = { x ( t ) } = 0 x ( t ) e st dt .
is known as the Riemann–Melinn formula:
x ( t ) = 1 { X ( s ) } = 1 2 π j c j c + j X ( s ) e st ds .
In the case under consideration, the residue method [28] was used to determine the inverse transform.
In results of transformations, the following was obtained:
(a) For L = 50 km, D = 0.7 m, and mass flow = 60 kg/s:
Hyperbolic model:
H 1 ( t ) = 0.0127 · sin ( 0.0059 t ) · e ( 0.0063 ) t
Parabolic model:
H 1 ( t ) = 0.02 · sin h ( 0.01 t ) · e ( 0.0184 ) t
(b) For L = 50 km, D = 0.7 m, and mass flow = 120 kg/s:
Hyperbolic model:
H 1 ( t ) = 0.0157 · sin h ( 0.0021 t )   · e ( 0.0059 ) t
Parabolic model:
H 1 ( t ) = 0.02 · sin h ( 0.01 t ) · e ( 0.0184 ) t
The results of the step change of the hyperbolic and parabolic model (Equations (61)–(64)) are presented below. Changes of output signal values p 2 ( t ) were determined, provided the input signal p 1 ( t ) has a form of a unit step:
p 1 ( t ) = {   5   MPa , if   t   > 0 , 0   MPa ,   if   t     0

The Parabolic Model Is Plotted in Red, While the Hyperbolic Model—In Blue

Analysis of the step change for the hyperbolic and the parabolic model shows that the parabolic model achieves a new steady state faster if the flow rates are lower. As the mass flow rate grows (diameter increases) and gas mass stored in the pipeline is bigger, the differences between the models become negligible Figure 5, Figure 6, Figure 7 and Figure 8.

7. State-Space Model

The state-space representation provides a convenient and compact way to model and analyze systems with multiple inputs and outputs. Unlike the frequency domain approach, the use of the state-space representation is not limited to systems with linear components and zero initial conditions. The transfer functions are used to derive the state space for transient analysis. With different input/output couples, different state-space models are derived. Equation (64) is the state-space model with specified inputs, i.e., the gas pressure at inlet ( p 1 ) and the mass flow rate at the outlet ( M 2 ), and two outputs, i.e., the pressure at the outlet ( p 2 ) and the gas mass flow rate at the inlet ( M 1 ).
x _ ˙ ( t ) =   A _   x _ ( t ) +   B _   u _ ( t )   y _ ( t ) =   C _   x _ ( t ) +   D _   u _ ( t )
where
u _ = [ p 1 ,   M 2 ] ,   y _ = [ p 2 , M 1 ] A _ = [ a 1 a 2 1 0 0 1 a ˜ 2 0 0 0 0 0 a 1 a 2 1 0 0 1 a = 2 0 ] B _ = [ 0 k 2 b 1 a 2 k 1 a ˜ 2 k 2 a 2 c 1 a 2 0 0 1 a = 2 ] C _ = [ 1 0 0 0 0 0 1 0 ] D _ = [ 0 0 0 0 ] .
Tests were carried out for the parabolic and hyperbolic model, assuming the following boundary conditions:
  • For x = 0 , p 1 = 5 MPa.
  • For x = L load set in the form of mass flow:   M 2 = M 0 + A · sin ( ω t ) , where M 0 = 60 kg s   and   120 kg s .
The test was performed for a pipeline of 50 km in length and a diameter of 0.7 m and 1.0 m.
Changes in the value of pressure at the end of the gas pipeline for both models are shown in Figure 9, Figure 10, Figure 11 and Figure 12.
The parabolic model is plotted in red, while the hyperbolic model—in blue.
Comparing the changes of pressure for both models, as shown in Figure 9, Figure 10, Figure 11 and Figure 12, it can be easily observed that the differences between the models diminish substantially as the flow rate in the gas pipeline (gas mass stored in the pipeline) increases.

8. Conclusions

The goal of the research was a comparative analysis of the hyperbolic and parabolic models simplified to the form of transmittance (lumped models). In certain situations, lumped models are used in hydraulic calculations of gas networks for the purposes of simulation and for optimization. They enable the creation of relatively simple calculation algorithms. The comparative analysis of the parabolic and hyperbolic models was carried out for different states of the pipeline (accumulation capacity) using frequency characteristics, time response analysis, and boundary conditions. The tests have shown that regardless of the degree of model simplification in the case of gas transmission pipelines of large accumulation capacity, high flow rates, and loads smoothly changing in time, the parabolic model is sufficiently accurate to describe the gas pipeline state. In the case of abrupt load changes, lower flow rates, and smaller accumulation capacity, the hyperbolic model will describe the changes of the gas pipeline parameters more accurately.

Author Contributions

Conceptualization, A.J.O.; methodology, A.J.O. and M.G.; software, M.G.; validation, A.J.O. and M.G.; formal analysis, A.J.O. and M.G.; investigation, A.J.O. and M.G.; writing—original draft preparation, A.J.O. and M.G.; writing—review and editing, A.J.O.; visualization, M.G.; supervision, A.J.O. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

No applicable.

Informed Consent Statement

No applicable.

Data Availability Statement

No applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Weiman, A. Gas Distribution Network Dynamic Modeling and Simulation with Respect to Network Control and Monitoring; The Technical University of Munich: Munich, Germany, 1978. [Google Scholar]
  2. Kralik, J.; Stiegler, P.; Vostry, Z.; Zavorka, J. Dynamic Modeling of Large Scale Networks with Application to Gas Distribution; Academia Praha: Pague, Czech Republic, 1988. [Google Scholar]
  3. Osiadacz, A.J. Simulation and Analysis of Gas Networks; Gulf Publishing Company: London, UK, 1987. [Google Scholar]
  4. Yue, Q.; Sara, G.; Martin, S.; Peter, B. Efficient Numerical Methods for Gas Network Modeling and Simulation; Networks and Heterogeneous Media: Berlin, Germany, 2020. [Google Scholar]
  5. Alamian, R.; Behbahani-Nejad, M.; Ghanbarzadeh, A. A state space model for transient flow simulation in natural gas pipelnies. J. Nat. Gas Sci. Eng. 2012, 9, 51–59. [Google Scholar] [CrossRef]
  6. Gugat, M.; Herty, M. Modeling, Control and Numerics of Gas Networks. arXiv 2020, arXiv:2010:02743. [Google Scholar]
  7. Wang, P.; Yu, B.; Deng, Y.; Zao, Y. Comparison study on the accuracy and efficiency of the four forms of hydraulic equation of a natural gas pipeline based on linearized solution. J. Nat. Gas Sci. Eng. 2015, 22, 235–244. [Google Scholar] [CrossRef]
  8. Huck, C.; Tischendorf, C. Transient modeling and simulation of gas pipe networks with characteristic diagram models for compressors. Proc. Appl. Math. Mech. 2017, 17, 707–708. [Google Scholar] [CrossRef]
  9. Wang, P.; Yu, B.; Han, D.; Sun, D.; Xiang, Y. Fast method for the hydraulic simulation of natural gas pipeline networks based on the divide and conquer approach. J. Nat. Gas Sci. Eng. 2018, 50, 55–63. [Google Scholar] [CrossRef]
  10. Wylie, E.B.; Stoner, M.A.; Streeter, V.L. Network System Transient Calculations by Implicit Method. Soc. Pet. Eng. J. 1971, 11, 356–362. [Google Scholar] [CrossRef]
  11. Kiuchi, T. An implicite method for transient gas flows in pipe networks. Int. J. Heat Fluid Flow 1994, 15, 378–383. [Google Scholar] [CrossRef]
  12. Greyvenstein, G.P. An implicit method for the analysis of transient flows in pipe networks. Int. J. Numer. Methods Eng. 2002, 53, 1127–1143. [Google Scholar] [CrossRef]
  13. Matko, D.; Geiger, G.; Gregoritza, W. Verification of various pipeline models. Math. Comput. Simul. 2000, 53, 303–308. [Google Scholar] [CrossRef]
  14. Yaacob, Z. Modelling and Simulation of Transient Gas Flow; Internal Report; Centre for Natural Gas Engineering, University of Salford: Salford, UK, 1996. [Google Scholar]
  15. Luongo, G.A. An efficient program for transient flow simulation in natural gas pipelines. In Proceedings of the PSIG—Annual Meeting, New Orleans, LA, USA, 30–31 October 1986. [Google Scholar]
  16. Santos, M.F. Analysis of Transient Flow in Natural Gas Transmission Network. Available online: https://fenix.tecnico.ulisboa.pl (accessed on 4 November 2021).
  17. Herran-Gonzales, A.; De La Cruz, J.M.; De Andres-Toro, B.; Risco-Martin, J.L. Modeling and simulation of a gas distribution pipeline network. Appl. Math. Model. 2009, 33, 1584–1600. [Google Scholar] [CrossRef]
  18. Hofsten, K. Model-Based Dynamic Control and Optimization of Gas Networks. Ph.D. Thesis, NTNU Trondhein, Trondheim, Norway, 2001. [Google Scholar]
  19. Goldwater, M.H.; Fincham, A.E. Modelling and Dynamical Systems; Peter Peregrinus: Stevenage, UK, 1981. [Google Scholar]
  20. Osiadacz, A.J. Numerical analysis of a method of transient simulation of gas networks. Int. J. Syst. Sci. 1990, 21, 961–975. [Google Scholar] [CrossRef]
  21. Zlotnik, A.; Chertkov, M.; Backhaus, S. Optimal Control of Transient Flow in Natural Gas Networks. In Proceedings of the 54th IEEE Conference on Decision and Control (CDC), Osaka, Japan, 15–18 December 2015. [Google Scholar]
  22. Kralik, J.; Stiegler, P.; Vostry, Z.; Zaworka, J. Modeling the dynamics of flow in gas pipelines. IEEE Trans. Syst. Man Cybern. 1984, SMC-14, 586–596. [Google Scholar] [CrossRef]
  23. Matko, D.; Geiger, G.; Werner, T. Modelling of the Pipeline as a Lumped Parameter System. Automatica 2001, 42, 177–178. [Google Scholar]
  24. Behbahani-Nejad, M.; Bagheri, A. The accuracy and efficiency of a MATLAB-Simulink library for transient flow simulation of gas pipelines and networks. J. Pet. Sci. Eng. 2010, 70, 256–265. [Google Scholar] [CrossRef]
  25. Aalto, H. Transfer Functions for Natural Gas Pipeline Systems. In Proceedings of the 17th World Congress The International Federation of Automatic Control, Seoul, Korea, 6–11 July 2008. [Google Scholar]
  26. Wen, K.; Xia, Z.; Yu, W.; Gong, J. A New Lumped Parameter Model for Natural Gas Pipelines in State Space. Energy 2018, 11, 1971. [Google Scholar] [CrossRef] [Green Version]
  27. Ogata, K. System Dynamics; Prentice Hall: New York, NY, USA, 2004. [Google Scholar]
  28. Cohen, A.M. Numerical Methods for Laplace Transform Inversion; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
Figure 1. Length = 50 km, diameter = 0.7 m, mass flow = 60 kg/s, T ( 0.5   h ; 24   h ) .
Figure 1. Length = 50 km, diameter = 0.7 m, mass flow = 60 kg/s, T ( 0.5   h ; 24   h ) .
Energies 15 00478 g001
Figure 2. Length = 50 km, diameter = 0.7 m, mass flow = 120 kg/s, T ( 0.5   h ; 24   h ) .
Figure 2. Length = 50 km, diameter = 0.7 m, mass flow = 120 kg/s, T ( 0.5   h ; 24   h ) .
Energies 15 00478 g002
Figure 3. Length = 50 km, diameter = 1 m, mass flow = 120 kg/s, T ( 0.5   h ; 24   h ) .
Figure 3. Length = 50 km, diameter = 1 m, mass flow = 120 kg/s, T ( 0.5   h ; 24   h ) .
Energies 15 00478 g003
Figure 4. Length = 50 km, diameter = 1 m, mass flow = 240 kg/s, T ( 0.5   h ; 24   h ) .
Figure 4. Length = 50 km, diameter = 1 m, mass flow = 240 kg/s, T ( 0.5   h ; 24   h ) .
Energies 15 00478 g004
Figure 5. Length = 50 km, diameter = 0.7 m, mass flow = 60 kg/s.
Figure 5. Length = 50 km, diameter = 0.7 m, mass flow = 60 kg/s.
Energies 15 00478 g005
Figure 6. Length = 50 km, diameter = 0.7 m, mass flow = 120 kg/s.
Figure 6. Length = 50 km, diameter = 0.7 m, mass flow = 120 kg/s.
Energies 15 00478 g006
Figure 7. Length = 50 km, diameter = 1 m, mass flow = 120 kg/s.
Figure 7. Length = 50 km, diameter = 1 m, mass flow = 120 kg/s.
Energies 15 00478 g007
Figure 8. Length = 50 km, diameter = 1 m, mass flow = 120 kg/s.
Figure 8. Length = 50 km, diameter = 1 m, mass flow = 120 kg/s.
Energies 15 00478 g008
Figure 9. Length = 50 km, diameter = 0.7 m, mass flow = 60 kg/s.
Figure 9. Length = 50 km, diameter = 0.7 m, mass flow = 60 kg/s.
Energies 15 00478 g009
Figure 10. Length = 50 km, diameter = 0.7 m, mass flow = 120 kg/s.
Figure 10. Length = 50 km, diameter = 0.7 m, mass flow = 120 kg/s.
Energies 15 00478 g010
Figure 11. Length = 50 km, diameter = 1.0 m, mass flow = 120 kg/s.
Figure 11. Length = 50 km, diameter = 1.0 m, mass flow = 120 kg/s.
Energies 15 00478 g011
Figure 12. Length = 50 km, diameter = 1.0 m, mass flow = 240 kg/s.
Figure 12. Length = 50 km, diameter = 1.0 m, mass flow = 240 kg/s.
Energies 15 00478 g012
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Osiadacz, A.J.; Gburzyńska, M. Selected Mathematical Models Describing Flow in Gas Pipelines. Energies 2022, 15, 478. https://doi.org/10.3390/en15020478

AMA Style

Osiadacz AJ, Gburzyńska M. Selected Mathematical Models Describing Flow in Gas Pipelines. Energies. 2022; 15(2):478. https://doi.org/10.3390/en15020478

Chicago/Turabian Style

Osiadacz, Andrzej J., and Marta Gburzyńska. 2022. "Selected Mathematical Models Describing Flow in Gas Pipelines" Energies 15, no. 2: 478. https://doi.org/10.3390/en15020478

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop