**There is no universal equation of state**

An equation of state relates a thermodynamic property to two others, allowing us to calculate any one of the three if we know the value of the other two. In pipelines, the thermodynamic properties we deal with are:

- Density
- Pressure
- Temperature

In pipeline simulation, equations of state are used to determine the fluid density from the temperature and pressure. A good pipeline simulation will require getting the fluid density correct. Relating density, pressure and temperature is crucial to finding many important results, such as the linepack (amount of gas in a pipeline) and the effect of temperature on a shut-in pipeline.

It also underpins how fluids flow (hydraulic calculations). Before pipeline operators calibrate flow meters against pressure drop, characterize the performance of pumps or compressors and model vapor-liquid equilibrium, they must have complete confidence in the calculation of fluid density at the operating pressures and temperatures throughout the pipeline.^{2}

A selection of equations of state are available, relating thermodynamic properties for various fluids. None of these are universal, each has its own conditions. Using several equations of state within the same model can be useful, for example if fluids with different characteristics are batched in a multi-product pipeline1. For an equation of state to be effective, we need it to be:

- Accurate over the wide range of pressures and temperatures encountered in pipelines
- Applicable over the various fluid compositions that may occur as streams are blended
- Underpinned by rigorous physical principles and validated by representative historic data
- Capable of handling fluids in their vapor and liquid phases, if both may occur in the pipeline
- Amenable in its mathematical form, to being implemented so it is numerically rapid to solve

The selection of a suitable equation of state is just the beginning of the process. In this article, we explore some of the particulars around equations of state in pipeline simulation, covering the concepts of:

- What we should select as our independent variables
- The bulk modulus equation of state for liquids
- Equations of state for compressible liquids
- Equations of state for gasses

**What we should select as our independent variables **

Meters along a pipeline are usually measuring the operating pressure and temperature, not density. It is reasonable to expect the best way of deducing operating conditions is also the best way of formulating the equation of state. We properly refer to these “known” parameters by labeling them as our independent variables.^{1}

However, many equations of state are inherently in a mathematical form that makes them inconvenient to solve this way around. To avoid wasting effort by inverting the equation of state, a pipeline simulator can choose to instead take pressure as its unknown, with temperature and density as the independent variables.

Figure 1: Taking pressure as an unknown in a pipeline simulator

Selecting density in the logic underpinning a pipeline simulator offers a further advantage, as the physical conservation laws are also more linear when written in terms of density rather than pressure, which makes the numerical solver faster and more robust.

**The bulk modulus equation of state for liquids**

As a liquid flows through a pipeline, they experience a head loss typically manifesting as a pressure drop. To calculate these losses, we need the density of the liquid at every point along the pipeline to be updated at every step of the simulation. Water, uniquely, remains almost constant in density at all the temperatures and pressures we encounter in a typical pipeline, but other liquids vary in density.

At more intense pressures, an almost-incompressible liquid is only slightly denser. Most crude oils and liquid products exhibit this behavior and their exact composition is unknown. This means that they can reasonably be described by their bulk parameters, rather than by a breakdown of their constituents. Atmos Simulation (SIM) Suite offers a bulk modulus equation of state for this purpose.

The concept of compressibility lies at the very heart of fluid mechanics. A compressible fluid is one that significantly varies in density due to fluctuations in operating pressure. Carefully observing this definition, one should note that it is possible for an incompressible liquid (ie one whose density is unaffected by pressure) to be significantly affected by temperature.

The direction of this dependency in liquids is that at lower temperatures, a cooler liquid gets denser, the inverse linearity with temperature is true almost universally. The only two exceptions to this rule are water below 4 C, which becomes less dense as it cools and extremely cold helium as it turns from a liquid into a superfluid.^{1}

**Equations of state for compressible liquids**

Certain refined products such as liquified petroleum gas (LPG) are very compressible liquids and so the bulk modulus approach is not accurate enough for modeling their density. It is better to use a physically derived gas-like equation of state for modeling these compressible liquids. To do this, a pipeline simulator can define LPG as a mixture of known composition, just as what is done for a gas.

The forms of some of the suitable equations of state for compressible liquids can post a challenge to the numerical solver within a pipeline simulator. Some are non-algebraic equations, which can only be inverted numerically. We avoid the problem of inverting such equations if we work in density and temperature as our independent variables, rather than pressure and temperature.^{1}

### Equations of state for gasses

All gases are highly compressible. This means that at the conditions encountered in a typical transmission pipeline, the high-pressure gas can have a high density. At atmospheric pressure, air is not very dense, but the gas in a pressurized pipeline could weigh hundreds of kilograms per cubic meter.

Thermodynamic equations of state are available to calculate the huge changes in density experienced by the diverse gases that flow through a pipeline. These equations of state can handle the changes in composition of natural gas by its differing supply points and as it is blended at mixing points encountered in a pipeline network.

Although it is difficult to measure liquid composition, the composition of gas in a pipeline is available from gas chromatographs at its supply points, so live data is fed to an online pipeline simulator. This simulator tracks the composition everywhere in the pipeline and can use this information in an equation of state to calculate the density and therefore all the operating conditions. This offers pipeline controllers an unprecedented insight into what is happening everywhere across their entire network.

The density being used within any equation of state for gases or component-defined fluids is the thermodynamic mole-basis density. It’s readily converted into the more familiar mass density (kilograms per cubic meter) via the molar mass of the fluid.^{1} The famous ideal gas law is taught to us in school to relate pressure (𝑃), volume (𝑉), moles (𝑁) and absolute temperature (𝑇) by way of a universal gas constant (𝑅).

All equations of state for gasses are derived conceptually from it, but in its original form the range of validity of the ideal gas law is rather limited. It assumes we are far from the critical point, which in plain terms means that it only applies at relatively low pressures and high temperatures. Simply put, although the ideal gas law holds true if we are in a hot air balloon, these conditions are far from what happens along a cold pressurized gas pipeline. Interestingly, it does serve a useful purpose if we want to quickly validate what pipeliners call the standard density. This is a quantity defined as “density of gas at standard temperature and pressure”.

In the conditions at which natural gas is transported through a cross-country pipeline (for example minus 3 C to 56 C at pressures of 120 bar), we require that the equation of state must be accurate enough to predict both density (𝜌) and the speed of sound (𝑐) within 0.1%.^{1}

To this end, the gas industry has responded by formulating a surprising number of equations of state. All the properties of a gas, density no exception, depend on its composition and the chosen equation of state deduces the mixture’s overall properties.

The most popular modern equations of state have proven to be reasonably accurate when implemented in pipeline simulators, which means they have passed the test of being practically reliable in the field. A few examples of these equations of state are the American Gas Association’s AGA-8 for natural gas, Span-Wagner for carbon dioxide, and GERG-2008 for almost all gases. These are written in terms of the Helmholtz free energy, a quantity whose derivatives not only return the fluid’s density, but also its specific isobaric and isochoric (both thermodynamic processes) heat capacities, giving correlations for these important quantities. Viscosities remain outside the purview of equations of state.^{1}

In addition to the above, Atmos SIM provides a bespoke equation of state for ethylene, which is proven to be even more accurate than GERG.

**Accurate fluid properties **

As advancements are made in pipeline simulation, equations of state have become more important than ever for ensuring the accuracy of fluid properties at the heart of what they do. When a simulator seamlessly determines the linepack, pressure drop, or any other important result it may be assisting pipeline controllers in operating the pipeline and engineers in their studies of pipeline behavior.

These teams should appreciate the importance of reliable, well-implemented equations of state that they rely on to calculate the fluid density underpinning all the calculations.

**References **

^{1 }”The Atmos book of pipeline simulation”

^{2} https://onepetro.org/PSIGAM/proceedings-abstract/PSIG00/All-PSIG00/PSIG-0008/2042

Download chapter four Order the book

### Ready for chapter five?

Chapter five covers the different considerations required for gas and liquid pipelines and approaches when it comes to steady state, with an outline of their hydraulics and how pipeline simulation can be configured.