Professional Documents
Culture Documents
k
k
o , (6)
0 = I
k
k
, (7)
0 = I +
k
ki k ki
u T . (8)
Equation (6) is the volume closure, whereas Eqs. (7) and
(8) express mass and momentum jump conditions at the
interface, respectively. In summary the complete model is
comprised of 22 variables and 7 equations, which requires a set
of additional assumptions to simplify the mathematical model
and render the system of equations determined. Thus, we
neglect the molecular-viscous and the turbulent Reynolds
stresses based on the assumption that they are too small
compared to other stresses. Also, we assume that there is no
mass transfer between phases, which is reasonable for
isothermal flow. The pressure difference P
ki
is conceived for
the non-equilibrium situation where surface tension effects are
non-negligible at the phase interface. Hence, we assume that
this term is negligible for the gas phase, but not for the liquid
phase. Therefore, the variables
k k k
I , ,
Re
t t and Pg
i
are set
equal to zero.
The model, then, encompasses the following 13 variables:
gi li gw lw li g l g l g l g l
T T T T P P P u u , , , , , , , , , , , , A o o . On the other
hand there are just 6 equations now. Thus, constitutive relations
for stratified flow are necessary to close the overall system of
differential equations.
Single-Pressure Four-Equation Two-Fluid Model
In the two-fluid model that we use to simulate our test case
we assume that both phases have the same pressure at any cross
section of the pipe. This assumption simplifies the model
defined by Eqs. (4) and (5) because it reduces the number of
unknowns by one, that is, P
l
= P
g
= P. We now have a single-
pressure four-equation two-fluid model, or Single Pressure
Model 4 Equations, as referred to by Omgba-Essama [4] and
denoted simply by SPM-4. Therefore, the SPM-4 is a generic
4 Copyright 2012 by ASME
two fluid model which employs four differential equations (one
mass and one momentum equation for each phase) and a single
pressure for the gas and liquid phases at any cross section of
the pipe.
With the assumptions above, Eqs. (4) and (5) can be
written for each phase as
0
) ( ) (
=
c
c
+
c
c
x
u
t
g g g g g
o o
, (9a)
0
) ( ) (
=
c
c
+
c
c
x
u
t
l l l l l
o o
, (9b)
and
gw i fg g
g g g g g g
T T B
x
P
x
u
t
u
+ + +
c
c
=
c
c
+
c
c
o
o o ) ( ) (
2
,
(10a)
lw i fl
l
c l
l l l l l l
T T B
x
P
x
P
x
u
t
u
+ +
c
c
c
c
=
c
c
+
c
c o
o
o o ) ( ) (
2
,
(10b)
where
fk
B is the body-force term for phase k, defined as
| o sin g B
k k fk
. (11)
The pressure difference between the liquid phase and the
phase interface, denoted by P
li
, is now renamed as the
pressure correction term, and denoted by P
c
[4]. This term has
been modeled by Bonizzi et al. [8] to take into account pressure
distortions, such as pressure wave propagation. For a stratified
flow, P
c
may be written as
l
l
l l c
h
g P
o
| o
c
c
= cos , (12a)
or
x
h
g
x
P
l
l l
l
c
c
c
=
c
c
| o
o
cos , (12b)
where h
l
is the height of the liquid measured from the bottom of
the pipe.
Considering a steady fully-developed flow, the wall shear
stress term is here modeled as
A
S
T
k k
kw
t
= , (13)
where A is the pipes cross-sectional area, S
k
is the wet
perimeter of the phase k and t
k
is the shear stress at the wall in
contact with phase k, which is given by the constitutive
expression
k k k k k
u u f t
2
1
= . (14)
For the wall friction factors, the expressions proposed by
Taitel and Dukler [9] are used here, that is,
(
=
2 . 0
Re
046 . 0
,
Re
16
max
k k
k
f , (15)
where Re
k
is the Reynolds number for phase k defined as
k
k k h k
k
u D
= Re . (16)
For the sake of simplicity, we assume that the pipes
internal surface is smooth. In Eq. (16), D
hk
is the equivalent
hydraulic diameter [4] for phase k. The interfacial friction stress
term T
i
T
gi
is calculated from Eq. (13), where S
i
is the wet
perimeter of the interface. The interfacial stress t
i
is calculated
from Eq. (14) by replacing the velocity u
k
by the relative
velocity (u
g
u
l
), the density
k
by
g
and the interfacial
friction factor by the gas friction factor, that is, f
i
= f
g
.
Initial-boundary-value problem
The set of Eqs. (9) (16) form a closed system of four
equations, with u
g
, u
l
, o
l
and P as unknowns, where o
g
is given
by Eq. (3). This system is subject to the following boundary
and initial conditions:
Boundary conditions:
Pipeline inlet:
l l g
u u o , , ;
Pipeline outlet: P.
Initial conditions:
Values of P u u
l l g
, , , o are prescribed throughout the
domain at t = 0.
NUMERICAL METHOD
Hyperbolic system of PDEs
Equations (9) and (10) comprise a hyperbolic system of
Partial Differential Equations (PDEs) that is discretized, in this
paper, using the finite difference method. This type of system
may be written in the form
S
Q
H
F Q
+
c
c
=
c
c
+
c
c
x x t
. (17)
Equation (17) is a general representation of a non-
conservative hyperbolic system of PDEs. If H equals zero the
system is said to be conservative. For our SPM-4 model, we
5 Copyright 2012 by ASME
consider that the liquid phase is incompressible and that the gas
phase obeys the ideal gas law. Under these assumptions, Eq.
(10) may be rewritten according
gw i fg
g g g g g g g g
T T B
x
P
x
P u
t
u
+ + +
c
c
=
c
+ c
+
c
c o o o o ) ( ) (
2
,
(18a)
lw i fl
l
c
l l l l l l l
T T B
x
P P
x
P u
t
u
+ +
c
c
=
c
+ c
+
c
c o o o o
) (
) ( ) (
2
(18b)
The non-linear system of equations is then replaced by
Eqs. (9) and (18). If all four equations are put together in the
form of Eq. (17), the parameters Q, F, H and S may be
identified as
(
(
(
(
=
l l l
g g g
l l
g g
u
u
o
o
o
o
Q
(
(
(
(
(
+
+
=
P u
P u
u
u
l l l l
g g g g
l l l
g g g
o o
o o
o
o
2
2
F (19a,b)
( )
(
(
(
(
=
0 0 / 0
0 0 / 0
0 0 0 0
0 0 0 0
l c
l
P P
P
H
(
(
(
(
(
+ +
+ +
=
lw i fl
gw i fg
T T B
T T B
0
0
S . (19c,d)
General discretization
The pipe length is discretized into M computational cells
of regular size Ax L/M = x
j+1/2
x
j1/2
, with x
j1/2
= ( j 1)Ax,
x
j+1/2
= jAx and j = 1,,M, so that the center of the cell is
positioned at x
j
= ( j 1/2)Ax.
A general finite-difference approximation to Eq. (17) may
be written as
| |
j
n
j
j j
n
j
n
j
t
x
S
Q
H F F Q Q A + |
.
|
\
|
c
c
+ =
+
+
2 / 1 2 / 1
1
, (20)
where t/x, At is the time step, Ax is the mesh spacing and
F
+ + +
= F F F . (26)
In our algorithm, we assume that v and are constant and
equal to 0.125, as adopted by Omgba-Essama [4].
Discretization of the non-conservative term
The discretization of Eq. (17) combines the method for its
conservative counterpart described above with a specific
method that deals specifically with the non-conservative term
x c cQ H . We employ a second-order scheme proposed by
Harten [14] to discretize this term according to
6 Copyright 2012 by ASME
) , , ( z y x
H
Q
H m
x x
n
j
n
j
A
= |
.
|
\
|
c
c
, (27a)
where the ) , , ( z y x m function is defined as
= = =
otherwise , 0
) ( sgn ) ( sgn ) ( sgn if ), , , min(
) , , (
s s
m
z y x z y x
z y x ,
(27b)
with
) ( 2
1
n
j
n
j
Q Q x
+
, ) (
2
1
1 1
n
j
n
j +
Q Q y , ) ( 2
1
n
j
n
j
Q Q z .
(27c,d,e)
Boundary conditions
For a numerical domain [0, L] discretized into M mesh
cells, we denote the extreme cells by 1 at the left boundary and
M at the right boundary, both located 2 / x A inside the domain.
We, then, create a ghost cell 0 adjacent to cell 1 and a ghost cell
1 + M adjacent to cell M, such that the left and right
boundaries lie exactly half-way between the ghost and its
adjacent cell. The intercell flux
2 1
+ M
F at the right boundary is
calculated using
n
M
Q and a cell average
n
M
Q
1 +
at the same time
level. We specify the ghost states
n
Q
0
and
n
M
Q
1 +
according to
the physical boundary conditions that we impose, as explained
above.
Stability criteria
For explicit schemes, the time step At is chosen based on
the CFL (Courant-Friedrichs-Lewy) condition [2], given by
n
x
t
max
CFL
A
= A , (28)
where CFL is a positive number that is, usually, less than or
equal to one. The closer to unity, the more efficient the
numerical scheme is in terms of stability. For the FCT scheme,
Sod [15] has shown that the CFL value should be less than 0.5.
Equation (28) defines the maximum time step that keeps the
method stable. The parameter
n
max
is the largest eigenvalue in
the flow domain at time level n, and expresses, physically, the
largest speed at which pressure waves propagate in the flow.
This eigenvalue is numerically close to the speed of sound. For
a system of N equations and M mesh cells,
n
max
is given by
N k M j
k
j
k j
n
,..., 1 and ,..., 1 for , max max
max
= =
(
= . (29)
RESULTS AND DISCUSSION
Table 1 shows the values of the gas mass flow rate, the
liquid mass flow rate and the liquid holdup at the pipeline inlet,
and the pressure at the pipeline outlet, used as boundary and
initial conditions. These values correspond to data frequently
observed in real gas pipelines. For each case, a transient
simulation is performed for 100.000 s, starting from the initial
condition shown in Table 1, until the corresponding steady state
solution is obtained. This steady-state solution becomes the
initial condition for the transient shut-down flow that we are
simulating.
Table 1: Boundary and initial conditions.
g
m (kg/s)
l
m (kg/s)
l
o P (MPa)
x = 0 18,7 1,3 0.01
x = L
3.1
t = 0 18,7 1,3 0.01
The accuracy analysis that we have performed focuses on
the transient response of the SPM-4 model, discretized
according to the FCT finite-difference technique, for the flow
in the gas pipeline. The transient shut-down flow starts after a
short period of 100 s from the moment when the steady-state
solution is reached. At this time, the shut-down of the pipeline
inlet is carried out by reducing the gas and liquid mass flow
rates at the inlet through a ramp during a short period of 30 s.
These data are shown in Table 2. After that, a new transient
flow sets in, which is run for t
total
= 10.000 s. This simulation
time is long enough to characterize the transient flow we wish
to obtain.
Table 2: Boundary conditions at x = 0 for the transient
shut-down simulation.
t (s)
g
m (kg/s)
l
m (kg/s)
0 18,7 1,3
100 18,7 1,3
130 9,35 0,65
For the two-phase flow conditions defined in Tables 1 and
2, the maximum wave speed observed in our simulations is of
the order of 350 m/s, whereas the (average) speed of the liquid
and gas phases are of the order of 0.6 m/s and 4 m/s,
respectively. These figures produce liquid and gas Mach
numbers of the order of 0.002 and 0.011, and liquid and gas
Reynolds numbers of the order of 3.710
6
and 1.410
4
,
respectively. Therefore, the flow is subsonic and turbulent in
both phases.
Our strategy to study the space and time accuracies of the
FCT finite-difference method applied to our two-phase flow
model was based upon a sequence of simulations. To assess the
time accuracy, we have run the code for four different values of
At, keeping Ax constant. Analogously, the space accuracy is
7 Copyright 2012 by ASME
obtained by running the code for seven different values of Ax,
keeping the At constant. For each one of these cases the value
of the CFL condition changes, such that Eq. (28) is satisfied. To
produce normalized results, all the values of At and Ax were
made non-dimensional by t
total
and L, respectively. Hence, we
define a non-dimensional time step and a non-dimensional
mesh spacing as At At/t
total
A_ Ax/L, respectively. The
results below are presented as a function of At and A_.
Our accuracy analysis is based upon one global quantity,
the total mass inventory I, and one local quantity, the flow
pressure at the pipeline inlet p. Although this type of analysis
is usually carried out for global quantities only, such as I, we
have also chosen p to demonstrate that the FCT accuracy is also
valid for this quantity, which, despite being local, is very
important for the design engineer or the operational technician
that runs the pipeline on an everyday basis. The relative
numerical errors for the inventory and the inlet pressure are
defined here as
ref
ref
) (
I
I I
I E
, (30a)
ref
ref
) (
p
p p
p E
(30b)
where I
ref
and p
ref
are the most accurate inventory and pressure
values, respectively, obtained with the lowest values of At and
A_. These values replace an unavailable exact solution to the
problem under study and, therefore, are used as references to
evaluate the numerical error.
Figures 1 and 2 show the results we have obtained for E(I)
and E(p) as a function of At, keeping A_ constant, for three
non-dimensional times t, defined as t t/t
total
. The behavior of
both E(I) and E(p) with the time step show first order accuracy
for At 0.0175, for all three values of t investigated. A first-
order line was drawn in the graph to allow easy comparison.
This first order behavior in At occurs for both the total
inventory and the inlet pressure. Large time stepping, even if
stability is guaranteed by the enforcement of Eq. (28), produces
very large (and approximately constant) errors, as shown in
Figs. 1 and 2. Thus, if a fine transient response is sought, the
time marching process should be carried out slowly, with a
non-dimensional time step no higher than 10
-2
, approximately.
Figures 3 and 4 show graphs of E(I) and E(p), respectively,
as a function of A_, keeping At constant, for the same three
values of the non-dimensional time t. A first-order line and a
second-order line are drawn to help in the identification of the
error behavior. Our results show that, for large values of A_,
that is, A_ > 0.0013 in our simulations, the error behavior is
first-order accurate. However, as A_ is reduced below this
value, the relative errors on I and p show clearly a second-order
behavior, for all three times evaluated. This is expected, since
Boris and Book [6] have suggested that the FCT technique is
second-order in space in regions of smooth variations of the
flow quantities. In fact, for the finest mesh, the simulation
shows an error behavior of even higher-order. In practical
terms, our analysis indicate that relatively coarse meshes
should not be employed to perform general-purpose or real-
time simulations of transient two-phase flows in gas pipelines,
even if quick simulations are sought for design purposes, since
the errors obtained may be first-order accurate. For a typical
transient flow such as the one simulated here, mesh sizes lower
than about 10
-3
should be used in order to guarantee second-
order accuracy in space.
Figure 1: Relative error on the total inventory in the pipeline as
a function of non-dimensional time step At, for three different
non-dimensional times t.
Figure 2: Relative error on the pressure at the pipeline inlet as a
function of non-dimensional time step At, for three different
non-dimensional times t.
8 Copyright 2012 by ASME
Figure 3: Relative error on the total inventory in the pipeline as
a function of non-dimensional mesh size A_, for three different
non-dimensional times t.
Figure 4: Relative error on the pressure at the pipeline inlet as a
function of non-dimensional mesh size A_, for three different
non-dimensional times t.
CONCLUSIONS
In this paper we evaluate the space and time accuracies of
the flux-corrected transport (FCT) finite-difference method
when used to solve a one-dimensional single-pressure four-
equation two-fluid model for the two-phase flow that occurs in
a horizontal pipeline characterized by the stratified-flow
pattern.
The results show that the method is first order in time and
second order in space, which have important consequences on
the choice of mesh spacing and time step for a given accuracy.
The error analysis presented for a typical shut-down flow
highlights the conclusion that, in order to guarantee first-order
accuracy in time and second-order accuracy in space, we need
to choose a value of non-dimensional time step less than 10
-2
and of non-dimensional mesh spacing less than 10
-3
,
approximately. These values may be used as a guideline for
general purpose simulations of transient two-phase flows in gas
pipelines using the FCT technique. Of course, these guidelines
are restricted to moderate transients, such as the one considered
in this paper.
ACKNOWLEDGMENTS
The authors would like to thank PETROBRAS S.A. for the
financial support of this research project. The authors would
also like to acknowledge CNPq, CAPES and FAPERJ, research
sponsoring agencies of the Brazilian and Rio de Janeiro State
governments, for the continuous support of all research
activities of this group over the years.
REFERENCES
[1] Bendlksen, K. H., Malnes, D., Moe, R., and Nuland,
S., 1991, The Dynamic Two-Fluid Model OLGA:
Theory and Application, SPE 19451, SPE Production
Engineering, May, pp. 171-180.
[2] Hirsch, C., 1990, Numerical Computation of Internal
and External Flows: Fundamentals of Numerical
Discretization, Volume 2, John Wiley & Sons.
[3] Boris, J. P., and Book, D. L., 1973, Flux-Corrected
Transport. I. SHASTA, a Fluid Transport Algorithm
that Works, Journal of Computational Physics, 11,
pp. 38-69.
[4] Omgba-Essama, C., 2004, Numerical Modeling of
Transient Gas-Liquid Flow (Application to Stratified
and Slug Flows), PhD Thesis, AMAC, Cranfield
University, UK.
[5] Ishii, M., and Mishima, K., 1984, Two-Fluid Model
and Hydrodynamic Constitutive Relations, Nuclear
Engineering and Design, 82, pp. 107-126.
[6] Chan, A. M. C., and Banerjee, S., 1981, Refilling and
Rewetting of a Hot Horizontal Tube. Part II: Structure
of a Two-Fluid Model, Journal of Heat Transfer, 103,
pp. 287-292.
[7] Park, J. W., Drew, D. A., and Lahey Jr., R. T., 1998,
The Analysis of Void Propagation in Adiabatic
Monodispersed Bubbly Two-Phase Flows Using an
Ensemble-Averaged Two-Fluid Model, Int. J.
Multiphase Flow, 24, pp. 1205-1244.
[8] Bonizzi, M., Issa, R. I., and Kempf, M. H. W., 2001,
Modeling of Gas Entrainment in Horizontal Slug
Flow, Proceedings of the ICMF 2001 Conference,
USA.
[9] Taitel, Y., and Duckler, A.E., 1976, A Model For
Predicting Flow Regime Transitions in Horizontal and
Near-Horizontal Gas-Liquid Flow, AIChE Journal,
22 (1), pp. 47-55.
[10] Book, D. L., Boris, J. P., and Hain, K., 1975, Flux-
Corrected Transport II. Generalizations of the
Method, Journal of Computational Physics, 18, pp.
248-283.
[11] Boris, J. P., and Book, D. L., 1976, Flux-Corrected
Transport III. Minimal-Error FCT Algorithms,
Journal of Computational Physics, 20, pp. 397-431.
9 Copyright 2012 by ASME
[12] Zalesak, S. T., 1979, Fully Multidimensional Flux-
Corrected Transport for Fluids, Journal of
Computational Physics, 31, pp. 335-362.
[13] Fletcher, C. A. J., 1988, Computational Techniques
for Fluid Dynamics: Specific Techniques for Flow
Categories, Volume 2, Springer-Verlag.
[14] Harten, A., 1989, ENO Schemes with Subcell
Resolution, Journal of Computational Physics, 83, 1,
pp. 148-184.
[15] Sod, G. A., 1985, Numerical Methods in Fluid
Dynamics: Initial and Boundary Value Problems,
Cambridge University Press.