July 2016, Vol. 243, No. 7


Automating Hydraulic Simulations of Large Number of Scenarios

By Nancy Gilmore, GTS Engineering & Consulting and Rick Brown, Pacific Gas & Electric (PG&E)

As PG&E and other utilities perform unparalleled levels of safety-related work on gas transmission systems, frequent and complex pipeline system outages occur throughout the year. This safety work also carries the potential of pressure reductions due to previously undetected system anomalies in the pipeline systems.

Each of these system outages, or pressure reductions, requires the gas system be hydraulically analyzed under a multitude of scenarios to ensure safe system operation and reliable customer service. The number of scenarios requiring analysis quickly grows as system hydraulics are assessed for factors such as varying temperatures (demands), operating options, interruptible customer curtailments and modeling uncertainty.

Additionally, multiple outages, or pressure reductions, may occur simultaneously on the same system and further increase the number of scenarios, which as a result, can easily reach into the hundreds or thousands.

Faced with this rapid increase in hydraulic analysis workload and the need to optimize operations to complete critical safety work, PG&E pursued the development of a simulation technology to achieve these goals. PG&E partnered with GTS Engineering & Consulting (GTS) to develop an application allowing hydraulic analysis to automatically run on hundreds to thousands of scenarios by leveraging DNV-GL’s Solver® pipeline network software. This technology, called the Batch Analysis Tool (BAT), is the subject of this article.

The BAT technology enables utility planning engineers to analyze various gas system scenarios under several demand-and-operating conditions. User-defined scenarios are performed and cataloged in an automated, sequential manner rather than manually, one run at a time. This approach allows the performance of hundreds or even thousands of scenarios accurately and rapidly in dramatically less time.

In addition, because system performance is hydraulically analyzed over a complete range of input variations, system intelligence is gained. This is a benefit that is not feasible when a limited number of scenarios are run. The system intelligence provides for a fuller understanding of operating risk for pipeline outages, allows for testing of different operating options to mitigate the pipeline outages, and uncovers non-intuitive solutions, allowing safety work to proceed. The benefit extends beyond utilities with large amounts of safety-related work to include any study that requires a wide range of hydraulically analyzed inputs.

This methodology is invaluable in performing hydraulic analyses in support of a variety of key industry objectives, such as:

  • Complex pipeline clearances for safety-related testing or safety improvements including hydrostatic testing, inline inspection (ILI), pipeline replacement and valve automation.
  • Threshold temperature (demand) of gas system failure.
  • Modeling of ILI pig velocities to determine feasible time frames.
  • Optimization of operations to expand feasible time frames.
  • Temporary portable CNG/LNG supply; injection sizing and location optimization.
  • Operational optimization including regulator setpoint optimization, cross-tie utilization, gas flow routing.
  • Load shifting.
  • Compressor station optimization.
  • Customer curtailment options.
  • Long-term system investment studies.
  • Distribution demand performance curves (situational awareness).
  • Critical supply failure studies.
  • Any studies that require a large number of simulations.

PG&E has used BAT to run over 200,000 hydraulic scenarios since its implementation. This capability has provided a full understanding of system risks for pipeline outages and pressure reductions, optimized operations for pipeline outages, winter operating plans, portable LNG/CNG, long-term network investment plans, impacts of regulator station outages, and many other studies that require more than a limited number of scenarios.

As an example, the value of BAT can be readily recognized when looking at six main regulators on PG&E’s Peninsula local transmission system.

Screen Shot 2016-07-18 at 3.45.41 PM


Figure 1: Simple schematic of PG&E’s Peninsula System Regulation.

Each black rectangle represents a regulator on the system. All six regulators are hydraulically interdependent. System hydraulics must be evaluated for all combinations of regulation set points at each regulator running at current pressure, and two lower set points; 10 and 20 psig below maximum operating pressure. The number of hydraulic runs is represented using the equation:

Hydraulic runs = number of pressure set point (number of regulators)

With the number of pressure set points = 3, and the number of inter-dependent regulators = 6, the total number of hydraulic runs = 729.

Running this amount of simulations individually is neither possible nor desirable. BAT has significant benefits in situations where the number of runs required is high or when the overall work environment requires hundreds to thousands of simulations over time. In this particular study BAT uncovered a non-intuitive solution where operating with the Reg A and B at a lower pressure (~115 psig) than Reg C (~130 psig) provided higher minimum pressure than running all three regulators at 130 psig.

Other hydraulic studies easily create the need to run hundreds or thousands of simulations when studies require many pressure settings, valving variations, a range of temperatures and demands, and other variations. The multiplicative nature of varying each input parameter causes the number of cases to grow rapidly.

BAT consists of two main components: the mathematical engine that performs the hydraulic calculations and the graphical user interface for user inputs and hydraulic result output. The mathematical engine is called Solver, a product of DNV-GL. The BAT tool required programming to develop both the user interface and a reliable connection between the user interface and Solver.

PG&E developed the alpha version of the user interface and the programming for the Solver/user interface connections. PG&E contracted GTS to fully develop and improve the user-interface to make it more intuitive and user-friendly and to expand upon the capabilities and function of BAT. PG&E retains the role of programming the connection between the user interface and Solver.

Screen Shot 2016-07-18 at 3.46.24 PMThe user can select which locations on the gas system to vary inputs and which locations to display hydraulic results. For the regulator set point analysis, all were model inputs and a series of runs were set up in which combinations of the regulator set points were varied. Results displayed key system pressures, flows and demands.


GTS worked with key users to develop a user-friendly, menu-driven interface. The interface is written in Excel Visual Basic.


Screen Shot 2016-07-18 at 3.47.18 PMFigure 3: BAT input, output and scenario screens.

The BAT tool is used at PG&E by planning engineers across its service territory for both transmission and distribution system analyses.

The following are benefits of the BAT approach:

  • Configuring the system model for the use of BAT, running simulations, and documenting results using BAT, takes 10-20% of the time it would, compared to the manual, single-run approach. This time savings makes it possible to perform studies with a large number of runs, something not possible with the single-run method.
  • More than 200,000 scenarios have been hydraulically analyzed using BAT thus far. The scenarios include all varieties of transmission and distribution system operations as well as capital investment plan analyses.
  • Analysis is more thorough due to the ability to vary inputs over a wide range of conditions.
  • Users gain system intelligence by understanding system performance as inputs are varied. This opens up optimization, non-intuitive results, and understanding of which factors most affect the system.
  • Technology provides automated analysis of thousands of runs. The engineer is free to do other work while the tool produces results.
  • The BAT input format provides a more structured input of scenarios, reducing the chance of omitting scenarios. In contrast, using the manual, single-run approach makes it more difficult to keep track of scenarios analyzed. Documenting results is simpler using BAT since BAT provides the input and output results for all runs directly into a tabular format. This contrasts with the single-run approach which requires the user to extract information from the model into separate reports.
  • Because BAT allows for scenarios to be run in an automated fashion, BAT greatly reduces the number of keystrokes required, providing significant ergonomic benefits.


An approximately tenfold increase in safety work on PG&E’s gas system has resulted in an unprecedented amount of hydraulic analyses workload. The BAT technology represents a major shift in the way planning engineers typically perform analyses. BAT has helped PG&E respond to the high level of workload by increasing engineer efficiency while providing system intelligence to enable safety work to proceed and ensuring reliable service to customers.

GTS’s development of a user-friendly interface was a key component of engineer acceptance of the technology. This user interface, combined with PG&E’s programming of the connection to Solver, has provided a substantial and highly beneficial new approach to pipeline simulation.


Screen Shot 2016-07-18 at 3.48.22 PMFigure 4Screen Shot 2016-07-18 at 3.49.14 PMFigure 5

Authors: Nancy Gilmore is the Planning and Operations manager at GTS Engineering. She has over 25 years of experience in natural gas transmission and distribution engineering and operations.

Rick Brown is director of Gas System Planning at Pacific Gas and Electric Company. He has over 30 years of pipeline simulation experience and over 15 years supervising pipeline network simulation functions.   


Related Articles


{{ error }}
{{ comment.comment.Name }} • {{ comment.timeAgo }}
{{ comment.comment.Text }}