InTech uses cookies to offer you the best online experience. By continuing to use our site, you agree to our Privacy Policy.

Computer and Information Science » Numerical Analysis and Scientific Computing » "Computational Fluid Dynamics", book edited by Hyoung Woo Oh, ISBN 978-953-7619-59-6, Published: January 1, 2010 under CC BY-NC-SA 3.0 license. © The Author(s).

Chapter 15

Computational Fluid Dynamics Methods for Gas Pipeline System Control

By Vadim Seleznev
DOI: 10.5772/7110

Article top

Overview

A schematic of a pipeline junction (а – 3D drawing; b – diagram)
Figure 1. A schematic of a pipeline junction (а – 3D drawing; b – diagram)
The scheme of decision independent variables assignment for on-line technological analysis of gas transmission through CS
Figure 2. The scheme of decision independent variables assignment for on-line technological analysis of gas transmission through CS
A diagram of a hypothetical CS (a) and a diagram for the branch point A to point B (b)
Figure 3. A diagram of a hypothetical CS (a) and a diagram for the branch point A to point B (b)
A diagram of a hypothetical GTN of serially connected compressor stations
Figure 4. A diagram of a hypothetical GTN of serially connected compressor stations
Initial function of gas transportation expenses in the analyzed interval (prediction period)
Figure 5. Initial function of gas transportation expenses in the analyzed interval (prediction period)
Approximation sequence for the cost function
Figure 6. Approximation sequence for the cost function
A diagram of the GDN under consideration
Figure 7. A diagram of the GDN under consideration

Multimedia Traffic over Wireless and Satellite Networks

Vadim Seleznev1

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.

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 Sbase 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=0NV(n) , where V(n)n=1N 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: Sbase=ςbaseδ(1)2 , where ςbase is the factor depending on the prism base geometry only. Now volume V(0) can be determined by the following formula: V(0)=HSbase= =Hςbase(f(1)/H)2=ςbasef(1)2/H , which means that limHV(0)=limH[ςbasef(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.

media/image21.png

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(ρwf)=0
(1)
t(ρYmf)+x(ρYmwf)x(ρfDmYmx)=0m=1NS1¯YNS=1m=1NS1Ym
(2)
(ρwf)t+(ρw2f)x=f(px+gρz1x)π4λρw|w|R
(3)
t[ρf(ε+w22)]+x[ρwf(ε+w22)]=x(pwf)ρwfgz1xpft+Qf+x(kfTx)Φ(TTam)+x(ρfm=1NSεmDmYmx)
(4)

for each of the junction nodes

ρt+n=1NΘ(n)((ρw)x)(n)=0
(5)
(ρYm)t+n=1N((ρYmw)x)(n)Θ(n)n=1N[x(ρDmYmx)](n)Θ(n)=0m=1NS1¯Y(n)NS=1m=1NS1Y(n)m
(6)
((ρw)t)(n)+((ρw2)x)(n)=(px)(n)gρ(z1x)(n)0.25(λρw|w|R)(n)n=1N¯
(7)
(ρε)t+n=1N((ρεw)xΘ)(n)=n=1N(pwxΘ)(n)+0.25n=1N(λρ|w|3ΘR)(n)++Q+n=1N([x(kTx)]Θ)(n)n=1N(Φ(TTam)fΘ)(n)+n=1Nm=1NS([x(ρεmDmYmx)]Θ)(n)
(8)
T(n)=T(ξ)ε=ε(n)=ε(ξ)(εm)(n)=(εm)(ξ)ρ=ρ(n)=ρ(ξ)p(n)=p(ξ)k(n)=k(ξ)(Dm)(n)=(Dm)(ξ)Ym=(Ym)(n)=(Ym)(ξ)(z1)(n)=(z1)(ξ)for anynξ1N¯andm1NS¯
(9)
n=1N(wfs)(n)=0n=1N(Txfs)(n)=0n=1N(Ymxfs)(n)=0
(10)
s(n)={1if(n(0)i(n))01if(n(0)i(n))0Θ(n)=V(n)V=f(n)Lγ(n)k=1N(f(k)Lγ(n))0Θ(n)1n=1NΘ(n)=1
(11)

equation of state (EOS) and additional correlations:

p=p({Smix})ε=ε({Smix})k=k({Smix})εm=εm({Smix})Dm=Dm({Smix})m=1NS¯T1=T2==TNS=T
(12)

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); Ym is a relative mass concentration of the m component of the gas mixture); Dm is a binary diffusivity of component m in the residual mixture; NS is the number of components of the homogeneous gas mixture; p is the pressure in the gas mixture; g is a gravitational acceleration modulus; z1 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; Tm 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); {Smix} is a set of parameters of gas mixture. Function Φ(TTam) 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 ( Φ(TTam)0 is cooling), Tam 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 Φ(TTam) describing the heat exchange between the environment and natural gas in the course of its pipeline transmission. The space-time distribution of function Φ(TTam) 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 105m 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(ρYmf)+x(ρYmwf)=0m=1NS1¯YNS=1m=1NS1Ym
(13)
t[ρf(ε+w22)]+x[ρwf(ε+w22)]==x(pwf)ρwfgz1xpft+QfΦ(TTam)
(14)

for each of the junction nodes

nIN{t[ρ(pJointT(n){Y(n)m|m=1Ns¯})]Θ(n)}++t[ρ(pJointTJoint{YmJoint|m=1Ns¯})]nOUTΘ(n)++n=1N{x[ρ(pJointT(n){Y(n)m|m=1Ns¯})w(n)]Θ(n)}=0
(15)
(t(ρYmf))(n)+(x(ρYmwf))(n)=0m=1NS1¯YNS=1m=1NS1YmnIN
(16)
Ym,Joint=nIN(ρ|w|fYm)(n)/nIN(ρ|w|f)(n)m=1NS¯
(17)
(t[ρ(ε+w22)])(n)+(x[ρw(ε+w22)])(n)==((pw)x)(n)(ρwgz1x)(n)+Q(n)(Φ(T(n)T(n)am)f)(n)nIN
(18)
hJoint=nIN(ρ|w|hf)(n)/nIN(ρ|w|f)(n)n{IN1N¯if(ws)(n)0OUT1N¯if(ws)(n)0
(19)
TJoint=T(pJointεJoint{YmJoint|m=1Ns¯})ρJoint=ρ(pJointTJoint{YmJoint|m=1Ns¯})
(20)
εJoint=hJointpJoint/ρJointnIN(ρ|w|f)(n)=nOUT(ρ|w|f)(n)
(21)
p(n)=pJointn=1N¯ρ(n)=ρJointnOUTT(n)=TJointnOUTε(n)=εJointnOUT
(22)
Y(n)m=Ym,JointnOUTm=1NS¯(z1)(n)=(z1)(ξ)for anynξ1N¯
(23)

equation of state:

h=ε+p/ρp=p(ρT{Ym|m=1Ns¯})ρ=ρ(pT{Ym|m=1Ns¯})
(24)
ε=ε(pT{Ym|m=1Ns¯})T=T(pε{Ym|m=1Ns¯})
(25)

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) hJoint 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
(26)
[(ρF)(S)(Ym)(S)]t++(ρ(R)w(0.5)f(0.5)(Ym)(R))x+(σθ)[(ρfDm)(R)δ(Ym)a]x+(σθ)=0m=1NS1¯YNS=1m=1NS1Ym
(27)
[(ρF)(S)w(S)]t++(ρ(R)w(0.5)f(0.5)w(R))x+(σθ)==(Bγpx¯+B+γ+px)(σθ)g[ρ(Bγ(z1)x¯+B+γ+(z1)x)](σθ)π4(λρ|w|r)(σθ)w(σθ)
(28)
[(ρF)(S)ε(S)]t++(ρ(R)w(0.5)f(0.5)ε(R))x+(σθ)+Kt(ρFw22)+Kx(ρwfw22)(σθ)==(p(R)w(0.5)f(0.5))x+(σθ)g[ρ(Bγ(z1)x¯+B+γ+(z1)x)](σθ)w(σθ)p(σθ)[F(S)]t+++(QF)(σθ)+[(kf)(R)δTa]x+(σθ)ϕ(σθ)+m=1NS[(ρDmf)(R)(εm)(R)δ(Ym)a]x+(σθ)
(29)
εm=εm({Smix})m=1NS¯T1=T2==TNS=Tp=p({Smix})ε=ε({Smix})
(30)
k=k({Smix})Dm=Dm({Smix})m=1NS¯
(31)

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); sasbrarb σ θ are parameters of the class of schemes (e.g., by specifying sa=sb=1ra=rb=05 σ=1 θ=0 , a two-layer scheme with central differences is selected from the class of scheme, and by specifying sa=sb=1rarb is according to the principles of “upwind” differencing, σ=1 θ=0 is a two-layer “upwind” scheme); Kt and Kx are the differential-difference operators of functions (0.5ρFw2) and (0.5ρwfw2) 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 Φ(TTam) . 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 {xitj} , where xi and tj are coordinates of the mesh node numbered i over space, and j , over time, ijZ Z being a set of nonnegative integers.

To explain the notations, it is expedient to consider an individual computational cell containing the node {xitj} (mesh base node) and bounded by straight lines x=xia x=xib t=tja and t=tjb xi1xiaxi xixibxi+1 tj1tjatj tjtjbtj+1 xiaxib tjatjb Let us introduce the so-called weighing parameters:

ria=xiaxi1xixi1=xiaxi1hirib=xibxixi+1xi=xibxihi+1sja=tjatj1tjtj1=tjatj1τjsjb=tjbtjτj+1
(32)

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

yij=y(xitj)yi=yi(t)=y(xit)yj=yj(x)=y(xtj)
(33)

Where there was applied the quadratic approximation

y(xt)=aiy(t)x2+biy(t)x+ciy(t)x[xi1xi]y(xt)=aiy+(t)x2+biy+(t)x+ciy+(t)x[xixi+1]
(34)

the system used the following notations:

δy(xt)=yx=2aiy(t)x+biy(t)x[xi1xi]δy(xt)=yx=2aiy+(t)x+biy+(t)x[xixi+1](δya)ij=2aiy(tj)xa+biy(tj)(δyb)ij=2aiy+(tj)xb+biy+(tj)
(35)

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

y=yijh=hiα=αiτ=τjβ=βjx=xit=tjy=yij+1y=yij1y(+1)=yi+1jy(1)=yi1jra=riarb=ribsa=sjasb=sjbijZy(a)=ay+(1a)yy(b)=by+(1b)y(1)y(ab)=ay+(1ab)y+byy(S)=say+(1sa)yy(+S)=sby+(1sb)yy(R)=ray+(1ra)y(1)y(+R)=rby(+1)+(1rb)yy(R)(+1)=y(+R)y(+R)(1)=y(R)y(S)=y(+S)y(+S)=y(S)Δt=tta=(1sa)τΔt+=tbt=sbτ=βsbτΔx=xxa=(1ra)hΔx+=xbx=rbh(+1)=αrbhΔt=tbta=Δt++Δt=(1sa)τ+sbτ=(1sa)τ+βsbτΔx=xbxa=Δx++Δx=(1ra)h+rbh(+1)=(1ra)h+αrbhγ=Δx/Δx=(1ra)h/[(1ra)h+rbh(+1)]=(1ra)/[(1ra)+αrb]γ+=Δx+/Δx=rbh(+1)/[(1ra)h+rbh(+1)]=αrb/[(1ra)+αrb]δya(+1)=δybδyb(1)=δyayx=[y(+1)y]/h(+1)yx¯=[yy(1)]/hyx¯(+1)=yxyx(1)=yx¯yt+=[yy]/Δtyx+=[y(+1)y]/Δx
(36)

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:

ht+whx=wρpx+1ρpt+λ|w|34RΦ(TTam)fρor DhDt=G(xtT(h))
(37)

where

G(xtT)=wρpx+1ρpt+λ|w|34RΦ(TTam)fρ
(38)
Dξ/Dt=ξ/t+wξ/x is a derivative of an arbitrary function ξ over t in the direction

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 Dh/Dt 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

dh=cpdTμcpdp
(40)

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

DTDt=(μ+1ρcp)DpDt+λ|w|34RcpΦ(TTam)fρcp
(41)

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:

dTdt(μ+1ρcp)dpdt=λ|w|34RcpΦ(TTam)fρcp
(42)

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.

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.

media/image159.jpeg

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:

{P111(JinPinTinJ1(X1)J11(X2)X6)P121(JinPinTinJ1(X1)J12(X3)X4)=0P121(JinPinTinJ1(X1)J12(X3)X4)P131(JinPinTinJ1(X1)J13X8X7)=0P131(JinPinTinJ1(X1)J13X8X7)P211(JinPinTinJ2J21X9X5)=0J11(X2)J111(X6)=0J12(X3)J121(X4)=0J13J131(X8)=0J131(X8)J132(X8X7)=0J21J211(X5)J212(X9)=0J212(X9)J213(X9X5)=00Xi1i=13¯εmax1Xjεmaxshopj=47¯εmin1Xkεmax1k=89¯
(43)

where P111 P121 P131 P211 are the natural gas pressure at the outlet of each of the CS branches, JinPinTin are the natural gas flow rate, pressure and temperature at the CS inlet, J1 J2 are the natural gas mass flow rates through “branches I”, J11 J12 J13 J21 are the natural gas mass flow rates through “branches II”, X6 X4 X7 X5 are the ratios of compression for compressor shops, X8 X9 are the ratios of compression for GCU groups of the first stages of compressor shops, εminmax1 is a minimal/maximal ratio of compression for GCU groups of the first stage, εmaxshop 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 Qj of each operating CFS; frequency uj of the CFS shaft rotation; maximal capacity Nj of the CFS drive; maximal outlet pressure Pj of the CFS, which is determined by the pipe's strength; maximal temperature Tj 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:

{QjminQj(X)QjmaxujminujujmaxNj(X)NjmaxPjminPj(X)PjmaxTj(X)Tjmax}
(44)

where index j=1M 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.

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: PT – 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 in Jii=123 – gas mass flow in the CS pipeline branch with its own number; nii=123 – 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 PA and temperature TA at the branch inlet, and pressure PB and heat flux qB (or temperature TB ) at the branch outlet (note that generally speaking these quantities are functions of time).

media/image200.png

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=J2CFS=J2CFS(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)=P22CFS(J)P22CGP(J)=0
(45)

where P22CFS(J)=ε2(P21CGS(J)T21CGS(J)J)P21CGS(J) is pressure at the CFS outlet; ε2(P21CGS(J)T21CGS(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); P21CGS(J) and T21CGS(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; P22CGS(J)=P22CGS(JT22CFS(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 T22CFS(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, JiCFS=JiCFS(t) where i=1N¯ N is the number of CFSs in the group), constitute a solution to the set of non-linear algebraic equations:

Ψi(Ji)=Pi2CGP(Ji)Pi2CFS(Ji)=0i=1N¯
(46)

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 212N

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.

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).

media/image215.jpeg

Figure 4.

A diagram of a hypothetical GTN of serially connected compressor stations

Fig. 4 uses the following notations: PTQ – 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(tu(t)) . It is evident that total expenses for the prediction period [0T] will be an integral, 0TZ(tu(t))dt . 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.

media/image223.jpeg

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)=0TZ(tu(t))dtmint[0T]u(t)U(t)Rm
(47)

given that

W(tu(t))Ω={WRk:(wminspecified)jwj(tu(t))(wmaxspecified)jj=1l¯wj(tu(t))(wmaxspecified)jj=l+1k¯}
(48)

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(tu(t))=(w1(tu(t))...wk(tu(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; wminspecifiedRl and wmaxspecifiedRk 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; Rm is the Euclidean m -dimensional vector space; Rk is the Euclidean k -dimensional vector space; Rl is the Euclidean l -dimensional vector space.

The first l rows of the vector-function W(tu(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, wj(tu(t))(wmaxspecified)j j=l+1k¯ , 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 t0t1tN onto the analyzed interval [0T] (see fig. 5) in such a way as to provide constant control of the GTN equipment within the time interval (titi+1) i=0N1¯ , (fig. 6a), i.e: u(t)=ui=const t(titi+1) uiU(t) . To simplify the problem definition (without loss of generality), we assume conventionally that the step Δt=ti+1ti i=0...N1 , is constant all over the prediction period.

media/image252.png

Figure 6.

Approximation sequence for the cost function

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

uj(t)={tt0δ(uj0uj(0))+uj(0)t[0δ)ujit[ti+δti+1δ)t(ti+1δ)2δ(uji+1uji)+ujit[ti+1δti+1+δ)
(49)

where i=0...N1 j=1...m uj(0) is a known value of the initial control at the initial time, ujN=ujN1 ; 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)=0TZ(tu(t))dt0.5ΔtZ0[u(t0)]+Δti=1N1Zi[u(t0+iΔt)]+0.5ΔtZN[u(tN)]
(50)

Thus, for some set of discrete controls (u0u1uN1)T , formula (44) allows calculating the quality functional J(u0u1uN1)

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 (u0u1uN1)T

J˜(u0u1uN1)=0.5Z0[u0]+i=1N1Zi[ui]+0.5ZN[uN1]min
(51)

subject to the conditions (considering (43)):

uiU={uRm:max[ui1ηconstruminspecified]jujimin[ui1+ηconstrumaxspecified]jj=1m¯}i=1N1¯
(52)
Wi(u0u1uN1)Ω={WiRk:(wminspecified)jwji(u0u1uN1)(wmaxspecified)jj=1l¯wji(u0u1uN1)(wmaxspecified)jj=l+1k¯}i=1N¯
(53)

where uminspecifiedRm and umaxspecifiedRm are given vectors of the minimum and maximum values of control parameters (as a rule, these vectors are time-independent); ηconstrRm 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 Zi(ui) 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(u1uN1)=i=1NZi(ui)minwhereuN=uN1
(54)

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.

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.

media/image271.jpeg

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:

fcalc(X)fmeasconstLminXΩRn
(55)

where L is the vector norm, the type of which is determined by the value of the parameter L (L=012) (see below); fcalc(X)fcalc:RnRm is the vector-function of calculated estimates of controlled transported gas variables at the identification points in the m -dimensional Euclidean space Rm (these calculated estimates are obtained using the CFD-simulator); fmeasconstRm 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ΩRn is the vector of independent controlled variables in the n -dimensional Euclidean space Rn ;

XΩ={XRn:aXbqcalcGDS(X)qmeas_GDSconst0tflow_rateGDS}
(56)
aRnandbRn 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., Y0=max1in|yi|YRn qcalcGDS(X)qcalcGDS:RnRl is the vector function of calculated estimates of mass flow rates through inlet GDSs in the l -dimensional Euclidean space Rl (these calculated estimates are obtained using the CFD-simulator); qmeas_GDSconstRl is a given vector of measured mass flow rates at GDS outlets; l is the number of GDSs; tflow_rateGDS=const 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 xi 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 (xii=1k¯) and pressures at outlet GDSs (xii=k+1n¯n=k+l) , where k is the number of associated CGPs

Components (aibii=1k¯) (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:

ai+tflow_ratecons[qconsconst]ibitflow_rateconsi=1k¯ai+tflow_ratecons[x0]ibitflow_rateconsi=1k¯
(57)
i=1k[x0]i=i=1k{[qconsconst]i+[Δqsellconst]i}=j=1l[qmeas_GDSconst]j
(58)

where qconsconstRk is a given vector of mass flow rates at outlet boundaries of associated CGPs; tflow_ratecons=const is a given upper estimate of the actual (nameplate) absolute error of flow meters installed at outlet boundaries of associated CGPs; X0Rn is the starting point of the conditional optimization problem; ΔqsellconstRk 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 (aibii=k+1n¯) are generally defined in accordance with conditions:

ai+tpressureGDS[x0]ibitpressureGDSi=k+1n¯[x0]i=[pmeas_GDSconst]iki=k+1n¯
(59)

where pmeas_GDSconstRl is a given vector of measured pressures in the GDS; tpressureGDS 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):

ai{min([x0]itflow_ratecons[qconsconst]itflow_ratecons)i=1k¯[pmeas_GDSconst]iktpressureGDSi=k+1n¯}bi{max([x0]i+tflow_ratecons[qconsconst]i+tflow_ratecons)i=1k¯[pmeas_GDSconst]ik+tpressureGDSi=k+1n¯}
(60)

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:

max1im|[fcalc(X)]i[fmeasconst]i|minXΩRn
(61)

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=1m|[fcalc(X)]i[fизмconst]i|minXΩ={XRn:aXb|[qcalcGDS(X)]j[qmeas_GDSconst]j|tflow_rateGDS0j=1l¯}
(62)

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=1m([fcalc(X)]i[fmeasconst]i)2minXΩ
(63)

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 X0Rn in accordance with conditions (52) and (53). Define the vectors aandb 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. ({ab}{ab}) . 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 Xinit , with XinitΦRn . 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:

{qcalccons(X)qconsconst2minXΘ={XRn:aixibii=1k¯[pinit_GDSconst]itpressureGDSxi[pinit_GDSconst]i+tpressureGDSi=k+1n¯|[fcalcident(X)]s[finit_identconst]s|tpressureident0s=1h¯|[qcalcGDS(X)]j[qmeas_GDSconst]j|tflow_rateGDS0j=1l¯}
(64)

where qcalccons(X)X[qcalc(x)]i=xii=1k¯ is the vector function of calculated mass flow rates for outlet boundaries of associated CGPs in the k -dimensional Euclidean space Rk pinit_GDSconstRl is a given vector of GDS pressure corresponding to the primary fluid dynamics mode at XinitRn fcalcident(X)fcalcident:RnRh is the vector function of calculated estimates of controlled variables at inner identification points in the h -dimensional Euclidean space Rh (these calculated estimates are obtained using the CFD-simulator); finit_identconstRh is a given vector of controlled variables at inner identification points corresponding to the primary fluid dynamics mode at XinitRn h is a given number of inner identification points; tpressureident=const 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 XinitRn . 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 XidentΘRn+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.

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 - V. V. Aleshin, V. E. Seleznev, 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 - J. E. Dennis , JrR. B. Schnabel, 1988 Numerical Methods for Unconstrained Optimization and Ninlinear Equations, Prentice-Hall Inc., 0-13627-216-9 Jersy.
3 - С. A. J. Fletcher, 1988 Computational Techniques for Fluid Dynamics. Fundamental and General Techniques, Springer-Verlag, 3-54018-151-2
4 - V. V. Kiselev, V. E. Seleznev, O. I. Zelenskaya, 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 - V. E. Seleznev, V. V. Aleshin, G. S. Klishin, R. I. Il’kaev, 2005 Numerical Analysis of Gas Pipelines: Theory, Computer Simulation, and Applications, KomKniga, 5-48400-352-0
6 - V. Seleznev, 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 - V. Seleznev, S. Pryalov, 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 - V. E. Seleznev, V. V. Aleshin, S. N. Pryalov, 2007 Mathematical modelling of pipeline networks and channel systems: methods, algorithms, and models, MAX Press, 978-5-31702-011-8 Moscow. (In Russian)
9 - A. N. Tikhonov, A. A. Samarsky, 1999 Equations of Mathematical Physics, Moscow State University Publisher, 5-21104-138-0 (In Russian)
10 - F. P. Vasilyev, 2002 Methods for Optimization, Factorial Press, 588688059 (In Russian)