Analysis of the Safety of Functioning Gas Pipelines in Terms of the Occurrence of Failures

: The development of appropriate methods by which to assess the functioning of gas pipelines helps limits the consequences of disasters, in that way protecting users better. Assessment methods of this kind are presented in this paper, which advocates the integrated risk area identiﬁcation method. The risk taken account of is understood to be a function of the probability or frequency of occurrence of undesirable events, and comes with parameters deﬁning the consequences of these events, should they arise, in terms of their magnitude. The level of system vulnerability to events of these types is a factor considered, and the risk calculation is of a kind that encompasses both quantitative and qualitative aspects. The approach taken is regarded as a quick and simple risk-assessment tool applicable to the daily operation of gas networks for a gas company. Speciﬁcally, the framework of the research carried out extends to: (1) Estimation of the average cost of failure of gas pipelines in the case of an urban agglomeration in SE Poland; (2) assessment of the level of integrated risk facing the gas-supply subsystem, by reference to the risk area identiﬁcation method; (3) failure forecasting by way of regressions with delay; and (4) conclusions regarding failure risk assessment in a gas-supply network, as well as a consideration of prospects. The framework referred here, thus constitutes the basis for both analysis and assessment of the safety of a gas-supply


Introduction
Natural gas is a fuel whose properties favor increased use. Relative environment-friendliness (e.g., a lack of particulate matter contributing to the occurrence of smog) ensures use in the heating of homes, the fueling of motor vehicles or various industrial production processes [1]. According to data from Statistics Poland (the Central Statistical Office) more people are also using natural gas from the network than did so a decade ago. The increase in the number of natural-gas consumers makes expansion of the system distributing natural gas imperative. Coming first and foremost: The construction of new gas pipelines [2,3]. According to the 10th Report of the European Gas Pipeline Incident Data Group, the 1970-2016 period brought a more-than 21% increase in the length of the gas transportation pipelines, whose length by 2016 had reached 149,000 km, and in case of the length of natural gas distribution length almost 2,200,000 km in Europe [4]. On the one hand, such a dynamic increase in the length of the gas network makes it possible for more consumers to use natural gas. On the other, the longer a network is, the greater the probability of its failing [5]. According to the EGIG report [4], the overall frequency of occurrences, characterizing the 1970-2016 period, is 0.31 failures per year per 1000 km. This might be contrasted with the figure for just the most-recent five years, which stands at just 0.134 per year per 1000 km. The historical analysis of accidents in the transportation of natural gas indicated, that the main causes for accidents were mechanical failure, as third party damage (TPD), and activities of workers, according to the report of Technical Association of the European Association of the European Natural Gas Industry [6] and previous studies [7,8]. Such situations show the need for special trainings of operators of construction machinery [6]. The performed analyses [9,10] show, that pipeline failure can cause significant economic losses and fatalities as a result of domino effect; therefore, it is important to maintain safety level at proper level.
In most cases, the failure of a gas network is associated with leakage. Gas leaks bring with them the likelihood of fire, explosion or poisoning of people [11,12]. Furthermore, the effects of a failures of a network can be very serious, both economic and in relation to the health of the population [13,14]. This is enough to justify a search for new methods by which determine both the probability of failures and their consequences [15].
Contemporary risk assessment draws on current world trends, which entail an increased emphasis on safety [16,17]. For its part, European energy policy takes account of issues, such as the diversification of sources of supply and stability of the political situation, while also drawing attention to the geographical locations of sources [18,19].
Both economic and environmental reasons account for the ever-greater importance of natural gas [20,21]. Growing demand for the fuel helps sustain efforts to expand networks, with this also making it more probable that undesirable events will arise [22]. Each such undesirable event across the subsystem put in place to distribute natural gas causes disruptions in supply and poses a risk of an explosion ensuing [23]. That makes it very reasonable to seek to determine the operational level in the natural-gas distribution subsystem potentially associated with the occurrence of an undesirable event [24][25][26].
Safety can be defined in descriptive terms as a condition or property of an object or system that characterizes its ability to resist accidents [27,28]. With regard to consumers of a supply of gas, safety is the probability of avoiding the risk resulting from hazard occurrence or protection against hazard [29].
The analysis and assessment of the safety of a gas-supply system is performed in line with the following steps presented in Figure 1. .

Figure 1.
Steps in the analysis and assessment of the safety of a gas-supply system.

Construction
Operation Functioning

Identification of the performed analysis
Purpose Scope  Steps in the analysis and assessment of the safety of a gas-supply system. An important step entails the estimation of possible losses for each group of threats by a determination of the number of residents using the gas-supply system, including an estimation of the probability of a certain value of losses being exceeded, and an estimation of the likelihood of undesirable events occurring [30]. Another issue includes the identification of safety barriers and the assessment of system vulnerability, through hazard classification in line with the degree of nuisance [31,32].

Hazard identification
Next, the risk function is determined, and its parameters characterized, including via an assessment of the risk value, at the adopted scale, with a view of the acceptability of risk being determined [33,34]. The analysis conducted is helpful, as emergency-response plans are developed; and as decision-making is engaged in, with regards to the need to implement corrective actions and develop future goals in terms of modernization or system expansion, so that the safety of gas supply is assured [35,36]. A very important issue is to predict threats affecting the loss of system security, taking into account failures or undesirable events that could cause a domino effect, or so-called cascade failure [37,38], via implementations of economical and reliability criteria for the integrated safety assessment [39][40][41][42][43][44].
The analysis was performed using real data on failures of gas-supply networks supervised by the municipal gas company in a Polish city, as well as technical documentation and information obtained in regard to everyday operations. The analysis was performed using Statsoft software [45], through network failure forecasting through regressions with delay [46].
The case described here makes clear the need to ensure both safety and comfort of use where gas supplies are concerned, as shown in [45][46][47][48][49]. The main aim of this paper has thus been to present approaches to failure assessment in regard to the functioning of a gas network. Findings then act in support of the management of an urban gas network, above all when it comes to strategic modernization plans and rehabilitation techniques.

Estimation of the Average Failure Cost of Gas Pipelines
Prior to an analysis of the effect of an undesirable event C, components of the cost of liquidating a single failure were determined as c fi .
This cost consists of components as follows, and can be expressed as: where c lab represents labour costs, c tran transport costs, c mat material costs, c mes mark-up expenses supply , and c pm is mark-up profit and tax. In turn, costs due to losses of gas in the course of a failure c gl are estimated in line with the formula: where ∆V is the amount of gas lost, in m 3 , and c gp the gas price in EUR/m 3 . The total cost is affected by the duration of the effort to rectify the failure, because personnel costs, and hence labor costs, are calculated in line with hourly rates. However, the average duration of a repair is in the range 7.9-9.3 h, and the time of failure protection is about 0.5 h, based on operating data obtained from a real gas supply system in a Polish city. The city is supplied by two high-pressure transmission lines, φ700 and φ400, of nominal pressure 6.4 MPa. The medium-pressure ring gas network is supplied from the high-pressure transmission bus through two reduction-measuring stations of the first stage, and reducing the high pressure of 6.4 MPa to an average of 0.4 MPa. To the main ring of medium pressure, a local natural gas mine was connected through the third reduction and measurement station of the first stage. The medium pressure network supplies 21 of the second stage reduction stations, reducing the average pressure of 0.4 MPa to the low 0.025 MPa and directly distributing to some of the buildings in the city.

Obtained Results
Lost gas relates directly related to the costs of putting right a failure. The cost of gas lost as a result of a failure is shown in Figure 2, as calculated in line with Equation (2).   The total cost of a failure is seen to comprise the cost of lost gas (36%) and the cost of removing the failure (64%). Most gas-pipeline failures are caused by ongoing works in the vicinity. So to reduce the cost of failures, the number of failures should be reduced first and foremost. This in turn denotes that plans for gas pipelines should be developed and updated, as inaccurate plans quite often result in underground pipelines being damaged. Damage cost can be reduced where amounts of gas lost are curbed. This can be facilitated by appropriate training of employees whose work is of a kind that makes damaging gas pipelines very probable. An employee having received such training will have adequate knowledge on how to seal a damaged gas pipeline safely and quickly. This will definitely increase the level of safety, and reduce the amount of gas escaping.

Assessment of the Level of Integrated Risk to the Gas-Supply Subsystem Using the Risk Area Identification Method
Estimates of the risk level inherent in the subsystem involved in the distribution of natural gas should begin with the division of subsystem elements into groups of factors of the same type. The distinguished parameters involve the cooperation of designers, contractors and operators of the gas distribution network. The criteria were also based on the relevant cited literature. Experts' opinions provide the opportunity of combining the experience, which allows taking into account all the most important factors affecting the risk values associated with failures in gas distribution networks. The method of doing this presented here entails assignment of the rank of a gas network to a group, as The total cost of a failure is seen to comprise the cost of lost gas (36%) and the cost of removing the failure (64%). Most gas-pipeline failures are caused by ongoing works in the vicinity. So to reduce the cost of failures, the number of failures should be reduced first and foremost. This in turn denotes that plans for gas pipelines should be developed and updated, as inaccurate plans quite often result in underground pipelines being damaged. Damage cost can be reduced where amounts of gas lost are curbed. This can be facilitated by appropriate training of employees whose work is of a kind that makes damaging gas pipelines very probable. An employee having received such training will have adequate knowledge on how to seal a damaged gas pipeline safely and quickly. This will definitely increase the level of safety, and reduce the amount of gas escaping.

Assessment of the Level of Integrated Risk to the Gas-Supply Subsystem Using the Risk Area Identification Method
Estimates of the risk level inherent in the subsystem involved in the distribution of natural gas should begin with the division of subsystem elements into groups of factors of the same type. The distinguished parameters involve the cooperation of designers, contractors and operators of the gas distribution network. The criteria were also based on the relevant cited literature. Experts' opinions provide the opportunity of combining the experience, which allows taking into account all the most important factors affecting the risk values associated with failures in gas distribution networks. The method of doing this presented here entails assignment of the rank of a gas network to a group, Energies 2019, 12, 3228 5 of 13 as followed by assignment of a given weighting to the given factor. The integrated risk level r is then calculated using the formula: where i tgp is a coefficient depending on the type of gas pipeline, be this: Low-pressure (1), medium-pressure (2) or high-pressure (3); P is the coefficient determining the probability of occurrence of an failure event as (1) low-unlikely once in 10-50 years, (2) medium-quite likely once every 1-10 years, or (3) high-1-10 times a year or more often(3); and C is the effect of (loss induced by) the undesirable event.
The effect of an undesirable event C is thus defined as: where: • w is a coefficient dependent on the gas leak: -No gas leak (with point weight 1); -A gas leak (with point weight 2).
• k is the location class for the gas pipeline according to the existing regulation concerning the technical conditions to be met by gas networks and their location: -First class of location-area with a shared residence and public utility buildings, single-or multi-family buildings, intensive vehicular traffic, and developed underground infrastructure, such as water supply, sewage, heating, gas, power and telecommunications, streets/roads, and mining areas (with point weight 3); -Second class of location-single-family and farm buildings, or developments with individual recreation buildings, as well as infrastructure necessary for them (with point weight 2); -Third class of location-an undeveloped area or an area where only single-family, farm and livestock buildings and the infrastructure necessary for them can be found (with point weight 1).
• s is a factor expressing the impact of the failure on the environment (s): -Little impact (with point weight 1); -Significant impact (with point weight 2); -Very significant impact (with point weight 3).
We can distinguish the following undesirable events connected with the functioning of a natural gas distribution subsystem: -Material ageing (compensator failure, leaks from fittings, pipe crack); -Improper performance (gas pipeline corrosion, pipe crack, formation of hydrates); -Material defect (compensator failure, leaks from fittings, pipe crack, gas pipeline corrosion); -Improper gas composition (gas pipeline corrosion, formation of hydrates, ice caps, false alarm); -Terrorist attack (pipe crack); -Investment works (pipe crack, false alarm); -Geological conditions (compensator failure, leaks from fittings, pipe crack).
The impact on the environment (s) can be distinguished as a result of a failure without a gas leak (w = 1), or with a gas leak (w = 2), as well as in relation to: After combining the probability and consequences categories, a risk matrix was obtained according to the Equations (3) and (4). The part of the obtained calculation was presented in the form of Table 1.  Others effects associated only with an actual gas leak (w = 2): − S8-evacuation of residents: Evacuation of 100 inhabitants (1), evacuation of 101 to 300 inhabitants (2), or more than 301 residents evacuated (3); − S9-material losses caused by a gas explosion: Financial loss of up to 10 4 EUR (1), financial loss from 10 4 to 10 6 EUR (2), or financial loss above 10 6 EUR (3); − S10-losses of life and health caused by a gas explosion: Required medical assistance (1); required hospitalization (2); or fatal descent (3); − S11-toxic contamination due to the escape of gas: Local impact (1), national impact (2), or international impact (3), − S12-toxic contamination by combustion gases (gas explosion): Local impact (1), national impact (2), or international impact (3); − S13-contribution to the greenhouse effect: Negligible (1), significant (2), or critical (3).
After combining the probability and consequences categories, a risk matrix was obtained according to the Equations (3) and (4). The part of the obtained calculation was presented in the form of Table 1. The value of r obtained by performing the analysis helps with decision making, vis-à-vis the operation or modernization of a system. Overall, proposed integrated risk levels based on Equations (3) and (4) would be as follows: − In the case of an insignificant risk (also definable as tolerable) being obtained (r < 50), no further action is required and the system is being operated in a proper and reliable way; − A controlled risk (r from 51 to 115) means that the system is allowed to operate, but under the condition that modernization or repair work will be undertaken; − If risk at an unacceptable level has arisen (r above 116), immediate action will have to be Others effects associated only with an actual gas leak (w = 2): − S8-evacuation of residents: Evacuation of 100 inhabitants (1), evacuation of 101 to 300 inhabitants (2), or more than 301 residents evacuated (3); − S9-material losses caused by a gas explosion: Financial loss of up to 10 4 EUR (1), financial loss from 10 4 to 10 6 EUR (2), or financial loss above 10 6 EUR (3); − S10-losses of life and health caused by a gas explosion: Required medical assistance (1); required hospitalization (2); or fatal descent (3); − S11-toxic contamination due to the escape of gas: Local impact (1), national impact (2), or international impact (3), − S12-toxic contamination by combustion gases (gas explosion): Local impact (1), national impact (2), or international impact (3); − S13-contribution to the greenhouse effect: Negligible (1), significant (2), or critical (3).
After combining the probability and consequences categories, a risk matrix was obtained according to the Equations (3) and (4). The part of the obtained calculation was presented in the form of Table 1. The value of r obtained by performing the analysis helps with decision making, vis-à-vis the operation or modernization of a system. Overall, proposed integrated risk levels based on Equations (3) and (4) would be as follows: − In the case of an insignificant risk (also definable as tolerable) being obtained (r < 50), no further action is required and the system is being operated in a proper and reliable way; − A controlled risk (r from 51 to 115) means that the system is allowed to operate, but under the condition that modernization or repair work will be undertaken; − If risk at an unacceptable level has arisen (r above 116), immediate action will have to be Others effects associated only with an actual gas leak (w = 2): − S8-evacuation of residents: Evacuation of 100 inhabitants (1), evacuation of 101 to 300 inhabitants (2), or more than 301 residents evacuated (3); − S9-material losses caused by a gas explosion: Financial loss of up to 10 4 EUR (1), financial loss from 10 4 to 10 6 EUR (2), or financial loss above 10 6 EUR (3); − S10-losses of life and health caused by a gas explosion: Required medical assistance (1); required hospitalization (2); or fatal descent (3); − S11-toxic contamination due to the escape of gas: Local impact (1), national impact (2), or international impact (3), − S12-toxic contamination by combustion gases (gas explosion): Local impact (1), national impact (2), or international impact (3); − S13-contribution to the greenhouse effect: Negligible (1), significant (2), or critical (3).
After combining the probability and consequences categories, a risk matrix was obtained according to the Equations (3) and (4). The part of the obtained calculation was presented in the form of Table 1. The value of r obtained by performing the analysis helps with decision making, vis-à-vis the operation or modernization of a system. Overall, proposed integrated risk levels based on Equations (3) and (4) would be as follows: − In the case of an insignificant risk (also definable as tolerable) being obtained (r < 50), no further action is required and the system is being operated in a proper and reliable way; − A controlled risk (r from 51 to 115) means that the system is allowed to operate, but under the condition that modernization or repair work will be undertaken; − If risk at an unacceptable level has arisen (r above 116), immediate action will have to be The value of r obtained by performing the analysis helps with decision making, vis-à-vis the operation or modernization of a system. Overall, proposed integrated risk levels based on Equations (3) and (4) would be as follows: - In the case of an insignificant risk (also definable as tolerable) being obtained (r < 50), no further action is required and the system is being operated in a proper and reliable way; -A controlled risk (r from 51 to 115) means that the system is allowed to operate, but under the condition that modernization or repair work will be undertaken; -If risk at an unacceptable level has arisen (r above 116), immediate action will have to be taken to reduce this.
It should be noted, that the occurrence of losses related to death accidents should be considered as an unacceptable risk, independent of the final result obtained, and the transfer of the received risk to the unacceptable risk interval.

Application Example
The following threat characteristics related to network operation through investment works have been adopted, which causes pipe cracking. The probability of occurrence of an failure event was assumed as high.
A section of gas pipeline selected for analysis is characterized as follows: -Type depending on pressure-medium-pressure gas pipeline; -Gas pipeline material-PE (polyethylene); -Location-areas with single-family housing.
The characteristics of the gas network are then as summarized in Table 2. Table 2. Characteristics of the gas network under analysis concerning the effect of an undesirable event. Σ 120

No. Factors of A Given Gas Distribution Subsystem Group Effect of Undesirable Event
According to the adopted risk levels, for the r value = 720 the level of risk is at the unacceptable level. The estimation of the level of risk posed by the r should be supported by expert knowledge on the construction and design of gas pipelines, as well as the management of gas networks.

Network Failure Forecasting Through Regressions with Delay
To ascertain how important network failure forecasting might be, monthly occurrences over four years were taken account of.
The first workspace is ANOVA, which shows that both years and months are important to the seasonality characterising network failures, as Figure 3 shows.
losses of life and health caused by a gas explosion 3 12 toxic contamination due to the escape of gas 3 12 toxic contamination by combustion gases (gas explosion) 2 8 contribution to the greenhouse effect 1 4 Σ 120 According to the adopted risk levels, for the r value = 720 the level of risk is at the unacceptable level. The estimation of the level of risk posed by the r should be supported by expert knowledge on the construction and design of gas pipelines, as well as the management of gas networks.

Network Failure Forecasting Through Regressions with Delay
To ascertain how important network failure forecasting might be, monthly occurrences over four years were taken account of.
The first workspace is ANOVA, which shows that both years and months are important to the seasonality characterising network failures, as Figure 3 shows. Analysis of the average values for failure in consecutive months shows that, in the three summer months culminating in July there is an increase in the incidence of failures that is clear and significant statistically (at p < 0.05).
Prior to the running of further analysis and drawing of conclusions regarding the model, the basic assumptions underpinning the analysis of variance were checked, in line with the assumption of normality. This assessment was made using a normal probability plot (Figure 4). The appearance of the presented graph suggests that the assumption of normality has been met, as points are arranged along the crossed line. Analysis of the average values for failure in consecutive months shows that, in the three summer months culminating in July there is an increase in the incidence of failures that is clear and significant statistically (at p < 0.05).
Prior to the running of further analysis and drawing of conclusions regarding the model, the basic assumptions underpinning the analysis of variance were checked, in line with the assumption of normality. This assessment was made using a normal probability plot (Figure 4). The appearance of the presented graph suggests that the assumption of normality has been met, as points are arranged along the crossed line. The model best-presenting a clear trend and increasing range of fluctuations over time entailed use of the model with a linear trend but multiplicative seasonal hesitantly; that is, a "combination" of the two versions ( Figure 5), which can be described by the Equation (5). The explanation of the used dependences and variables are presented in the Appendix A. The model best-presenting a clear trend and increasing range of fluctuations over time entailed use of the model with a linear trend but multiplicative seasonal hesitantly; that is, a "combination" of the two versions ( Figure 5), which can be described by the Equation (5). The explanation of the used dependences and variables are presented in the Appendix A.
where X t is the observed series, t = 1, ..., n. The formula was obtained from the least squares method. The logarithmic transformation of the dependent variable was used to obtain a better fit and meet the assumptions of the multiple regression model.
The presented model can be described by the following equation: The model is built for a logarithmic variable in forecasting, and is calculated on the basis of a linear trend over time. The delayed variable involving the number of failures in the previous month was included, because the data showed strong first-order autocorrelation. For such a case, the December-January variable was added-that necessitating a value of 1 for those months, as opposed to 0 in remaining months. In those months a clear increase in the number of failures could be seen, which was not explained by the other variables in the model.

Conclusions and Perspectives
In operational practice, gas networks are subject to various kinds of damage. Elements are exposed to various random factors while in operation. As the process of their exploitation includes work, downtime, service, and repair, the complex nature of the process is made clear. The work done in this paper has thus sought to achieve certain simplifications, in order to better illustrate the possibilities for Markov processes to be used in evaluating the operation of a gas net-work. National To produce a forecast for the next period, combinations of the last linear observation and previous forecast adjusted for seasonal fluctuations were made use of.
The formula was obtained from the least squares method. The logarithmic transformation of the dependent variable was used to obtain a better fit and meet the assumptions of the multiple regression model.
The presented model can be described by the following equation: No. of failures = Exp(2.23 + 0.011 · no. of failures in the previous month + 0.019 · no. of months from beginning of the observation period + 0.41*) * Exp(0.41), taking into account seasonal adjustment for December and January when there are more failures every year The model is built for a logarithmic variable in forecasting, and is calculated on the basis of a linear trend over time. The delayed variable involving the number of failures in the previous month was included, because the data showed strong first-order autocorrelation. For such a case, the December-January variable was added-that necessitating a value of 1 for those months, as opposed to 0 in remaining months. In those months a clear increase in the number of failures could be seen, which was not explained by the other variables in the model.

Conclusions and Perspectives
In operational practice, gas networks are subject to various kinds of damage. Elements are exposed to various random factors while in operation. As the process of their exploitation includes work, downtime, service, and repair, the complex nature of the process is made clear. The work done in this paper has thus sought to achieve certain simplifications, in order to better illustrate the possibilities for Markov processes to be used in evaluating the operation of a gas net-work. National and global legal regulations require the adaptation and development of research methods relating to the safety of the gas supply. The terms safety and risk, made common use of in various aspects of everyday gasworks practice, are significant. All would seek to espouse a firm belief regarding the absence of risk, and the idea that effective controls against risk are in place. This then constitutes a challenge for science and technology, especially in the face of undesirable events that prove to be out of the ordinary, as well as terrorist threats of an unprecedented nature. In this sense, conclusions drawn from the history of individual failures offer signposting where active risk management is concerned. It becomes important for risk-reduction procedures and decision-support tools to be developed, on the basis of risk analyses and assessments that accompany the actual functioning of a gas network, and that also take account of sustainable development principles.
In practice, we are living in times in which gas networks are continuing to increase in length, with that almost inevitably denoting increases in incidences of failure. This leaves fully justified efforts to develop new research methods that will allow for determinations of potential risks along given sections of gas networks. Developed studies supported by experience and expert knowledge constitute more-effective methods of monitoring gas networks, and seeking to protect them against failure. The method proposed here is an alternative to others that assess and manage failure of gas pipe networks.
The considerations presented here in the process may constitute a basis for further research, proving helpful in a process of risk management that should start by determining priority problems, with the next step then being the formulation of management principles. Technical solutions adopted should then be optimized from the point of view of effects anticipated and sums invested. The chosen solution should be implemented, and its functioning monitored to provide for verification of the method, as well as the determination of limitations on risk that have been achieved.
The gas companies supervising gas networks should be in a position to estimate risk, to inform users of the magnitude thereof, to take appropriate actions to minimize risk and to initiate actions imperative where incidents actually arise. The risk analysis may also prove useful in the planning of preventive measures seeking to ensure that damage does not arise, as well as in the development of emergency scenarios.