This paper presents an application of object-oriented methodology for modeling a natural gas transmission network. Each element of the network, such as a gas pipeline segment or a node is represented as an object with behavior necessary to implement the algorithm modeling this element. This behavior also includes the mechanism necessary to assemble these objects into a model of a network. This methodology hai been implemented using a collection of C++ classes for structured modeling of dynamical systems. This collection makes it possible to simulate hierarchical dynamical system using the slate variables, ports and submodels as components of a model. The implementation of the object-oriented model of a gas transmission network based on these concepts is also presented in the paper.
Transient simulation of a natural gas pipeline network is complicated because of the large scale and the complexity of the network. The gas pipeline network is described as a system of partial differential equations which must be solved sufficiently fast to make the solution applicable for real-time operation of the gas transmission system or for supporting planning decisions. Expertise and knowledge regarding modeling of a single pipeline segment has been already accumulated (Hannah 1964, Wylie, 1983, Osiadacz, 1987). Unfortunately, modeling of gas pipeline networks consisting of many connected pipeline segments is more complicated because equations describing nodes linking pipeline segments and auxiliary devices such as compressors and valves must be taken into account. Therefore, to perform simulation of a gas pipeline network, a graph describing the structure of a network must be converted into an equivalent set of ordinary differential equations. This process is technically complicated and various solutions such as program generators or graph interpreters have been proposed for this purpose. Fortunately, when object-oriented technology is applied to the modeling of a gas pipeline network, these difficulties can be reduced. A graph representing structure of a gas pipeline network can be composed of objects which can be directly linked to an ODE solver, without performing the flattening operation. In this way, the most complex part of a simulation procedure can be eliminated. This approach has been implemented using a library of C++ classes for structured modeling and sensitivity analysis of dynamical systems, designed and implemented by Calhoun and Lewandowski (1994). Simulation of a gas pipeline network is one of the first large-scale applications of this library.
Although this fact is not visible for users of computer software, there is a large gap between the software technology and the computer hardware technology. About 30 years ago, the only available electronic element was a vacuum tube. Computers built using these elements had the processing power comparable with todays pocket calculators. Currently available desktop computers are comparable with "supercomputers" available 15 years ago. Unfortunately, the software engineering technology used today is not more advanced than that used during the vacuum tube period.