Numerical Adaptation of Pipeline Network Models on Measurement Archive

We propose an adaptation method for gas dynamic pipeline network models to enable credible representation of actual properties of real simulation objects. The presentation is illustrated by fitting equivalent pipeline section roughnesses used in the models to accommodate the influence of flow resistance on gas transport parameters. The method is based on the setting up and solution of a series of special parametric identification problems based on a limited set of field measurement data at local (in space) network points. This method can be used by specialists in mathematical modeling of gas transport systems to solve practical parametric identification problems.


Problem Statement
Under present-day conditions of progress in computational technology, various problems of monitoring and operation of complex pipeline systems are closely related to the problem of numerical recovery of flow parameters in pipelines [1].Mathematical modeling of fluid transport processes in a pipeline network offers a promising approach to this problem.Various properties of the engineering system of interest are represented by corresponding model parameters.Some properties of a branched pipeline network that are essential for flow parameters may vary with time over its life cycle.If the model parameters corresponding to such properties are static, or if their variation law cannot be defined a priori, then such model parameters should be periodically adjusted or revised.Without loss of generality, this method of pipeline network model adjustment will be presented for the case of numerical fitting of effective (equivalent) roughnesses of inner pipe walls in linear segments of the pipeline system of interest.
As we know [2], total losses of pressure Δ full in viscous matter flowing through pipes to surmount the flow resistance forces are usually defined as a sum of friction losses Δ fric and local losses Δ loc  : where  = (Re, Δ) is the flow friction coefficient [2,3]; Re = (||)/ is the Reynolds criterion; , , and  are the density, flow velocity, and dynamic viscosity coefficient of matter;  and  are the pipeline hydraulic diameter and length; Δ = Δ/ is the relative pipe wall roughness; Δ is the absolute pipe wall roughness; and  loc  is the local resistance coefficient.In a number of practically significant cases, the total resistance (total pressure losses) in calculations is treated as conventionally increased friction resistance [2].In the first approximation, as applied to the problem of interest, let us use a similar approach; that is, we approximate the characteristic of interest (1) by the following relationship: where  is some increased (compared to Δ) value of relative roughness that includes, among other things, the influence of local resistance.The parameter  is called equivalent relative roughness of the pipe wall.By analogy, the parameter  =  will be the equivalent absolute roughness of the pipe wall.Formula (2) has proven its credibility by many years of its application for the modeling of real gas mixture transport conditions in branched trunklines.This was primarily attributed to the actual closeness of the character of the above flow under design conditions to quadratic flow.Thus, the problem to be solved involves calculating the equivalent pipe wall roughnesses to incorporate the influence of flow resistance in segments of real gas networks [3,5,6].The values of the above effective roughnesses are initially taken from the reference literature based on the available design and construction documentation.The values are then revised based on the consultations with the pipeline operating personnel and based on the results of a comparison of the calculated gas flow parameters (pressure, mass flow rate, and temperature) with corresponding field data gathered by remote measurement systems.It should be noted that the procedure of fitting the generalized semiempirical parameters of a gas pipeline system is basically performed at rather long time intervals-at most, once in two or three years-if there has been no repair or upgrade of the gas pipeline system over the given time period.
In order to improve the quality and efficiency of the above fitting procedure and to minimize the influence of human intervention on the results of subsequent calculations, it makes sense to computerize it [4].The basic prerequisite for such computerization as applied to a specific gas pipeline system is that the corresponding gas transport or gas distribution company should have an electronic data archive, including valve positions, gas withdrawal by consumers, and in-house gas consumption (here and below we do not differentiate between the terms "gas" and "gas mixture"), results of field measurements of basic gas flow parameters in the gas pipeline system, and parameters of gas transmission equipment.This data archive is generally collected and stored in the form of a computer database over a relatively long time period (one month to several years).

Preparation of Initial Data
To computerize the equivalent roughness fitting procedure, linear gas pipeline segments of the simulated gas pipeline network are conventionally divided into  nonoverlapping regions [4].Neighboring of resulting pipeline regions is admissible (i.e., the regions can have a common boundary in space).The regions can be several hundred meters to several kilometers long.Then, for each resulting region of the linear gas pipeline segment, based on the reference literature, we establish the starting value of the equivalent roughness of the inner pipe wall.
Based on the analysis of the electronic data archive, we identify  nonoverlapping time intervals, over which gas transport was performed in company-specific non-steadystate nonisothermal regimes, which nevertheless differ from each other in their characteristics.We assume here that the gas pipeline system functioning over each of the identified time intervals was accompanied by a wide range of correct field measurements of gas flow parameters.The identification of the time intervals necessarily complies with the rule that the beginning of each identified time interval should be preceded by a period (though very small) corresponding to company-specific quasi-steady-state gas transport regimes.Violation of this rule will later make it impossible to use mathematical models of non-steady-state flow in gas pipeline systems to calculate target functions and functions in constraints of identification problems (see below).The above can be explained by the fact that, according to the laws of mathematical physics, solving non-steady-state problems requires setting not only boundary conditions but also initial conditions.In practice, initial data can be specified consistently only based on the results of preliminary solution of a corresponding steady-state problem.
In our case, it is practical to identify time intervals such that they have the same length Δ.If multiprocessor computers are used, this will enable efficient paralleling of the problem of gas dynamic model adjustment to real parameters of the gas pipeline system of interest.The recommended interval length Δ can vary from several tens of minutes to several tens of hours.To improve the consistency of equivalent pipe wall roughness fitting, it makes sense to distribute the identified time intervals uniformly with respect to four calendar seasons.It is desirable for the time intervals to be spaced apart.
As noted above, problem simulation by this method includes mathematical modeling of non-steady-state gas flow regimes for each of the identified time intervals with given values of equivalent pipe wall roughnesses in linear gas pipeline segments of the gas pipeline system of interest [1,3].Boundary conditions in modeling are specified at gas pipeline system boundaries in the form of various combinations of pressure, temperature, and gas flow rates.
The modeling data are used to assess the closeness of the corresponding calculated and measured gas transport parameters in the gas pipeline system.Space-time pressure distributions we consider interest parameters.There are several reasons for this choice: the accuracy of pressure gauges is higher than the accuracy of flow rate and temperature meters [5,6]; the number of pressure gauges in real networks is generally larger than the number of flow rate meters (as a rule, flow rate measurements are not taken inside the network); it follows from practical experience of extreme simulations that using a combination of pressure and flow rate parameters, which are fundamentally different in their scale, leads to significant worsening of the convergence of optimization simulations.The closeness of calculated and measured values is assessed for so-called identification points (IPs).IP locations are specified before equivalent roughness fitting based on the analysis of the layout of gas flow instruments in the pipeline network of interest and consistency and stability of their functioning.The preferred location of each IP should meet the following requirement [1,3]: any significant change in time of rated gas dynamic regimes in the pipeline system of interest at the identification point must be accompanied by significant changes in time of gas flow parameters actually measured at this point.The distribution of IPs in the simulated pipeline network diagram should be as uniform as possible.Here we also assume that in the process of automatic adjustment of gas pipeline network models to real parameters of simulated objects the number of properly functioning IPs and their locations is fixed over all the identified time intervals.

Mathematical Formalization of Identification Problems
By analogy with [1], the closeness of calculated and measured time histories of the parameters under comparison at each IP will be analyzed in three senses [7]: closeness of the quality of two functional relationships (first-sense closeness); closeness of two functional relationships in the timeweighted average metric defined using the octahedral ‖ ⋅ ⋅ ⋅ ‖ 1 or Euclidean ‖ ⋅ ⋅ ⋅ ‖ 2 norm (second-sense closeness); closeness of two functional relationships within the framework of their uniform discrepancy, that is, in the metric ‖ ⋅ ⋅ ⋅ ‖ 0 (third-sense closeness).Calculated and measured time histories can be brought closer to each other in all the three senses by solving the classical identification problem: where ‖ ⋅ ⋅ ⋅ ‖  is the vector norm, the type of which is determined by setting the parameter  = 0, 1, 2; p calc (, X) is the vector function of calculated gas flow pressure values at the IP in the Euclidean space   (it is practical to calculate these values using mathematical models presented in [1,3]), p meas () = ([ meas ()] 11 , . . ., [ meas ()] 1 , . . ., [ meas ()]  )  ∈   is the given vector function of measured gas flow pressure values at the IPs;  is the time (marching variable); X ∈ Ω ⊂   is the vector of independent variables in the Euclidean space   (in the form of a set of sought equivalent inner wall roughnesses of pipeline segments); Ω = {X ∈   : a ≤ X ≤ b}, a ∈   , b ∈   are well-defined vectors establishing the boundaries in simple constraints on the range of admissible variations in the vector of independent variables;  is the number of defined IPs in the simulated pipeline system diagram;  is the number of independent variables.The problem (3) can have different statements depending on the chosen type of the vector function norm.For example, given the choice of the cubic norm ‖ ⋅ ⋅ ⋅ ‖ 0 we have a mini-max problem [8] with simple constrains on the variables: Solving the problem (5) provides the so-called uniform closeness of calculated gas transport parameters to their measured values.If we choose the octahedral vector norm ‖ ⋅ ⋅ ⋅ ‖ 1 , the original problem (3) transforms into a nonlinear programming problem expressed as Note that the problems ( 5) and ( 6) are equivalent only in terms of the definition of the global minimum.And the global solution of the problem (5) entails the global solution of (6).Unfortunately, we are not aware of scientifically based methods of search for the global extremum in such problems.An efficient search for the local solution to the problems ( 5) and ( 6) can be done by the known modified Lagrange functions (MLF) method supplemented with the variable metric method of search for the MLF minimum under simple constraints [9].However, it is problematic to guarantee the coincidence of optimal (in the general case, local) solutions of the problems ( 5) and ( 6) in practice.The results of numerical solution of these problems can therefore differ from each other even if the same starting point is used.The choice of the Euclidean vector norm ‖ ⋅ ⋅ ⋅ ‖ 2 in (3) results in the formulation of a new conditional optimization problem, which is practically equivalent to (6): Solving the problem (7) provides the root-mean-square closeness of calculated gas transport parameters to their measured values.It should be stressed here that the requirement of uniform closeness in (5) is stricter than the root-mean-square closeness in (7) [7].As we show in [1,3], it is also practical to solve the problem (7) by the MLF method.
When solving the problem of fitting the equivalent roughnesses, one should give preference to the results of solving the problem (7) rather than the problem (5).This can be motivated by the fact that the compensation for individual spikes as a result of solving the problem (5) cannot guarantee satisfactory agreement between calculated and measured values in general.At the same time, partly smoothed individual discrepancy spikes in the functions under comparison that can theoretically remain after solving the problem (7) as a rule have a minor effect on the character of agreement between the functions of interest in general and can be ignored in the first approximation.Note that in most practical cases, given a fixed starting point, the runtime of the problem (7) (or (6)) is significantly smaller than that of the problem (5).
Experience of production simulations involving the fitting of equivalent roughnesses of inner pipe walls shows that in the absence of sufficient IPs, in addition to the closeness of pressure values at the IPs, it makes sense to require that gas pressure differences along the pipelines between specifically identified pairs of IPs should also be close.In this case, the optimization problem will take the following form: where (  ,   ),  = 1, , is a predefined set of pairs of the numbers of IPs, between which the gas pressure difference along the pipeline is analyzed;  is the number of predefined pairs.The approach to this problem is similar to that of (7).Analysis of the closeness between calculated and measured time histories in the first sense (i.e., in essence, the closeness between the first derivatives of the functions under comparison) gives the following problem statement:

Conclusion
The paper describes a version of a practical method of mathematical gas flow model adaptation to actual parameters of real simulation objects.The method in itself is an extension of approaches to high-accuracy numerical recovery of transport flow in gas pipeline systems.This method can be used for the adaptation of constant characteristics of corresponding mathematical models to actual parameters of real engineering systems of the gas industry.This method has demonstrated its efficiency as applied to practical simulations by many years of its application to support pipeline operator decisions at gas transport and gas distribution companies and in the course of gas pipeline dispatcher training using researchgrade computer simulators.