Gas networks simulation

Last updated

Gas networks simulation or gas pipeline simulation is a process of defining the mathematical model of gas transmission and gas distribution systems, which are usually composed of highly integrated pipe networks operating over a wide range of pressures. Simulation allows to predict the behaviour of gas network systems under different conditions. Such predictions can be effectively used to guide decisions regarding the design and operation of the real system.

Contents

Simulation types

Depending on the gas flow characteristics in the system there are two states that can be matter of simulation:

Network topology

Gas Network Topology Gas Network Topology.jpg
Gas Network Topology

In the gas networks simulation and analysis, matrices turned out to be the natural way of expressing the problem. Any network can be described by set of matrices based on the network topology. Consider the gas network by the graph below. The network consists of one source node (reference node) L1, four load nodes (2, 3, 4 and 5) and seven pipes or branches. For network analysis it is necessary to select at least one reference node. Mathematically, the reference node is referred to as the independent node and all nodal and branch quantities are dependent on it. The pressure at source node is usually known, and this node is often used as the reference node. However, any node in the network may have its pressure defined and can be used as the reference node. A network may contain several sources or other pressure-defined nodes and these form a set of reference nodes for the network.
The load nodes are points in the network where load values are known. These loads may be positive, negative or zero. A negative load represents a demand for gas from the network. This may consist in supplying domestic or commercial consumers, filling gas storage holders, or even accounting for leakage in the network. A positive load represents a supply of gas to the network. This may consist in taking gas from storage, source or from another network. A zero load is placed on nodes that do not have a load but are used to represent a point of change in the network topology, such as the junction of several branches. For steady state conditions, the total load on the network is balanced by the inflow into the network at the source node.
The interconnection of a network can produce a closed path of branches, known as a loop. In figure, loop A consists of branches p12-p24-p14, loop B consists of p13-p34-p14, and loop C consists of p24-p25-p35-p34. A fourth loop may be defined as p12-p24-p34-p13, but it is redundant if loops A, B and C are also defined. Loops A, B and C are independent ones but the fourth one is not, as it can be derived from A, B and C by eliminating common branches.
To define the network topology completely it is necessary to assign a direction to each branch. Each branch direction is assigned arbitrarily and is assumed to be positive direction of flow in the branch. If the flow has the negative value, then the direction of flow is opposite to branch direction. In the similar way, direction is assigned to each loop and flow in the loop.
The solutions of problems involving gas network computation of any topology requires such a representation of the network to be found which enables the calculations to be performed in the most simple way. These requirements are met by the graph theory which permits representation of the network structure by means of the incidence properties of the network components and, in consequence, makes such a representation explicit.

Flow equations

The calculation of the pressure drop along the individual pipes of a gas network requires use of the flow equations. Many gas flow equations have been developed and a number have been used by the gas industry. Most are based on the result of gas flow experiments. The result of the particular formula normally varies because these experiments were conducted over different range of flow conditions, and on varying internal surface roughness. Instead, each formula is applicable to a limited range of flow and pipe surface conditions.

Mathematical methods of simulation

Steady state analysis

A gas network is in the steady state when the values of gas flow characteristics are independent of time and system described by the set of nonlinear equations. The goal of simple simulation of a gas network is usually that of computing the values of nodes' pressures, loads and the values of flows in the individual pipes. The pressures at the nodes and the flow rates in the pipes must satisfy the flow equations, and together with nodes' loads must fulfill the first and second Kirchhoff's laws.

There are many methods of analyzing the mathematical models of gas networks but they can be divided into two types as the networks, the solvers for low pressure networks and solvers for high pressure networks.
The networks equations are nonlinear [ disambiguation needed ] and are generally solved by some of Newton iteration; rather than use the full set of variables it is possible to eliminate some of them. Based on the type of elimination we[ who? ] can get solution techniques are termed either nodal or loop methods.

Newton-nodal method

The method is based on the set of the nodal equations which are simply mathematical representation of Kirchhoff's first law which states that the inlet and outlet flow at each node should be equal. Initial approximation is made to the nodal pressures. The approximation is then successively corrected until the final solution is reached.

Disadvantages
  • Poor convergence characteristics, the method is extremely sensitive to initial conditions.
Advantages
  • Does not require extra computation to produce and optimize a set of loops.
  • Can easily be adapted for optimization tasks.

Newton-loop method

The method is based on the generated loops and the equations are simply mathematical representation of Kirchhoff's second law which states that the sum of the pressure-drops around any loop should be zero. Before using loops method the fundamental set of loops need to be found. Basically the fundamental set of loops can be found by constructing spanning tree for the network. The standard methods for producing spanning tree is based on a breadth-first search or on a depth-first search which are not so efficient for large networks, because the computing time of these methods is proportional to n2, where n is the number of pipes in the network. More efficient method for large networks is the forest method and its computational time is proportional to n*log2n.

The loops that are produced from the spanning tree are not the best set that could be produced. There is often significant overlap between loops with some pipes shared between several loops. This usually slows convergence, therefore the loops' reduction algorithm needs to be applied to minimize the loops overlapping. This is usually performed by replacing the loops in the original fundamental set by smaller loops produced by linear combination of the original set.

Disadvantages
  • It requires extra computation to produce and optimize a set of loops.
  • The dimension of the equations to be solved is smaller but they are much less sparse.
Advantages
  • The main advantage is that the equation can be solved very efficiently with an iterative method that avoids the need of matrix factorization and consequently has a minimal requirement for storage; this makes it very attractive for low pressure networks with a large number of pipes.
  • Fast convergence which is less sensitive to the initial conditions.

Newton loop-node method

The Newton loop-node method is based on Kirchhoff’s first and second laws. The Newton loop-node method is the combination of the Newton nodal and loop methods and does not solve loop equations explicitly. The loop equations are transformed to an equivalent set of nodal equations, which are then solved to yield the nodal pressures. The nodal pressures are used then to calculate the corrections to the chord flows (which is synonymous to loop flows), and the tree branch flows are obtained from them.

Disadvantages
  • Since set of nodal equations are solved nodal Jacobi matrix is used which is more sparse then the equivalent loop Jacobi matrix which may have negative impact on computational efficiency and usability.
Advantages
  • Good convergence characteristics of loop method are maintained.
  • No need to define and optimize the loops.

Unsteady state analysis

Computer simulation

The importance of the mathematical methods' efficiency arises from the large scale of simulated network. [1] It is required that the computation costs of the simulation method be low, this is related to the computation time and computer storage. At the same time the accuracy of the computed values must acceptable for the particular model.

Related Research Articles

<span class="mw-page-title-main">Electrical network</span> Assemblage of connected electrical elements

An electrical network is an interconnection of electrical components or a model of such an interconnection, consisting of electrical elements. An electrical circuit is a network consisting of a closed loop, giving a return path for the current. Thus all circuits are networks, but not all networks are circuits. Linear electrical networks, a special type consisting only of sources, linear lumped elements, and linear distributed elements, have the property that signals are linearly superimposable. They are thus more easily analyzed, using powerful frequency domain methods such as Laplace transforms, to determine DC response, AC response, and transient response.

<span class="mw-page-title-main">Computational fluid dynamics</span> Analysis and solving of problems that involve fluid flows

Computational fluid dynamics (CFD) is a branch of fluid mechanics that uses numerical analysis and data structures to analyze and solve problems that involve fluid flows. Computers are used to perform the calculations required to simulate the free-stream flow of the fluid, and the interaction of the fluid with surfaces defined by boundary conditions. With high-speed supercomputers, better solutions can be achieved, and are often required to solve the largest and most complex problems. Ongoing research yields software that improves the accuracy and speed of complex simulation scenarios such as transonic or turbulent flows. Initial validation of such software is typically performed using experimental apparatus such as wind tunnels. In addition, previously performed analytical or empirical analysis of a particular problem can be used for comparison. A final validation is often performed using full-scale testing, such as flight tests.

In power engineering, the power-flow study, or load-flow study, is a numerical analysis of the flow of electric power in an interconnected system. A power-flow study usually uses simplified notations such as a one-line diagram and per-unit system, and focuses on various aspects of AC power parameters, such as voltages, voltage angles, real power and reactive power. It analyzes the power systems in normal steady-state operation.

In electrical engineering and electronics, a network is a collection of interconnected components. Network analysis is the process of finding the voltages across, and the currents through, all network components. There are many techniques for calculating these values; however, for the most part, the techniques assume linear components. Except where stated, the methods described in this article are applicable only to linear network analysis.

Computational science, also known as scientific computing, technical computing or scientific computation (SC), is a division of science that uses advanced computing capabilities to understand and solve complex physical problems. This includes

<span class="mw-page-title-main">Nodal analysis</span> Method in electric circuits analysis

In electric circuits analysis, nodal analysis, node-voltage analysis, or the branch current method is a method of determining the voltage between "nodes" in an electrical circuit in terms of the branch currents.

<span class="mw-page-title-main">Mesh analysis</span> Circuit analysis that solves for currents

Mesh analysis is a circuit analysis method for planar circuits. Planar circuits are circuits that can be drawn on a plane surface with no wires crossing each other. A more general technique, called loop analysis can be applied to any circuit, planar or not. Mesh analysis and loop analysis both make systematic use of Kirchhoff’s voltage law to arrive at a set of equations guaranteed to be solvable if the circuit has a solution. Mesh analysis is usually easier to use when the circuit is planar, compared to loop analysis.

The United States Environmental Protection Agency (EPA) Storm Water Management Model (SWMM) is a dynamic rainfall–runoff–subsurface runoff simulation model used for single-event to long-term (continuous) simulation of the surface/subsurface hydrology quantity and quality from primarily urban/suburban areas.

Computational aeroacoustics is a branch of aeroacoustics that aims to analyze the generation of noise by turbulent flows through numerical methods.

<span class="mw-page-title-main">Reservoir simulation</span> Using computer models to predict the flow of fluids through porous media

Reservoir simulation is an area of reservoir engineering in which computer models are used to predict the flow of fluids through porous media.

In fluid dynamics, pipe network analysis is the analysis of the fluid flow through a hydraulics network, containing several or many interconnected branches. The aim is to determine the flow rates and pressure drops in the individual sections of the network. This is a common problem in hydraulic design.

A signal-flow graph or signal-flowgraph (SFG), invented by Claude Shannon, but often called a Mason graph after Samuel Jefferson Mason who coined the term, is a specialized flow graph, a directed graph in which nodes represent system variables, and branches represent functional connections between pairs of nodes. Thus, signal-flow graph theory builds on that of directed graphs, which includes as well that of oriented graphs. This mathematical theory of digraphs exists, of course, quite apart from its applications.

In electrical engineering, modified nodal analysis or MNA is an extension of nodal analysis which not only determines the circuit's node voltages, but also some branch currents. Modified nodal analysis was developed as a formalism to mitigate the difficulty of representing voltage-defined components in nodal analysis. It is one such formalism. Others, such as sparse tableau formulation, are equally general and related via matrix transformations.

The circuit topology of an electronic circuit is the form taken by the network of interconnections of the circuit components. Different specific values or ratings of the components are regarded as being the same topology. Topology is not concerned with the physical layout of components in a circuit, nor with their positions on a circuit diagram; similarly to the mathematical concept of topology, it is only concerned with what connections exist between the components. There may be numerous physical layouts and circuit diagrams that all amount to the same topology.

Z88 is a software package for the finite element method (FEM) and topology optimization. A team led by Frank Rieg at the University of Bayreuth started development in 1985 and now the software is used by several universities, as well as small and medium-sized enterprises. Z88 is capable of calculating two and three dimensional element types with a linear approach. The software package contains several solvers and two post-processors and is available for Microsoft Windows, Mac OS X and Unix/Linux computers in 32-bit and 64-bit versions. Benchmark tests conducted in 2007 showed a performance on par with commercial software.

<span class="mw-page-title-main">EPANET</span> Water distribution system modeling software

EPANET is a public domain, water distribution system modeling software package developed by the United States Environmental Protection Agency's (EPA) Water Supply and Water Resources Division. It performs extended-period simulation of hydraulic and water-quality behavior within pressurized pipe networks and is designed to be "a research tool that improves our understanding of the movement and fate of drinking-water constituents within distribution systems". EPANET first appeared in 1993.

The unit commitment problem (UC) in electrical power production is a large family of mathematical optimization problems where the production of a set of electrical generators is coordinated in order to achieve some common target, usually either matching the energy demand at minimum cost or maximizing revenue from electricity production. This is necessary because it is difficult to store electrical energy on a scale comparable with normal consumption; hence, each (substantial) variation in the consumption must be matched by a corresponding variation of the production.

SystemC AMS is an extension to SystemC for analog, mixed-signal and RF functionality. The SystemC AMS 2.0 standard was released on April 6, 2016 as IEEE Std 1666.1-2016.

<span class="mw-page-title-main">FEATool Multiphysics</span>

FEATool Multiphysics is a physics, finite element analysis (FEA), and partial differential equation (PDE) simulation toolbox. FEATool Multiphysics features the ability to model fully coupled heat transfer, fluid dynamics, chemical engineering, structural mechanics, fluid-structure interaction (FSI), electromagnetics, as well as user-defined and custom PDE problems in 1D, 2D (axisymmetry), or 3D, all within a graphical user interface (GUI) or optionally as script files. FEATool has been employed and used in academic research, teaching, and industrial engineering simulation contexts.

<span class="mw-page-title-main">Physics-informed neural networks</span> Technique to solve partial differential equations

Physics-informed neural networks (PINNs) are a type of universal function approximators that can embed the knowledge of any physical laws that govern a given data-set in the learning process, and can be described by partial differential equations (PDEs). They overcome the low data availability of some biological and engineering systems that makes most state-of-the-art machine learning techniques lack robustness, rendering them ineffective in these scenarios. The prior knowledge of general physical laws acts in the training of neural networks (NNs) as a regularization agent that limits the space of admissible solutions, increasing the correctness of the function approximation. This way, embedding this prior information into a neural network results in enhancing the information content of the available data, facilitating the learning algorithm to capture the right solution and to generalize well even with a low amount of training examples.

References

  1. Himpe, Christian; Grundel, Sara; Benner, Peter (2021). "Model order reduction for gas and energy networks". Journal of Mathematics in Industry. 11: 13. arXiv: 2011.12099 . doi: 10.1186/s13362-021-00109-4 . S2CID   227153263.