You are on page 1of 12

Journal of Natural Gas Science and Engineering 28 (2016) 479e490

Contents lists available at ScienceDirect

Journal of Natural Gas Science and Engineering


journal homepage: www.elsevier.com/locate/jngse

Simulation of the transient flow in a natural gas compression system


using a high-order upwind scheme considering the real-gas behaviors
Lei Zhang
College of Mechanical and Transportation Engineering, Beijing Key Laboratory of Process Fluid Filtration and Separation, China University of Petroleum,
Beijing 102249, China

a r t i c l e i n f o a b s t r a c t

Article history: The transient flow in a pipe flow network was numerically simulated to study the performance of the
Received 26 September 2015 surge avoidance system in a natural gas compression station. The simulation was performed based on a
Received in revised form combined approach that the flow in the pipe was simulated using a finite volume method with a high-
4 December 2015
order upwind scheme considering the real-gas behaviors and the behaviors of elements (e.g., compressor
Accepted 10 December 2015
Available online 13 December 2015
and valve) were evaluated using quasi-steady models. In the pipe flow simulation, characteristic
boundary conditions were used to couple with the quasi-steady modeling of elements. The numerical
scheme for the pipe flow simulation was first used to predict the rapid transients in a single pipe after the
Keywords:
Centrifugal compressor
sudden closure of a downstream valve. The predicted distributions of the flow properties indicated that
Emergency shutdown the present numerical scheme was capable of simulating the pipe flow under extreme flow conditions
Recycle valve with high order of accuracy. The present approach was further used to simulate the transient flow during
Surge avoidance the emergency shutdown of compressor in an experimental piping network. Simulation results,
Finite volume method including traces of operating points and histories of pressures at both sides of the compressor, were
compared to the corresponding experimental data, and an agreement with a maximum deviation less
than 10% was obtained in the primary control stage. The agreement proved the accuracy of the present
approach for the simulation of the transient flow in a piping network and its validity in evaluating the
performance of the surge avoidance system in a natural gas compressor station.
© 2015 Elsevier B.V. All rights reserved.

1. Introduction characteristics of the recycle valve, including its size, response time,
and stroke time. To ensure the safe operation of the compressor, the
Surge is the dynamic instability characterized by flow reversal in surge avoidance system needs to be properly designed to make it
gas compressors and occurs if the maximum head at a certain capable of protecting the compressor from surge at normal oper-
rotation speed is achieved and the inlet flow rate further reduces. ating conditions.
Since the reversed gas flow during surge can impose massive The performance of the surge avoidance system is evaluated by
fluctuating load on the rotor, severe damage can occur to the investigating its behaviors during the emergency shutdown (ESD)
compressor. In a natural gas compression station, the surge of compressors. ESD is an event that a compressor suddenly loses
avoidance system mainly consists of recycle piping loops around its driving power after, for example, the cutoff of fuel supply to a gas
the compressor and a corresponding recycle valve as illustrated by turbine or electricity to an electric motor. Due to the rapid reduc-
Fig. 1. The surge avoidance system functions to increase the inlet tion of rotor rotation speed after the start of ESD, the operation
flow, reduce the pressure ratio, and finally move the operating point of the compressor moves rapidly towards the surge operating
point away from the surge operating conditions. Therefore, it is conditions. Therefore, this process imposes the most stringent
crucial to protect the compressor from the damage of surge in a requirement on the surge avoidance system. Hence, examining the
natural gas compression station. The performance of surge avoid- behavior of the surge avoidance system during the ESD of
ance system is determined by the pipe arrangements upstream and compressor is an effective way to evaluate its performance and
downstream of the compressor, the check valve behavior and the verify the design of the system. Both experimental and modeling
approaches have been used to examine the behavior of the surge
avoidance system during the ESD of compressor in a natural gas
E-mail address: zlei@cup.edu.cn. compression station. A standard experimental study was carried

http://dx.doi.org/10.1016/j.jngse.2015.12.012
1875-5100/© 2015 Elsevier B.V. All rights reserved.
480 L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490

the capabilities of the numerical methods under extreme flow


conditions. Greyvensein (2002) developed an implicit finite dif-
ference method based on the simultaneous pressure correction to
simulate the transient flow in a single pipe after the sudden closure
of the downstream valve. Simulation results were compared to
those obtained by other numerical methods, for example, the
method of characteristics and the two-step Lax-Wendroff method.
It was found that the proposed numerical method has advantages
in accuracy, stability, and especially in the reduction of computa-
tional time. Tentis et al. (2003) used an adaptive method of lines to
solve the one-dimensional Euler equations for pipe flow simula-
tion. Fast transients in a single pipe after the instantaneous shutoff
of a downstream valve and slow transients resulting from a
perturbation of flow rate at the outlet of a very long pipe were both
simulated. It was found that spurious oscillations at the wave front
could be significantly reduced by using the proposed method.
Similar studies using various numerical methods on the simulation
of transient flows in a single pipe were also performed (Dorao and
Fernandino, 2011; Gato and Henriques, 2005; Kessal, 2000).
In addition to the single pipe flow, the transient flow in a simple
Fig. 1. Cooled recycle pipe loop for a surge avoidance system.
piping network after a sudden open and subsequently a sudden
closure of a valve at a pipe-connection node has also been inves-
out by Moore et al. (2010) who conducted ESD experiments starting tigated extensively. Abbaspour and Chapman (2008) described an
from several initial operating conditions on a full-scale test cen- implicit finite-difference method for the solution of non-isothermal
trifugal compressor. Experimental data, such as the operating pipe flow governing equations and simulated such a transient flow
points of the compressor and gas properties at valves and com- problem. The identical transient problem was extended by
pressors during the entire shutdown process, were measured and Chaczykowski (2010), who applied the method of lines with a
used to validate the simulation results of the same cases by the central difference scheme for the spatial derivatives, to further
Stoner Pipeline Simulation, a computer program for solving the consider the effect of unsteady heat transfer. Similar computational
one-dimensional pipe flow equations based on the method of studies involving the application of various numerical schemes in
characteristics. On the other hand, compared the experiments, the simulation of flow transients induced by perturbations from a
modeling approaches are relatively more convenient and indeed node in a piping network have also been conducted (Alamian et al.,
have been more commonly used to study the performance of the 2012; Behbahani-Nejad and Bagheri, 2010; Ke and Ti, 2000; Reddy
surge avoidance system in natural gas compression stations. Kurz et al., 2006).
and White (2004) proposed a lumped system volume approach to In the present study, the natural gas compressing system, which
model the compressor's discharge volume, which is the pipe vol- is essentially a piping network in a compression station, was
ume bounded by the discharge side of the compressor, downstream modeled as the integration of pipes and elements. The term
check valve, and the recycle valve. Their model could be further “element” represents those idealized models used for the simula-
reduced to an even simpler form and was found capable of properly tion of actual devices such as compressors, valves, and pipe fittings
sizing the upstream and downstream pipe volumes for optimizing in a compression station. Therefore, an element in a piping network
the surge avoidance system by simulating the ESD process of the is used to provide relations to the gas flows in different pipes
compressor. Furthermore, more detailed simulation of the pipe connected to it. With its peculiar characteristics, an element can
flow, in contrast to the lumped volume approach, was also pursued exert certain effects on the gas flow network. Methods for simu-
by researchers through the numerical solution of the one- lating the flow in the entire piping network were developed based
dimensional governing equations for the pipe flow. The numerical on a combined strategy that the flow in the pipe is numerically
study by Botros et al. (1991) was one of the earliest practices that simulated using the finite volume method and the effects of ele-
can be attributed to this category. In their simulation of the tran- ments in the pipe flow network were evaluated using quasi-steady
sient events in the piping networks, the pipe flow equations were methods. For the simulation of the pipe flow, a high-order upwind
solved using the method of characteristics, and quasi-steady scheme considering the real-gas behaviors was used to solve the
methods were employed for the modeling of elements such as one-dimensional partial differential equations. The characteristic
compressor, valve, and pipe fittings. Especially for the emulation of boundary conditions were employed to integrate with the quasi-
valve's movement, an ordinary differential equation determining steady modeling of elements. A computational program was
the instantaneous position of the valve's actuator as a function of developed based on this strategy and can be used to numerically
time was also proposed. More detailed formulations for the solu- study the dynamic behavior of a natural gas compression system
tion procedure of the governing equations based on the method of during transient events such as the emergency shutdown of the
characteristics and additional quasi-steady models for cooler and compressor. Results of the simulation can be used to evaluate the
scrubber were further proposed by Botros and Petela (1994). performance of the surge avoidance system and aid the design of
Besides the method of characteristics, other advanced numerical the piping network in new natural gas compression stations.
methods have also been used in the solution of partial differential
equations for the pipe flow to either achieve high order of spatial 2. Governing equations for pipe flow
accuracy or capture the rapid flow transients in a pipe flow
network. Transient pipe flows due to the sudden closure of a The governing equations, including continuity, momentum, and
downstream valve or periodic perturbations at the boundaries have energy equations, for one-dimensional unsteady pipe flow
been extensively selected as the numerical experiments to examine considering friction and heat transfer on the pipe wall can be
written into the following conservation-law form:
L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490 481

Considering that natural gas is a complex mixture of numerous gas


vQ vF components, it is modeled as the mixture of the following nine
þ þ G ¼ 0; (1)
vt vx major components: methane, ethane, propane, n-butane, n-
pentane, carbon dioxide, nitrogen, hydrogen sulfide, and helium.
where
The properties of natural gas as a mixture are then calculated using
0 1 0 1 0 1 the properties of each of the nine major components and the actual
r ru 0
composition according to the mixing rules suggested by Poling
Q ¼ @ ru A; F ¼ @ ru2 þ p A; G ¼ @ f A: (2)
et al. (2000). The binary interaction coefficients of the components
E uðE þ pÞ q
used in the mixing-rule calculation are from Ma et al. (2015). The
In the governing equations, E ¼ r(e þ u2/2) is the total energy of heat capacity, cp, for real gas is estimated using the correlation
the gas per unit volume consisting of internal and kinetic energies. f proposed by Maric et al. (2005) based on the actual composition of
is used to consider the effect of wall friction and is related to the the natural gas being simulated.
Fanning friction factor (Cf) through
3. Numerical scheme for solving pipe flow equations
2Cf 2
f ¼ ru ; (3)
D The finite volume method is used in the present study to solve
the hyperbolic governing equations of the one-dimensional pipe
where D is the internal diameter of the pipe. q in Eq. (2) is the heat
flow. Using this method, the pipe flow domain is discretized into a
flux due to the heating by pipe wall and is defined by
finite number of computational cells and the average values of the
4hf conservative variables in each computational cell are updated ac-
q¼ ðTw  Taw Þ: (4) cording to the conservation principles derived from the
D
conservation-law form of the governing equations. In this study,
In the above equation, hf is the film coefficient of heat transfer. fluxes of the conservative variables at each cell interface are
Tw and Taw represent the actual pipe wall temperature and adia- calculated using the Roe's flux-difference splitting method, which
batic pipe wall temperature, respectively. is a total variation diminishing (TVD) scheme, and the real-gas
To close the governing equations of pipe flow, an additional properties are also implemented into the scheme. To derive an
equation describing enthalpy (h) as a function of pressure and approximate Riemann solver for real gas, introduce two additional
density, namely, h ¼ h(p,r), is needed and can be obtained by first variables, k and c, both of which can be related to speed of sound
considering the total derivative of enthalpy with respect to pres- through
sure and density, namely,
1 c2
dh ¼ adp þ bdr: (5) k≡ ¼  ; c≡c2  kh: (10)
ra  1 rb
In the above equation, a and b represent the partial derivatives Using the above two variables, the Jacobian matrix of the hy-
(vh/vp)r and (vh/vr)p, respectively. By describing pressure as a perbolic governing equations (Eq. (1)) can be written into the
function of density and entropy (s), i.e., p ¼ p(r,s) and using the following concise form:
thermodynamic relation Tds ¼ dh-vdp, a and b can be related to (vp/
0 1
vs)r, the partial derivative of pressure with respect to entropy, as 0 1 0
vF @ c þ ðk=2  1Þu2. ð2  kÞu k A:
A¼ ¼
T Tc2 vQ c  h þ ðk  1Þu2 2 h þ ð1=2  kÞu2 ðk þ 1Þu
a ¼   þ v; b ¼   : (6)
vp vp
vs vs (11)
r r
The above Jacobian matrix has three eigenvalues (i.e., u, u þ c,
In the above equation, T is the temperature and v is the specific and u-c) and the following matrix of right eigenvectors
volume. c is the speed of sound defined by
0 1
  1 1 1
vp R¼@ u . þc
u. c
u. A;
c2 ¼ : (7) (12)
vr s c=k þ u2 2 h þ u2 2 þ uc h þ u2 2  uc
To obtain calculable expressions for a and b, further trans-
formations of the thermodynamic derivatives related to entropy which has a reverse matrix:
can be performed using the Maxwell relations, and therefore, the
1
speed of sound can be alternatively calculated by 0 h  u2 u 1 1
2 
  B h þ c=k h þ c=k h þ c=k C
vp B C
c2 ¼ g ; (8) B C
vr B 1 C
T B h  u2 C
R1 ¼ B1 u 2 u 1 1 C:
B    þ C
where g is the specific heat ratio. In a similar way, another deriv- B 2 2c 2ðh þ c=kÞ 2ðh þ c=kÞ 2c 2ðh þ c=kÞ C
B C
ative, (vp/vs)r, can be calculated using the following relation @ 1 A
h  u2
    , 1 u
þ  2 
u

1 1
vp 2 1 vv 2 2c 2ðh þ c=kÞ 2ðh þ c=kÞ 2c 2ðh þ c=kÞ
¼ rTc cp : (9)
vs r v vT p (13)
The partial derivatives in the above two equations can be then Consequently, an approximate Riemann solver, which gives the
evaluated using an equation of state for real gas. In this study, the fluxes of the conservative variables at the cell interface, can be
Peng-Robinson cubic equation of state is used in such calculations. formulated as
482 L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490

obtained by setting j ¼ 0, and otherwise by setting j ¼ 1 and


1h R   i
L b R L l ¼ 1/3, the third order of accuracy can be achieved. f is a limiter
Fiþ1=2 ¼ Fiþ1=2 þ Fiþ1=2  A  Qiþ1=2  Qiþ1=2 : (14)
2 for the avoidance of non-physical interpolations if discontinuities
 
 b  b  b b 1   
or sharp changes exist in the flow field, and riþ1=2
In the above equation,  A  ¼ R L R is obtained by taking  Lb is defined as
as the diagonal matrix whose components are the absolute values
of A's eigenvalues. The hat “^” indicates that the components of  Q i  Q i1
riþ1=2 ¼ : (19)
matrix are evaluated using values of variables at an average state of Q iþ1  Q i
the two states separated by the cell interface. For velocity u and
Consequently, according to finite volume method, the flux at cell
enthalpy h, the Roe-averaging rules are used to give their average-
interface determined by Eq. (14) can be used to update the average
state values as
values of conservative variables in each computational cell through
pffiffiffiffiffi pffiffiffiffiffi pffiffiffiffiffi pffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffi  
rL uL þ rR uR b rL hL þ rR hR rL rR ðuR  uL Þ2 Fi1=2  Fiþ1=2

u pffiffiffiffiffi pffiffiffiffiffi ; h ¼ pffiffiffiffiffi pffiffiffiffiffi þ pffiffiffiffiffi pffiffiffiffiffi 2 : DQ i ¼ Dt þ Gi ; (20)
rL þ rR rL þ rR 2 r þ r Dxi
L R
(15)
in which the averaging of source terms, Gi , is performed by an
b
Nevertheless, to satisfy the jump conditions, i.e., DF ¼ ADQ , the integration based on the Gaussian quadrature in each computa-
values of c and k at the average state are obtained in a different tional cell. For time marching, the two-step Runge-Kutta approach
manner according to the formulas suggested by Montagne  et al. is used, and the time step, Dt, is restricted to satisfy the Courant
(1989): conditions during the unsteady computation.

 L    
1 1 c cR 1 1 4
¼ þ Dp þ þ ec Dr Dr þ DðreÞDp Dp2 4. Quasi-steady models for elements and boundary
b
k 2 kL kR kL kR
 conditions
4
þec Dr2
(16) In the present study, in modeling the gas flow in the piping
network of a compressor station, four categories of elements are
and considered, including the centrifugal compressor, resistive ele-
ments (e.g., valve, elbow, and reducer), capacity elements (e.g.,

 L     cooler and scrubber), and tee elements. Elements grouped into the
c
b 1 c cR 1 1 4 4
¼ þ Dp þ þ ec Dr Dp  e
c DðreÞDr same category impose similar effects on the pipe flow, and the only
b
k 2 kL kR kL kR
  difference lies in the actual characteristics determined by the na-
4
 Dp2 þ ec Dr2 : ture of the actual devices. The characteristics of an element may
vary with time in response to certain events, for instance, shut-
(17)
down of the compressor or movement of valves. In this study, to
In both equations, the symbol D($)¼ ($) -($) represents the
R L
evaluate the effects of elements on the pipe flow network, the el-
difference of variables between the two states separated by the cell ements are modeled in a quasi-steady manner in contrast to the full
2
interface, and e
c ¼ ½ðcR Þ2 þ ðcL Þ2 =2 is the arithmetic average of the numerical computation of the pipe flow. The quasi-steady
squared speed of sound working as a scale factor for the normali- approximation of the elements can be justified, considering that
zation of Dp/Dr. The speed of sound at the average state can be then the elements always react to the transients more rapidly due to
calculated using the average state values of h, c, and k obtained their relatively small length scales in the flow direction compared
from the above equations according to Eq. (10). to the pipe flow. Using the quasi-steady methods, flow properties at
Furthermore, as already used in the above discussions, symbols each opening of an element can be directly related to those at its
with superscripts “R” and “L” indicate values of variables taken at other openings. In the transient simulation of a pipe flow network,
the right and left states of a cell interface, respectively. Values of the an element obtains information from the pipe flows connected to
primitive variables at both states can simply be taken as their its openings, performs a quasi-steady calculation according to its
average values in the corresponding neighboring computational instantaneous characteristics, and provides boundary conditions to
cells separated by the interface. In this study, however, the MUSCL the pipe flows connected to it. Correspondingly, the characteristic
approach is used to reconstruct the distribution of conservative boundary conditions are used in the pipe flow simulation to ensure
variables in each computational cell to achieve the third order of that the correct information from the pipe flow is received by the
spatial accuracy while maintaining the TVD properties. Using the element connected to it for the quasi-steady calculation. In this
MUSCL approach, values of the conservative variables at both states section, the quasi-steady models for all of the four categories of
separated by a cell interface can be formulated by elements in a natural gas compression station and the character-

R jh        . i
Qi1=2 ¼ Qi  ð1  lÞ Q iþ1  Q i f riþ1=2 þ ð1 þ lÞ Q i  Q i1 f 1 riþ1=2
4
(18)
L jh        . i
Qiþ1=2 ¼ Qi þ ð1 þ lÞ Q iþ1  Q i f riþ1=2 þ ð1  lÞ Q i  Q i1 f 1 riþ1=2 :
4

In the above equation, j and l are constants determining the istic boundary conditions for the pipe flow simulation are
order of accuracy of the scheme. The first order of accuracy is discussed.
L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490 483

4.1. Centrifugal compressor


1
NðtÞ ¼ u 1
: (26)
The gas-compressing process through a centrifugal compressor t þ Nðt¼0Þ
Jð2pÞ2
can be regarded as a polytropic process, with the polytropic effi-
ciency defined by In the above equation, J is the combined rotational inertia of the
compressor rotor and its driver. u is the ratio of power to the cube

n k of rotation speed and therefore is constant during the emergency
hpol ¼ ; (21)
n1 k1 shutdown process of the compressor.

where n is the polytropic exponent and k is the isentropic expo-


4.2. Resistive elements
nent. The polytropic head of the gas compressing process is defined
by
In a natural gas compression station, devices such as valve,
" ðn1Þ=n # elbow, and reducer (expander), behave similarly as flow resistance
zs RTs pd as a result of their intricate internal geometries and induce pressure
Hpol ¼ 1 : (22)
ðn  1Þ=n ps losses to the pipe flow. Therefore, these devices can be modeled in a
similar way as the resistive elements. In this study, the pressure loss
In the above equation, Hpol is the polytropic head and z is the gas
to the pipe flow introduced by a resistive element is calculated
compressibility factor. R is the specific gas constant. Subscripts “d”
according to
and “s” denote the discharge side and suction side of the
compressor, respectively. For a given rotation speed and inlet 1
volumetric flow rate, both the polytropic efficiency and head can be Dp ¼ pi  po ¼ xr u2 : (27)
2 i i
directly pinpointed on a compressor performance map; thus, the
instantaneous pressure ratio can be solved from the above In the above equation, subscripts “i” and “o” represent the ele-
expression. Since the available compressor performance data are ment's openings where the pipe flow enters and leaves the
usually several discrete points at a certain rotation speed, the element, respectively, and x denotes the pressure loss coefficient.
following cubic expression, which was suggested by Moore and For the valves, x is usually given in terms of Cv, the flow coefficient
determined by the instantaneous valve position and the maximum
Greitzer (1986), was used to fit the performance curve based on
the discrete experimental data points and also predict the head to valve capacity. Nevertheless, for elbows and reducers, the pressure
loss coefficient is determined by their unchangeable internal ge-
the left of theoretical surge control line.
ometries and instantaneous inflow conditions. Existing correla-
"    3 # tions, for example, the 3 K method for elbows, can be used to
3 Qin 1 Qin
Hpol ¼ H0 þ C1 1 þ 1  1 (23) estimate the pressure loss coefficients of these devices.
2 C2 2 C2
In addition, it is assumed that a resistive element does not
In the above equation, Qin indicates the compressor inlet volu- introduce a loss in enthalpy to the gas flowing through it, namely,
metric flow rate, and H0, C1, and C2 are constants determining the
hi ¼ ho : (28)
shape of the fitted performance curve. The performance curves at
other rotation speeds can be obtained through an extrapolation There is also a balance in mass flow rate between the gas flows
from the available data points based on the fan affinity law. at the both openings of a resistive element, namely,
Consequently, using the extrapolated performance curve, the
pressure ratio can be solved using Eq. (22) at each rotation speed, m_ i ¼ m_ o : (29)
and according to the polytropic process, temperatures at both sides
of the compressor can be in turn related to each other through
 ðn1Þ=n 4.3. Tee elements
Td pd
¼ : (24)
Ts ps
In a compressor station, a tee element, which is characterized by
In addition to the pressure and temperature relations, it is its three openings, is mainly used for mounting the recycle or
assumed that there is a balance in the mass flow rate between the bypassing piping loops onto the main gas compressing pipe route.
suction side and discharge side of the compressor, namely, In the quasi-steady modeling of a tee element, similar to other
categories of elements discussed above, it is first assumed that the
m_ s ¼ m_ d : (25) element does not accumulate mass or energy, namely,
The minus sign in the above equation is subject to the conven-
X
3
tion that the positive direction of mass flow is toward the inside of m_ i ¼ 0: (30)
the compressor. This convention is also used in the mass flow i¼1
equations of the remaining categories of elements.
An ESD event happens when the rotor of the compressor sud- and
denly loses its driving power and decelerates together with its
driver as a result of the resistance from the gas flow. An additional X
3

model is therefore necessary to evaluate the rotation speed during


m_ i hi ¼ 0: (31)
i¼1
the shutdown process for the solution of pressure ratio from the
performance map. In this study, the equation derived and validated Depending on the instantaneous local flow directions at all of its
by Kurz and White (2004) according to the fan affinity law, which three openings, a tee element can behave as flow dividing or
assumes a constant ratio of power on the rotor to the cube of combining. The pipe flow enters a dividing tee from only one of its
rotation speed during the shutdown process, is used. Thus, the openings and leaves from the other two, and a combining tee
rotation speed as a function of time is given by merges two entering pipe flows into one leaving the element. For a
484 L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490

dividing tee, the above equation can be further simplified by 0 1


assuming that the enthalpy of the two flows leaving the element is 1
B 2 1 0C
equal to that of the flow entering the element, i.e., ho ¼ hi. Addi- 0 1 Bc C 0 1
DW1 B C Dp
tionally, the pressure loss, which may be induced to the pipe flow B 1 C
by an actual tee device, is also neglected, thus, DW ¼ @ DW2 A ¼ B
B rc 0 1C @
C, Dr :
A (36)
DW3 B C Du
B C
@ 1 A
p1 ¼ p2 ¼ p3 : (32) 0 1
rc
In the above equation, Wi indicates the characteristic variables
and “D” denotes the variation of the characteristic variables or
4.4. Capacity elements primitive variables at the boundary. Determined by the local sign of
the corresponding eigenvalue of the Jacobian matrix (Eq. (11)), a
Capacity elements are the models for scrubber and cooler in a characteristic variable at the boundary may be fully determined
compression station and are characterized by their large internal from the interior of the pipe flow and therefore needs to remain
volume in contrast to other categories of elements discussed above. unchanged (i.e., DWi ¼ 0) after the quasi-steady calculation of the
Therefore, in the modeling of a capacity element, it is not appro- element. Consequently, with the aid of characteristic boundary
priate to assume that balances in mass or energy exist between gas conditions, boundary values of variables satisfying the quasi-steady
flows at its two openings, and instead, the accumulation of mass equations for the element and simultaneously in consistency with
and energy needs to be considered (Botros and Petela, 1994). the numerical boundary conditions of the pipe flow can be ob-
Therefore, the total mass and internal energy of a capacity element tained. Using the boundary values of variables, the flux of conser-
can be updated according to the following ordinary differential vative variables at the pipe flow boundary can be then calculated
equations: through Fb ¼ F(Qb). Therefore, in this way, the physical boundary
conditions for each pipe flow connected to the element can be
dMv
¼ m_ i þ m_ o þ M_ v;loss (33) provided.
dt

dUv 5. Results and discussion


¼ m_ i hi þ m_ o ho þ U_ v;loss : (34)
dt
5.1. Simulation of the transient pipe flow after the sudden closure of
In the above two equations, Mv and Uv denote the total mass and
a downstream valve
internal energy of a capacity element, respectively. Terms with
subscript “loss” represent the rates of change in the total mass or
To examine the behavior of the present numerical scheme in the
internal energy due to the corresponding mass or heat loss intro-
simulation of rapid flow transients, the unsteady natural gas flow in
duced by the element. Knowing the total internal volume of a ca-
a single pipe after the sudden closure of a downstream valve was
pacity element, the instantaneous pressure and temperature in the
first simulated. The pipe being investigated was 20 m in length and
element can be then calculated using Mv and Uv according to the
had a uniform internal diameter of 0.5 m, and a valve was con-
relations described by Eq. (5)e(9) together with the cubic equation
nected to its downstream end, as shown in Fig. 2. The flow in the
of state. The pressure of gas flows at both openings of a capacity
pipe was modeled to be one-dimensional in the axial direction. For
element are assumed to be its internal pressure, namely,
the simulation of the unsteady pipe flow, the one-dimensional flow
p1 ¼ p2 ¼ pv : (35) field was discretized using a computational mesh having a uniform
cell size of 1 cm in the flow direction. The pipe wall was assumed to
In addition, for the gas flow leaving the capacity element, an be adiabatic, and the Fanning friction factor Cf was assigned a
additional assumption is made to let its enthalpy equal to the in- constant value of 0.02. Prior to the unsteady simulation of the
ternal enthalpy of the element, namely, ho ¼ hv. transient flow, a steady state gas flow was achieved at an inlet
volume flow rate of 9.4 m3/s, and the inlet pressure and tempera-
4.5. Characteristic boundary conditions ture were 0.7 MPa and 27  C, respectively. This steady state was
used as the initial flow condition for the transient simulation. As the
The quasi-steady models for elements described above are beginning of the unsteady simulation, a zero velocity was set at the
coupled with the numerical simulation of pipe flow through the downstream boundary of the pipe flow to emulate the sudden
boundary conditions. To properly evaluate the effect of element in closure of the downstream valve. Meanwhile, at the upstream
the pipe flow network, at each pipe-element connection, an boundary of the pipe flow, the pressure and temperature were fixed
element should entirely receive the numerical boundary condi- to their initial values throughout the entire simulation process.
tions, which are the information being transported from the inte- The predicted evolutions of the volume flow rate, pressure, and
rior of the pipe flow. Based on the received information and the density distributions along the pipe shortly after the sudden
element's characteristics, the quasi-steady calculation can there- closure of the valve are shown in Figs. 3e5, respectively. In each of
fore be performed. Results of the quasi-steady calculation are in these figures, the first few curves depicting the distributions of
turn used to provide the physical boundary conditions, which are variables are plotted with a time interval of 5 ms, and results of
the information supposed to be given from the exterior of the
boundary, to each pipe flow connected to it. This delivery of pipe
flow information by an element can be accomplished by using the
characteristic boundary conditions, since the information being
transported to or away from the pipe flow boundary is completely
carried by the characteristic variables (or Riemann variables). The
characteristic boundary conditions can be described as the
following (Hirsh, 2007): Fig. 2. Single pipe with a valve connected to its downstream end.
L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490 485

Fig. 3. Evolution of volume flow rate distribution along the pipe after the sudden closure of the downstream valve, Dt ¼ 5 ms.

Fig. 4. Evolution of pressure distribution along the pipe after the sudden closure of the downstream valve, Dt ¼ 5 ms.

both the first and third order schemes are presented. It can be seen Figs. 6 and 7, respectively. It can be seen that both pressure and
from these figures that the present numerical scheme is able to density at the closed valve vibrates around their initial values in a
simulate the pipe flow with sharp changes in the flow field. Espe- similar pattern. In consistence with the spatial distributions of the
cially near the wave front, there are no spurious oscillations, which variables, the third-order scheme predicted more abrupt temporal
are commonly seen near the locations of sharp variations in the variations compared to the first-order scheme.
simulations of similar problems (Tentis et al., 2003), and this Considering that the rapid flow transients prevail in the piping
behavior can be attributed to the application of the flux limiter in network in a compression station as a result of the variation of
the MUSCL scheme. Compared to the first-order scheme, the third- elements' characteristics, the numerical scheme for the pipe flow
order scheme predicted steeper wave front, showing the effect of should be able to accurately address sharp changes in the pipe flow
high-order spatial accuracy. On the other hand, the temporal vari- field. The significance of the above transient pipe flow simulation
ations of pressure and density at the downstream end of the pipe after the sudden closure of the downstream valve is that the
within the first second after the closure of the valve are plotted in capability of the present scheme in the simulation of such extreme
486 L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490

Fig. 5. Evolution of density distribution along the pipe after the sudden closure of the downstream valve, Dt ¼ 5 ms.

Fig. 6. Variation of pressure at the downstream end of the pipe after the sudden closure of the downstream valve.

flow conditions can be proved. Therefore, it can be used in the Research Facility (Moore et al., 2010) were further simulated in this
transient simulation of pipe flow network in a compression station study. In the Metering Research Facility, there was a C160-type
by simulating the pipe flow with a high-order accuracy and prop- single-stage centrifugal compressor driven by a Solar Saturn 20, a
erly evaluating the effects of elements in the network. 2-shaft industrial gas turbine. The schematic of the experimental
piping network of the research facility is illustrated in Fig. 8. As
5.2. Simulation of the transient flow in the piping network during shown in the schematic, a cooled recycle pipe loop connecting from
the ESD of a compressor in the Metering Research Facility the downstream to the upstream of the compressor is designed for
surge avoidance control, and the recycle pipe loop is controlled by
To further validate the numerical scheme for pipe flow and the an equal-percentage type (Kurz and White, 2004) recycle valve
quasi-steady models for elements, emergency shutdown experi- which has a maximum flow coefficient of 394 gpm/psi1/2. The pre-
ments of compressor carried out in the piping network of Metering stroke time and full-stroke time of the recycle valve are 0.18 s and
L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490 487

Fig. 7. Variation of density at the downstream end of the pipe after the sudden closure of the downstream valve.

Using the present models, simulations were conducted from the


initial operating conditions of the corresponding experimental
cases. Comparisons between the simulated and experimental
traces of compressor operating points for the selected cases of the
ESD tests are shown in Fig. 9. It can be seen from the figure that in
each case the compressor's operating point move toward the surge
operating conditions immediately after the start of ESD, indicating
Fig. 8. Schematic of the piping network of the Metering Research Facility. a decreasing compressor inflow. However, the reduction of
compressor inflow was inhibited shortly after the opening of the
recycle valve, and the operating point was later favorably moved
2 s, respectively. The cooler has an internal volume of 0.297 m3, and away from the theoretical surge line. For these selected cases with
the scrubber at the upstream of the compressor has an internal
various initial operating conditions, the simulated traces of
volume of 0.142 m3. The original experiments on the behaviors of compressor operating points agree with the corresponding exper-
the surge avoidance system during the emergency shutdown of the
imental data very well. Especially within the primary control stage,
compressor were conducted by Moore et al. (2010) from several where most of the variations of the characteristics have taken place
initial inflow conditions and rotation speeds of the compressor.
(the recycle valve has fully opened and the compressor has lost
Before the transient simulation of the flow in the experimental more than 75% of its initial head and more than 50% of its initial
piping network, a rigorous modeling of the network was conducted
rotation speed), the simulation accurately predicted the variation of
beforehand based on the actual dimensions of pipes, characteristics operating points during the shutdown process. The deviations from
of elements, and pipe-element connection status. To obtain
the experiment data for the three cases in the primary control stage
continuous performance curves for the MRF centrifugal are listed in Table 2. It can be seen that the maximum deviation
compressor, the steady-state experimental operating points at
from the experimental data for all of the three cases is less than 10%
19800 RPM and various inflow rates were used, and the discrete within this stage. This agreement then demonstrates the overall
operating points were fitted based on the cubic polynomial
validity of the present combined modeling strategy in the transient
formulation shown in Eq. (23). The obtained values of the constants simulation of the pipe flow network after the ESD of compressor.
in Eq. (23), namely, H0, C1, and C2, after the curve-fitting are
A further validation of the models was done by comparing the
1.811  104 J/kg, 1.335  103 J/kg, and 8.965  102 m3/h, respec- predicted and measured histories of compressor inflow, rotation
tively. The resulting cubic performance curve was compared to
speed, and isentropic head as shown in Fig. 10. The measured data
those discrete experimental operating points as shown in Fig. 9. At
in the figure are those for case #9 which was marked by an initial
any other rotation speeds, the characteristics of the compressor can
compressor inflow of 1824 m3/h. The rotor rotation speed of the
be extrapolated from the fitted performance curve at 19800 RPM
compressor during the shutdown process was estimated using Eq.
according to the fan affinity law. The theoretical surge line in the
(26), and it can be seen that the estimated rotation speed agrees
figure was obtained at the first horizontal slope of the experimental
with the measured data during the entire simulation process. This
head-flow operating points from the right and was used to indicate agreement proves that Eq. (26) is adequate in emulating the
the theoretical surge operating region of the compressor. The
deceleration of rotor during the ESD process. The predicted his-
properties of the major components and a typical composition of tories of compressor inflow and isentropic head agree with the
the natural gas used in the simulation are listed in Table 1.
measured data especially within the primary control stage of the
488 L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490

Fig. 9. Comparisons between the simulated and experimental traces of compressor operating points and during ESD for cases with various initial flow conditions and rotation
speeds around 19800 RPM. Initial conditions at the suction side of the compressor: ps ¼ 1275.9 kPa, Ts ¼ 22.4  C (Case #04), ps ¼ 1257.6 kPa, Ts ¼ 22.9  C (Case #05), and
ps ¼ 1233.5 kPa, Ts ¼ 22.6  C (Case #09).

Table 1
Properties of the components and typical composition of natural gas (Poling et al., 2000).

Component Molecular weight (g/mol) Critical pressure (MPa) Critical temperature (K) Critical volume (cm3/mol) Acentric factor Mole fraction(%)

Methane 16.04 4.599 190.56 98.60 0.011 81.8


Ethane 30.07 4.872 305.32 145.50 0.099 0.8
Propane 44.10 4.248 369.83 200.00 0.152 0.3
n-Butane 58.12 3.796 425.12 255.00 0.200 0.4
n-Pentane 72.15 3.370 469.70 311.00 0.252 0.1
Carbon dioxide 44.01 7.374 304.12 94.07 0.225 4.1
Nitrogen 28.01 3.398 126.20 90.10 0.037 12.0
Hydrogen sulfide 34.08 8.963 373.40 98.00 0.090 0.0
Helium 4.00 0.227 5.19 57.30 0.390 0.5

Table 2 the discharge side and suction side gradually diminishes as the
Deviation from the experimental data in the primary control stage. shutdown progresses due to the loss of driving power. The simu-
Cases Deviation in the primary control stage (%)
lated results also agree with the experimental data by correctly
predicting the temporal variation histories of pressure, despite the
Maximum Averaged
noticeable difference at the discharge side of the compressor. The
#04 6.67 3.39 maximum deviation from the experimental data is below 1%. This
#05 4.21 2.20
agreement can be attributed to the proper quasi-steady modeling
#09 8.40 4.16
for compressor and the reasonable treatment of compressor's
characteristics. The noticeable difference between simulation re-
sults and experimental data at the discharge side is due to the
incomplete knowledge of the detailed pipe-element arrangements
process, which is about 3 s for case #9, and the maximum deviation
and the lack of exact characteristics of the compressor at low
for both parameters is less than 10% in this stage. Noticeable
rotation speeds.
discrepancy can be observed after the primary control stage, and
this is a result of the increasing performance curve error at very low
rotation speeds and small inflow of the compressor. The discrep- 6. Conclusions
ancy then accumulates as the computation progresses. Nonethe-
less, the agreements in the compressor inflow and isentropic head The transient flow in the piping network of a natural gas
in the primary stage prove the validity of the quasi-steady model compression station was simulated for evaluating the performance
and also indicate a reasonable treatment of the performance curves of the surge avoidance system. The computational model used in
of the compressor. the simulation was developed based on a combined strategy
Furthermore, Fig. 11 shows the histories of pressures at both including the numerical scheme for pipe flow and the quasi-steady
sides of the compressor for case #9 by both simulation and modeling methods for elements. The detailed modeling strategy
experiment. It can be seen that the difference in pressure between can be summarized as:
L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490 489

Fig. 10. Comparisons of histories of compressor inflow, isentropic head, and rotation speed between predicted and experimental results for case #9.

Fig. 11. Comparisons between the predicted and experimental histories of pressure at both sides of the compressor for case #9.

 Since the flow in the piping network is usually subject to elements for the proper evaluation of their effects on the
rapid or slow transients due to the variations of the elements' network. The integration between the quasi-steady modeling of
characteristics, sharp changes can exist in the pipe flow field. the element and the pipe flow simulation was accomplished
Thus, an upwind scheme considering the real gas behaviors is through the characteristic boundary conditions.
appropriate for the simulation of the pressurized natural gas
pipe flow. The upwind scheme proposed in the present study The above computational model was validated through the
is composed of a Riemann solver for real gas and the MUSCL simulation of the transient flow in a single pipe after the sudden
scheme for the achievement of high orders of spatial closure of a downstream valve and the transient flow in the piping
accuracy. network of a compressor station after the ESD of compressor. The
 To simulate the pipe flow network in a compression station, results can be concluded as the following:
quasi-steady methods were used to model the four categories of
490 L. Zhang / Journal of Natural Gas Science and Engineering 28 (2016) 479e490

 The transient flow in a single pipe after the sudden closure of a Greek letters
downstream valve was first simulated to examine the capability a variable defined by (vh/vp)r
of the present numerical scheme for extreme flow conditions. b variable defined by (vh/vr)p
Simulations results indicated that the scheme with a high order g specific heat ratio
of accuracy can capture the wave front with a high resolution k variable defined by 1/(ra-1)
and spurious oscillations can be avoided near the wave front. l constant of the MUSCL scheme
 Experiments on the behaviors of the surge avoidance system x pressure loss coefficient
after the ESD of the compressor in the MRF were simulated to r density (kg/m3)
examine the capability of the models in predicting the overall f flux limiter
behavior of the surge avoidance system in a compression sta- c variable defined by c2-kh (m2/s2)
tion. For the selected cases of simulation, the deviation of the j constant of the MUSCL scheme
simulation results from the corresponding experimental data u ratio of power to the cube of rotation speed (W/rpm3)
was less than 10% in the primary control stage. The agreement
indicates that the quasi-steady models for elements are able to
evaluate the effects of elements on the pipe flow in a pipe flow References
network with a decent accuracy.
Abbaspour, M., Chapman, K.S., 2008. Nonisothermal transient flow in natural gas
pipeline. J. Appl. Mech. 75, 031018.
Acknowledgment
Alamian, R., Behbahani-Nejad, M., Ghanbarzadeh, A., 2012. A state space model for
transient flow simulation in natural gas pipelines. J. Nat. Gas Sci. Eng 9, 51e59.
Project supported by the National Natural Science Foundation of Behbahani-Nejad, M., Bagheri, A., 2010. The accuracy and efficiency of a MATLAB-
China (Grant No. 51306209) and the Science Foundation of China Simulink library for transient flow simulation of gas pipelines and networks.
J. Petrol. Sci. Eng. 70, 256e265.
University of Petroleum, Beijing (No. YJRC-2013-43). Botros, K.K., Campbell, P.J., Mah, D.B., 1991. Dynamic simulation of compressor
station operation including centrifugal compressor and gas turbine. ASME J.
Nomenclature Eng. Gas. Turb. Power 113, 300e311.
Botros, K.K., Petela, G., 1994. Use of method of characteristics & quasi-steady
approach in transient simulation of compressor stations. ASME Fluids Eng.
A Jacobian matrix Div. Sumer. Meet. 324e338. Lake Tahoe Nevada.
c speed of sound (m/s) Chaczykowski, M., 2010. Transient flow in natural gas pipeline e the effect of
pipeline thermal model. Appl. Math. Model 34, 1051e1067.
cp constant pressure heat capacity (J/kg$K) Dorao, C.A., Fernandino, M., 2011. Simulation of transients in natural gas pipelines.
C1 constant of head-flow equation (J/kg) J. Nat. Gas. Sci. Eng. 3, 349e355.
C2 constant of head-flow equation (m3/s) Gato, L.M., Henriques, J.C., 2005. Dynamic behavior of high-pressure natural-gas
flow in pipelines. Int. J. Heat. Fluid Flow. 26, 817e825.
Cf fanning friction factor
Greyvensein, G., 2002. An implicit method for the analysis of transient flows in pipe
Cv valve flow coefficient (gpm/psi1/2) networks. Int. J. Numer. Meth. Eng. 53, 1127e1143.
D pipe diameter (m) Hirsh, C., 2007. The Treatment of Boundary Conditions, in: Numerical Computation
of Internal and External Flows, Volume 2: Computational Methods for Inviscid
ESD emergency shutdown
and Viscous Flows, second ed. John Wiley & Sons, Chichester, pp. 344e407.
F flux Ke, S., Ti, H., 2000. Transient analysis of isothermal gas flow in pipeline network.
G source terms Chem. Eng. J. 76, 169e177.
h enthalpy (J/kg) Kessal, M., 2000. Simplified numerical simulation of transients in gas networks.
Chem. Eng. Res. Des. 78, 925e931.
hf film coefficient of heat transfer (J/m2$K) Kurz, R., White, R.C., 2004. Surge avoidance in gas compression systems. ASME J.
Hpol polytropic head (J/kg) Turbomach. 126, 501e506.
J moment of inertia (kg$m2) Ma, M., Chen, S., Abedi, J., 2015. Binary interaction coefficients of asymmetric CH4,
C2H6, and CO2 with high n-alkanes for the simplified PC-SAFT correlation and
k isentropic exponent prediction. Fluid Phase Equilibr 405, 114e123.
m_ mass flow rate (kg/s) Maric, I., Galovi 
c, A., Smuc, T., 2005. Calculation of natural gas isentropic exponent.
M mass (kg) Flow. Meas. Instrum. 16, 13e20.
Montagne , J.L., Yee, H.C., Vinokur, M., 1989. Comparative study of high-resolution
N rotation speed (rpm) shock-capturing schemes for a real gas. AIAA J. 27, 1332e1346.
n polytropic exponent Moore, F.K., Greitzer, E.M., 1986. A theory of post-stall transients in axial
p pressure (MPa) compression systems: part I-development of equations. J. Eng. Gas. Turb. Power
108, 68e76.
Q conservative variables Moore, J., Kurz, R., Garcia-Hernandez, A., Brun, K., 2010. Experimental evaluation of
Qin inlet volumetric flow rate of the compressor (m3/s) the transient behavior of a compressor station during emergency shutdowns.
R specific gas constant (J/kg K) J. Eng. Gas. Turb. Power 132, 062401.
Poling, B.E., Prausnitz, J.M., O'Connell, J.P., 2000. Pressure-volume-temperature
T temperature (K)
Relationships of Mixtures, in the Properties of Gases and Liquids, fifth ed.
Taw adiabatic wall temperature (K) McGraw-Hill, pp. 5.1e5.28.
u velocity (m/s) Reddy, H.P., Narasimhan, S., Bhallamudi, S.M., 2006. Simulation and state estimation
U internal energy (J) of transient flow in gas pipeline networks using a transfer function model. Ind.
Eng. Chem. Res. 45, 3853e3863.
v specific volume (m3/kg) Tentis, E., Margaris, D., Papanikas, D., 2003. Transient gas flow simulation using an
z compressibility factor adaptive method of lines. C. R. Mec. 331, 481e487.

You might also like