Open access

Computational Fluid Dynamics Methods for Gas Pipeline System Control

Written By

Vadim Seleznev

Published: 01 January 2010

DOI: 10.5772/7110

From the Edited Volume

Computational Fluid Dynamics

Edited by Hyoung Woo Oh

Chapter metrics overview

4,130 Chapter Downloads

View Full Metrics

1. Introduction

At the present level of development of long, branched gas transmission networks (GTN), solving the problems of improving safety, efficiency and environmental soundness of operation of industrial pipeline systems calls for the application of methods of numerical simulation. The development of automated devices for technical inspection and process control, and availability of high-performance computer hardware have created a solid technical basis to introduce numerical simulation methods into the industrial practice of GTN analysis and operation. One of the promising approaches for numerical analysis of GTN operating is the development and application of high-accuracy computational fluid dynamics (CFD) simulators of modes of gas mixture transmission through long, branched pipeline systems (CFD-simulator) (Seleznev, 2007).

Actually, a CFD-simulator is a special-purpose software simulating, in “online” and “real time” modes with a high similarity and in sufficient detail, the physical processes of gas mixture transmission through a particular GTN. The development of a CFD-simulator focuses much attention to correctness of simulation of gas flows in the pipelines and to the impact produced by operation of relevant GTN gas pumping equipment (including gas compressor unit (GCU), valves, gas pressure reducers, etc.) and the environment upon the physical processes under study.

From the standpoint of mathematical physics, a CFD-simulator performs numerical simulation of steady and transient, non-isothermal processes of a gas mixture flow in long, branched, multi-line, multi-section gas pipeline network. Such simulation is aimed at obtaining high-accuracy estimates of the actual distribution (over time and space) of fluid dynamics parameters for the full range of modes of gas mixture transmission through the specific GTN in normal and emergency conditions of its operation, as well as of the actual (temporal) distribution of main parameters of GTN equipment operation, which can be expressed as functional dependencies on the specified controls on the GTN and corresponding boundary conditions. Theoretically, the high-accuracy of estimates of gas flow parameters is achieved here due to (Seleznev et al., 2005): (1) minimization of the number and depth of accepted simplifications and assumptions in the mathematical modeling of gas flows through long, branched, multi-section pipelines and gas compressor stations (CS) on the basis of adaptation of complete basic fluid dynamics models, (2) minimization of the number and depth of accepted simplifications and assumptions in the construction of a computational model of the simulated GTN, (3) improving methods for numerical analysis of the constructed mathematical models based upon results of theoretical investigation of their convergence and evaluation of possible errors of solution, (4) taking into account the mutual influence of GTN components in the simulation of its operation, (5) detailed analysis and mathematically formal description of the technologies and supervisor procedures for management of gas mixture transport at the simulated GTN, (6) automated mathematic filtration of occasional and systemic errors in input data, etc.

Input information required for work of a CFD-simulator is delivered from the Supervisory Control and Data Acquisition System (SCADA-system) operated at the simulated GTN.

CFD-simulator’s operating results are used for on-line control of the specific GTN, as well as in short-term and long-term forecasts of optimal and safe modes of gas mixture transport subject to fulfillment of contractual obligations. Also, a CFD-simulator is often used as base software for a hardware and software system for prevention or early detection of GTN failures.

For better illustration of the material presented in this chapter, but without loss of generality, further description of a CFD-simulator will be based on a sample pipeline network of a gas transmission enterprise. For the purpose of modeling, natural gas is deemed to be a homogenous gas mixture. A CFD-simulator of a gas transmission enterprise’s GTN is created by combining CS mathematical models into a single model of the enterprise’s pipeline system, by applying models of multi-line gas pipelines segments (GPS) (Seleznev et al., 2007). At that, in accordance with their process flow charts, the CS models are created by combining of GCU, dust catcher (DC) and air cooling device (ACD) models by applying mathematical models of connecting gas pipelines (CGP).

In a CFD-simulator, the control of simulated natural gas transmission through the GTN is provided by the following control commands: alteration of shaft rotation frequency of centrifugal superchargers (CFS) of GCU or their startup/shutdown; opening or closing of valves at a CS and valve platforms of multi-line GPS; alteration of the rates of gas consumption by industrial enterprises and public facilities; alteration of the gas reduction program at reduction units; alteration of the operation program at gas distributing stations; change in the program of ACD operating modes, etc. Therefore, simulated control in a CFD-simulator adequately reflects the actual control of natural gas transmission through pipeline networks of the gas transmission enterprise.

Generally, a CFD-simulator can be divided into three interrelated components (elements) (Seleznev et al., 2007). Each of these components is an integral part of the CFS-simulator.

The first system element is a computational scheme of a gas transmission enterprise pipeline system built on the basis of typical segments representing minimum distinctions from a comprehensive topology of an actual system considering the arrangement of valves, the system architecture, laying conditions, the process flow scheme of the system’s CS, etc. The second component is a database containing input and operative (current) data on time-dependent (owing to valves operation) system topology, pipeline parameters, process modes and natural gas transmission control principles for an actual gas transmission enterprise. The third component of a CFD-simulator is a mathematical software which operates the first two CFD-simulator elements.

The mathematical software includes (in addition to the computation core) a user interface environment imitating the operation of actual control panels located at gas transmission enterprises control centers in a visual form familiar to operators. This provides for faster training and, for the operator, easier adaptation to the CFD-simulator.

Advertisement

2. Simulation of multi-line GPS by CFD-simulator

Multi-line GPS are long, branched, multi-section pipelines. For numerical evaluation of parameters of steady and transient, non-isothermal processes of the gas mixture flow in multi-line GPS, a CFD-simulator uses a model developed by tailoring the full set of integral fluid dynamics equations to conditions of the gas flow through long branched pipeline systems. Transform of the 3D integral problem to an equivalent one-dimensional differential problem is implemented by accepting the minimum of required simplifications and projecting the initial system of equations onto the pipeline's geometrical axis. At that, a special attention is given to the adequacy of simulation of pipeline junction nodes where the 3D nature of the gas flow is strongly displayed.

In order to improve the accuracy of the simulations, it is reasonable to use the CFD-simulator in the “online” and “real time” modes for the numerical analysis of the given processes. There are two mathematical models of fluid flow through branched pipeline: heat-conductive model of pipeline junction and nonconductive model of pipeline junction. These models were developed by S. Pryalov and V. Seleznev at the turn of the century. These alternatives differ in a way of simulation of gas heat transfer within pipeline junction. The principle underlying the simulations is to observe the major conservation laws as strictly as possible. In practice the simultaneous implementation of the models makes it possible to find an accurate solution in short time.

The basis for the mathematical models of fluid flow through branched pipeline was the geometrical model of a junction (fig. 1) proposed by S. Pryalov (Seleznev et al., 2005). In this model, volume V ( 0 ) can be depicted as a right prism with base area S b a s e and height H (see fig. 1а). For the prism lateral surface with linear dimensions δ ( n ) , true is the following relation: δ ( n ) = f ( n ) / H , where f ( n ) is the cross-sectional area of the pipe adjacent to the junction core V ( 0 ) . It should be noted that the summarized volume of the joint is equal to V = n = 0 N V ( n ) , where V ( n ) n = 1 N is the volume of an infinitely small section of the pipe adjacent to the junction core V ( 0 ) (see fig. 1b). The prism base area can be represented as follows: S b a s e = ς b a s e δ ( 1 ) 2 , where ς b a s e is the factor depending on the prism base geometry only. Now volume V ( 0 ) can be determined by the following formula: V ( 0 ) = H S b a s e = = H ς b a s e ( f ( 1 ) / H ) 2 = ς b a s e f ( 1 ) 2 / H , which means that lim H V ( 0 ) = lim H [ ς b a s e f ( 1 ) 2 / H ] = 0 . The application of this geometrical model enabled us to approximate compliance with mass, momentum and energy conservation laws at the pipelines junction.

Simplifications and assumptions used to construct the heat-conductive model of pipeline junction include the following: (1) when gas mixture flows join together, pressure can change with time, but at each time step it will have the same value at the boundaries of the pipeline junction, (2) the simulations take account of «downwind” heat and mass exchange due to heat conduction and diffusion, (3) in the pipeline junction, the gas mixture instantaneously becomes ideally uniform all over the pipeline junction volume V ( 0 ) (see fig. 1b), (4) effects of gas mixture viscosity in the pipeline junction (inside the volume V ( 0 ) ) can be ignored, (5) there are no heat sources in V ( 0 ) (inside the volume V ( 0 ) ), (6) pipeline diameters near the pipeline junction are constant.

Figure 1.

A schematic of a pipeline junction (а – 3D drawing; b – diagram)

Then, the heat-conductive fluid dynamics model of a transient, non-isothermal, turbulent flow of a viscous, chemically inert, compressible, heat-conductive, multi-component gas mixture through multi-line GPS which consist of pipes of round cross-sections and rigid rough heat-conductive walls is represented in the following way (Seleznev et al., 2005):

for each pipe adjacent to the junction node

( ρ f ) t + x ( ρ w f ) = 0 E1
t ( ρ Y m f ) + x ( ρ Y m w f ) x ( ρ f D m Y m x ) = 0 m = 1 N S 1 ¯ Y N S = 1 m = 1 N S 1 Y m E2
( ρ w f ) t + ( ρ w 2 f ) x = f ( p x + g ρ z 1 x ) π 4 λ ρ w | w | R E3
t [ ρ f ( ε + w 2 2 ) ] + x [ ρ w f ( ε + w 2 2 ) ] = x ( p w f ) ρ w f g z 1 x p f t + Q f + x ( k f T x ) Φ ( T T am ) + x ( ρ f m = 1 N S ε m D m Y m x ) E4

for each of the junction nodes

ρ t + n = 1 N Θ ( n ) ( ( ρ w ) x ) ( n ) = 0 E5
( ρ Y m ) t + n = 1 N ( ( ρ Y m w ) x ) ( n ) Θ ( n ) n = 1 N [ x ( ρ D m Y m x ) ] ( n ) Θ ( n ) = 0 m = 1 N S 1 ¯ Y ( n ) N S = 1 m = 1 N S 1 Y ( n ) m E6
( ( ρ w ) t ) ( n ) + ( ( ρ w 2 ) x ) ( n ) = ( p x ) ( n ) g ρ ( z 1 x ) ( n ) 0.25 ( λ ρ w | w | R ) ( n ) n = 1 N ¯ E7
( ρ ε ) t + n = 1 N ( ( ρ ε w ) x Θ ) ( n ) = n = 1 N ( p w x Θ ) ( n ) + 0.25 n = 1 N ( λ ρ | w | 3 Θ R ) ( n ) + + Q + n = 1 N ( [ x ( k T x ) ] Θ ) ( n ) n = 1 N ( Φ ( T T am ) f Θ ) ( n ) + n = 1 N m = 1 N S ( [ x ( ρ ε m D m Y m x ) ] Θ ) ( n ) E8
T ( n ) = T ( ξ ) ε = ε ( n ) = ε ( ξ ) ( ε m ) ( n ) = ( ε m ) ( ξ ) ρ = ρ ( n ) = ρ ( ξ ) p ( n ) = p ( ξ ) k ( n ) = k ( ξ ) ( D m ) ( n ) = ( D m ) ( ξ ) Y m = ( Y m ) ( n ) = ( Y m ) ( ξ ) ( z 1 ) ( n ) = ( z 1 ) ( ξ ) for any n ξ 1 N ¯ and m 1 N S ¯ E9
n = 1 N ( w f s ) ( n ) = 0 n = 1 N ( T x f s ) ( n ) = 0 n = 1 N ( Y m x f s ) ( n ) = 0 E10
s ( n ) = { 1 i f ( n ( 0 ) i ( n ) ) 0 1 i f ( n ( 0 ) i ( n ) ) 0 Θ ( n ) = V ( n ) V = f ( n ) L γ ( n ) k = 1 N ( f ( k ) L γ ( n ) ) 0 Θ ( n ) 1 n = 1 N Θ ( n ) = 1 E11

equation of state (EOS) and additional correlations:

p = p ( { S mix } ) ε = ε ( { S mix } ) k = k ( { S mix } ) ε m = ε m ( { S mix } ) D m = D m ( { S mix } ) m = 1 N S ¯ T 1 = T 2 = = T N S = T E12

where ρ is the density of the gas mixture; f is the flow cross-sectional area of pipeline; t is time (marching variable); x is the spatial coordinate over the pipeline's geometrical axis (spatial variable); w is the projection of the pipeline flow cross-section averaged vector of the mixture velocity on the pipeline's geometrical axis (on the assumption of the developed turbulence); Y m is a relative mass concentration of the m component of the gas mixture); D m is a binary diffusivity of component m in the residual mixture; N S is the number of components of the homogeneous gas mixture; p is the pressure in the gas mixture; g is a gravitational acceleration modulus; z 1 is the coordinate of the point on the pipeline's axis, measured, relative to an arbitrary horizontal plane, upright; π is the Pythagorean number; λ is the friction coefficient in the Darcy – Weisbach formula; R = f / π is the pipe's internal radius; ε is specific (per unit mass) internal energy of the gas mixture; Q is specific (per unit volume) heat generation rate of sources; k is thermal conductivity; T is the temperature of gas mixture; ε m is specific (per unit mass) internal energy of the m component; T m is the temperature of the m component; N is the number of pipes comprising one junction (see (5–11)); s ( n ) Θ ( n ) are auxiliary functions (re n ( 0 ) i ( n ) see fig. 1b below); { S mix } is a set of parameters of gas mixture. Function Φ ( T T am ) is defined by the law of heat transfer from the pipe to the environment and expresses the aggregate heat flow through the pipe walls along perimeter χ of the flow cross-section with area f ( Φ ( T T am ) 0 is cooling), T am is the ambient temperature. To denote the relationship of a value to the pipe numbered by n , we use a parenthesized superscript on the left side of the value, e.g.: ρ ( n ) . In equations (1–12), we use physical magnitudes averaged across the pipeline's flow cross-section. The set of equations (1–12) is supplemented by the boundary conditions and conjugation conditions. As conjugation conditions it is possible to specify boundary conditions simulating a complete rupture of the pipeline and/or its shutoff, operation of valves, etc.

As was stated above, the energy equations (4) and (8) comprise function Φ ( T T am ) describing the heat exchange between the environment and natural gas in the course of its pipeline transmission. The space-time distribution of function Φ ( T T am ) is defined, in the CFD-simulator, at specified time steps of the numerical analysis of parameters of the transient mode of gas transmission by solving a series of conjugate 2D or 3D problems of heat exchange between the gas flow core and the environment (Seleznev et al., 2007).

Simulation of steady processes of gas mixture flow through multi-line GPS is a less complicated task compared to (1–12). These models can be easily derived by simplifying the set of equations (1–12).

When simulating the gas mixture flow through real multi-line GPSs, one uses meshes with a spatial cell size of 10m to 10,000m. As a result, a smooth growth (or decrease) of temperature in a span of about 10 5 m will be simulated as a temperature jump. Difference “upwind” equations make it possible to find a solution, which is quite adequate for the process at issue, almost without any impact on the convergence and accuracy of the resulting solution. On the contrary, the schemes that use the principles of central differences as applied to this process can yield solutions with difference oscillations. This may impair the accuracy of such simulations.

To overcome this drawback, S. Pryalov and V. Seleznev in 2008 suggested using the nonconductive model of pipeline junction. Downwind (and upwind) heat conduction and diffusion in this model are ignored. There will be a temperature discontinuity on gas mixture transition through the pipeline junction node, but this dependence will be monotone along each pipeline.

The list of additional simplifications in setting up the nonconductive model of pipeline junction includes only one item: the model ignores the downwind heat and mass exchange in the gas mixture due to heat conduction and diffusion. The temperature of the gas mixture at the outlet boundaries of inlet pipelines is defined only by the mixture flow parameters (mainly, by the temperature) inside these pipelines.

As there is no downwind heat transfer mechanism from the volume V ( 0 ) to the inlet pipelines, the temperature of the gas mixture at these boundaries may differ from the temperature inside the volume V ( 0 ) . On the other hand, the outlet boundaries of the inlet pipelines are also boundaries of the volume V ( 0 ) . For this reason, it does not seem to be correct to say that the mixture is uniformly intermixed all over the volume.

Thus, the nonconductive model of pipeline junction of a transient, non-isothermal, turbulent flow of a viscous, chemically inert, compressible, multi-component gas mixture through multi-line GPS which consist of pipes of round cross-sections and rigid rough heat-conductive walls contains equations (1), (3), (7), (11) and the following equations:

for each pipe adjacent to the junction node

t ( ρ Y m f ) + x ( ρ Y m w f ) = 0 m = 1 N S 1 ¯ Y N S = 1 m = 1 N S 1 Y m E13
t [ ρ f ( ε + w 2 2 ) ] + x [ ρ w f ( ε + w 2 2 ) ] = = x ( p w f ) ρ w f g z 1 x p f t + Q f Φ ( T T am ) E14

for each of the junction nodes

n IN { t [ ρ ( p Joint T ( n ) { Y ( n ) m | m = 1 N s ¯ } ) ] Θ ( n ) } + + t [ ρ ( p Joint T Joint { Y m Joint | m = 1 N s ¯ } ) ] n OUT Θ ( n ) + + n = 1 N { x [ ρ ( p Joint T ( n ) { Y ( n ) m | m = 1 N s ¯ } ) w ( n ) ] Θ ( n ) } = 0 E15
( t ( ρ Y m f ) ) ( n ) + ( x ( ρ Y m w f ) ) ( n ) = 0 m = 1 N S 1 ¯ Y N S = 1 m = 1 N S 1 Y m n IN E16
Y m , Joint = n IN ( ρ | w | f Y m ) ( n ) / n IN ( ρ | w | f ) ( n ) m = 1 N S ¯ E17
( t [ ρ ( ε + w 2 2 ) ] ) ( n ) + ( x [ ρ w ( ε + w 2 2 ) ] ) ( n ) = = ( ( p w ) x ) ( n ) ( ρ w g z 1 x ) ( n ) + Q ( n ) ( Φ ( T ( n ) T ( n ) am ) f ) ( n ) n IN E18
h Joint = n IN ( ρ | w | h f ) ( n ) / n IN ( ρ | w | f ) ( n ) n { IN 1 N ¯ i f ( w s ) ( n ) 0 OUT 1 N ¯ i f ( w s ) ( n ) 0 E19
T Joint = T ( p Joint ε Joint { Y m Joint | m = 1 N s ¯ } ) ρ Joint = ρ ( p Joint T Joint { Y m Joint | m = 1 N s ¯ } ) E20
ε Joint = h Joint p Joint / ρ Joint n IN ( ρ | w | f ) ( n ) = n OUT ( ρ | w | f ) ( n ) E21
p ( n ) = p Joint n = 1 N ¯ ρ ( n ) = ρ Joint n OUT T ( n ) = T Joint n OUT ε ( n ) = ε Joint n OUT E22
Y ( n ) m = Y m , Joint n OUT m = 1 N S ¯ ( z 1 ) ( n ) = ( z 1 ) ( ξ ) for any n ξ 1 N ¯ E23

equation of state:

h = ε + p / ρ p = p ( ρ T { Y m | m = 1 N s ¯ } ) ρ = ρ ( p T { Y m | m = 1 N s ¯ } ) E24
ε = ε ( p T { Y m | m = 1 N s ¯ } ) T = T ( p ε { Y m | m = 1 N s ¯ } ) E25

where the subscript “ Joint ” means that the physical parameter of the gas mixture belongs to the pipeline junction i.e. to the volume V ( 0 ) h Joint is enthalpy of the gas mixture in the pipeline junction.

The numerical analysis of the mathematical models (1–12) and (1, 3, 7, 11, 13–24) under consideration will be carried out by hybrid algorithm. It comprises Integro-Interpolation Method by A. Tikhonov and A. Samarsky (IIM) (Russian analog of the Finite Volume Method) (Tikhonov & Samarsky, 1999) and Lagrangian Particle Method by Pryalov (LPM).

To illustrate the parametric classes used for the difference equations in IIM, it is possible to present the class of the difference equations for a mathematical model of the non-isothermal transient motion of a multi-component gas mixture through a GPS line (see (1–4, 12)) (Seleznev, 2007):

[ ( ρ F ) ( S ) ] t + + ( ρ ( R ) w ( 0.5 ) f ( 0.5 ) ) x + ( σ θ ) = 0 E26
[ ( ρ F ) ( S ) ( Y m ) ( S ) ] t + + ( ρ ( R ) w ( 0.5 ) f ( 0.5 ) ( Y m ) ( R ) ) x + ( σ θ ) [ ( ρ f D m ) ( R ) δ ( Y m ) a ] x + ( σ θ ) = 0 m = 1 N S 1 ¯ Y N S = 1 m = 1 N S 1 Y m E27
[ ( ρ F ) ( S ) w ( S ) ] t + + ( ρ ( R ) w ( 0.5 ) f ( 0.5 ) w ( R ) ) x + ( σ θ ) = = ( B γ p x ¯ + B + γ + p x ) ( σ θ ) g [ ρ ( B γ ( z 1 ) x ¯ + B + γ + ( z 1 ) x ) ] ( σ θ ) π 4 ( λ ρ | w | r ) ( σ θ ) w ( σ θ ) E28
[ ( ρ F ) ( S ) ε ( S ) ] t + + ( ρ ( R ) w ( 0.5 ) f ( 0.5 ) ε ( R ) ) x + ( σ θ ) + K t ( ρ F w 2 2 ) + K x ( ρ w f w 2 2 ) ( σ θ ) = = ( p ( R ) w ( 0.5 ) f ( 0.5 ) ) x + ( σ θ ) g [ ρ ( B γ ( z 1 ) x ¯ + B + γ + ( z 1 ) x ) ] ( σ θ ) w ( σ θ ) p ( σ θ ) [ F ( S ) ] t + + + ( Q F ) ( σ θ ) + [ ( k f ) ( R ) δ T a ] x + ( σ θ ) ϕ ( σ θ ) + m = 1 N S [ ( ρ D m f ) ( R ) ( ε m ) ( R ) δ ( Y m ) a ] x + ( σ θ ) E29
ε m = ε m ( { S mix } ) m = 1 N S ¯ T 1 = T 2 = = T N S = T p = p ( { S mix } ) ε = ε ( { S mix } ) E30
k = k ( { S mix } ) D m = D m ( { S mix } ) m = 1 N S ¯ E31

where F B + B are the expressions approximating f r is the expression approximating R (the type of these expressions is defined upon selection of a particular scheme from the class of schemes); s a s b r a r b σ θ are parameters of the class of schemes (e.g., by specifying s a = s b = 1 r a = r b = 0 5 σ = 1 θ = 0 , a two-layer scheme with central differences is selected from the class of scheme, and by specifying s a = s b = 1 r a r b is according to the principles of “upwind” differencing, σ = 1 θ = 0 is a two-layer “upwind” scheme); K t and K x are the differential-difference operators of functions ( 0.5 ρ F w 2 ) and ( 0.5 ρ w f w 2 ) over time and space, respectively (the type of these operators is defined upon selection of a particular scheme from the class of schemes); ϕ ( σ θ ) is a difference expression approximating function Φ ( T T am ) . The difference equations (25–30) are supplemented by difference expression of initial and boundary conditions, as well as of conjugation conditions.

To record the parametric class of the difference equations (25–30), we used notations of a non-uniform space-time mesh { x i t j } , where x i and t j are coordinates of the mesh node numbered i over space, and j , over time, i j Z Z being a set of nonnegative integers.

To explain the notations, it is expedient to consider an individual computational cell containing the node { x i t j } (mesh base node) and bounded by straight lines x = x i a x = x i b t = t j a and t = t j b x i 1 x i a x i x i x i b x i + 1 t j 1 t j a t j t j t j b t j + 1 x i a x i b t j a t j b Let us introduce the so-called weighing parameters:

r i a = x i a x i 1 x i x i 1 = x i a x i 1 h i r i b = x i b x i x i + 1 x i = x i b x i h i + 1 s j a = t j a t j 1 t j t j 1 = t j a t j 1 τ j s j b = t j b t j τ j + 1 E32

where h i = x i x i 1 and h i + 1 = x i + 1 x i are steps “backward” and “forward” over the space coordinate for the i node; τ j = t j t j 1 and τ j + 1 = t j + 1 t j are steps “backward” and “forward” over the time coordinate on the j time layer; α i = h i + 1 / h i and β j = τ j + 1 / τ j are mesh parameters characterizing non-uniformity of the space and time mesh. To describe mesh function y = y ( x t ) , the system (25–30) used the following notations:

y i j = y ( x i t j ) y i = y i ( t ) = y ( x i t ) y j = y j ( x ) = y ( x t j ) E33

Where there was applied the quadratic approximation

y ( x t ) = a i y ( t ) x 2 + b i y ( t ) x + c i y ( t ) x [ x i 1 x i ] y ( x t ) = a i y + ( t ) x 2 + b i y + ( t ) x + c i y + ( t ) x [ x i x i + 1 ] E34

the system used the following notations:

δ y ( x t ) = y x = 2 a i y ( t ) x + b i y ( t ) x [ x i 1 x i ] δ y ( x t ) = y x = 2 a i y + ( t ) x + b i y + ( t ) x [ x i x i + 1 ] ( δ y a ) i j = 2 a i y ( t j ) x a + b i y ( t j ) ( δ y b ) i j = 2 a i y + ( t j ) x b + b i y + ( t j ) E35

Also, the system (25–30) used the following index-free notations:

y = y i j h = h i α = α i τ = τ j β = β j x = x i t = t j y = y i j + 1 y = y i j 1 y ( + 1 ) = y i + 1 j y ( 1 ) = y i 1 j r a = r i a r b = r i b s a = s j a s b = s j b i j Z y ( a ) = a y + ( 1 a ) y y ( b ) = b y + ( 1 b ) y ( 1 ) y ( a b ) = a y + ( 1 a b ) y + b y y ( S ) = s a y + ( 1 s a ) y y ( + S ) = s b y + ( 1 s b ) y y ( R ) = r a y + ( 1 r a ) y ( 1 ) y ( + R ) = r b y ( + 1 ) + ( 1 r b ) y y ( R ) ( + 1 ) = y ( + R ) y ( + R ) ( 1 ) = y ( R ) y ( S ) = y ( + S ) y ( + S ) = y ( S ) Δ t = t t a = ( 1 s a ) τ Δ t + = t b t = s b τ = β s b τ Δ x = x x a = ( 1 r a ) h Δ x + = x b x = r b h ( + 1 ) = α r b h Δ t = t b t a = Δ t + + Δ t = ( 1 s a ) τ + s b τ = ( 1 s a ) τ + β s b τ Δ x = x b x a = Δ x + + Δ x = ( 1 r a ) h + r b h ( + 1 ) = ( 1 r a ) h + α r b h γ = Δ x / Δ x = ( 1 r a ) h / [ ( 1 r a ) h + r b h ( + 1 ) ] = ( 1 r a ) / [ ( 1 r a ) + α r b ] γ + = Δ x + / Δ x = r b h ( + 1 ) / [ ( 1 r a ) h + r b h ( + 1 ) ] = α r b / [ ( 1 r a ) + α r b ] δ y a ( + 1 ) = δ y b δ y b ( 1 ) = δ y a y x = [ y ( + 1 ) y ] / h ( + 1 ) y x ¯ = [ y y ( 1 ) ] / h y x ¯ ( + 1 ) = y x y x ( 1 ) = y x ¯ y t + = [ y y ] / Δ t y x + = [ y ( + 1 ) y ] / Δ x E36

LPM is illustrated by the example of solution of energy equation from gas dynamics equations set for a single-component gas transmitted through an unbranched pipeline. Imaginary Lagrange particles are distributed along the pipeline. They are considered weightless. This allows them to move together with the fluid. Due to the small size, each particle can instantaneously acquire the temperature of the ambient fluid. Thus, by tracking the motion of such Lagrange particles along with the fluid and their temperature, one can analyze the process of heat transfer through multi-line GPSs. Energy equation is easy to derive by simplifying and transforming equation (4) accounting for (1-3), (12) and (23). The simplified equation will have the following form:

h t + w h x = w ρ p x + 1 ρ p t + λ | w | 3 4 R Φ ( T T am ) f ρ or   D h D t = G ( x t T ( h ) ) E37

where

G ( x t T ) = w ρ p x + 1 ρ p t + λ | w | 3 4 R Φ ( T T am ) f ρ E38
D ξ / D t = ξ / t + w ξ / x is a derivative of an arbitrary function ξ over t in the direction
d x / d t = w ( x t ) E39

This direction is called characteristic, and the equation is called the equation of characteristic direction. The second equation in (31) is called the characteristic form of the first equation in (31) or the differential characteristic relation. From the physical standpoint, the derivative D h / D t corresponds to the substantial derivative, and the solution of equation (33) defines the coordinate of the continuum particle (in our case, the spatial coordinate of the fluid flow cross section) at each time.

Considering the known thermodynamic relationship

d h = c p d T μ c p d p E40

where c p is specific heat capacity at constant pressure; μ is the Joule-Thomson factor, equation (31) can be transformed as follows:

D T D t = ( μ + 1 ρ c p ) D p D t + λ | w | 3 4 R c p Φ ( T T am ) f ρ c p E41

Equation (35) is satisfied along each characteristic curve (33). These curves per se describe the trajectory of fluid particles. In other words, these equations describe the change in the fluid temperature for each cross section of the transported product flow.

When implementing the LPM, fluid flow parameters (such as pressure and velocity) are obtained using a difference scheme, while the gas temperature distribution is obtained based on the analysis of the Lagrange particle motion. For each particle, equation (35) is solved. The form of this equation enables such simulations, because it corresponds to the change in time of the temperature at each cross section of the fluid flow. Within this problem statement (which is Lagrangian with respect to each particle), equation (35) transforms into an ordinary differential equation (ODE) relative to the marching variable:

d T d t ( μ + 1 ρ c p ) d p d t = λ | w | 3 4 R c p Φ ( T T am ) f ρ c p E42

Numerical analysis of ODE (36) can be carried out using different ODE solution procedures, for example, the known Runge – Kutta method with an adjustable accuracy of solution. As initial temperature of Lagrange particles one uses respective values from the defined initial conditions (i.e., for each Lagrange particle, its temperature is assumed equal to the fluid temperature at the location of the given particle).

As particles move together with the fluid flow towards the outlet pipe boundary, one needs to introduce new Lagrange particles at the inlet boundary at some regular intervals. The initial temperature of each introduced particle should be defined based on the boundary conditions related to the inlet boundary of the given pipe. The Lagrange particles that leave the pipe are deleted. As applied to the inlet boundaries of the outlet pipelines of each junction node, the temperature of the introduced particles should be defined in accordance with equations (10) and (12).

Since LPM for solving the energy equation is not related immediately to the finite difference mesh used to solve the continuity and momentum equations, this mesh has almost no effect on the accuracy of the method proposed. Thus, high-accuracy computed values of gas temperature are obtained without mesh refinement, and this leads to a considerable speedup of computations.

Also, as there is no direct relationship between LMP and the finite difference mesh, the method is free of artificial viscosity and computational dispersion (Fletcher, 1988). As a result, LPM yields solutions without “scheme smoothing” of temperature fronts, which is consistent with actual physical processes. This makes such simulations more credible than the simulations, in which the energy equation is solved using difference schemes.

Advertisement

3. Simulation of a CS by CFD-simulator

The principal task of mathematical simulation of stable and safe operation of a CFS is to determine physical parameters of gas at the CFS outlet on the basis of the known values of gas flow parameters at the CFS inlet. To construct a 1D mathematical model of a CFS in a CFD-simulator, we used a well-known polytropic model of a CFS developed by A. Stepanov. The model is based on the combination of analytical dependencies for polytropic fluid dynamics processes and empirical characteristics obtained for each CFS during its full-scale testing.

When simulating steady modes of CS operation, an isothermal model is used for description of the gas flow in a CGP and DC, and an isobaric model – for description of the gas flow in an ACD. The power drive is simulated by specifying an analytical dependency of the capacity at the CFS shaft on energy expenditures. Such approach provides for the simplicity of the conjugation of models and a high, from the practical standpoint, veracity of simulation.

As was noted above, a CFD-simulator of a particular CS is a result of combining GCU, ACD and DC models, by application of CGP models, into a single integral network model of the CS in accordance with the process flow charts of the actual CS (fig. 2).

As proposed by V. Seleznev (Kiselev et al., 2005), in order to determine parameters of steady modes of natural gas transmission through a CS, generally, it is necessary to solve a system of nonlinear algebraic equalities under simple constraints on unknown variables. The system includes the law of conservation of gas masses at CGP branching points and one of the group of equations representing either conditions for conservation of mass flow rate at inlet and outlet CGPs in one branch, or conditions for equality of natural gas heads in parallel branches, where a branch is a segment of a pipeline system, which comprises an inflow (inlet) CGP, CFS and an outflow (outlet) CGP (see fig. 2).

As independent decision variables we used fractions of a mass flow rate of natural gas transmitted through separate branches of a CS, ratios of compression by compressor shops and ratios of compression by GCUs working as the first stage of transmitted gas compression at compressor shops. Such a set of variables allowed to reduce the problem dimension and narrow the range of search for problem solution, by more accurate specification of constraints on variables. This allowed to considerably save running time.

Figure 2.

The scheme of decision independent variables assignment for on-line technological analysis of gas transmission through CS

The mathematical model for the CS scheme presented in fig. 2 can be written as follows:

{ P 11 1 ( J i n P i n T i n J 1 ( X 1 ) J 11 ( X 2 ) X 6 ) P 12 1 ( J i n P i n T i n J 1 ( X 1 ) J 12 ( X 3 ) X 4 ) = 0 P 12 1 ( J i n P i n T i n J 1 ( X 1 ) J 12 ( X 3 ) X 4 ) P 13 1 ( J i n P i n T i n J 1 ( X 1 ) J 13 X 8 X 7 ) = 0 P 13 1 ( J i n P i n T i n J 1 ( X 1 ) J 13 X 8 X 7 ) P 21 1 ( J i n P i n T i n J 2 J 21 X 9 X 5 ) = 0 J 11 ( X 2 ) J 11 1 ( X 6 ) = 0 J 12 ( X 3 ) J 12 1 ( X 4 ) = 0 J 13 J 13 1 ( X 8 ) = 0 J 13 1 ( X 8 ) J 13 2 ( X 8 X 7 ) = 0 J 21 J 21 1 ( X 5 ) J 21 2 ( X 9 ) = 0 J 21 2 ( X 9 ) J 21 3 ( X 9 X 5 ) = 0 0 X i 1 i = 1 3 ¯ ε max 1 X j ε max s h o p j = 4 7 ¯ ε min 1 X k ε max 1 k = 8 9 ¯ E43

where P 11 1 P 12 1 P 13 1 P 21 1 are the natural gas pressure at the outlet of each of the CS branches, J i n P i n T i n are the natural gas flow rate, pressure and temperature at the CS inlet, J 1 J 2 are the natural gas mass flow rates through “branches I”, J 11 J 12 J 13 J 21 are the natural gas mass flow rates through “branches II”, X 6 X 4 X 7 X 5 are the ratios of compression for compressor shops, X 8 X 9 are the ratios of compression for GCU groups of the first stages of compressor shops, ε min max 1 is a minimal/maximal ratio of compression for GCU groups of the first stage, ε max s h o p is the maximal ratio of compression for compressor shops.

To assure a safe mode of CS operation, it is required to observe the following restrictions on: maximal volumetric capacity Q j of each operating CFS; frequency u j of the CFS shaft rotation; maximal capacity N j of the CFS drive; maximal outlet pressure P j of the CFS, which is determined by the pipe's strength; maximal temperature T j at the CFS outlet, which is determined by the insulating coating; the lower value of pressure at the outlet of each CFS, related to the requirements to maintain pressure at major gas tapping and boundary gas pipeline points. These restrictions can be formulated as one-sided and two-sided weak inequality:

{ Q j min Q j ( X ) Q j max u j min u j u j max N j ( X ) N j max P j min P j ( X ) P j max T j ( X ) T j max } E44

where index j = 1 M means the number of CFS. Also, it is necessary to comply with restrictions on: positions of operational points at the CFS performance curves, related to surge-free operation requirements; conditions related to CFS drive's stable operation; etc. Compliance with the latest restrictions can only be analyzed in the process of a detailed simulation of the mode of gas transmission through the CS.

The system of nonlinear algebraic inequalities (38) describes technological, operating and design constraints on CS equipment operation. When formulating the constraints in a CFD-simulator, a maximum consideration is given to the specifics of the CS process flow chart and the modes of its operation, including a possibility of surging in “CFS – Adjacent CGP” (Seleznev & Pryalov, 2007).

The resultant system (37, 38) represents a generalized system of nonlinear algebraic equalities and inequalities. One of the methods to solve the system of nonlinear algebraic equalities and inequalities is the well-known Interior Point Method, which, in a CFD-simulator, is implemented by statement and solution of an equivalent problem of mathematical optimization (Dennis & Schnabel, 1988). The equivalent optimization problem is solved by the method of modified Lagrange functions. If no solution can be found, the possibility of failure occurrence is admitted. The method we use makes it possible to identify constraints which are not complied with and to evaluate the extent of such non-compliance.

Advertisement

4. Simulation of a GTN by CFD-simulator

Industrial application of CFD-simulators in the gas industry is shown by the example of two acute problems: cutting down the power costs for natural gas transportation through pipeline networks; finding out the reasons for discrepancy between estimates of supplied gas volume by seller and consumer. To resolve these problems, one should be able to simulate the processes of GTN operation in a credible way. Let us consider the GTN simulation algorithm of S. Pryalov as applied to a fragment of a hypothetical CS (fig. 3).

In this CS fragment, three GCUs are combined in parallel into a group by means of a CGP. Fig. 3a uses the following notations: P T – pressure and temperature of the gas (the double number subscripts indicate that the physical parameters of the natural gas flow are attributed to the CFS inlet or outlet with a respective number; parameters at the CS inlet are denoted with the lower index i n J i i = 1 2 3 – gas mass flow in the CS pipeline branch with its own number; n i i = 1 2 3 – speed of the i -th CFS shaft; ξ – friction factor for CGP (the double number subscripts indicate that the quantity is attributed to a certain CGP).

Let us conventionally isolate one (the second from the top in fig. 3a) CS branch (fig. 3b): between points A and B . In this case, it is assumed that respective boundary conditions are defined at the branch inlet and outlet points. Such boundary conditions can include: pressure P A and temperature T A at the branch inlet, and pressure P B and heat flux q B (or temperature T B ) at the branch outlet (note that generally speaking these quantities are functions of time).

Figure 3.

A diagram of a hypothetical CS (a) and a diagram for the branch point A to point B (b)

The value of the mass flow rate through the CFS J = J 2 CFS = J 2 CFS ( t ) in this case is a solution of a non-linear algebraic equation (lower indices of pressures are the same as in fig. 3):

Ψ 2 ( J ) = P 22 CFS ( J ) P 22 CGP ( J ) = 0 E45

where P 22 CFS ( J ) = ε 2 ( P 21 CGS ( J ) T 21 CGS ( J ) J ) P 21 CGS ( J ) is pressure at the CFS outlet; ε 2 ( P 21 CGS ( J ) T 21 CGS ( J ) J ) is gas compression rate produced by the CFS and computed in the CFD-simulator using a semi-empirical CFS model (Seleznev & Pryalov, 2007); P 21 CGS ( J ) and T 21 CGS ( J ) are the outlet pressure and temperature of the inlet CGP from the simulations of the gas flow parameters in the given pipeline, in which boundary conditions at its outlet include the target mass flow J and heat flux conservation at the outlet of the inlet CGP; P 22 CGS ( J ) = P 22 CGS ( J T 22 CFS ( J ) ) is inlet pressure of the inlet CGP from the simulations of the gas flow parameters in the given pipeline, in which boundary conditions at its outlet include the target mass flow J and gas temperature equal to the gas temperature T 22 CFS ( J ) at the CFS outlet.

The functions in this equation are determined numerically by using the CFD-simulator at each step of the iterative solution of equation (39). Therefore, the target distributions of the fluid dynamics parameters of both CGPs and operating parameters of the GCU are obtained automatically in the course of solving equation (39).

Equation (39) in the CFD-simulator is solved numerically using the well-known modified Newton procedure, in which equation (39) is solved by iterations using a finite-difference Jacobian approximation. In the paper (Dennis & Schnabel, 1988) the authors show that this method preserves its q-quadratic convergence of the classical Newton procedure for solving non-linear algebraic equations provided that the finite-difference step length is chosen properly.

For simulations of transient CS operation conditions, the computational model of a hypothetical CS fragment (see fig.3a) will comprise sub-models of an inlet CGP, three CFSs and an outlet CGP. The inlet CGP includes pipelines from the point of transported gas flow entry into the CS to the points of the gas flow entry into each CFS. The outlet CGP includes pipelines from the points of gas flow exit from each CFS to the point of gas flow exit from the CS. These inlet and outlet CGPs in this case are branched, multi-line pipelines, which are simulated by models (1–12) or (1, 3, 7, 11, 13–24). It is assumed that boundary conditions at the transported gas flow inlet/outlet points of the CS are defined in accordance with the principles described above. Here, the values of the mass flow rate through each CFS, J i CFS = J i CFS ( t ) where i = 1 N ¯ N is the number of CFSs in the group), constitute a solution to the set of non-linear algebraic equations:

Ψ i ( J i ) = P i 2 CGP ( J i ) P i 2 CFS ( J i ) = 0 i = 1 N ¯ E46

The notations used in (40) are similar to those used in equation (39). The subscripts of pressures correspond to the indices shown in fig. 3.

The target distributions of the fluid dynamics parameters of the CGPs and operating parameters of the GCU equipment are obtained automatically by numerical simulation of equations (40) (as a result of using the CFD-simulator for solving this set of equations to determine the values of its constituent functions).

Numerical solution of equations (40) in industrial application of the CFD-simulator is performed by known quasi-Newton methods. In the first line, one can recommend using the modified Broyden method (Dennis & Schnabel, 1988) as one of the best performing extensions of the classical secant method to the case of numerical solution of non-linear algebraic equations. This method can have q-superlinear local convergence with an r-order of 2 1 2 N

It is not difficult to extend the above method to the whole GTN. In this case, equations (40) instead of the mass flow rates through the CFSs will contain the mass flow rates through the CS as a whole. By analogy with simulations of gas transportation through an individual CS, due to the use of the CFD-simulator, target distributions of parameters for the whole multi-line GPS and operating parameters of GCU, CFS, DC and ACD are obtained automatically by numerical simulation of modified equations (40) by the quasi-Newton methods.

Advertisement

5. Optimization of gas transmission expenditures using CFD-simulator

To avoid too many technical details without loss of generality, here we consider GTNs with serially connected CSs (fig. 4).

Figure 4.

A diagram of a hypothetical GTN of serially connected compressor stations

Fig. 4 uses the following notations: P T Q – pressure, temperature and volumetric flow rate. The symbols CS1, CS2 and CS3 in fig. 4 are used in the diagram to designate CSs with their serial number. The double number subscripts indicate that the physical parameters of the natural gas flow are associated with the inlet or outlet of the CS with a respective serial number. The horizontal lines between the CSs in the diagram show multi-line GPSs. The flow direction in fig. 4 is from left to right. The GTN diagram is typical of many gas transportation companies. As an example one can mention GTNs of Tomsktransgas, Russia, and SPP, a.s., Slovakia.

The energy criterion of reduced expenses for failure-free natural gas transportation through GTNs has the following form: One should obtain calculated estimates of GTN equipment controls corresponding to minimum costs of integral energy costs related to transient conditions of gas transportation through the GTN in a given time interval subject to compliance with gas specifications at GTN control points and, at the same time, observance of applicable restrictions to ensure safe and environmentally sound operation of the GTN.

In such a criterion, estimates of the cost function for integral energy expenditures are made using the CFD-simulator. For this purpose, the CFD-simulator features functional dependencies of energy carrier consumption in GCUs on the power consumption at CFS shafts for all GCUs of the GTN. Note that plotting distributions of energy carrier consumption in GCUs over time in the CFD-simulator belongs to GTN performance monitoring procedures and is one of its standard functions (Seleznev & Pryalov, 2007). If the energy carrier consumption and the price of these energy carriers are known, it will be easy for a gas transportation company to calculate their total cost.

The requirement of compliance with gas specifications at GTN control points within the criterion is consistent with the requirement for gas transportation companies to fulfill their contractual obligations. The requirement of compliance with restrictions to ensure GTN safety and environmental soundness comes to the observance of process, performance, design and other restrictions as applied to the operation of the GTN equipment. These restrictions can be formalized mathematically as a set of simple constraints on the target values of the GTN equipment controls and a set of non-linear weak two-sided (and/or one-sided) algebraic inequalities. Function values in these inequalities (GTN equipment operating data and fluid dynamics parameters of the gas flow in the network) are calculated using the CFD-simulator.

In practice, in implementing the criterion mathematically, one usually seeks a local minimum of the function of integral expenses subject to given constraints. This is primarily related to the complexity (and, as a rule, polymodality) of the target function, complexity of the constraint functions and uncertainties in input data coming to the CFD-simulator from SCADA systems.

An optimization algorithm for transient GTN operation conditions was developed by V. Seleznev in 2003. It provides for preliminary predictive simulations, using the CFD-simulator, of physical parameters of the gas flow through the GTN for a given time interval based on the predefined history of GTN operation and gas flow parameters at the GTN boundaries. The value of the function of energy (or financial) expenses for gas transportation through the GTN, which is related immediately to the operating parameters of its equipment and gas flow parameters, is calculated at each time step of this simulation. Thus, during the predictive simulations, the time dependence of expenses is automatically generated for a so-called non-optimized prediction.

Setting up an optimized prediction for the given time interval in a general case consists in the definition of time laws for the GTN equipment controls to reduce the costs of natural gas transportation. Target controls should first of all include regulation of the CFS shaft speed in the whole GTN. The speed regulation for all CFSs can result in shutdowns or starts of individual GCUs. The list of involved GCUs, including valve status data, are called the CS configuration (or configuration of the GTN as a whole).

As has been already mentioned above, energy (or financial) expenses at a given time point t depend on the status u ( t ) of the whole package of GTN gas pumping equipment. These expenses will be represented in the form of a non-linear algebraic cost function, Z ( t u ( t ) ) . It is evident that total expenses for the prediction period [ 0 T ] will be an integral, 0 T Z ( t u ( t ) ) d t . From the mathematical viewpoint, minimizing the costs of natural gas transportation through the GTN over the predicted period comes to the minimization of the area of the 2D figure Φ shown in fig. 5.

Figure 5.

Initial function of gas transportation expenses in the analyzed interval (prediction period)

Mathematically, this can be represented in the following way:

J ( u ) = 0 T Z ( t u ( t ) ) d t min t [ 0 T ] u ( t ) U ( t ) R m E47

given that

W ( t u ( t ) ) Ω = { W R k : ( w min s p e c i f i e d ) j w j ( t u ( t ) ) ( w max s p e c i f i e d ) j j = 1 l ¯ w j ( t u ( t ) ) ( w max s p e c i f i e d ) j j = l + 1 k ¯ } E48

where U ( t ) is a given set to define the type of constraints related to the limited availability of control resources (simple constraints on the control quantities); m is the number of controls used for optimization; W ( t u ( t ) ) = ( w 1 ( t u ( t ) ) ... w k ( t u ( t ) ) ) T is a given algebraic constraint vector-function; k is the total number of constraints in the form of two-sided and one-sided weak algebraic inequalities used for optimization; w min s p e c i f i e d R l and w max s p e c i f i e d R k are given vectors of the minimum and maximum permissible values to implement the constraints; l is the number of constraints in the form of two-sided weak algebraic inequalities used for optimization; R m is the Euclidean m -dimensional vector space; R k is the Euclidean k -dimensional vector space; R l is the Euclidean l -dimensional vector space.

The first l rows of the vector-function W ( t u ( t ) ) describe process, design, environmental and other constraints on the GTN operating conditions. The rest of the constraint vector-function rows provide stabilization of the programmed status and GTN operating conditions. Stabilization of a given programmed status and GTN operating conditions here means maintaining true paths of GTN operating and gas flow parameters in some neighborhood of expected paths. Examples of such GTN parameters are gas pressures at the GTN boundaries, which should be strictly controlled in accordance with contractual obligations of the gas company. Thus, problem (41, 42) includes additional conditions, w j ( t u ( t ) ) ( w max s p e c i f i e d ) j j = l + 1 k ¯ , which will constrain the deviation of computed paths of specified parameters from their programmed paths. Algebraic functions in these constraints are generally modules of discrepancies between computed and programmed paths.

The technology of natural gas transportation through GTNs provides for stepwise variation of the GTN equipment controls (for example, individual GCUs or their groups) in time. Therefore, in setting up an optimal prediction of expenses, one should map a grid t 0 t 1 t N onto the analyzed interval [ 0 T ] (see fig. 5) in such a way as to provide constant control of the GTN equipment within the time interval ( t i t i + 1 ) i = 0 N 1 ¯ , (fig. 6a), i.e: u ( t ) = u i = c o n s t t ( t i t i + 1 ) u i U ( t ) . To simplify the problem definition (without loss of generality), we assume conventionally that the step Δ t = t i + 1 t i i = 0 ... N 1 , is constant all over the prediction period.

Figure 6.

Approximation sequence for the cost function

Given this, the function of the GTN equipment status will be represented as follows (fig.6a):

u j ( t ) = { t t 0 δ ( u j 0 u j ( 0 ) ) + u j ( 0 ) t [ 0 δ ) u j i t [ t i + δ t i + 1 δ ) t ( t i + 1 δ ) 2 δ ( u j i + 1 u j i ) + u j i t [ t i + 1 δ t i + 1 + δ ) E49

where i = 0 ... N 1 j = 1 ... m u j ( 0 ) is a known value of the initial control at the initial time, u j N = u j N 1 ; the spacing δ is chosen empirically. In industrial applications the function of the GTN equipment status is often a function of shaft speed variation for all CFSs.

It is difficult to calculate the integral of expenses (41) in the constructed optimization model (41–43) analytically. Therefore, this integral is calculated numerically. The widely known method of trapezoids is considered quite acceptable as applied to this case, i.e. (fig.6b):

J ( u ) = 0 T Z ( t u ( t ) ) d t 0.5 Δ t Z 0 [ u ( t 0 ) ] + Δ t i = 1 N 1 Z i [ u ( t 0 + i Δ t ) ] + 0.5 Δ t Z N [ u ( t N ) ] E50

Thus, for some set of discrete controls ( u 0 u 1 u N 1 ) T , formula (44) allows calculating the quality functional J ( u 0 u 1 u N 1 )

Hence, the problem of finding an optimal control (41–43) can be replaced with an equivalent problem of nonlinear programming with respect to independent vectors ( u 0 u 1 u N 1 ) T

J ˜ ( u 0 u 1 u N 1 ) = 0.5 Z 0 [ u 0 ] + i = 1 N 1 Z i [ u i ] + 0.5 Z N [ u N 1 ] min E51

subject to the conditions (considering (43)):

u i U = { u R m : max [ u i 1 η c o n s t r u min s p e c i f i e d ] j u j i min [ u i 1 + η c o n s t r u max s p e c i f i e d ] j j = 1 m ¯ } i = 1 N 1 ¯ E52
W i ( u 0 u 1 u N 1 ) Ω = { W i R k : ( w min s p e c i f i e d ) j w j i ( u 0 u 1 u N 1 ) ( w max s p e c i f i e d ) j j = 1 l ¯ w j i ( u 0 u 1 u N 1 ) ( w max s p e c i f i e d ) j j = l + 1 k ¯ } i = 1 N ¯ E53

where u min s p e c i f i e d R m and u max s p e c i f i e d R m are given vectors of the minimum and maximum values of control parameters (as a rule, these vectors are time-independent); η c o n s t r R m is a given constraint on the maximum step of a single j-th control change in time. The numerous constrains in (47) are attributed to the requirement that variation of GTN operating parameters on transition from one time layer to the next one should be smooth. One should be reminded here that calculations of expenses Z i ( u i ) for gas transportation through the GTN are enabled by the CFD-simulator.

In industrial applications for optimal predictions, knowing the optimal control path is more critical than knowing the minimum value of the quality functional. Therefore, it is reasonable to transform the problem statement (45) in the following way:

J ( u 1 u N 1 ) = i = 1 N Z i ( u i ) min where u N = u N 1 E54

To solve the problem of general non-linear programming (46–48), we use the method of modified Lagrange functions (Vasilyev, 2002). In accordance with this method, the modified target function of the optimized problem being solved is a sum of initial target function (48) and formalized constrains (47) weighted in a special way (by means of Lagrange multipliers and penalties). An equivalent task of searching for the minimum value of the modified target function subject to simple constraints on variables (46) is fulfilled using modified varied metrics algorithms (Vasilyev, 2002) or modified conjugate gradient algorithms (Vasilyev, 2002), which are resistant to the error accumulation in the course of arithmetic operations.

If the choice of the GTN configuration is considered as an additional control, one will have to introduce additional constraints into the optimization problem to represent process bans on frequent changes of GTN configurations during gas transportation. The choice of the GTN configuration does not require fundamental changes in the optimization approach or algorithm for transient conditions of gas transportation through the GTN.

The above approach to the construction of optimal prediction for gas transportation through the GTN can be easily extended to the CS or group of GCUs.

Advertisement

6. Numerical monitoring of gas distribution discrepancy using CFD-simulator

Numerical monitoring of the discrepancy is based on a statement (for a specified time gap) and numerical solution of identification problem of a physically proved quasi-steady gas dynamics mode of natural gas transmission through specified gas distribution networks.

In large communities, natural gas is supplied to the consumers using medium or low pressure ring mains, being several dozen kilometers long. Gas from the supplier is transmitted to such mains through a GTN after its pressure is reduced by means of a system of gas reducers installed at inlet gas distribution stations (GDSs) (fig. 7). Major parameters of gas supplied by the gas transportation company to the seller are also measured at the GDS outlets. Here, major parameters of natural gas include its flow rate, pressure and temperature.

Gas from inlet GDSs is delivered to the ring main via the CGP network of the gas seller. Consumers receive gas from the ring mains through outlet CGPs leading from the ring main to the consumer. The length of the CGPs can range from several hundred meters to several kilometers. In the first approximation, each consumer is considered independent and provided with gas through one CGP, which is completely associated with the consumer (called “associated CGP” as the text goes). Consumer independence means that the consumer’s gas cannot be delivered to other consumers.

Thus, the gas distribution network (GDN) under consideration comprises inlet CGPs from inlet GDSs, a ring main and associated CGPs. In fig. 7, the GDN under consideration is shown with gray color.

If the GDN operates properly, the seller seeks to sell the whole amount of gas received from the supplier. An exception in this case is natural gas forcedly accumulated in the GDN.

Figure 7.

A diagram of the GDN under consideration

For settlement of accounts, consumers submit reports to the seller, in which they indicate estimated volumes of received gas. These reports are usually generated either by processing the consumers’ field flow meter readings or by simplified calculations based on the rates formally established for the given category of consumers. Verification of data provided by the consumers consists in the comparison of their estimates with data obtained by processing the seller’s flow meter readings in compliance with current guidelines.

The central difficulty in such verification is that the amount of field measurements of supplied gas that can be used as a reliable basis is rather limited in the present-day gas industry. Such a situation results in occasional discrepancies (especially during the heating season) in analyzing the volume of natural gas supplied to the consumers. The total discrepancy over a given time period is determined as a difference between two estimates of the gas volume. The first estimate represents the total gas volume actually received during the time period in question as reported by all consumers, and the second estimate, the total volume of natural gas delivered by the supplier to the seller less the gas volume accumulated in the GDN.

One of the most promising ways to resolve the above problem is to use the CFD-simulator. For this purpose, the following problem setup can be used for numerical monitoring of gas distribution discrepancy using CFD-simulator.

Input data: layout chart of the GDN; sensor locations in the GDN, where gas parameters are measured; given time interval of GDN operation; results of field measurements of gas parameters in the GDN in the given time interval; actual (or nameplate) errors of instruments used to measure gas parameters; data on received gas volumes as reported by each consumer for the given time interval.

Target data: (1) physically based gas flow parameters in the GDN in the given time interval having a minimum discrepancy compared to respective field measurement data at identification points and providing the closest possible agreement between calculated flow rate values at the outlet of each associated CGP and corresponding reported values (further as the text goes, this mode will be called “the identified gas flow”); (2) associated CGPs with underreported gas volumes as against the identified gas flow; (3) calculated estimates of discrepancies between gas volumes delivered in the given time interval through each associated CGP as an arithmetic difference between the calculated gas volume corresponding to the identified gas flow and the reported value; (4) calculated estimates of discrepancies between gas volumes delivered in the given time interval through each inlet GDS as an arithmetic difference between the calculated gas volume corresponding to the identified gas flow and the reported value.

Correct simulation of item 1 in the problem statement makes it possible to obtain credible information on physically consistent space-time distributions of flow rates, pressures and temperatures for the gas flow, which is most reasonable for the given time interval with the given field measurement data. Convergence of calculated and reported gas flow values for individual consumers increases the level of objectivity of numerical analysis, as it seeks to maintain the highest possible trust in the data on received gas volumes reported by the consumers.

It follows from the above problem statement that numerical monitoring of gas distribution discrepancy under items 2–4 in the list of target values in essence consists in performing straightforward arithmetic operations with output data of item 1. Therefore, special attention below will be paid to the algorithm of this calculation. This algorithm was proposed by V. Seleznev in 2008. In the first approximation, we consider the process of gas flow through the GDN to be steady-state.

In order to calculate non-isothermal steady-state gas flow parameters in the GDN under consideration, the following boundary conditions of “Type I” need to be specified: pressure, temperature and composition are defined at the outlet of each inlet GDS; mass flow rate and gas temperature are defined at the outlet of each associated CGP.

Using the CFD-simulator with the given boundary conditions and fixed GDN characteristics, one can unambiguously determine physically based spatial distributions of calculated estimates of steady-state GDN operation parameters (Seleznev et al., 2007). Spatial distributions of parameters here mean their distributions along the pipelines.

A diagram of identification locations is generated on the given layout of sensor locations in the GDN. The preferred location of each identification point should correspond to the key requirement: a considerable change in the fluid dynamics conditions of GDN operation should be accompanied by considerable changes in the gas parameters actually measured at this point. The distribution of identification points over the GDN diagram should be as uniform as possible. An identification point can be located both inside the GDN and at its boundaries. At each identification point, different combinations of major gas flow parameters can be measured. These combinations can be varied for every identification point.

The process of finding the identified gas flow comes to the statement and solution of the problem of conditional optimization:

f calc ( X ) f meas const L min X Ω R n E55

where L is the vector norm, the type of which is determined by the value of the parameter L ( L = 0 1 2 ) (see below); f calc ( X ) f calc : R n R m is the vector-function of calculated estimates of controlled transported gas variables at the identification points in the m -dimensional Euclidean space R m (these calculated estimates are obtained using the CFD-simulator); f meas const R m is a given vector of measured values of controlled transported gas variables at the identification points; m is the number of given identification points in the GDN diagram; X Ω R n is the vector of independent controlled variables in the n -dimensional Euclidean space R n ;

X Ω = { X R n : a X b q calc GDS ( X ) q meas_GDS const 0 t flow_ rate GDS } E56
a R n and b R n are correctly defined vectors setting limits in simple constraints for the range of admissible variation of the vector of independent controlled variables (see below); n is the number of independent controlled variables (see below); 0 is the cubic vector norm (e.g., Y 0 = max 1 i n | y i | Y R n q calc GDS ( X ) q calc GDS : R n R l is the vector function of calculated estimates of mass flow rates through inlet GDSs in the l -dimensional Euclidean space R l (these calculated estimates are obtained using the CFD-simulator); q meas_GDS const R l is a given vector of measured mass flow rates at GDS outlets; l is the number of GDSs; t flow_ rate GDS = c o n s t is a given upper estimate of actual (nameplate) absolute error of flow meters installed at the inlet GDSs. The constraint in the form of a one-sided weak inequality in (50) formalizes the assumption that the probability of gas underdelivery by the supplier is small.

Components x i of the vector of independent controlled variables here mean some boundary conditions of “Type I” specified in the simulations of steady-state fluid dynamics conditions using the CFD-simulator. As practice shows, problem (49, 50) can be solved successfully, if as components of the vector of independent variables one uses an integrated set of mass flow rates at outlet boundaries of associated CGPs ( x i i = 1 k ¯ ) and pressures at outlet GDSs ( x i i = k + 1 n ¯ n = k + l ) , where k is the number of associated CGPs

Components ( a i b i i = 1 k ¯ ) (see (50)) establish the ranges for controlled variables, the size of which is largely attributed to the degree of the seller’s actual trust in a certain consumer. The following conditions should be necessarily observed:

a i + t flow_ rate cons [ q c o n s c o n s t ] i b i t flow_ rate cons i = 1 k ¯ a i + t flow_ rate cons [ x 0 ] i b i t flow_ rate cons i = 1 k ¯ E57
i = 1 k [ x 0 ] i = i = 1 k { [ q cons const ] i + [ Δ q sell const ] i } = j = 1 l [ q meas_GDS const ] j E58

where q cons const R k is a given vector of mass flow rates at outlet boundaries of associated CGPs; t flow_ rate cons = c o n s t is a given upper estimate of the actual (nameplate) absolute error of flow meters installed at outlet boundaries of associated CGPs; X 0 R n is the starting point of the conditional optimization problem; Δ q sell const R k is the increment vector for reported mass flow rates at outlet boundaries of associated CGPs, which is chosen by the gas seller depending on the degree of trust in a certain consumer. Fulfillment of conditions (51) is a guaranty for the consumers that the discrepancy analysis will necessarily account for their reported values of received gas volumes. Constraints (52) serve to implement quasi-steady-state operating conditions of the pipeline network of interest from the very starting point of the conditional optimization problem. The values of remaining components ( a i b i i = k + 1 n ¯ ) are generally defined in accordance with conditions:

a i + t pressure GDS [ x 0 ] i b i t pressure GDS i = k + 1 n ¯ [ x 0 ] i = [ p meas_GDS const ] i k i = k + 1 n ¯ E59

where p meas_GDS const R l is a given vector of measured pressures in the GDS; t pressure GDS is a given upper estimate of the actual (nameplate) absolute error of pressure gauges installed in the GDS. As a result of fulfillment of conditions (51) and (53), the starting point of optimization problem (49, 50) will be the inner point with respect to simple constraints on controlled variables, which by far extends the range of methods that can be used for conditional minimization.

Thus, based on (51–53):

a i { min ( [ x 0 ] i t flow_ rate cons [ q cons const ] i t flow_ rate cons ) i = 1 k ¯ [ p meas_GDS const ] i k t pressure GDS i = k + 1 n ¯ } b i { max ( [ x 0 ] i + t flow_ rate cons [ q cons const ] i + t flow_ rate cons ) i = 1 k ¯ [ p meas_GDS const ] i k + t pressure GDS i = k + 1 n ¯ } E60

Problem (49–54) can take different forms depending on the type of the vector norm chosen in (49). For example, if we choose the cubic vector norm (L=0), we come to a discrete minimax problem with constraints in the form of one-sided weak inequalities and simple constraints on independent controlled variables:

max 1 i m | [ f calc ( X ) ] i [ f meas const ] i | min X Ω R n E61

Solution to (55) provides so-called uniform agreement between calculated estimates of gas flow parameters and their measured values. Choosing the octahedron vector norm (L=1) transforms initial problem (49–54) into a general non-linear programming problem represented in the following way:

{ i = 1 m | [ f calc ( X ) ] i [ f и з м c o n s t ] i | min X Ω = { X R n : a X b | [ q calc GDS ( X ) ] j [ q meas_GDS const ] j | t flow_ rate GDS 0 j = 1 l ¯ } E62

Choosing the Euclidean vector norm (L=2) in (49) results in the statement of a new conditional optimization problem, which is almost equivalent to (50-54, 56):

i = 1 m ( [ f calc ( X ) ] i [ f meas const ] i ) 2 min X Ω E63

Solution of (50-54, 57) provides root-mean-square agreement between calculated estimates of gas flow parameters and their measured values. It should be stressed here that statement (50-55) is stricter than (50-54, 57).

Problems (50-55), (50-54, 56) and (50-54, 57) can be solved numerically using the method of modified Lagrange functions (Vasilyev, 2002), which is quite suitable for this purpose. Note that in practice the time of numerical solution of (50-54, 57) in most cases is much shorter than the time of numerical solution of problems (50–55) or (50-54, 56).

To choose a certain type of the target function in problem (49, 50), a series of numerical experiments were conducted and more than a hundred applied tasks were simulated. The best (in terms of the accuracy/runtime ratio) results in simulating the identification problem (49, 50) were obtained using target function (57).

Based on the above considerations, in order to provide efficiency and improved accuracy of industrial applications, it is reasonable to propose the following algorithm for finding the identified gas flow in the GDN at the initial stage:

Define the starting point X 0 R n in accordance with conditions (52) and (53). Define the vectors a a n d b in simple constraints according to (54).

Solve optimization problem (50-54, 57). Results of its numerical solution become input data in searching for the conditional minimum at Step 4.

Analyze correctness of solution results from Step 2. The correctness criterion in this case is the condition of necessary fulfillment of all constraints in problem (50-54, 57). If this criterion is satisfied, proceed to Step 4. If not, extend the variation range of independent variables with subsequent transition to Step 2, i.e. ( { a b } { a b } ) . Usually, the range extension algorithm used here is heuristic and bases on the experience gained in the course of actual simulations.

Find numerical solution to problem (50–55) from the starting point, obtained at Step 2, by the method of modified Lagrange functions. Execution of Step 4 makes it possible to reduce or completely eliminate individual local peaks in discrepancy between calculated estimates and measured values, which may appear at Step 2.

Analyze correctness of the results obtained at Step 4, i.e. check the necessary fulfillment of all constraints in problem (50–55). If the correctness criterion is not fulfilled, solution of Step 3 is assumed to be the target solution.

The vector of controlled variables corresponding to the optimal solution at Step 5, is designated as X init , with X init Φ R n . The found fluid dynamics conditions of GDN operation is taken as the primary fluid dynamics mode. Its calculated parameters have uniform (i.e. strictest) agreement with respective measured values.

At the final stage of identification, the primary fluid dynamics mode is corrected within the available measured information, in order to minimize possible discrepancies between calculated and reported estimates of gas volumes transmitted through each associated CGP in the given time interval. This stage is legal by nature, because given the limited amount of measured data the gas seller has no right to accuse the consumer a priori of deliberate misrepresentation of reported received gas volumes. This stage consists in the solution of the general nonlinear programming problem:

{ q calc cons ( X ) q cons const 2 min X Θ = { X R n : a i x i b i i = 1 k ¯ [ p init_GDS const ] i t pressure GDS x i [ p init_GDS const ] i + t pressure GDS i = k + 1 n ¯ | [ f calc ident ( X ) ] s [ f init_ident const ] s | t pressure ident 0 s = 1 h ¯ | [ q calc GDS ( X ) ] j [ q meas_GDS const ] j | t flow_ rate GDS 0 j = 1 l ¯ } E64

where q calc cons ( X ) X [ q calc ( x ) ] i = x i i = 1 k ¯ is the vector function of calculated mass flow rates for outlet boundaries of associated CGPs in the k -dimensional Euclidean space R k p init_GDS const R l is a given vector of GDS pressure corresponding to the primary fluid dynamics mode at X init R n f calc ident ( X ) f calc ident : R n R h is the vector function of calculated estimates of controlled variables at inner identification points in the h -dimensional Euclidean space R h (these calculated estimates are obtained using the CFD-simulator); f init_ident const R h is a given vector of controlled variables at inner identification points corresponding to the primary fluid dynamics mode at X init R n h is a given number of inner identification points; t pressure ident = c o n s t is a given upper estimate of the actual (nameplate) absolute error of pressure gauges at inner identification points.

The first group of simple constraints on the controlled variables in (58) is partly redundant. It assures that numerical search for solutions in industrial applications is always performed in the domain of practically significant results. The second group of simple constraints and the second group of one-sided weak inequality constraints in problem (58) account for the imperfectness of corresponding existing instruments in favor of consumers. The first group of one-sided weak inequality constraints in (58) formalizes the demand for the closest possible uniform agreement between calculated estimates and reported volumes of gas received by each consumer.

Problem (58) can be solved using modified Lagrange functions (Vasilyev, 2002). As a starting point here we use X init R n . The target result of the simulation should necessarily be correct, i.e. it should fulfill all simple constraints and inequality constraints of problem (58). Otherwise, the primary fluid dynamics mode is taken as a solution to (58).

The simulation outcome of optimization problem (58) is the final solution to the problem of finding the identification gas flow in the GDN. The target identified gas flow is completely defined by the vector X ident Θ R n + 1 , corresponding to the optimal solution of problem (58), and is characterized by the fulfillment of the following conditions: (1) calculated gas flow parameters at each identification point should be as close as possible to corresponding field measurement data; (2) calculated estimates of gas volumes supplied to the GDN in a given time interval should correspond to the supplier-reported values within actual (nameplate) absolute errors of the flow meters installed in the GDS; (3) calculated estimates of gas volumes received by each consumer in the given time interval should be as uniformly close as possible to the values reported by the consumers.

Advertisement

7. Conclusion

The methods and approaches described in this chapter have been developed during the past fifteen years. These methods demonstrated their efficiency as applied to simulations for Gazprom, Russia, and SPP, a.s., Slovakia (Seleznev et al., 2005). These methods apply to pipeline systems for transportation of liquid and gas-liquid products. They are rather efficient in analysis and prevention of accidents (Aleshin & Seleznev, 2004).

The approach presented in this article for high-accuracy numerical analysis of operating parameters of industrial pipeline networks using CFD-simulators is based on adaptation of the full system of equations of fluid dynamics to conditions of transient, non-isothermal processes of the flow of gas mixtures in actual GTNs. The adaptation applies the rule of minimization of the number and depth of accepted simplifications and assumptions. The high accuracy of analysis of industrial pipeline networks operating parameters is understood here as the most reliable description and prediction of actual processes in a GTN, which are achievable due to the present level of development of mathematical modeling and technical monitoring methods and available computer hardware. Development and operation of CFD-simulators in solving industrial problems of improving safety, efficiency and environmental soundness of pipeline network operation can be regarded as one of the promising trends of industrial application of the state-of-the-art computational mechanics methods.

In the past few years, the proposed approach to the numerical monitoring of natural gas delivery through gas distribution networks has proved to be well-performing in industrial applications for discrepancy analysis of natural gas deliveries to large and medium-size consumers. This approach can be implemented even on standard personal computers.

Future development of the methods discussed will be largely focused on their applications in high accuracy analysis and control of multi-phase fluid transportation.

References

  1. 1. Aleshin V. V. Seleznev V. E. 2004 Computation technology for safety and risk assessment of gas pipeline systems, Proceedings of the Asian International Workshop on Advanced Reliability Modeling (AIWARM’2004), 443 450 , 9-81238-871-0 Japan, August 2004, World Scientific Publishing Co. Pte. Ltd., London.
  2. 2. Dennis J. E. Jr Schnabel R. B. 1988 Numerical Methods for Unconstrained Optimization and Ninlinear Equations, Prentice-Hall Inc., 0-13627-216-9 Jersy.
  3. 3. Fletcher С. A. J. 1988 Computational Techniques for Fluid Dynamics. Fundamental and General Techniques, Springer-Verlag, 3-54018-151-2
  4. 4. Kiselev V. V. Seleznev V. E. Zelenskaya O. I. 2005 Failure forecast in engineering systems by searching for the inner points of system of algebraic equalities and inequalities, Proceedings of the European Safety and Reliability Conference (ESREL 2005), 2 1773 1776 , 0-41538-343-9 City (Gdyna- Sopot- Gdansk), Poland, June 2005, Taylor & Francis Group, London.
  5. 5. Seleznev V. E. Aleshin V. V. Klishin G. S. Il’kaev R. I. 2005 Numerical Analysis of Gas Pipelines: Theory, Computer Simulation, and Applications, KomKniga, 5-48400-352-0
  6. 6. Seleznev V. 2007 Numerical simulation of a gas pipeline network using computational fluid dynamics simulators. Journal of Zhejiang University SCIENCE A, 8 5 755 765 , 0167-3565X (Print); ISSN 1862-1775 (Online)
  7. 7. Seleznev V. Pryalov S. 2007 Numerical forecasting surge in a piping of compressor shops of gas pipeline network. Journal of Zhejiang University SCIENCE A, 8 11 1770 1783 , 0167-3565X (Print); ISSN 1862-1775 (Online)
  8. 8. Seleznev V. E. Aleshin V. V. Pryalov S. N. 2007 Mathematical modelling of pipeline networks and channel systems: methods, algorithms, and models, MAX Press, 978-5-31702-011-8 Moscow. (In Russian)
  9. 9. Tikhonov A. N. Samarsky A. A. 1999 Equations of Mathematical Physics, Moscow State University Publisher, 5-21104-138-0 (In Russian)
  10. 10. Vasilyev F. P. 2002 Methods for Optimization, Factorial Press, 588688059 (In Russian)

Written By

Vadim Seleznev

Published: 01 January 2010