An ultra-specialized pipeline simulator

Generalist process simulators often simplify pipelines beyond what is reasonable, which is one reason why pipeline simulators have a significant strategic edge over them. Because the simulation is tailored to pipelining, specific features relevant to a real pipeline are included, such as a fully transient thermal model capturing the physics of temperature and heat.

Carefully implementing features like this makes a simulation reliable, valid and accurate for pipeline operators. Here, we look at the core components that make up effective pipeline simulation, exploring some of the specialist aspects like adaptive spatial mesh and moving knots for composition tracking.

We will cover:

  • The three common approaches employed for the numerical solver in a pipeline simulator
  • Knot spacing and the adaptive spatial mesh
  • Considering the core components

The three approaches of a pipeline simulator

A physical simulator uses a solver to approach the task of finding a solution to equations numerically. Relatively famous approaches for Navier-Stokes solvers include Galerkin and finite element methods.

Almost all commercial pipeline simulators use one of three main approaches for their solver. Although in practice, a typical user of pipeline simulation software doesn’t consider the method used to solve its equations, the approach is important to consider carefully for certain studies such as surge analysis. Each approach brings its own set of advantages and drawbacks.

The three approaches used for the solver of a pipeline simulator are:

  1. An upwind explicit finite difference method
  2. The method of characteristics
  3. The box scheme, an implicit finite difference approach - used by Atmos Simulation (SIM) Suite

A study from the 1980s compared these approaches. Simulating a gas pipeline, it concluded that all three were accurate, however the box scheme is usually the fastest for achieving a given accuracy.1

The advantages and drawbacks of the three approaches usually chosen for the solver of a pipeline simulator

Figure 1: The advantages and drawbacks of the three approaches usually chosen for the solver of a pipeline simulator

This means that the length of every stretch of pipeline in our network is unlikely to divide exactly into this pre-determined knot spacing. It also means that if we vary the time-step, we must vary the knot spacing accordingly. If interpolation is used to work around this, we lose this method’s chief advantage: the property of avoiding dispersion.

Why the box scheme is often the best approach

There are several advantages offered by the box scheme, which is why it’s a favorite among pipeline simulators today. It is stable at longer time-steps and supports adaptive knot-spacing, which means that it solves equations faster in practice.

In addition, it has a parameter that can be tuned to adjust numerical dispersion, allowing a user to prioritize accuracy or stability as needed. As the box scheme approach is more complex than the other two, implementing it is slightly more advanced. However, once tuned and set up it is incredibly flexible and does not need modifying when a developer extends the simulator to add new features.

Adaptive spatial mesh

A robust pipeline simulator is designed and coded to overcome a series of challenges, often around how to maintain numerical stability when solving the challenging equations governing the flow of liquids and gases. One of these arises in how a simulator splits a pipeline into knots: the spatial mesh, discretizing a continuous pipeline into many small segments.

Atmos SIM uses an adaptive spatial mesh, allowing the user to decide the simulation accuracy desired and calculating the knot spacing automatically, while maintaining computational speed. This enables the user to observe a section of pipeline when something interesting is happening to the vicinity of just a few hundred meters.

A courser knot spacing is automatically used in pipeline sections where the conditions are stable. When transient effects are taking place, a finer knot spacing is applied to the affected sections of a pipeline. This boosts the accuracy of the simulation when and where the need arises – a frequent occurrence during some pipeline’s routine operations.

An adaptive spatial mesh has long been a feature in pipeline and reservoir simulators for solving partial differential equations (PDE’s) in two or three dimensions. These algorithms are useful in all scenarios and have become an integral component of powerful pipeline simulators today.

One key benefit we’ve seen from using an adaptive spatial mesh is that a user of Atmos SIM does not need to adjust the spatial mesh manually which had previously been a tedious exercise. This powerful feature offers a seamless plug-and-play experience, giving the user confidence that their simulation will remain accurate and robust. It allows the busy users to focus on on answering the questions that are important and interesting to them at the click of a button. The adaptive spatial mesh in Atmos SIM can handle many advanced scenarios, by incorporating a whole range of innovative features.

Moving knots

Atmos SIM also uses moving knots to handle pipeline batches or composition fronts. This means it’s able to:

  • Maintain fidelity when tracking different grades of liquid product
  • Track the composition in gas pipelines
  • Detect anomalies
  • Trace the origin of a fluid

Considering the core components

With a pipeline simulator like Atmos SIM, the user doesn’t need to think about exactly where and when tighter spatial knots and shorter time-steps are needed, it is all done automatically. The same algorithms seamlessly handle online scenarios, offline studies and look-aheads, adapting knots in the pipeline during a simulation to always remain stable, fast-solving and accurate.

Pipeline simulators should ultimately make the operators’ lives easier. That’s why it’s important to consider which type of approach is used to solve the equations and the algorithms. Simulators that use adaptive spatial mesh help professionals conducting offline studies and operators running pipelines have confidence in their simulation’s speed, robustness and accuracy everywhere at all times.

References

1 ”The Atmos book of pipeline simulation”

Download chapter two Order the book

Ready for chapter three?

It’s crucial to address uncertainties that can arise in pipeline simulation. Chapter three covers the ways pipeline operators can increase the reliability of their results, optimizing the simulator’s performance.

Watch the summary video Read the blog