PIPELINE SIMULATION-1 MODELS TRACK, PREDICT AUSTRALIAN SYSTEM OPERATIONS
William J. Turner William
J. Turner Pty. Ltd.
Willetton, Australia
Prue A. Maguire
Csiro Division of Mineral & Process Engineering
Menai, Australia
Chris Smith
Leeds & Northrup (Australia)
Alexandria, Australia
Patrick McConnell
AGL Sydney Ltd.
Concord Australia
Mike Severs
Pipeline Authority
Canberra
Pilot testing of a gas-pipeline computer simulation program, fully integrated with the control system for an operating high-pressure gas pipeline, indicates that the program can model the pipeline well enough to track its current state and predict its next 16 days of operation.
Tracking provides the operator with information, most importantly linepack and pressure, that may otherwise not be available.
Prediction helps the operator with both major tasks: informing his gas supplier how much gas the pipeline needs and assuring his customers that the pipeline can meet their requirements.
SIROGAS simulates the steady state and transient behavior of single-phase fluid (principally gas) in pipeline networks. It is used by most operators of high pressure, long distance natural-gas pipelines in Australia.
In 1991, the program was installed on the Leeds & Northrup Australia supervisory control and data acquisition (scada) computer at Australian Gas Light Co.'s control center in Sydney.
SIROGAS uses information provided by the scada system (pressures, flows, for example) to simulate each previous minute. These data are measured at Moomba, Newcastle, and other places on the New South Wales (NSW) gas-pipeline network (Fig. 1).
Most of the NSW network is operated by the Pipeline Authority (TPA), an agency of the Australian government.
The purpose of the simulation is to provide the operator, through the program's tracking model, with as many as 300 quantities calculated by SIROGAS, many of which (such as linepack--the mass of gas present in the pipeline) are not easily measured.
The tracking model also provides a starting state to simulate the operation of the network over the next 16 days. This is done routinely by the program's prediction model once each day and at other times as requested by the operator.
SIROGAS is designed for routine operator use; all interaction with the model is through normal or specially developed scada functions.
Development and use of SIROGAS are described in this first part of a two-part series on the project.
The conclusion relates details and results of its pilot testing in late 1991. Comparisons between measured, tracking, and prediction results show that when the model receives valid data, good agreement is obtained with actual operation.
The tracking model performed well over the trial period under adverse conditions in which data on compressor operations were obtained only about twice per day and, during several periods, grossly incorrect measurement data were passed to the model.
In spite of these difficulties, the average pressure difference between the model and measured pressure at Eastern Nitrogen Ltd. (ENL) north of Newcastle was less than 1%, with all excursions above 1% accounted for by known data failures.
Major advantages of integrating the models with the scada are that the operators only need to master modest extensions of current procedures using the same screens and keyboards and that the tracking and prediction data are available for use in subsequent calculations and in any other scada operation.
Also, much less software is required because many of the functions required by a standalone simulation model are performed by the scada.
THE PIPELINE NETWORK
Natural gas is supplied to the Australian state of New South Wales from a gas plant at Moomba, South Australia, through the high-pressure gas pipeline network shown in Fig. 1. NSW is the most populous of the seven Australian states with a population of about 7 million.
From the gas plant at Moomba, gas enters a pipeline network owned and operated by TPA. This network conveys gas to several towns in New South Wales and to Wilton, south of Sydney.
Here, gas passes into a high-pressure network owned and operated by Australian Gas Light Co. (AGL) which also distributes most of the natural gas in NSW, including that supplied to towns from the TPA network.
Following are the main components of the network:
- Main TPA pipeline from Moomba to Wilton
- TPA compressors at Bulla Park and Young
- Northern TPA lateral to Lithgow
- Southern TPA lateral to Wagga Wagga
- Canberra TPA lateral
- AGL lateral from Wilton to Mt. Keira
- AGL lateral from Wilton to ENL.
AGL operates a control room in Sydney which is divided into two parts: one controlling the AGL high-pressure network; the other, the low-pressure distribution system.
The high-pressure control system uses a recently installed Leeds & Northrup scada system with remote terminal units (RTUs) at Moomba and at many points of the AGL network. No on-line information, however, is received from the TPA part of the network which includes the only two compressor stations in the network.
This part of the network is controlled by TPA from its control room at Young. The only information available at the AGL control room on this portion of the network is that taken by telephone by the operators in discussion with the TPA control-room staff who operate the TPA control system with RTUs scattered throughout the TPA part of the network.
In 1990, AGL decided to include a simulation model with prediction capability as part of its new scada system.
The model was required to simulate the entire network and to be fully integrated into the scada system so that no additional operator consoles were envisioned and all model output was to be displayed with the standard scada trend and profile generation facilities and some special screens developed for this purpose.
All tracking-model input was to come from the scada data base, part of which is updated automatically from AGL RTUs and part manually by the operators. This updating scheme is not too Significant for the small flows leaving the network upstream of Wilton but may be very important in the case of the compressor discharge pressures.
THE MODEL
SIROGAS is a computer program to simulate the hydraulic behavior of gas in complex pipeline networks. 1 2 It is based on an earlier computer program for the cooling networks of water-cooled nuclear power reactors. 3
SIROGAS is used by most natural-gas pipeline operators in Australia and by several consulting engineering firms. The tracking model and the prediction model are further developments of SIROGAS to provide the operator of a gas pipeline network with a current simulation of the network and with the capability to predict its future behavior.
In calculating the steady-state and transient behavior of compressible gas in a complex flow network, SIROGAS treats the flow network as a set of one-dimensional flow paths, each of which starts and finishes at a connection.
Flow paths can be uniform round pipes over hills and valleys, complex tubes of varying shapes and areas, or even banks of tubes such as those in heat exchangers.
Nodes are placed at the start, finish, and at any required intermediate positions in each flow path so that an implicit finite-difference method can be used for each path. Connections, which join together these flow paths to form the network, are described by algebraic (for example, pipe junctions) or differential (for example, tanks) equations.
The only limits on network topology result from limits on computer storage. Problems involving as many as 1,200 pipes have been run.
In SIROGAS, the state of a flow path is described by several variables, including gas composition, flow rate, pressure, temperature, enthalpy, density, flow path's surface temperature, and flow path's wall or ground temperature at nodes.
The variables specifying the state of a connection depend on the type of connection. The program contains connections for simulating a wide range of network components, including compressors, regulators, valves, LPG plant, supply points, demands, tanks, pipe bursts, and heaters.
The detailed properties of the flow paths and connections and how they join together to form the network are given in a configuration file read by SIROGAS at the start of a simulation, that is during any warm or cold start.
The equation of state developed by Starling 4 for light petroleum systems has been adopted.
This formulation covers any mixture of 15 gases and has been extensively tested against a variety of experimental data.
The formulation consists of complex expressions for pressure, enthalpy, and entropy as functions of temperature and density. These expressions involve constants which are evaluated from the gas composition data, data for each component gas, and data for interactions between gases.
Numerical procedures are used in SIROGAS to invert Starling's expressions so that all gas properties are obtained from pressure and either enthalpy or temperature. Thus, variations in gas compressibility and composition are taken into account at every node and every time step.
Two compressor models are available:
- The polytropic or Cooper-Bessemer model, which has all the usual modes of operation, represents both compressor stations in the NSW network model. Both are set to discharge pressure-control mode.
- The two-unit station model presents the two units in parallel. Either unit or the station can be stopped or started during a transient. Compressor speed and efficiency are determined directly from the manufacturer's performance chart.
Both models include shutdown operation with the main line valve open or closed. Shutdown is achieved by reducing the setpoint to less than the operating point.
The models never allow reverse flow or an inverse pressure ratio to occur because the main line valve is closed to prevent reverse flow and opened to prevent an inverse pressure ratio.
CALCULATIONS
To begin a transient calculation, initial values of mass flow rate, pressure and temperature, and other parameters must be determined at every node, and the state of all connections determined.
In the tracking model, these determinations are made by computing a steady state from information contained in the configuration file. The prediction model reads values which determine a dynamic state from a restart file written by the tracking model.
In the tracking model, the variation in time of boundary-condition pressures and flows or of setpoints such as compressor-discharge pressures is taken from information received from the scada after filtering and limiting.
In the prediction model, the variation is specified to the scada and passed to the prediction model.
It is usually desirable to take long time steps when conditions are changing slowly and small time steps when there are rapid changes. This is done automatically in SIROGAS within a specified minimum and maximum time step, and with a repeat with a shorter step if too large a change occurs.
Usually the effect of this procedure is that time step size is varied automatically to keep the fractional change in pressure approximately equal to a specified value (usually 0.01) except that the time step is slightly reduced as a target time is approached, in a similar way to a fast walker approaching a single stepping stone creek crossing.
TRACKING MODEL
The tracking model simulates an operating network in real time. Thus, calculated current and past values of pressures, flows, temperatures, linepack (mass), and other parameters of interest are available to the operator. Many of these are not measured, for example linepack and many pressures.
Comparing measured and modeled parameters, such as pressures and flows, may reveal instrumentation problems or leaks.
On a cold or warm start, the tracking model reads the input files, calculates the initial state specified in these files, and enters a computation loop that continues until either a fault occurs within the model or the model is stopped by the operator.
Within this loop, output values are passed to the scada which then provides a new set of measurements, and the period from the end of the previous simulation (usually the previous scada scan) up to the time of the current scan is simulated.
This loop normally takes much less time than the real time interval between scada scans. Thus, the new data are not available when the tracking model requests it, and the scada system is able to control the tracking model only by returning when a tracking-model calculation is required.
The tracking model uses the standard SIROGAS variable time step procedure (previously discussed) with a minimum time step of 15 sec for this application. Normally this results in one or two time steps to simulate the 1-min scada scan period.
It may happen that the scada delays operation of the tracking model by several minutes or even hours. Thus, simulation of much longer periods may be required. The same procedure is used.
Since changes to boundary conditions are reported to the model to have taken place over a longer period and thus more slowly, successively larger time steps will be used provided the required accuracy is met, with the step sizes chosen to ensure approximately equal steps that land precisely on the time corresponding to the latest scada data.
If the period is more than 2 hr, a cold start is automatically initiated.
The tracking model point-identification (PID) file contains descriptions of the flow, pressure, and temperature measurement points in the network. Data for each measurement point include PID, type, location, and limits to be placed on the measurement value.
The tracking model determines, from the type and location, which measurement points to use to drive the model. A fist of the corresponding PIDs is passed to the scada, which subsequently passes the required values to the tracking model at each scada scan.
If a particular boundary condition or setpoint is not present in the PID file, then its value remains unchanged from the initial value. Thus, the SIROGAS software configures itself to accommodate the set of measurements listed in the PID file.
Usually the scada system supplies an indication of the status of the corresponding measurement. A non-zero status value indicates that there is some problem with the measurement, and the tracking model substitutes a value equal to the last measured value with a zero status.
The status indicator provided by the scada does not always indicate bad data; hence it is necessary to modify the scada data which drive the model to ensure as good a simulation as possible with the available data and that the simulation improves when the quality of the data improves.
This is done by noting and filtering the scada data (Fig. 2).
THE PREDICTION MODEL
From the network's current calculated state, the prediction model simulates the future behavior of the network. The pipeline network configuration and equation of state data are read from two files also used by the tracking model.
Measurement predictions to be passed to the prediction model and quantities calculated by the model required to be returned to the scada are listed in the prediction model PID file.
The current state is obtained from an historical restart file written by the tracking model. The future variation of demands and setpoints is provided by the operator with assistance from the scada system.
As with the tracking model, the input to and output from the model occur through files and Fortran subroutine arguments, These routines are called by special subroutines provided in the standard SIROGAS code for applications such as the tracking and prediction models.
The Leeds & Northrup Australia scada system consists of several LN2068 computing stations (based on the 68030 chip) using the Versados operating system on a data highway (Fig. 3).
One of these, the SIROGAS station, performs all SIROGAS tracking and prediction model functions, although all displays and controls can be accessed from any operator's console.
Once initialized, the tracking model is a background process on the SIROGAS station. The model has access to the scada data base which includes all real time data from the AGL system and manually entered data from the TPA system.
At intervals which are normally 1 min, the model reads data from a set of calculated and manually entered input points and runs a transient cycle. The output from the model is then stored in a set of calculated output points.
These SIROGAS resident points are available for trending or display on any of the LN2068 operator displays.
The prediction model is also available on demand at the SIROGAS station. The model simulates much faster than real time and makes the resultant prediction available within 30 min of initiation.
It is faster partly because it takes much larger time steps than the tracking model and partly because the tracking model itself runs at least six times faster than real time.
Data produced by the prediction model are available as analog long-term historical data. These SIROGAS output data may be displayed for any period, past or future. Both tracking and prediction models run automatically requiring no operator control action.
The operator, however, is required to make some data entry to ensure the accuracy of both models. The models operate concurrently at some times in the day.
OPERATOR INTERFACE
The operation, control, data entry, and display of SIROGAS data are accessed by selecting the "SIROGAS" alpha display key from any operator panel. Pressing this assigned key calls up the SIROGAS main control display.
The tracking model runs continuously and is synchronized to the system real time clock. Normally, the model takes only about 10 sec to simulate the 1-min period between scada scans and hence has no difficulty in keeping up.
Progress of the model is controlled and monitored by the operator from the "Real Time Model" section in the SIROGAS main control display.
The GO command produces a cold start if the shutdown period was longer than 2 hr. In this case, a steady state is computed with the SIROGAS network steady-state procedure.
Otherwise, a warm start occurs in which the initial state is taken from the most recent dynamic state available.
The tracking model writes input on the dynamic state at regular intervals, currently set at once per minute. The input to the tracking model is the set of calculated points listed in the "Input Data" display of the main control display.
Although all of the input data points are automatically taken from the scada data base, measurements are only made each minute at some points. The remaining points are changed less frequently by other means; in particular, the Bulla Park and Young compressor models require a measurement of the current pressure setpoint.
This measurement must be obtained from TPA and entered manually whenever a setpoint change is made and checked at least once per hour if reasonable tracking is to be achieved.
The tracking model dynamic accuracy depends on two main factors: prompt and regular entry of the manually entered points and settling time after a cold start.
The model settling time is related to the actual storage of gas in the pipeline and the consequent dynamic effect of this on pressure and flow.
Following a cold start, the model will probably be in error in both pressure and flow conditions. This error will gradually decay over the first 12 hr of operation.
The accuracy of the model can be checked by observing the dynamic relationship between the model results and actual measurements on trend displays. The most likely cause of error during normal operation is the long time between manual entry of some load and compressor measurements, particularly the Bulla Park and Young compressor setpoints.
The prediction model predicts up to 16 days ahead. One prediction ("Current Day Prediction") is run automatically at 6:15 a.m. just before the start of the gas day but can also be run manually at any time in the day and replaces the data generated in any previous run that day.
Another prediction ("Hypothetical Prediction") can be run manually at any time; results from two runs can be stored. Separate data setup is required for the current day and hypothetical predictions.
The only operational requirement for the current-day prediction is that the operator check and update, if required, the expected loads and expected compressor setpoints over the 16-day period.
The scada takes the concise forecast data entered by the operator and expands it to hourly forecasts of all demand, supply, and compressor-discharge points. It is expected that the operator has entered these data during the previous day.
The method of data entry is identical for both current day and hypothetical prediction. Hourly profiles are provided for each day of the week and for a holiday.
The loads on the network are aggregated into five composite loads and the daily load of each of these is specified for each of days 0 to 15 being simulated. Simplified procedures are provided to re-order the days so that a reasonable set of new data is automatically generated from the previous set.
Operator access to SIROGAS' prediction model output is identical to that used for displaying historical data except that SIROGAS' displays are configured to retrieve prediction data instead of historical scada data.
REFERENCES
- Turner, W.J., and Maguire, P.A., "SIROGAS A Computer Program for the Calculation of Steady State and Transient Behaviour of Gas Pipeline Networks," CSIRO, Division of Mineral and Process Engineering, Report No. VI6/447, 1989.
- Turner, W.J., Kwon, S., and Maguire, P.A., "Evaluation of a Gas Pipeline Simulation Program," Mathl. Comput. Modelling (1991), Vol. 15, (No. 7), p. 1.
- Trimble, G.D., and Turner, W.J., NAIAD-A Computer Program for Calculation of the Steady State and Transient Behaviour (including LOCA) of Compressible Two-phase Coolant in Networks, Australian Atomic Energy Commission Report, AAEC/E378, 1976.
- Starling, K.E., Fluid Thermodynamics for Light Petroleum Systems, Houston, Gulf Publishing Co., 1973.
Copyright 1993 Oil & Gas Journal. All Rights Reserved.