Automation Scripts are custom VB scripts that can be run on the Simulation Server or in Simulation Office, or even in the run engine.
Simulation Server scripts are used to manipulate the input data going to the run engine and are typically used for Online implementations. For example, a typical script may detect that the data quality for a valve status went bad, but we still need to know whether the valve is open or closed. The script can infer what it is by examining nearby pressures on the upstream and downstream sides of the valve, and then set the valve status accordingly.
Simulation Office scripts on the other hand are created for automating tasks and can be launched as a command line argument or selected from a drop menu of available user created scripts. For example, a user might create a script called Calculate Max Capacity, and the script would open a model, create a loop to globally increment all supplies and deliveries by 1% increments and make repeated runs until the model fails, then back up one increment, make another run, export the results out to Excel, and then close the model.
Simulation Engine scripts are scripts that are run inside the calculation engine. They can be used to customize calculations or even code up custom optimization algorithms.
Load Forecaster Module
The Load Forecaster module allows a user to quickly and efficiently request a set of accurate loads for any required time frame. The Load Forecaster module can directly connect to weather services to obtain data, perform training and forecasting automatically, and use a series of forecasting algorithms to perform both long term (daily, weekly, and monthly) and short term (hourly) forecasting.
Forecasts are performed using any of three available methodologies, neural nets, genetic algorithms, or regressions analysis, or all three in which case the Load Forecaster keeps track of which method is more accurately forecasting a load and returns that method’s forecast.
In addition, it has a built-in Historian enabling it to provide past actual loads to simulation models. This means that any simulation model can request loads from any time in the past or future and can expect to receive a set of accurate loads in return.
Thus, it is applicable for all NextGen simulation sections, including Steady State, Sequential, Transient Predictive, and Transient Look Ahead to model past or future expected events. In fact, the Load Forecaster is powerful enough that it can even be used to fill in gaps for missing SCADA data in Transient Online modeling.
The Loads Generator allows the user to predict the loads of a system for a given degree day utilizing consumption history.
The user can rapidly change their NextGen and WinFlow models from one loading scenario to another without having to manually enter the loads or generate them using an external application. It analyzes the user’s weather and consumption file and performs regression calculations on the dataset and produces regression coefficients.
These coefficients are then used to calculate the load for all locations for a given degree day. The produced loads file is then imported into NextGen or WinFlow where the user can analyze how the loads will affect the system.
Autotune for Pipeline Efficiency Tuning
It is absolutely essential that pipeline simulation models accurately reflect real pipeline conditions, and in order to accomplish this, simulation models must be properly tuned and calibrated as often as possible. This is typically done by modifying the pipeline efficiencies in the various pipe segments throughout the model, so that predicted pressures and flow rates more closely match up with those found in the real pipeline.
This is a fairly straightforward process for straight line single pipe shotgun systems, and an engineer can usually make a series of simulation runs and, by trial and error, globally modify pipeline efficiencies in various areas of the pipeline until predicted pressures and flow rates match up with actual data. This process becomes much more difficult for more complex transmissions systems with multiple line services, or highly branched gathering systems where telemetry can be sporadic. In addition, it can become almost impossible for very large, highly interconnected distribution systems.
This calibration process can also be very time consuming and take up to several days to complete and, in some cases, calibrating the model is so difficult that it is simply not done at all or only a halfhearted attempt is made to properly calibrate the model.
The challenge in designing a solution is to have the calibration process work quickly, with a minimum amount of set up, support very large complex models, and be able to accomplish all of this using either steady state or transient simulation.
NextGen’s AutoTune Module does exactly that, and can tune pipeline efficiencies for all model sizes and types ranging from gathering to distribution. Three layers of highly sophisticated optimization algorithms are used to recalculate individual pipeline efficiencies on each and every pipe segment in the model so as to best match up the model with real world conditions.
Unlike typical Online transient tuning methodologies that work slowly over time, the NextGen Autotune feature quickly converges to a solution in both steady state and transient, and in many cases, is easier to use in steady state. Even very large LDC models which are typically too big to run in transient can be easily tuned.
The user simply needs to import a handful of field pressures so they can be compared against calculated pressure, make sure that the loads used in the model match up with the loads that existed when those filed pressures were collected, and then run NextGen’s AutoTune.
AutoTune will first establish major routes between the defined control locations (those with field pressures) and start modifying the pipeline efficiencies along these major routes to get a better match between field and calculated pressure. It will also diffuse those modified efficiencies into surrounding connected pipes, which is why it works well with distribution systems.
Typically, it might take 5 to 10 iterations to get an 80% improvement in the pressure deviations, and 20 to 30 iterations to get a 99% improvement, and in a matter of minutes (seconds for smaller systems), NextGen will have modified the pipeline efficiencies throughout the system to get a better match, in many cases a perfect match, between calculated and field pressures in the system.
Resulting pipeline efficiencies can help identify problem areas in the model, but for two phase systems where liquids might be present, can also help identify where liquid hold up might be occurring.
Autotune for Loads Tuning
Autotuning for Loads is very similar to pipeline efficiency tuning, but instead of tuning efficiencies, loads in different parts of the system are adjusted upward or downward using their InFlow Factor in order to get a better match between calculated model pressures and field pressures.
This is especially useful for LDC models where the loads that are in the model might be last month’s metered loads, or loads generated from a degree day forecaster. Since the loads are estimated, they may not exactly represent the true current loads on the system.
Using Loads Autotuning, LDC models that are supposed to represent current conditions and will be used for operational studies, can first be calibrated properly.
Portable Compressed Natural Gas (PCNG) Module
Most LDC systems are designed so that Portable Compressed Natural Gas (PCNG) supply points at predetermined locations throughout the system can be activated during maintenance outages or emergency conditions. Typically tanks of compressed natural gas or LNG tanks can be transported to these locations, and tied into the system so that they can provide additional supplies to meet demand.
A number of tanks can be brought in and stored beforehand in any one location to meet expected demand, and as the tanks empty out, additional tanks can be trucked in as needed. When a maintenance outage is planned, or an unplanned emergency outage occurs, operators must determine which PCNG points in the system need to be activated, and estimate how much flow each PCNG point needs to supply based on the location(s) and severity of the outage(s).
In the case of planned maintenance outages, engineers and planners have plenty of time to design an operation with certain PCNG locations activated, and schedule supply tanks to be available and replenished at those PCNG supply points.
In the case of unscheduled outages that occur unexpectedly however, operators have much less time to determine what PCNG locations to activate, and typically only have a few minutes to come up with a plan to minimize the possibility of customers being shut in.
There are a variety of methods available to model PCNG locations in NextGen, including Transient, Sequential, or Steady State solutions, but in determining the best solution methodology, execution speed can be critical.
To get the fastest possible answer, and one that we know has to deal with worst case conditions, NextGen’s Portable Compressed Natural Gas Module uses a steady state solution methodology along with PCNG supply point modeling features and optimization techniques to automatically find what PCNG supply locations need to be activated any time customers are in danger of being shut in due to outages or emergency conditions.
Each PCNG location, if activated, will try and operate at the configured pressure set point, but if the supply flow needed to maintain that pressure starts to exceed the max flow limit, it will switch to flow control at the max flow limit and let the pressure float.
Loads Planning Module and the PCNG Module: NextGen’s Loads Planning Module, which can be used to plan ahead for worst case operations and to minimize load shedding when we know some loads will be lost, is intended to work with the PCNG Module, so NextGen will first trigger all potential sources of PCNG supplies prior to doing any load shedding for isolation zones or interruptible customers, and by the time we get to Load Shedding conditions in the Loads Planning Module, all applicable PCNG locations that can help alleviate the situation should have already been activated.
PCNG runs and Loads Planning runs can be set up to run automatically using the automated Multi Scenario Run feature in NextGen to test out a variety of possible solutions, so a matrix of different combinations of Enabled PCNG supplies and combinations of different tank pressures, tank flows, and PCNG locations can be imported from Excel and quickly evaluated.
The Multi Scenario Run feature takes advantage of multiple run engines that can crank through the scenarios in parallel at a very rapid pace, so different scenarios or emergency outage conditions can be analyzed in bulk, with multiple possible solutions presented for each emergency outage.
If maintenance of a database of operational actions for many potential emergency situations for regulatory purposes is required, for example what operation is appropriate and what actions need to be taken for leaks in each and every isolation zone, or loss of the regulator for each regulator in the system, NextGen can help auto generate these operational reports in bulk.
Loads Planning Module for Distribution Systems
The purpose of the Loads Planning Module in “Deliveries” mode is to help LDCs plan loads to ensure that all delivery locations stay above their respective Minimum Delivery Pressures, and predict load losses during cases of outages or other emergency situations such as line ruptures.
If supplies into a system are limited due to outages or other emergencies, or deliveries are projected to be much higher than planned, or there is a rupture in the system, the Load Loss Prediction feature in NextGen can be used to predict exactly which loads in the system will wind up being shut in due to low pressure if no action is taken.
In Transient simulation, load loss prediction is pretty straight forward since this is in essence a transient occurrence. The problem with Transient simulation is that it may not be feasible due to large system sizes and excessive execution times.
Load Losses Predicted by Loads Planning Module with Ruptured Supply Line.
Load loss prediction in Steady State is not that easy because we are trying to solve what is in essence a transient problem with a steady state solution. NextGen’s Loads Planning Module, which was designed to work in steady state, solves this problem by using a combination of smart logic algorithms to predict loads most likely to fail first, optimization algorithms, and a series of steady state runs in which loads are taken out and put back in as it converges to a solution.
NextGen’s load loss algorithms start with the areas of the most severe minimum delivery pressure violations and work their way outward over a series of iterations to approximate what will happen over time before the system stabilizes.
The Loads Planning Module has four modes of operation:
- Predict what loads (nodes and meters) will be lost if no action is taken
- Derive a list of interruptible loads, from low priority to high priority, that can be preemptively shut in to alleviate the problem
- Derive a list if isolation zones that can be preemptively shut in to alleviate the problem
- Let the user manually select isolation zones to shut in or put back in service
In cases where there is a rupture in the system, obviously we will need to isolate the zone in which the rupture occurred, but further losses may be incurred if the zone being isolated was being used to feed gas into other zones in the system, and the Load Planning feature can be used to not only predict what will happen when one zone is isolated, but also suggest other remedial action that may be taken to minimize the total loads lost.
Loads Planning Module for Gathering Systems
Predicted Well Shut Ins with Emergency Shut Down at South Booster Station
The Loads Planning Module in “Supplies” mode helps gathering pipelines plan ahead when system capacity is exceeded due to oversupply, emergency or planned outages, or other operational interruptions.
The Supply Load Loss Prediction feature in NextGen can be used to predict exactly which supply locations such as wells will wind up being shut in due to pressures rising above the maximum supply pressures.
Transient simulation could be used to solve such problems accurately, but as with Distribution models, Gathering models can get quite large, making transient simulation unfeasible.
The Loads Planning Module can approximate a transient simulation using a combination of smart logic algorithms to predict loads most likely to fail first, optimization algorithms, and a series of steady state runs, and will typically only take a few seconds to find a solution that might take several hours to run in transient (the model shown in the image took 2 hours to run in transient to predict which wells would be shut in due to an emergency shut down of a compressor station, the Loads Planning module took 6 seconds to run and come up with the same answer).
NextGen’s load loss algorithms start with the wells with the most severe maximum supply pressure violations and work their way outward over a series of iterations to approximate what will happen over time before the system stabilizes.
The Loads Planning Module has four modes of operation:
- Predict what supply loads (nodes and meters) will be lost if no action is taken
- Derive a list of interruptible supply loads, from low priority to high priority, that can be preemptively shut in to alleviate the problem
- Derive a list of isolation zones that can be preemptively shut in to alleviate the problem
- Let the user manually select isolation zones to shut in or put back in service
Pig Tracking Module
The Pig Tracking in NextGen is a Transient feature which lets users set up, launch, and monitor pigs or inline tool runs. It is important to be able to properly control the velocity of pigs and NextGen can help determine and optimize what set points need to be set and maintained.
Users can set up any number of pig runs in a simulation, where multiple pigs can be running simultaneously through different lines and launched at different time. Starting and end points are defined as well as launch times. Pigs are displayed on the map and when launched will be shown traveling down the pipeline, and are color coded to indicate whether the pig is yet to be launched, is in transit, or has completed its run.
Pig Reports can also be exported to Excel, and will show launch and arrival locations, launch time and predicted arrival time, distance traveled, and predicted min, max, and average velocities.
A detailed section also contains predicted arrival times and other information at intermediate locations between the launch location and final arrival location.
Leak Detection Module
NextGen’s Transient Leak Detection Module is a simulation based leak detection system. It is not just volume balancing as is found in liquid pipeline leak detection, which would only account for all the gas in and out, plus line pack or inventory change, NextGen also monitors line pack variations, pressures, changes in pressure, and the speed of changes.
A single sign of a potential leak can be due to an operational problem or can be simply instrumentation error. NextGen’s Leak Detection Module does a system-wide analysis. A potential Leak is triggered by a population of pressure anomalies and mutually confirming anomalies. If there is a leak, the SCADA pressures in and near the leak will all be lower than the model pressures.
To avoid instrument False alarming, the NextGen Leak Detection algorithms monitor the history, and if a pressure is consistently off, then the 6 hour average and 24 hour average anomalies should be about the same. Also, instrument noise levels can be globally or individually set, to prevent false alarming.
Obviously, each network system will perform differently than others. The performance is highly depending on the instrumentation available, the locations of instrumentation and accuracy of the instruments. It is to the best interest of the client to have some historical operational data for fine tuning the leak performance before activating the Leak Detection feature in the production environment.
There are 3 key data Items to monitor or detect potential leaks or ruptures:
- Known Scada Pressure Points – if a SCADA pressure is lower than model pressure, maybe we are losing pressure due to a leak somewhere
- Known Scada Flow Points – if the metered flow rate is higher than the model flow rate, maybe we are feeding a possible leak
- Known Inline Check meters – if a monitored throughput at a point in the pipeline, a check measurement, is higher than model, maybe we are feeding downstream leak.
These are potential signs of leak formation. However, these signs alone do not always define the existence of a potential leak, which is why it is important to also include data filters and instrumentation error detection.