Mathematical Model for Time of Leak Estimation in Natural Gas Pipeline

The ability to detect leak is crucial in pipeline fluid transport operations. Leaks will inevitably occur in pipelines due to wide range of uncertainties. A good leak detection system should not only be able to detect leak but also accurately estimate the actual time of leak occurrence. This will enable proper estimation of the fluid loss, from the pipeline before shut-in of the pipeline or before remedial actions were carried out on the pipeline which ultimately will help quantified the degree of financial or environmental implications resulting from the leak incidence. This paper gives a new model for the estimation of the time of leak in natural gas pipeline. The idea for the model hinges on the notion that the time of response of most pipeline alarm are not necessarily the time actual time the leak occurred. Period of lapse depends on the accuracy, sophistication of the alarm and volume of leak it is capable of detecting. Most alarms responds at later times than the leak occurred. Quantification of fluid loss volume demands that the actual time of leak occurrence be determined, this means that the time the leak occurred must be calculated accurately. The model was simulated using the Matlab software. The results shows proves that the model is highly accurate when tested with field data.


Introduction
Leak has been the greatest problem facing pipelines as means of hydrocarbon fluid transportation. The acceptability and efficiency of pipelines rests on the provision of quick leak detection system as part of the pipeline system network. Leak detection capability of a pipeline refers to how quick the leak is detected as compared to the time the leak occurred. While robust and efficient leak detection system relies on quick time detection of leak such that the period between the leak occurrence and leak detection time is infinitesimal, on the other hand inefficient leak detection system provides a leak detection time much later than the time the leak actually occurred [1,2]. This discrepancy in leak occurrence time and detection time can be misleading in trying to quantify the volume and mass of fluid loss from the pipeline during leak. Thus it may be difficult to accurately determine the level of environmental damage or financial losses due to leak when the accurate time of leak occurrence is not determined.
The parametres to be determine in most leak detection operation are time of leak, leak location, mass or volume of fluid loss. Several methods are available to ascertain this parametres. There are two broad categories. One is the physical inspection methods that only detects the distance and volume of leak but not capable of estimating the time of leak. The model base method utilizes the hydraulic parametres intrinsic of the pipeline to determine the flow behavior of the pipeline in the absence and presence of leak and compare their differences. This enables the estimation of leak time, distance, volume or mass of fluid and even the pressure and flowrate at point of leak. This methods does not require the shutdown of pipeline operation or physical involvement at the site of leak occurrence.
In summary, existing methods are grouped into two main categories: physical method and mathematical model. Physical detection has the advantages of accuracy and high certainty. The online, real-time surveillance of pipelines and leak detection can be realized if monitoring equipment is installed on the pipeline [3,4]. Because the physical method requires installation and maintenance of high levels of costly equipment on the pipeline, it may be excluded because the high operating cost is not affordable and the long time taken to detect the leak is unacceptable because of the continuous loss of revenue, damage to facilities and environment, and possible loss of life. Sometimes, a harsh environment or severe weather can make the installation of detection instruments in the pipeline and/or physical inspections impossible [5,6]. In some cases, remote locations that are difficult to access make physical inspection unrealistic. The mathematical model has the advantages of low cost and quick leak detection. Shutdown of the operation may not be required. The continuous online, real-time monitoring of the pipeline and leak identification are possible if the required data can be measured and transmitted to the central office simultaneously. The disadvantages of the mathematical model are low accuracy and high uncertainty. High-quality and complete data sets are key factors of detecting leaks successfully. In practice, the mathematical model can be used to narrow down the possible leak interval before the physical inspection is carried out [7].
In this paper, a model is developed for the estimation of time of leak. This is with the knowledge that some alarm sensors installed do not accurate signal immediately the leak occurs because of the degree of sophistication of the technology and the volume threshold of leak that the alarm is capable of detecting. Whatever the case, accurate calculation of time of leak occurrence is necessary for quantification of fluid loss. This is the essence of the development of time of leak equation in this paper.

Objectives
The objectives of this paper are: i. The development of mathematical model for estimation of the accurate time of leak occurrence in natural gas pipeline. ii. The estimation of the actual time of leak occurrence in natural gas pipelines. iii. To minimize fluid loss from natural gas pipeline through efficient and accurate leak detection system. iv. To propose a new and more accurate leak detection system for natural gas pipelines.

Literature Review
Flow monitoring methods make use of pressure and/or flow signals at different sections of a pipeline, mostly only the extremes. During normal pipeline operation, there exist steady state relationship among these signals. Changes in these relationships will indicate the occurrence of leaks. Volume balance is the most straightforward flow monitoring method. A leak alarm will be generated when the difference between upstream and downstream flow measurements changes by more than an established threshold. But because of the inherent flow dynamics and the superimposed noise, only relatively large leaks, which exceed about 10% for gas pipelines, can be detected. Considering the fact that the inlet flow rate measurements are not available and the conventional mass balance techniques cannot be used, Dinis et al. [8] gave a statistical method to detect leaks in subsea liquid pipelines. But his method has not been tested in gas pipelines. Dynamic model-based methods attempt to mathematically model the gas flow within a pipeline. Using this model, flow parameters are calculated at different sections of the pipeline, and these parameters are measured as well. Then leaks can be detected by comparing the calculated and measured parameters. By discretizing the pipeline model with non-uniform regions along the line, Verde [9] proposed an accommodation scheme to solve the multi-leak detection and location problem. But this method could not estimate the leak size. Based on the same model, Zhao and Zhou [10] used an STF to detect and locate leaks, and the detection speed was faster. Hauge et al. [11] used an adaptive Luenberger-type estimator to locate and quantify leakage given inlet velocity, pressure, and temperature and outlet velocity and pressure. The model was built in OLGA, a commercial software from Schlumberger [12], which can handle multiphase flow and incorporated temperature dynamics. Pressure and rate at two ends of the pipeline are required for numerical calculation.
Balda Rivas and Civan [13] used mass-balance and transient flow models to detect leaks in liquid pipelines. The response times to the transient-flow operation were used to estimate leak location.
Jin [14] worked on negative pressure wave technique in leak detection. He found out that the Leak detection time is around the time required by the pressure wave to travel from the leak location to the pressure transmitter. In addition, the NPW method can provide an accurate leak location.
Their model required intensive measurements of all variables. Tian et al [14] also found that the leak location precision of NPW systems is challenged by the pressure data noise.

Methods
The basic equations of compressible fluid flow are: continuity equations, momentum equations, energy equations, equations of state. For this work the continuity equation shall be the governing equation for the determination of mathematical models that predict natural gas flow behaviour in pipeline both in the leak and no leak cases.
Consider a fluid element in a pipe of uniform cross-section From continuity equation in 3 dimension Where ρ=density of fluid U x , U y , U z =volumetric velocity in 3 dimension But for steady state The above equation is for three dimensional steady state flows.
Considering flow in one dimension i.e. in the x-direction 0 The above holds if there is no mass accumulation Integrating w. r. t x If there are of the flow is A, then the rate of flow is Thus when there is leak

Development of Time of Leak Model
When leak occurs, the actual time of the day when it occurs is only determined by calculation. The time the leak actually occurred may not be the time when the leak was detected. The discrepancy in time or lapse is dependent on the accuracy of the computer hardware devices employed to detect the leak and the swift response of the pipeline monitoring team in the SCADA unit.
Furthermore, when the leak has been detected, there may need to shut in and discontinue flow until safe custody transfer is assured. Thus, the leak detection time is not also the same as the time of shut in of the pipeline.
If we consider a horizontal pipeline of equal cross-section transporting natural gas at steady state isothermal condition.
Let the time the first mass of fluid exits the leak opening (time of leak) be + , and let the time the leak was discovered by the pipeline monitoring team be + -, and assuming there was shut inlet the shut in time be + . .
From the above The time + -is already known which is given by the pipeline monitoring team. It means that if the time interval ,-is gotten then the time of leak + , can be calculated from the equation below.
It is now required to determine the parameter 0 to enable further calculation.
Recall that The distance travelled downstream is equal to L-X Many approach has been used in the application of equation 16. This application will affect the alarm system design and modeling in determination of the instance of leak.
Two methods are used here for application of equation 16; one is the fluid mass method while the other is the pressure wave method. For the mass balance method, the leak will be detected if upon leak occurrence the affected fluid flux travels downstream to the exist point of the pipeline. If the sensors detect reduction in flowrate caused by leak the alarm system is triggered. Thus the time it takes the fluid to travel to the exit point of the pipeline is the time lag between actual leak occurrence and the leak detection time by the alarm systems. Alarms designed with these methodology may be prone to errors in determination of the actual time of leak. Thus the determination of the time of leak by the alarm depends on the velocity of the fluid flux travelling downstream immediately after leak occurrence. This can be illustrated diagrammatically as shown below.
The flowrate of the affected fluid G I recorded at the exit point is given by the equation Where V=velocity of the fluid travelling downstream to the output of the pipeline, ft/s A the cross sectional area of the pipeline in sq. in.
We assume that the pipeline is a circular pipe.

Proposed Model for Determination of Leak Period
Because of the errors encountered in the alarm system by using the mass balance method in determination of time of leak, we develop a new method that uses the principle of pressure waves during leak. When leak occurs, a negative pressure wave is emitted which can be recorded by sensors or pressure transducers. This pressure wave travel along the pipeline segment. Thus the velocity V in equation 16 is the velocity of pressure wave Vsw traveling along the pipeline body. The equation becomes For steel pipes, the velocity of the pressure wave along in the medium of the pipe wall is 5960m/s (5.96Km/s or 357.6Km/minutes). With the leak period calculated and using the time of leak equation in equation 3.76 the time of leak can be estimated.

Simulation of Time of Leak Model
The simulation result for time of leak is given for the two methods used. One was for the mass balance which many authors have used as was given in equation 16 while the other is the proposed model for time of leak determination using the concept of pressure wave as given in equation 23.

Results of Time of Leak Using Mass Balance Method
The table 1 and table 2 gives the time of leak results of simulation using the mass balance method

Results for Time of Leak Using Proposed Pressure Wave Method
The equation 24 is the equation used for simulation with Vsw equal to 5960m/s (357.6Km/minutes) for steel pipes. From our proposed model using pressure wave signals during leak, the time period has been reduced drastically when compared with the mass balance approach. The reason is because waves travel faster than fluid in a pipeline and the time of detection of this properties varies with their speed of travel to be detected by the sensors downstream. This is illustrated in the table below.

Discussions
From table 1, it is seen that there is gap between the time the leak occurred and the time it was detected. Without realizing this time difference, there could be erroneous estimation of fluid loss volume if volume estimation technique is time-dependent. Figure 2 gives the accurate time of leak occurrence and the time it was detected. Table  3 gives the time of leak result using the proposed pressure wave method. It is evident from table 3 that using the proposed pressure wave method helps in quicker leak detection than the mass balance approach. This is because sonic waves travel faster than fluid particles. Table 4 compares the result from the two time of leak models presented in this work. It is seen from the table that the proposed pressure wave method gives less time lag between the leak detection time and leak occurrence time than the mass balance method. As a result of this, the proposed pressure wave method is more efficient for quicker time of leak detection than the mass balance method.

Conclusion
Mathematical equation has been developed for the estimation of time of leak in natural gas pipeline. The model indicates that the time the alarm responded to the leak occurrence was not the actual time the leak occurred. The discrepancy in this time reveals how efficient and accurate the available alarm system was. Inefficient alarm system has longer period (in seconds or minutes) from the leak occurrence time to the detection time by the alarm. The model is to be used in SCADA system for high integrity pipeline supervision and monitoring of hydrocarbon gas pipeline especially where pipelines are close to human habitation areas to avoid casualties and losses of lives and properties accruing from late detection of leak and erroneous quantification of fluid loss due to leak.