Escolar Documentos
Profissional Documentos
Cultura Documentos
Informationstechnik GmbH
D-45024 Essen
Phone +49 2 01 17 03 8 - 0
Fax +49 2 01 17 03 8 - 30
E-mail postmaster@liwacom.de
SIMONE SOFTWARE
Copyright 2004 LIWACOM Informationstechnik GmbH and SIMONE Research Group s.r.o.
All rights reserved
Contents
1 INTRODUCTION .......................................................................................................................... 5
2 UNITS ........................................................................................................................................... 6
2.1 GAUGE PRESSURE FOR LOW-PRESSURE NETWORKS ......................................................................... 6
3 FLOW EQUATIONS..................................................................................................................... 7
3.1 CONTINUITY EQUATION .................................................................................................................... 7
3.2 MOMENTUM EQUATION .................................................................................................................... 7
3.3 FRICTION FACTOR ........................................................................................................................... 8
3.3.1 Hofer formula .................................................................................................................................. 8
3.3.2 Nikuradze formula .......................................................................................................................... 8
3.3.3 PMT-1025 formula.......................................................................................................................... 8
3.3.4 Pipe efficiency................................................................................................................................. 9
3.3.5 Comparison of Hofer and Nikuradze formulae ............................................................................. 11
4 EQUATION OF STATE FOR REAL GAS.................................................................................. 15
4.1 AGA (AMERICAN GAS ASSOCIATION)............................................................................................. 16
4.2 PAPAY FORMULA ........................................................................................................................... 16
4.3 REDLICH-KWONG EQUATION .......................................................................................................... 16
4.4 BWR EQUATION ........................................................................................................................... 17
4.4.1 Simple fluid approach ................................................................................................................... 17
4.4.2 Full mixing rules............................................................................................................................ 19
4.5 AGA8 DC92 EQUATION ................................................................................................................ 19
4.6 THERMODYNAMIC PROPERTIES OF REAL GAS .................................................................................. 20
4.6.1 Specific heat ................................................................................................................................. 20
4.6.2 Isentropic exponent ...................................................................................................................... 21
4.6.3 Joule-Thomson coefficient............................................................................................................ 21
4.7 CALCULATION OF GAS PROPERTIES USING GAS COMPOSITION .......................................................... 22
4.7.1 Calculation of relative density and volumetric heating value using gas composition................... 23
4.7.2 Conversion of molar to volumetric fractions and vice versa......................................................... 24
5 QUALITY TRACKING ................................................................................................................ 25
5.1 SOLUTION PROCEDURE ................................................................................................................. 25
5.2 QUALITY PARAMETERS .................................................................................................................. 25
5.3 MIXING RULES ............................................................................................................................... 26
6 HEAT DYNAMICS...................................................................................................................... 28
6.1 DIFFERENTIAL EQUATIONS............................................................................................................. 28
6.2 HEAT TRANSFER COEFFICIENT IN SIMONE.................................................................................... 29
6.3 SUPPRESSING THE JOULE-THOMSON EFFECT FOR PIPES ................................................................. 31
7 COMPRESSOR STATIONS....................................................................................................... 32
7.1 BASIC THERMODYNAMICS RELATIONS ............................................................................................. 32
7.1.1 Pressure ratio ............................................................................................................................... 32
7.1.2 Adiabatic head .............................................................................................................................. 32
7.1.3 Adiabatic efficiency....................................................................................................................... 32
7.1.4 Shaft power................................................................................................................................... 32
7.1.5 Discharge temperature ................................................................................................................. 33
7.1.6 Isentropic exponent ...................................................................................................................... 34
7.1.7 Volumetric flow rate ...................................................................................................................... 34
7.2 CENTRIFUGAL COMPRESSOR ......................................................................................................... 35
7.3 RECIPROCATING COMPRESSOR ...................................................................................................... 35
7.4 GAS TURBINE ................................................................................................................................ 36
7.5 GAS ENGINE ................................................................................................................................. 36
7.6 ELECTRO DRIVE ............................................................................................................................ 37
7.7 STEAM DRIVE (COMBINED CYCLE)................................................................................................... 37
7.8 GAS COOLER ................................................................................................................................ 38
7.9 LOCAL PRESSURE LOSS ................................................................................................................. 38
8 CONTROLLED VALVES ........................................................................................................... 40
8.1 PREHEATING POWER ..................................................................................................................... 40
8.2 VALVES WITH CHARACTERISTIC ...................................................................................................... 40
8.2.1 Characteristic A (Mokveld) ........................................................................................................... 41
8.2.2 Characteristic B (Argus) ............................................................................................................... 42
8.3 LOCAL PRESSURE LOSS ................................................................................................................. 42
9 RESISTOR.................................................................................................................................. 44
10 STATE RECONSTRUCTION ..................................................................................................... 45
10.1 STATE RECONSTRUCTION IN SIMONE........................................................................................ 45
10.2 OUTLYING MEASURED DATA ...................................................................................................... 46
10.3 STATE RECONSTRUCTION PARAMETERS ..................................................................................... 47
10.4 TOOLS FOR SCANNING STATE RECONSTRUCTION ....................................................................... 47
10.5 METERING STATION ................................................................................................................... 48
11 STEADY-STATE OPTIMIZATION ............................................................................................. 49
11.1 OBJECTIVE FUNCTION................................................................................................................ 49
11.2 CONSTRAINTS ........................................................................................................................... 49
11.3 SIMONE METHOD OF STEADY-STATE OPTIMIZATION ................................................................. 49
12 HYDRATE FORMATION RISK ANALYSIS............................................................................... 51
12.1 EQUILIBRIUM CONDITION ............................................................................................................ 51
12.2 WATER DEW POINT .................................................................................................................... 51
12.2.1 Bukacek approximation .............................................................................................................. 52
12.3 HYDRATE EQUILIBRIUM .............................................................................................................. 52
12.3.1 Motiee approximation ................................................................................................................. 52
12.3.2 Carson-Katz method................................................................................................................... 53
12.3.3 Ponomarev approximation.......................................................................................................... 53
12.3.4 Remarks on accuracy and choice of models.............................................................................. 54
12.4 EFFECT OF INHIBITORS .............................................................................................................. 57
12.5 RISK INDICATORS ...................................................................................................................... 58
Introduction -5-
1 Introduction
This document outlines the basic equations and methods being used in SIMONE to model the
behavior of gas, flows, and equipment in a pipeline system.
2 Units
p l = p − p air (h )
Here
pl Local overpressure [kPah]
p Absolute gas pressure [kPa]
p air (h ) Local air pressure (absolute) [kPa]
depending on elevation
h Elevation [m]
The elevation change of air pressure is derived from the barometric equation using the definition of
International Standard Atmosphere:
gh
p air (h ) = p 0 ⋅ exp −
R T
air 0
3 Flow equations
The simulation of dynamic processes in gas transport and distribution is based on the non-linear
partial differential equations describing the dynamics – i.e. the continuity equation and the momentum
equation.
For a more sophisticated and detailed description of the heat dynamics processes running with the
gas flow, another partial differential equation must be linked to those mentioned above – see sections
5 and 6.
The unit hydraulic resistance in a pipeline with a circular cross section is described by the Darcy-
Weisbach equation
λ | w| w
fR = ρ
2D
Here
λ Friction factor [1]
w Flow velocity [m.s-1]
ρ Gas density [kg.m-3]
D Pipe internal diameter [m]
Here
k Pipe equivalent roughness [m]
D Pipe internal diameter [m]
Re Reynolds number [1]
Here
D Pipe internal diameter [m]
w Flow velocity [m.s-1]
ν Gas kinematic viscosity [m2 s-1]
M Mass flow rate [kg.s-1]
µ Gas dynamic viscosity [kg m-1 s-1]
The value of dynamic viscosity for natural gas is approximately 10-5 kg.m-1.s-1.
The pipe efficiency η pipe is usually introduced as correction factor to 1 λ in the momentum or
Darcy-Weisbach equations, i.e. the friction term becomes
λ | w| w
fR = ρ
η pipe
2
2D
There is a simple and straightforward link between flow rate and pipe efficiency for steady flow: If one
assumes a pipe efficiency of 0.99 instead of 1.00, the flow rate for constant pressure drop is also
reduced to 0.99 of its original value.
The pipe efficiency can be altered by setting the CORLAM scenario parameter for a subsystem or an
individual pipe element (the default value is 1).
Hofer - Nikuradze
0.05
D/k=60
0.04 120
250
0.03 500
λ
1000
0.02 2500
5000
0.01 10000
100000
0
1.00E+06 1.00E+07 1.00E+08 1.00E+09
Re
Percentage differences between Hofer and Nikuradze formulae are depicted in the next figure:
10
9
8
7 D/k=100000
6 10000
5
%
5000
4 2500
3 1000
2
500
1
0
1.00E+06 1.00E+07 1.00E+08 1.00E+09
Re
To get rough figures about flow rate and Reynolds number see the following graph (drawn for natural
gas of normal density 0.73 kg/m3, i.e., relative density 0.565):
10000
D=1400 mm
1200 mm
1000 900 mm
500 mm
300 mm
100
10
1.00E+06 1.00E+07 1.00E+08 1.00E+09
Re
For D=1000 mm, k=0.01 mm, and a usual load of about 106 m3/h results Re=2.4×107 and therefore
the non-negligible difference between Hofer and Nikuradze can be seen!
p = ρ RTz
Here
p Pressure [Pa]
ρ Gas density [kg.m-3]
R Gas constant [J.kg-1.K-1]
T Absolute temperature [K]
z Compressibility factor [1]
The gas constant is related to the molar weight or relative density (specific gravity) of the gas
~
R
R=
M
ρ0 z air , 0 Rair z air , 0 M
r= = =
ρ air , 0 z0 R z 0 M air
Here
~ Universal gas constant [J.kmol-1.K-1]
R
M Molar weight [kg.kmol-1]
r Gas relative density [1]
ρ Density [kg.m-3]
z Compressibility factor [1]
Subscript 0 Used for standard condition (101.325 kPa and 0, 15 or 20ºC)
Subscript air Used for air
The non-ideal behavior of the gas is expressed by the compressibility coefficient z . The
compressibility coefficient is a function of pressure, temperature and gas composition. The following
choices are available in SIMONE:
Here
p
pr = Dimensionless reduced pressure [1]
pc
T Dimensionless reduced
Tr = [1]
Tc temperature
N
p c = ∑ x i p c ,i Pseudo critical pressure of the gas
[Pa]
mixture
i =1
N
Tc = ∑ xi Tc ,i Pseudo critical temperature of the
[K]
gas mixture
i =1
z = z ( p r , Tr , ω )
Here
N
ω = ∑ xiω i Acentric factor of gas mixture [1]
i =1
The following equations of state are currently available in SIMONE (being selected by the ZET
scenario parameter):
• AGA formula
• Papay formula (default)
• Redlich-Kwong equation
• BWR in simplified form (Fasold et al.)
• BWR
• AGA8 DC92 (ISO 12213-2)
For natural gases, this relationship is adequate for pressures up to 150 bars.
Here
p Pressure [Pa]
T Temperature [K]
~ Universal gas constant [J.mol-1.K-1]
R
~ Molar volume of gas [m3.mol-1]
V
~
R 2Tc2.5
a = Ωa
pc
~
R Tc
b = Ωb
pc
1
Ωa =
9 2 −1
1/ 3
( )
2 1/ 3
−1
Ωa =
3
Stands for pseudo
c critical values of gas
mixture
For pure gases, the Redlich-Kwong equation is the most precise 2-constant equation of state.
Redlich-Kwong equation is currently used in simplified form with the simple definition of pseudo critical
pressure and temperature:
N
p c = ∑ x i p c ,i
i =1
N
Tc = ∑ xi Tc ,i
i =1
The precise more complex mixing rules or other modifications of Redlich-Kwong equation can be
implemented if required..
cρ~ 3
~ ~ C ~
( ) (
p = R Tρ~ + B0 R T − A0 − 0 ρ~ 2 − bR T − a ρ~ 3 + aαρ~ 6 + 2 1 + γρ~ 2 exp − γρ~ 2
T T
) ( )
Here
p Pressure [atm]
T Temperature [K]
~ Universal gas constant [atm.dm3 mol-1.K-1]
R
ρ~ Molar density of gas [mol.dm-3]
A0 , B0 , C 0 , BWR equation constants
(traditional units)
a , b , c ,α , γ
~
Tc2 R 2
A0 = A0′ A0′ = −0.06000000α c + 0.6900000
pc
~
Tc R
B0 = B0′ B0′ = 0.00797872α c + 0.0781383
pc
~
Tc4 R 2
C 0 = C 0′ C 0′ = 0.02000000α c + 0.0340000
pc
~
Tc3 R 3
a = a′ 2 a ′ = 0.04083330α c − 0.2128330
pc
~
Tc2 R 2
b = b′ a ′ = 0.01700000α c − 0.0706000
p c2
~
Tc5 R 3
c = c′ 2 a ′ = 0.02400000α c − 0.0980000
pc
~
Tc3 R 3
α =α′ 3 α ′ = −0.00183333α c + 0.0138333
pc
~
Tc2 R 2
γ =γ′ 2 γ ′ = −0.01400000α c + 0.1332000
pc
N
p c = ∑ x i p c ,i Pseudo critical pressure of gas mixture [atm]
i =1
N
Tc = ∑ xi Tc ,i Pseudo critical temperature of gas mixture [K]
i =1
N
α c = ∑ x iα c , i Critical Riedel factor for gas mixture [1]
i =1
The Critical Riedel factor is calculated using the acentric factor by equation of Edmister
α c = 5.7839 + 4.8763ω
2
N
C 0 = ∑ x i C 0 ,i
i =1
3
N
a = ∑ xi 3 ai
i =1
3
N
b = ∑ xi 3 bi
i =1
3
N
c = ∑ xi 3 ci
i =1
3
N
α = ∑ xi 3 α i
i =1
2
N
γ = ∑ xi γ i
i =1
Here
x1 K x N Molar fractions of gas components [1]
Subscript i Stands for BWR equation constants for component i
The constants of the BWR equation for the basic 21 gas components listed in ISO 12213 are
predefined in SIMONE. The user has the possibility to add new gas components and enter the
constants for it.
( ) ( )
18 58
z = 1 + Bρ~ − ρ r ∑ C n∗ + ∑ C n∗ bn − c n k n ρ rkn ρ rbn exp − c n ρ rkn
n =13 n =13
Here
z Compressibility factor [1]
B Second virial coefficient (function of [dm3.mol-1]
Here
K3 Mixture size parameter [dm3.mol-1]
(function of composition)
Here
c~p Molar specific heat (for [J.mol-1.K-1]
constant pressure)
c~p0 (T ) Molar specific heat of [J.mol-1.K-1]
ideal gas
∆c~p ( p, T , x1 , K , x N ) Correction to real gas [J.mol-1.K-1]
behavior
The ideal gas specific heat is a function of temperature and in SIMONE is approximated by a second-
order parabola:
c~p0 (T ) = A + B ⋅ T + C ⋅ T 2
For a gas mixture the coefficients are simply mixed from pure component values
A N Ai
B = ∑ xi Bi
C i =1 C
i
Here
x1 K x N Molar fractions of gas components
Subscript i Stands for mixture component i
~ ∂z dp
p
2 ∂ z
2
~
∆c p = − R ∫ 2T + T 2
∂T p
0 ∂T p p
Here
~ Universal gas constant [J.mol-1.K-1]
R
z Compressibility factor [1]
Here
p Pressure [Pa]
~ Molar volume [m3.mol-1]
V
S Entropy [J.mol-1.K-1]
z Compressibility factor [1]
∂z Dimensionless derivative of [1]
Z p = z − p compressibility factor
∂p T , x1Kx N
∂z Dimensionless derivative of [1]
ZT = z + T compressibility factor
∂T p , x1Kx N
~ Universal gas constant [J.mol-1.K-1]
R
c~
p
Molar specific heat of real [J.mol-1.K-1]
gas (for constant pressure)
~
T R
µ JT = (Z T − z )
p c~p
Here
µ JT Joule-Thomson coefficient [K.Pa-1]
p Pressure [Pa]
T Temperature [K]
H Enthalpy [J.mol-1.K-1]
z Compressibility factor [1]
∂z Dimensionless derivative of [1]
ZT = z + T compressibility factor
∂T p , x1Kx N
~ Universal gas constant [J.mol-1.K-1]
R
c~p
Molar specific heat of real [J.mol-1.K-1]
gas (for constant pressure)
The integral Joule-Thomson effect, i.e. the temperature change caused by pressure drop during the
isenthalpic process, can be described by the initial-value problem
T ( p1 ) = T1
dT
= µ JT ( p, T )
dp
T2 = T ( p 2 )
Here
p1 Starting pressure [Pa]
T1 Starting temperature [K]
p2 Final pressure [Pa]
T ( p) Solution of the initial-value problem
T2 Final temperature [K]
Here
z air ,0 Compressibility factor of air at standard condition [1]
z air ( p0 , 0°C ) = 0.99941
z air ( p0 , 15°C ) = 0.99958
z air ( p0 , 20°C ) = 0.99963
p0 = 101.325 kPa
M air Molar weight of air [kg.kmol-1]
M air = 28.9626 kg.kmol-1
z0 Compressibility factor of gas at standard condition [1]
M Molar mass of gas mixture [kg.kmol-1]
N
M = ∑ xi M i
i =1
The Molar gas heating value is the amount of heat released by burning 1 kmol of gas at constant
pressure p0 = 101.325 kPa while the temperature of gas and air before combustion and the
temperature of the combustion products are the same:
~
H U [TH ] [MJ.kmol-1]
TH Temperature of combustion products (0, 15, 20 or 25oC)
SIMONE uses the upper (superior) heating value (i.e. all water in combustion products is assumed to
condense) at the temperature TH = 25°C .
The molar heating value for a gas mixture is given by the simple weighted sum of molar heating
values of individual mixture components:
N
~ ~
H U = ∑ xi H U ,i
i =1
The volumetric heating value is the amount of heat released by burning 1 m3 std. of gas at constant
pressure p0 = 101.325 kPa (while the temperature of gas and air before combustion and the
temperature of combustion products are the same):
The relation of molar and volumetric heating value is given by the formula
~
H U [TH ] p0
H U [TH , T0 ] = ~
z 0 R T0
For the above listed conversion formulae, the compressibility factor of gas at standard condition z 0 is
necessary.
For known composition of gas mixture, the compressibility factor at standard condition can be
calculated by the ISO 6976 formula
2
N
z 0 = 1 − ∑ xi bi
i =1
bi Summation factor for component i [1]
~
The data for individual components (heating values H U ,i ; summation factors bi for 0, 15 and 20ºC)
are taken from ISO 6976:1995(E), Table 1-3.
x i z 0 ,i
yi = N
, i = 1, K , N
∑x
j =1
j z 0, j
Here
z 0,i Compressibility factor of component i at standard condition [1]
The values of z 0,i are taken from ISO 6976:1995(E), Table 2.
5 Quality Tracking
To describe the dynamics of particular components of a gas mixture within the pipeline system in an
exact way, the mathematical model must contain the mass balance equation for each component:
∂ mci ∂ρci
+S = 0, i = 1K N
∂x ∂t
Here
m Mass flow rate [kg.s-1]
S Pipe cross section [m2]
ρ Gas density [kg.m-3]
ci K c NMass fractions of gas components [1]
x Lengths coordinate [m]
t Time [s]
The momentum equation remains untouched.
Such partitioning corresponds to the quality tracking options being set for the individual network in the
network editor. The available options are:
• Uniform quality distribution – the network is filled by gas of one composition only.
• Gas properties tracking – various gases at individual supplies can enter the pipeline network.
To describe the gas behavior, only the set of gas physical properties is used and tracked over
the network. This implies that only 2- or 3-parametric equations of state can be used.
• Gas composition tracking – various gases at individual supplies can enter the pipeline network
and both gas physical properties and gas composition are tracked over the network.
(1)
(2)
(k)
The mixing of different gas streams is described by the following balance equations:
• Mass balance:
k
m = ∑ m( j)
j =1
• Molar balance (consider no chemical reactions):
m k
m( j)
= ∑ ( j)
M j =1 M
Here
m Mass flux [kg.s-1]
M Gas molar weight [kg.kmol-1]
Superscript ( j ) Gas stream j
Therefore the mixing rule for all gas quality parameters can be written in a compact form:
M M ( j)
~ ~
HU H U( j )
( j)
Tc Tc
( j)
pc pc
ω ω j )
A 1 k
m ( j ) A( j )
= k m( j ) ∑
j =1 M
( j) ( j)
B ∑ ( j) B
C j =1 M C ( j)
x1 x1( j )
M M
x x( j)
N N
ψ~ ψ~ ( j )
Here
M Molar mass of gas [kg.kmol-1]
~
HU Molar heating value of gas [MJ.kmol-1]
Tc Pseudo critical pressure of gas [K]
pc Pseudo critical temperature of gas [bar]
ω Acentric factor of gas [1]
A, B, C Coefficients of ideal gas specific heat expansion c~p0 (T ) = A + B ⋅ T + C ⋅ T 2
xi Molar fractions of mixture components [1]
ψ~ Any (user-defined) parameter per 1 kmol of gas [x.kmol-1]
6 Heat Dynamics
In the standard SIMONE package, heat dynamics are respected by calculating the temperature
changes in a pipeline behind a compressor station or pressure reducer using a fixed exponential
model. The temperature of each node can be entered individually for a particular time period.
In most situations, this concept is quite satisfactory. Nevertheless, there are occasions when the
description of heat dynamics is required – pipe sections downstream of compressor stations,
underwater lines, and long sections with high-pressure drop. In all of these cases, the omission of heat
balance results in a loss of accuracy.
Therefore the heat dynamics model is available in SIMONE.
∂T ∂T T ∂ z ∂ p T ∂ z ∂ p dh
S ρ cP + w − S 1 + − Sw + Swgρ + QE = 0
∂t ∂x z ∂ T p ∂t
z ∂T p ∂ x dx
Here
S Pipe cross section [m2]
ρ Gas density [kg.m-3]
cp Gas specific heat [J.kg-1.K-1]
The description of the heat flux Q E should describe the effect of the heat capacity of the pipe-
surrounding soil, e.g. if a gas that is cooler than the near soil enters the pipe, a heat flux back from soil
to gas occurs (until the near soil is cooled) and should be modeled properly.
The character of the dynamic processes in the pipe and the surrounding soil is „stiff” – it consists of a
quick component corresponding to the near soil and a very slow one corresponding to the remote
mass of soil. Therefore the process needs to be modeled by a minimum of two capacitors with
substantially different time constants:
d Ts1
C1 = α 1(T − Ts1 ) − α 2 (Ts1 − Ts 2 )
dT
dT
C 2 s 2 = α 2 (Ts1 − Ts 2 )− α 3 (Ts 2 − Tsoil )
dT
Here
T Gas temperature [K]
Ts1 Near soil temperature at the surface of first layer (capacitor) [K]
Tsoil Far soil temperature being not influenced by temperature changes of gas; this [K]
value is referred in SIMONE scenario as Ground Temperature (GT)
C1 Heat capacity of first layer (per unit of pipe length) [J.m-1.K-1]
C2 Heat capacity of second layer (per unit of pipe length) [J.m-1.K-1]
α1 Heat transfer coefficient through first layer (per unit of pipe length) [J.m-1.K-1.s-1]
α2 Heat transfer coefficient through second layer (per unit of pipe length) [J.m-1.K-1.s-1]
α3 Heat transfer coefficient between the surface of second layer and the surface [J.m-1.K-1.s-1]
of constant far soil (per unit of pipe length)
The heat flux Q E is then given by the first right-hand side term in the equation for the first layer
temperature:
QE = α 1(T − Ts1 )
Here
D Internal pipe diameter [m]
k Heat transfer coefficient between gas and far soil (per unit of internal pipe [J.m-2.K-1.s-1]
surface); this value is referred to in a SIMONE scenario as Heat Transfer
Coefficient (HTC)
SIMONE allows both models of axial heat dynamic to be used within scenarios:
• SIMPLE – only the steady-state heat flux between pipe and soil is used. This model is for use
in steady-state scenarios.
• FULL – the full axial dynamic is respected. However, the initial condition need to be carefully
prepared – the initial gas temperature distribution should correspond to a steady-state profile
in order to reasonably initialize the axial model.
Here
QE Heat flux from gas through the inner surface [J.s-1.m-1]
of pipe to the surrounding soil per unit of
length
D Internal pipe diameter [m]
T Gas temperature [K]
HTC Heat transfer coefficient between gas and [J.m-2.K-1.s-1]
far soil (per unit of internal pipe surface); this
value is referred to in a SIMONE scenario as
Heat Transfer Coefficient (HTC)
Tsoil Soil temperature being not influenced by [K]
temperature changes of gas; this value is
Let us suppose a cylindrical model of n layers of different materials where the last layer has a
constant temperature equal to Tsoil . The heat flow between gas and surrounding environment is then
described as
2π
QE = (T − Tsoil )
n
1 D
∑
i =1 λi
ln i +1
Di
Here
Di Diameter of layer i , for i = 1 it is internal diameter of tube [m]
Comparing both equations one obtains the equation for the Heat Transfer Coefficient
2
HTC = n
1 Di +1
D1 ∑ ln
i =1 λi Di
Due to the high conductivity and small thickness of the pipe wall the layer of pipe itself can be
neglected. A typical situation can be represented by two layers, bitumen and clay. Because λ for
bitumen is roughly the same as for wet clay only one layer is sufficient and the equation for HTC can
be rearranged as
2λ
HTC =
2ξ
D ln1 +
D
Here
ξ Thickness of the clay layer; at the outer surface of clay the temperature is assumed to be [m]
equal to Tsoil
To show how the thickness of the clay layer ξ and pipe diameter D influence the relation between
HTC and λ see the following picture. The typical values for λ are summarized below:
Material λ [W.m-1.K-1]
Concrete 1.28 – 1.5
Dry clay 0.14
Wet clay 0.65
Bitumen 0.6
HTC/lambda
5
HTC/lambda
0
200 400 600 800 1000 1200 1400
Diameter [mm]
If one rearranges the energy equation to point out the Joule-Thomson coefficient
∂T ∂T ∂p ∂p
+ w − S (1 + ρ c p µ JT )
dh
S ρ cP − Swρ c p µ JT + Swgρ + QE = 0
∂t ∂x ∂t ∂x dx
∂T ∂T ∂p dh
S ρ cP +w −S + Swgρ + QE = 0
∂t ∂x ∂t dx
7 Compressor Stations
Here
ε Pressure ratio [1]
pi Inlet (suction) pressure [Pa]
po Outlet (discharge) pressure [Pa]
κ κκ−1
H ad = RTi z i ε − 1
κ −1
Here
H ad Adiabatic head [kJ.kg-1]
κ Isentropic exponent (mean value) [1]
R Gas constant [J.kg-1.K-1]
Ti Inlet gas temperature [K]
z i = z ( pi , Ti ) Compressibility factor at inlet condition [1]
ε Pressure ratio [1]
Here
η ad Adiabatic efficiency [1]
H ad Adiabatic head [kJ.kg-1]
Hi Gas enthalpy at inlet condition [kJ.kg-1]
Ho Gas enthalpy at outlet condition [kJ.kg-1]
Here
m Mass flow rate [kg.s-1]
η ad Adiabatic efficiency [1]
H ad Adiabatic head [kJ.kg-1]
Hi Gas enthalpy at inlet condition [kJ.kg-1]
Ho Gas enthalpy at outlet condition [kJ.kg-1]
1. Compute the temperature change due to compression of ideal gas. The formula is selected
using the THETAEQ (Theta equation) scenario parameter:
• Basic (default) equation taking into account
κ −1
κη ad
Tx = Ti ε
• RG1991 (Fasold et al)
κκ−1
ε −1
Tx = Ti +1
η
ad
• Isentropic equation
κ −1
Tx = Ti ε κ
2. The temperature Tx obtained in previous step is corrected to the real gas behavior using
formula selected by the THETACOR (Theta correction) scenario parameter:
• Basic (default)
zi
To = Tx
z ( p o , Tx )
• RG1991 – iterate To starting form Tx (Fasold et al)
zi
To = Tx
z ( p o , To )
• No correction
To = Tx
Here
Ti Inlet gas temperature [K]
κ Isentropic exponent (mean value) [1]
ε Pressure ratio [1]
η ad Adiabatic efficiency [1]
Tx Ideal gas outlet temperature after compression [K]
z Compressibility factor [1]
To Outlet gas temperature [K]
1. Constant (default) – the isentropic exponent is assumed to be constant and equal to the value
being set in topoeditor
2. RG Equation – a temperature-dependent relation is used
k (T ) = 1.290 − 5.8824 × 10 −4 (T − 273.15)
Here
Ti + To
T= Mean gas temperature during compression [K]
2
3. Equation of state – the isentropic exponent is calculated from the currently used equation of
state
z
κ=
R
Z p − Z T2
cp
Here
z Compressibility factor [1]
∂z
Z p = z − p Dimensionless derivative of compressibility factor [1]
∂p T , x1Kx N
∂z
ZT = z + T Dimensionless derivative of compressibility factor [1]
∂T p , x1Kx N
R Gas constant [J.kg-1.K-1]
cp Real gas specific heat (for constant pressure) [J.kg-1.K-1]
Here
Qvol ,i Volumetric flow rate at inlet condition [m3.s-1]
m Mass flow rate [kg.s-1]
ρi Gas density at inlet condition [kg.m-3]
R Gas constant [J.kg-1.K-1]
Ti Inlet gas temperature [K]
a1 a4 a7 1
H ad (
= 1 n n a2 2
) a5 a8 Qvol ,i
a
3 a6 a9 Qvol
2
,i
b1 b4 b7 1
η ad (
= 1 n n b2 2
) b5 b8 Qvol ,i
b
3 b6 b9 Qvol
2
,i
Here
η ad Adiabatic efficiency [1]
H ad Adiabatic head [kJ.kg-1]
n Compressor revolutions (speed in r.p.m.) [min-1]
Qvol ,i Volumetric flow rate at inlet condition [m3.s-1]
a1 K a9 , b1 Kb9 Coefficients
Combining the above equations with the general formula for compressor shaft power, one obtains the
relation between adiabatic head and torque momentum:
VW
MT = H ad ρ i
2πη ad
Here
VW Working volume of compressor (per 1 shaft revolution) [m3]
η ad Adiabatic efficiency (assumed constant within the whole [1]
operation range of reciprocating compressor)
H ad Adiabatic head [kJ.kg-1]
ρi Gas density at inlet condition [kg.m-3]
Here
PF Fuel gas consumption in energy units [kWh.h-1]
PS Turbine performance [kW]
d1 K d 3 Coefficients
Here
Pmax Maximum engine performance [kW]
n Engine revolutions (speed in r.p.m.) [min-1]
c1 K c3 Coefficients
Here
PF Fuel gas consumption in energy units [kWh.h-1]
PE Engine performance [kW]
n Engine revolutions (speed in r.p.m.) [min-1]
d1 K d 3 Coefficients
Here
FFP Fuel gas consumption of primary gas turbine (sum for [kWh.h-1]
all primary turbines) in energy units
PSS Shaft power of secondary steam turbine [kW]
a1 K a3 , b1 Kb3 Coefficients
The gas velocity is calculated using the representative internal diameter of the compressor station D ,
entered in network element data:
4m
wi =
πD 2 ρ i
Here
m Mass flow rate through element [kg.s-1]
D Element diameter [m]
8 Controlled valves
T ( pi ) = Ti
dT
= µ JT ( p, T )
dp
To = T ( p o )
Here
pi Inlet pressure [Pa]
Ti Inlet temperature [K]
po Outlet pressure [Pa]
µ JT Joule-Thomson coefficient [K.bar-1]
T ( p ) Solution of the initial-value problem
To Outlet temperature [K]
c p ( p1,T 1 ) + c p ( p 2 ,T 2 )
P = m(T2 − T1 )
2
Here
P Preheating power [kW]
m Mass flow rate of gas [kg.s-1]
cp Gas specific heat [kJ.kg-1.K-1]
p Pressure [Pa]
T Temperature [K]
Subscript 1 Exchanger inlet condition
Subscript 2 Exchanger outlet condition
m = m( pi , p o , o,K)
Here
m Mass flow rate [kg.s-1]
pi Inlet pressure [Pa]
V0 = CV 0 CVR
(
241F1 p1 Y − 0.148Y 3 )
rT1 z1
1.63 p1 − p 2
Y = min1.5;
F1 p1
Here
V0 Volumetric flow rate at standard condition (101.325 kPa and 0ºC) [m3.h-1]
CV 0 Sizing coefficient [-]
o Opening percentage, o ∈ 0,100 [1]
CVR (o ) Characteristic coefficient depending on opening percentage [1]
CVR (0) = 0 ; CVR (100) = 1
F1 (o ) Characteristic coefficient depending on opening percentage [1]
F1 (0 ) = 1 ; F1 decreasing function
p1 Inlet pressure (absolute) [bar]
p2 Outlet pressure (absolute) [bar]
T1 Inlet gas temperature [K]
z1 Compressibility factor at inlet condition [1]
r Gas relative density [1]
The valve behavior is therefore described by the sizing coefficient CV 0 and the functions CVR (o ) ,
F1 (o ) (being defined by table values).
Here
K VS Sizing coefficient [m3.h-1]
o Opening percentage, o ∈ 0,100 [1]
K VR (o ) Function of opening percentage [1]
K VR (0) = 0 ; K VR (100 ) = 1
Q0 Volumetric flow rate at standard condition (101.325 kPa and [m3.h-1]
0ºC)
p1 Inlet pressure (absolute) [bar]
p2 Outlet pressure (absolute) [bar]
T1 Inlet gas temperature [K]
ρ0 Gas density at standard conditions (101.325 kPa, 0ºC) [kg.m-3]
The valve behavior is therefore described by the sizing coefficient K VS and function K VR (o ) (being
defined by table values).
1
pi − p o = ξρ i wi2
2
Here
pi Pressure at resistor inlet [Pa]
po Pressure at resistor outlet [Pa]
ξ Pressure loss coefficient [1]
ρi Gas density at resistor inlet [kg.m-3]
The gas velocity is calculated using the representative internal diameter of controlled valve D , entered
in the network element data:
4m
wi =
πD 2 ρ i
Here
m Mass flow rate through element [kg.s-1]
D Element diameter [m]
9 Resistor
A resistor is an element representing the lumped resistance of an armature, partially closed valve,
filtering equipment etc. The hydraulic resistance is characterized by the local pressure loss coefficient.
The resulting pressure drop is described by the equation
1
pi − p o = ξρ i wi2
2
Here
pi Pressure at resistor inlet [Pa]
po Pressure at resistor outlet [Pa]
ξ Pressure loss coefficient [1]
ρi Gas density at resistor inlet [kg.m-3]
wi Velocity at resistor inlet [m.s-1]
The gas velocity is calculated using the representative internal diameter of the resistor D , entered in
network element data:
4m
wi =
πD 2 ρ i
The temperature drop caused by Joule-Thomson effect is included in the resistor description:
T ( pi ) = Ti
dT
= µ JT ( p, T )
dp
To = T ( p o )
Here
pi Inlet pressure [Pa]
Ti Inlet temperature [K]
po Outlet pressure [Pa]
µ JT Joule-Thomson coefficient [K.bar-1]
T ( p ) Solution of the initial-value problem
To Outlet temperature [K]
10 State reconstruction
The state of a network is described by a complete set of values for all process variables, namely
pressures and flow rates, for the entire network. Naturally, because of the perpetual transients in the
network, the state changes continually.
The task to calculate the most probable estimate of the actual state of the network on the basis of a
restricted number of measured variables and considering the individual accuracy of measurements is
called state reconstruction.
In control theory the concept of State Observer is used for the state reconstruction task. Nevertheless,
the solution of this problem can be found in literature only for zero mean random errors and zero
systematic errors of measured variables.
The ability to find the state of a given dynamic system on the basis of a set of values measured over a
time interval is called observability. Consider all non by-passed compressor stations, control valves,
and closed valves removed from the network. This divides the network into separated sub-networks. If
all supplies and off-takes are measured, set points of non-pipe elements are known, and at minimum
one pressure measurement exists in each sub-network, the entire system is observable. The sub-
network in which there is no pressure measurement available for a longer time is not observable. The
reason is the following. The errors in flow rate measurements result in uncertainty of the in-take/off-
take balance of the sub-network. Without the information about pressure the system is unable to
compensate for the drift of balance.
State reconstruction is built as an observer, which is using a closed loop system consisting of a
dynamic model of the system and a controller.
Input
System
err_2 real err_1
state
estimated measurement
state
-
Model
Controller
What is above the dashed line is unknown for us. We have only a model of the system and some input
and a restricted number of measurements that are corrupted by errors. If the model is a ‘good’
approximation of the system, and the controller makes the closed loop stable, then the observer
(laying below the dashed line) is able to fulfill the task of state reconstruction.
The output of the dynamic model is compared with measured variables. The difference is used by the
controller that actuates on the model to minimize the difference, i.e. to get the state of the simulated
system close to reality. The task is to find such a gain of the controller, which corresponds to an
„optimum solution“. If the „optimum solution" is defined by the minimum variance of the state
reconstruction error, the solution is known as Kalman filter.
σ pi2 σ po
2
σ m2 σ s2
subject to hydraulic conditions in tubes. Other constraints like compressor characteristics are
not taken into account.
Here
pi , σ pi Input pressure, accuracy of input pressure measurement
p o , σ po Output pressure, accuracy of output pressure measurement
m ,σ m Flow rate, accuracy of flow rate measurement
ms , σ s Flow rate driven by set-point requirement, accuracy of flow rate set-point
requirement
∗ Marks the measured values
The accuracy of the flow rate given by set-point requirements is by experience set to 0.07 m s .
If any measurement is not available, the corresponding term in the objective is omitted.
2. In the second step, the distances between measured and estimated pressures are minimized
respecting the uncertainty of pressure drops on tube elements computed in the first step. The
minimized objective is
(P − P ) * T
( )
RP−1* P − P * + (∆P − ∆P_ ) R∆−P1 (∆P − ∆P_ ) + (P − P_ ) R_−1 (P − P_ )
T T
Here
P Vector of estimated pressures
P_ Vector of pressures in the first step
R P∗ Diagonal matrix with non-zero elements in the nodes with pressure measurements
only; the values of these elements are variances of pressure measurements
R_−1 Diagonal matrix with positive elements close to zero; it is used only to overcome
numerical problems arising when in some part of the network the pressure
measurements are missing
R∆P Diagonal covariance matrix of pressure drops derived from resistance of tubes and
uncertainty of flow rates in the first step
of pressure measurement, then the difference value is locally used as the modified accuracy
of the measurement.
• If the difference between the first reconstruction step and the flow rate measurement is greater
than rel m × σ m , where rel m is the coefficient and σ m is the accuracy of flow rate
measurement, then this number is locally used as the modified accuracy of the measurement.
The results of this approach evidently depend on the parameters rel p and rel m .
relQP Real number modifying artificial off-takes (these are defined in all supply/off-take nodes
where pressure measurement is available) as
σ Q * relQP
QP =
σp
(p − p* )
Here
σQ is the accuracy of the supply/off-take
σp is the accuracy of the pressure measurement.
Recommended value is 0.2;1.
sigma _ m Coefficient reflecting uncertainty of pipe line pressure drops in the first step of
reconstruction (see matrix R∆P ).
Recommended value is 0.03;010
.
rel p Coefficient for managing outlying pressure measurement data.
Recommended value is 3;10
rel m Coefficient for managing outlying flow rate measurement data.
Recommended value is 5;20
For the “starting reconstruction run” use values of parameters near to upper bound and for “normal
reconstruction run” to lower bound.
The reason for using the “mean value of flow rate since the last writing’’ is the calculation of mass
balance under the circumstances of different computation time step and writing time step.
There are two integrals in the graphic arithmetic: INTG for integrating by trapezoidal rule and INTG2
for rectangular rule. To compute balances use INTG only for supplies and off-takes where continuous
linear interpolation between samples is assumed. For all other flow rates use INTG2.
It is possible to use the statement tv qrec in the command line to have a quick overview of the
situation in the network at a particular time instant.
Flow metering equipment is typically installed either at stations where gas is entering or leaving the
pipeline system or at compressor stations and control valve stations. In the first case, the flow
information is passed to the state reconstruction as a boundary flow at nodes, for other stations it allows
for assigning the flow meter information to the stations.
The only case not covered by this concept occurs for if the flow meter is just in between pipe elements
without any significant or controlled pressure change. To allow such meter information to pass to the
state reconstruction, a specially marked control valve element can be used, that we call a metering
station.
The name of a control valves which is to be used as a metering must be changed in the network editor to
read
Once the network is being activated, the additional characters :1: are removed and the control valve
retains its original name. The change in name only keeps to be visible in the network editor. This has the
advantage of leaving the name for reconstruction purposes unchanged.
The control valve now only has three control modes, OFF, BP and MEA.
In the mode MEA a metered flow passed for the element is used in the reconstruction. It then tries to
adjust the flow accordingly, but keeping a zero pressure drop across the element.
11 Steady-State Optimization
The steady-state optimization for fixed compressor configurations is based on a gradient method of
feasible directions. The attention is focused on the design of the control strategy with respect to
commercial policy taking into account the network possibilities, the storage capacities, the structure of
contracts, etc.
11.2 Constraints
The constraints can be classified into three basic groups:
1. Constraints related to pipe elements. These constraints are equalities.
2. Constraints related to non-pipe elements and representing the fixed operation limits of built-in
technological devices (compressor stations, control valves). These constraints are
inequalities.
3. Constraints determined by contractual conditions. These constraints are inequalities.
The constraints 1 and 2 can be derived from the simulation model; the constraints 3 are defined (and
changed) by the user.
B x 0 x ≤ bx 0
The number of equality constraints can be great (it is determined by the network extent), but the
following transformation can simply be computed (using the knowledge of the structure of Ax 0 ):
x = D x0 y
where y is a choice of linearly independent variables from x and matrix D x 0 has a special structure
given by the configuration of the network. From this follows, that it is advantageous to respect these
constraints in the computation of a new step of optimization by gradient reduction.
It should be noted that the vector y represents the set of control variables. The set points of non-pipe
elements need not necessarily correspond to real control variables used for the optimization – it is
better to interpret them as a way how to describe the final optimum solution (may be completed by
some additional information about the pressure and flow rate distribution).
The number of active constraints belonging to the second group is much smaller as compared to the
number of constraints of the first group, but it changes within iterations. The integration of these
constraints in the first group would significantly complicate the computation as well as the structure of
the matrix D x 0 . Moreover, the procedure of determining the D x 0 matrix would have to be repeated
any time the number of active constraints changes! For these reasons, the method of gradient
projection was chosen to respect the constraints. It enables to change the number of active
constraints very simply. This method also allows solving the problem of linearly dependent constraints
(this problem does not occur in the first group of constraints).
Td(p,WC)
Th(p)
T<Td
T<Th
The water content of gas WC [g/m3 std. dry] is being tracked over the network (as a gas quality
parameter). For known water content and given pressure, the water dew point temperature can be
calculated anywhere in the network.
The hydrate equilibrium temperature calculation can take into account the effect of hydrate inhibitors
(methanol, glycols). For this purpose, the inhibitor content of gas IC [g/m3 std. dry] is being tracked
over the network.
Here
p Pressure [Pa]
WC Water content of gas [g/m3 std. dry]
Here
WC 0 Equilibrium water content [g/m3 at 101.325 kPa and 0ºC, dry]
p Gas pressure [bar]
A,B Temperature-dependent coefficients:
t ∈ + 40°C,+90°C :
( )
A = 6.1569611 exp 0.0620686t − 0.00013096345t 2
B = 0.0405058 exp(0.055042799t − 0.00016553793t ) 2
t ∈ + 90°C,+130°C :
(
A = 6.1569611exp 0.0620686t − 0.00013096345t 2 )
B = 0.0700737 exp(0.032637894t )
The Bukacek approximation is suitable for sweet natural gases ( r ≤ 0.8 , xCO2 < 2% , x H 2 S < 1.5% ).
Here
p Pressure [Pa]
x Gas composition using molar fractions (dry gas) [1]
b1 Kb6 Coefficients
i bi
1 -238.24469
2 78.996674
3 -5.352544
4 349.473877
5 -150.854675
6 -27.604065
The original charts exhibit relatively high uncertainty, especially for gas relative density around 0.6.
However the Motiee approximation seems to perform well for sweet, methane-rich gas.
Here
K vs ,i Vapor-solid distribution coefficient for gas component i [1]
xi Molar fraction of component i in dry gas [1]
Subscript i Hydrate-forming components of natural gas: CH4, C2H3, C3H8, i-C4H10, n-C4H10,
N2, CO2, H2S
ln K vs ,i = Ai + Bi t + C i p + Di t −1 + Ei p −1 + Fi pt + Gi t 2 + H i p 2 + I i pt −1 + J i ln pt −1 + ( )
K i p − 2 + Li tp −1 + M i t 2 p −1 + N i pt − 2 + Oi tp −3 + Pi t 3 + Qi p 3 t − 2 + Ri t 4
Here
t Temperature [ºF]
p Pressure [psia]
Ai K Ri Coefficients
Here
p Pressure [at]
P0 , P1 Coefficients dependent on reduced relative density r ′ [1]
∑r x i i
r′ = i
Reduced relative density [1]
∑x i
i
r′ P0 P1 r′ P0 P1 r′ P0 P1
0,56 24,25 77,4 0,71 13,85 43,9 0,86 12,07 37,6
0,57 21,80 70,2 0,72 13,72 43,4 0,87 11,97 37,2
0,58 20,00 64,2 0,73 13,57 42,9 0,88 11,87 36,8
0,59 18,53 59,5 0,74 13,44 42,4 0,89 11,77 36,5
0,60 17,67 56,1 0,75 13,32 42,0 0,90 11,66 36,2
0,61 17,00 53,6 0,76 13,20 41,6 0,91 11,57 35,8
0,62 16,45 51,6 0,77 13,08 41,2 0,92 11,47 35,4
0,63 15,93 50,0 0,78 12,97 40,7 0,93 11,37 35,1
0,64 15,47 48,6 0,79 12,85 40,3 0,94 11,27 34,8
0,65 15,07 47,6 0,80 12,74 39,9 0,95 11,17 34,5
0,66 14,76 46,9 0,81 12,62 39,5 0,96 11,10 34,2
0,67 14,51 46,2 0,82 12,50 39,1 0,97 11,00 33,9
0,68 14,34 45,6 0,83 12,40 38,7 0,98 10,92 33,6
0,69 14,16 45,0 0,84 12,28 38,3 0,99 10,85 33,3
0,70 14,00 44,5 0,85 12,18 37,9 1,00 10,77 33,1
The results of CSMHYD, HYDK, Motiee, Ponomarev and our implementation of K vs -model (referred
below as HETKVS) are shown on the following pictures:
1000
CSMHYD p->T
CSMHYD T->p
100
p [bar]
CSM K-code
Motie
10
Ponomarev
HETKVS
1
-5 0 5 10 15 20 25 30
t [ºC]
1000
CSMHYD
100 CSMHYD T->p
p [bar]
CSM K-code
Motie
10
Ponomarev
HETKVS
1
-5 0 5 10 15 20 25 30
t [ºC]
1000
CSMHYD
100 CSMHYD T->p
p [bar]
CSM K-code
Motie
10 Ponomarev
HETKVS
1
-5 0 5 10 15 20 25 30
t [ºC]
The results of hydrate equilibrium temperature calculation for given pressure may be summarized in
the following points:
• The computationally simplest approximation by Motiee performs with precision about 0.5 ºC
for CH4-rich gas (“Russian gas”). For other natural gases (C2H6-rich H-gas “North Sea” and
N2-rich L-gas “Groningen”) the error may significantly increase (up to 5 ºC).
• For the Ponomarev approximation, similar results as those for the Motiee formula hold (about
1ºC for “Russian gas” and the accuracy significantly decreases for the other two types of
natural gas). The higher computational complexity (gas composition tracking) however makes
this method inferior to the Motiee formula.
• The K vs -model performs much better even for very different gases as it takes into account
the composition of gas (observed accuracy to 1ºC for all three above mentioned basic gas
types, to 0.5 ºC for “Russian gas”). Therefore this model seems to be the most
recommendable general solution, well compromising accuracy and speed.
The weight fraction X of inhibitor dissolved in free water is calculated from the equations:
WC = WC 0 ( p, T , x ) + WC l
X
IC = MC v ( p, T )X + WC l for methanol
100 − X
IC
X = × 100 for glycols
WC l + IC
Here
WC Total (tracked) water content of gas [g/m3 std. dry]
WC 0 Equilibrium water content of gas [g/m3 std. dry]
WC l Free water content [g/m3 std. dry]
IC Total (tracked) inhibitor content of gas [g/m3 std. dry]
MC v ( p, T ) Methanol losses to the hydrocarbon phase – g/m 3std.
amount of methanol vaporized into gas per 1% wt.
of methanol dissolved in free water % wt. methanol in free water
Here
Note: If the profiles of all temperatures along the pipe element are monotone (what is the most
frequent case), these three indicators only show two different values:
DTHF = max(DTDP, DTHE )
However the monotonicity of all profiles along a pipe element is generally not guaranteed (assume for
example the possibility of a “batch” of gas of different water content moving inside the pipe element),
so all three indicators have to be stored.