Surplus gas in Russia’s gas transmission network due to gas export suspension, and ways to cope with it

. For technical, economic and political reasons the volumes of Russian pipeline gas export can be considerably reduced for relatively short periods of time. Such situations create unconsumed gas volumes in the gas transmission network of Russia, which can cause mal-function of the network. Here a problem arises of how to fast and optimally distribute the un-consumed gas to minimize various negative consequences. The paper presents a method for solving this problem. A focus is made on a model necessary to perform calculations within the proposed method. A situation of a short-term disruption of Russian gas delivery to European consumers through the territory of Ukraine is modelled, with an analysis of potential consequences and actions necessary to prevent them.


Introduction
Russia is one of the largest gas producers and exporters. Russian natural gas is exported to European and Asian gas markets. There are plans to expand Russian export in the eastern direction. At the same time currently 95% of Russia's gas export goes to Europe. In 2017 Russia exported to Europe 219.7 billion m 3 of gas, which is about 40% of the total gas demand of the European countries in 2017. Table 1 demonstrates production, domestic consumption and export of Russian gas in 2013-2017, billion m 3 , [1,2].  Table 1 show that in 2013-2017 gas production and consumption in Russia remained almost at the same level. Export of Russian gas to Europe was also at one level and made up about 30% of all the gas produced in Russia.
These figures ( Table 1) are indicative of a considerable impact of exported gas volumes on the technological characteristics and topology of gas transmission network of Russia.
Major main gas pipelines run primarily from the northern areas of the Tyumen region, producing 90% of Russian gas, through the European part of the country to the European gas markets. At the same time these pipelines are technologically connected to the main gas pipelines that supply gas to domestic consumers in Russia.
Occasionally, for different technical or political reasons Russia's gas export can decline sharply for a period from several days to 2-3 weeks. The short-term forced reduction in the export of Russian gas to the importing countries along one of the export gas corridors creates surplus gas in Russia's unified gas supply system. This gas was intended for export, but due to arisen circumstances it remained in the Russian gas transmission network. The matter is that the main conditions for the normal operation of Russia's gas transmission network are maintenance of a rated pressure in the network and a balance between gas production and consumption. In the case of the unexpected emergence of considerable volumes of unconsumed gas, as in the situation with gas export suspension, the necessity arises to quickly use this surplus gas. Otherwise, the accumulation of unconsumed gas in the gas transmission network can upset the balance between gas production and consumption, and consequently lead to a pressure increase in considerable part of worn-out gas pipelines, and emergency situations. All these factors will negatively affect the operation of Russia's gas industry.
The practice confirmed the existence of this problem against the background of a conflict between Russia and Ukraine in 2008-2009. The conflict situation was related to gas supply to Ukraine and interruptions to gas transit to European countries. The main stages and chronology of this conflict are in detail presented in [3][4][5][6][7]. The disruption to export gas flows through Ukraine in 2009 left 18 European states without a considerable amount of Russian gas. This, undoubtedly, seriously affected the energy sectors in these countries [8]. On the other hand, Russia also suffered in this situation. Firstly, the country lost considerable revenues due to the failure to export gas, and secondly, it faced a number of problems related to the need to distribute considerable volumes of surplus gas in the gas transmission network.
The main measures to solve the surplus gas problem during the time of export suspension that lie on the surface include:  The use of all capabilities to inject the extra gas into the pipelines of the system that were not involved in the export termination;  Combustion of the produced gas to decrease pressure in the system;  Temporary (for the time of emergency) closure of operating wells. The last two measures can undoubtedly cause negative consequences both economic and technological. For example, when a well is suspended, the operating gas fields often face the situations with intensive formation of gas hydrates that fill all the well space, thus making it impossible to demothball the well without redrilling.
Therefore, it is necessary to determine potential gas volumes that can remain in Russia's gas transmission network due to suspension of export gas supply, and analyze the capabilities of Russia's gas industry to distribute these volumes to ensure normal emergencyfree operation of Russia's gas transmission network.

A method for solving the problem of surplus gas in Russia's gas transmission network
A method is proposed in the paper to minimize negative consequences of excess gas in the unified gas supply system. The method suggests the following procedures:  Assessment of capabilities to inject additional gas into the system pipelines exporting Russian gas, that were not involved in the situation with interruption of export deliveries;  Assessment of storage capacity of the dead-end sections of the main gas pipelines;  Assessment of underground gas storage (UGS) capabilities, which includes an analysis of the UGS capabilities to inject surplus gas and to reduce or completely stop gas withdrawal from the UGS facilities during heating period;  Assessment of surplus gas injection capability (for the period of gas export suspension) in the systems of fuel and energy supply in Russia's regions located in the service area of the unified gas supply system. Solving the problem of surplus gas reduction in Russia's gas transmission network requires that we take into consideration the period when the extra gas occurs in the network, because due to specific features of the UGS operation, the gas industry capabilities to solve the surplus gas problem will be different in winter, summer and autumn:  Winter is characterized by heating period when gas transmission network has the maximum load; gas is withdrawn from the UGS facilities to the network; large amounts of fuel oil are burnt at thermal power plants and dual-fuel boiler plants;  Summer is characterized by a reduction in gas consumption, gas transmission system is not loaded; gas is injected into the UGS facilities; thermal power plants and dual-fuel boiler plants consume much smaller amounts of fuel oil;  Early autumn is characterized by a gradual increase in gas consumption. Gas transmission network operates under normal conditions; UGS facilities are filled with gas; thermal power plants and dual-fuel boiler plants start active consumption of fuel oil. In order to solve the problem of extra gas in Russia's gas transmission network in the situation of gas export suspension in any of the directions after loading the export pipelines that were not involved in gas flow interruption, and the use of storage capability of the network it is necessary to implement the measures according to the following algorithm, (Fig.1).  Fig. 1. An algorithm for solving the problem of "surplus" gas in the unified gas supply system of Russia According to Figure 1, to reduce the amount of surplus gas during heating period it is necessary, first of all, to curtail the volumes of gas withdrawn from the UGS facilities and replace this gas with surplus one. Then the amount of gas injected into the UGS should be increased. After these possibilities are exhausted we can switch to substitution of fuel oil for surplus gas at thermal power plants and dual-fuel boiler plants (where possible). The decrease in gas production in the considered situation is reasonable only after all the above possibilities of using the surplus gas are exhausted.
Thus, the volumes of forced reduction in gas production when solving the problem of surplus gas can be determined as follows: (1) subject to where Qred -volumes of forced reduction in gas production; Qsg -surplus gas volume resulted from a sharp decline in gas export; Qwith -possible reduction in gas withdrawal from UGS; Qinj -possible increase in a gas amount to be injected into UGS; Qsubst -possible volume of surplus gas to substitute fuel oil.

A model for assessment of production capabilities of Russia's unified gas supply system
Today there are a lot of various models for the assessment of gas transmission system operation. Some of these models are described in detail in [9]. The most relevant models are as follows: Gas Systems Analysis Model (GSAM) [10,11] is a market model which is constructed bottom-up, with very detailed data on natural gas reserves (above 17000 fields with geological and economic variables). The model successively builds up a supply curve on the basis of market signals, and technological levels based on the principle of minimum acceptable price of producers for the upcoming survey and production.
National Energy Modeling System (NEMS) [12] is one of the models applied by the US Energy Information Administration to issue annual energy review. One of the NEMS components is a natural gas transmission and distribution module which applies a heuristic algorithm for the establishment of a market balance.
MAGELAN [13,14] is a global model of gas supply. MAGELAN optimizes gas supply in the long term, including investment in the production until 2035, by using a linear programming approach. The objective function includes capital and operation costs for the world gas production and transmission. These costs are minimized to meet the existing technical constraints on gas production and transmission.
TIGER (Transport Infrastructure for Gas with Enhanced Resolution) [15,16] is another example of a model with a very high level of detail of data on gas production in European Union. TIGER includes a database on pipelines, terminals of liquefied natural gas, points of gas regasification and storage. The model was applied in some studies on European gas market. TIGER represents a linear model with cost minimization, which also takes account of important technical constraints of gas infrastructure such as constraints on production and transmission capacities, material balance, etc.
Rice World Gas Trade Model (RWGTM) is a dynamic spatial model of global gas market equilibrium on the basis of economic theory and geological data. This model covers the whole world and provides highly detailed consideration of a regional level. It, for example, has been lately used to study potential gas export from Russia [17].
Currently the Energy Systems Institute SB RAS applies the software "Russia's Oil and Gas" [18] to study the issues of survivability and reliable operation of energy systems. This software makes it possible to determine the extent to which the domestic and export demand for gas is met, when various types of emergency situations occur. Moreover, the software "Russia's Oil and Gas" allows researchers to detect "narrow" places, i.e. the sections of gas transmission network limiting the transmission capacity of the system in some cases.
The model of flow distribution in the unified gas supply system is embedded in the software "Russia's Oil and Gas". It is intended for the assessment of transmission capacity of the unified gas supply system under various types of disturbances. The aim of such an assessment is to minimize gas shortage at demand nodes.
The unified gas supply system in the model is represented as an aggregate of three subsystems: gas sources, main transmission network and consumers.
Flow distribution in the model meets the condition of gas balance at nodes, i.e. on the basis of the first Kirchhoff's law. The volumes of gas supplied to the nodes are limited by the specified transmission capacities of edges, depending on a number of parameters. These are: length, diameter, number of compressor stations, and pressure in the gas pipeline represented in the model by an edge. Consideration of average transmission capacities of the edges allows us to avoid the application of the second Kirchhoff's law, i.e. to determine and consider gas flow rate and pressure losses throughout the entire gas pipeline and in the sections representing local resistances.
Mathematically, the unified gas supply system is represented as a network changing over time (due to a disturbance), and the nodes of the network have the gas supplying facilities and gas consuming facilities. A change in the state of system facilities requires solving the problem of flow distribution in the system in order to provide maximum gas supply to consumers, i.e. the model can be formalized as the maximum flow problem [19].
Mathematical form of the stated problem is described in [20]. Also in [20] presented results of research of possible implications for European energy from violating the Russian gas supply through Ukraine, by using following software "Russia's Oil and Gas".

Distribution of surplus gas
The model of flow distribution in the unified gas supply system, that was described above and is used in the software "Russia's Oil and Gas" was developed for emergency conditions and was applied to calculations in winter, i.e. in the period when the UGS facilities supply , , 0 (201 Web of Conferences https://doi.org/10.1051/e3sconf/201911401 9) 201 E3S 114 9 100 00 Energy Systems Research 8 8 gas to the network and thus cover the elevated gas demand. The injection mode of operation of the UGS facilities in such a situation has not been analyzed before.
To solve the problem of unconsumed surplus gas in the unified gas supply system we propose changing the operation mode of the UGS facilities. In the event of unconsumed surplus gas the UGS facilities should be able to switch from their state of gas sources to the state of gas consumers, thus reducing or totally accommodating the unconsumed gas volumes. Since the base model for the determination of maximum flow of minimum cost [20] does not allow us to do that, we present its next modification implemented in the software "Russia's Oil and Gas": , for all (i, j) , where aijan integer variable used to switch on or switch off the flow along the edge from node i to node j.
This problem can also have several variants of solution, or several possible maximum flows. Therefore, it is necessary to solve the problem of gas transmission cost minimization:  The diagram in Figure 2 shows how the flow model took into account the UGS facility before (a) and its transformation considering changes in the UGS facility operation mode (b).
Since the UGS facility is physically one component of the system, it was necessary to introduce an additional equation to relate UGS-source and UGS-consumer into a single object. , for the UGS, where i is the number of UGS as a source of energy resources, and j is the number of UGS as a consumer. , (10) , (11) , (12) where N s is a subset of storage facilities in the set of sources of energy resources, N cis a subset of storage facilities in the set of consumers of energy resources. According to equation (8) each UGS can only be a gas source (аoi =1; аjs =0) or a gas consumer (аoi =0; аjs =1).
Problem (3)- (12) is solved by the method of branch and bounds [21] which is implemented in the solver lp_solve [22]. Thus, the model of surplus gas distribution makes it possible to automatically change the operation mode of UGS, i.e. where necessary to make the UGS either a gas source or a gas consumer, and vice versa. Moreover, it is necessary to take into account the UGS capabilities to inject more gas for a short time, since technologically this is quite possible [23]. Thus, the values of the maximum gas withdrawal and injection for each UGS can be increased by 10%, where necessary. To implement these capabilities, the UGS facilities are represented as "narrow" places in the system.
A respective module of the software "Russia's Oil and Gas" was developed in its time and is described in detail in [24,25]. A detailed model-based analysis of any emergency situation in the gas transmission network makes it possible to identify what specific sections of the network necessitate a temporary increase in the transmission capacity to the maximum extent practicable.

Analysis of Russia's gas industry capabilities to distribute surplus gas on the basis of the proposed method
Let us consider the following situation as an example of applying the method to solve the problem of unconsumed surplus gas in Russia's gas transmission network. Suspension of gas transmission to the European countries through the territory of Ukraine for a period of up to two weeks for three periods (winter, summer, autumn) in 2017 [26]. Such an interruption to export deliveries after the maximum loading of the other export pipelines and consideration of the storage capacity of dead-end sections of the main gas pipeline will result in 193.7 million m 3 /d of unconsumed gas in Russia's gas transmission network.
The calculation diagram of the unified gas supply system used for calculation in this research on the basis of a flow model takes account of all the main features of the unified gas supply system operation. This calculation diagram was constructed with the software "Russia's Oil and Gas", and contains:  Table 2 presents aggregate UGS capabilities in terms of gas withdrawal from them to the gas transmission system by Federal District. The data from Table 2 demonstrate that most of UGS facilities to be used to withdraw gas to the gas transmission network are concentrated in Volga and Central Federal Districts, and are distributed across the unified gas supply system quite unevenly. In practice such values of gas withdrawal from UGS take place in cold winters during winter gas demand peaks [27].
The data from [27] demonstrate that in last years the amount of gas withdrawn from UGS was close to the maximum only in quarter 1 in 2011. These statistical data also show that the UGS store the gas volumes which will further limit the capabilities to additionally inject gas into the UGS.
Constraints on gas withdrawal from UGS facilities for the model of the unified gas supply system for the period before the surplus gas appears in the system, and the volumes of gas withdrawal from the UGS facilities for December 2017 are presented in Table 3. In December 2017, which was taken as a representative month of the winter period, the Russian gas exported to Europe made up 15.4 billion m 3 [28] or average daily -513 million m 3 . According to the assumed scenario for the suspension of gas export through Ukraine, during the period of undersupplies, the unconsumed gas makes up 193.7 million m 3 /d. The average daily gas withdrawal from UGS facilities at this time (December 2017) was 108.6 million m 3 /d. Thus, the UGS capabilities (under complete termination of gas withdrawal from UGS) to solve the problem of additional gas make up the said 108.6 million m 3 /d (Table 3). Then, we have 85.1 million m 3 /d (193.7-108.6) of additional gas to distribute among the entities of the Russian Federation.
In the cases of potential termination of gas export through Ukraine in summer, it is impossible to stop withdrawing gas from the UGS facilities. Although in the presented statistical data (Table 3) there are values of gas withdrawal from the UGS facilities in summer, these are production volumes of gas which is used to maintain normal operation of wells of the UGS facilities.
When the possibilities of solving the surplus gas problem by fully loading the gas export pipelines that did not stop their operation and by reducing gas withdrawal from the UGS facilities are exhausted, it is necessary to involve gas injection capabilities of the UGS facilities. The average daily gas volume injected into the Russian UGS facilities in December 2017 made up 34.5 million m 3 /d. In [29] presents the data on gas volumes (million m 3 /d) injected into the Russian UGS facilities in last years.
In [29] shows that the largest amount of gas was injected into the UGS facilities in the second and third quarters. This is associated with a decrease in gas consumption by heat power industry in these periods. At the same time gas production throughout the year is maintained at almost the same level [30]. For example, in the spring and summer considerable volumes of gas are delivered from gas production areas directly to the UGS facilities, and fill them completely, thus making it impossible to inject additional amounts of unconsumed gas into the UGS facilities. At the beginning of autumn the UGS facilities are filled with gas completely and are ready to supply it to the network to smooth seasonal nonuniform gas consumption, which makes it also impossible to inject unconsumed gas into them. In the first and fourth quarters gas consumption increases considerably and gas from the fields is delivered to consumers. The volumes of gas injected into the UGS facilities drop, which makes it possible to inject surplus gas into them.
Based on the analysis of statistical data on gas withdrawal from the UGS facilities and data on gas injections into them, we can suppose that in the considered situation (the emergence of surplus gas in December 2017) it will be possible to inject 73.5 million m 3 /d (108-34.5). Thus, the potential volumes of gas to be injected into the UGS facilities will not exceed the withdrawn gas volume which was before the emergency situation, and this will not lead to the untimely filling of the UGS facilities. Thus, by limiting the injection capabilities of UGS facilities to 73.5 million m 3 /d in the model of the unified gas supply system, we obtained the following distribution of the surplus gas among the operating UGS facilities for December 2017 conditions (Table 4).  According to the data from Table 4, the flow model of the unified gas supply system distributed the given gas volume among the UGS facilities of Central and Volga Federal Districts, which in such a situation can correspond to reality. The UGS facilities in Central and Volga Federal Districts are the closest to the major corridors of currently operating main gas pipelines and their filling in the case of surplus gas is most beneficial in terms of gas transmission.
Thus, when considering the gas injection capabilities of UGS facilities for the scenario of disruption to gas delivery to Europe through Ukraine, the unconsumed amount of gas will make up 11.6 million m 3 /d (85.1-73.5).
In summer gas injection into UGS facilities is the largest, for example in June 2017 it made up 237.9 million m 3 /d. Nevertheless, the amount that can be injected into the UGS facilities makes up about 370.4 million m 3 /d (Table 4). Therefore, the surplus gas can be partially distributed among the UGS facilities. The results of such a distribution for June 2017 are presented in Table 5. The calculations were made with the flow model of the unified gas supply system. Thus, the gas volume of 61.3 million m 3 /day remains unconsumed (193.7-132.4). Table 6 presents the required increase in the transmission capacity of the main gas pipeline sections to raise gas injection into the UGS facilities. This increase was obtained by additionally using the module of "bypassing the "narrow" places" within the software "Russia's Oil and Gas".  The increase in the transmission capacities of the main gas pipeline sections presented in Table 8 will raise the injection capabilities of the UGS facilities by 27.8 million m 3 /d.
After the use of the software module of "bypassing the "narrow" places" (a 10 % increase in the UGS injection capabilities) the volume of unconsumed gas will account for 33.5 million m 3 /d (61.3-27.8).
In September, before heating period, all UGS facilities are filled with gas and there is no possibility of injecting additional gas into them.
The extra gas problem in the situation of short-term Russian gas export termination can be solved by changing the structure of fuel consumed by individual categories of consumers only if to replace fuel oil with gas at thermal power plants and dual-fuel boiler plants [31,32].
The total volumes of fuel oil that can be replaced with gas in the situation of December 2017 and the required amount of gas to replace fuel oil at thermal power plants and dual-fuel boiler plants that receive gas from all gas pipelines of the unified gas supply system, for Russia as a whole and by Federal District are presented in Table 7. In the flow model of the unified gas supply system the obtained ( Table 7) potential volumes of fuel oil to be replaced with gas were added to the gas consumption volumes in respective entities of the Russian Federation. Then the calculations related to the gas flow distribution under the indicated conditions were carried out.
According to the scenario suggesting suspension of gas transmission to Europe through the territory of Ukraine in the case of fuel oil replacement with gas (11.6-8) the amount of unconsumed gas will account for 3.6 million m 3 (Table 7).
In summer and early autumn fuel oil consumption at thermal power plants and dual-fuel boiler plants is much lower than in December. Therefore, the volumes of gas to be used to replace fuel oil will also be smaller. Tables  8 and 9 present the total volumes of fuel oil that can be replaced with gas and the required amount of gas to replace fuel oil at thermal power plants and dual-fuel boiler plants for the conditions of June and September, respectively. In the event that gas export through Ukraine is suspended in summer, the amount of gas to replace fuel oil will make up 3.34 million m 3 /d (Table 8). Then the surplus gas in the system can amount to 30.1 million m 3 /d (33.5-3.34). In autumn the above described consequences will be much severer. For example, the volume of surplus gas will make up 188.6 million m 3 /d (193.7-5.11).
Summary Table 10 presents the effectiveness of measures to reduce surplus gas volumes in the unified gas supply system of Russia in 2017.  Table 10 illustrates how and under which conditions the consequences of surplus gas emergence in the unified gas supply system of Russia can be mitigated. Successive steps proposed by the method for solving this problem will considerably decrease the required reduction in gas production in such a situation.

Conclusion
The paper is concerned with a method for solving the problem of surplus gas in the unified gas supply system of Russia.
Step-by-step implementation of the method stages allows us to completely solve the problem and ensure maximum possible surplus gas distribution aimed at minimizing the reduction in gas production.
The model tool and its respective upgrading necessary to make calculations within the proposed method are presented. The model of surplus gas distribution enables an automatic change in the operation mode of UGS facility, i.e. to switch it to either a withdrawal mode or an injection mode, which is necessary to model different situations of gas delivery disruption in the unified gas supply system.
In the research a situation with a short-term termination of Russian gas export to European  8 8 consumers through the territory of Ukraine is modeled, and possible consequences and necessary actions on their prevention are analyzed. The calculations show that the transmission capacities of the existing gas transmission network are sufficient to receive the indicated amount of surplus gas in the network. Nevertheless, there are several rather loaded sections in the network, whose transmission capacities can be insufficient in the case of an increase in the volume of gas supplied to the network. Such potential "narrow" places include the sections of the main gas pipelines between the compressor stations "Krasnaya Tura" and "Nizhnyaya Tura" between the compressor stations "Nizhnyaya Ivdel", "Gremyachinskaya" and compressor station "Vavozhskaya", and crossing of two major main gas pipelines near the compressor station "Pomary".
The work was carried out within the framework of a scientific project III.17.5.1 of program of fundamental research of the SB RAS, reg. number АААА-А17-117030310451-0.