Next Article in Journal
Hesitant Fuzzy Sets Based Symmetrical Model of Decision-Making for Estimating the Durability of Web Application
Next Article in Special Issue
Matrix Expression of Convolution and Its Generalized Continuous Form

Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

# Detecting Optimal Leak Locations Using Homotopy Analysis Method for Isothermal Hydrogen-Natural Gas Mixture in an Inclined Pipeline

1
Department of Mathematical Sciences, Universiti Teknologi Malaysia, Johor Bahru 81310, Malaysia
2
Department of Mathematics, Universitas Airlangga, Surabaya 60115, Indonesia
*
Author to whom correspondence should be addressed.
Symmetry 2020, 12(11), 1769; https://doi.org/10.3390/sym12111769
Received: 18 August 2020 / Revised: 25 September 2020 / Accepted: 29 September 2020 / Published: 26 October 2020
(This article belongs to the Special Issue Integral Equations: Theories, Approximations and Applications)

## Abstract

:
The aim of this article is to use the Homotopy Analysis Method (HAM) to pinpoint the optimal location of leakage in an inclined pipeline containing hydrogen-natural gas mixture by obtaining quick and accurate analytical solutions for nonlinear transportation equations. The homotopy analysis method utilizes a simple and powerful technique to adjust and control the convergence region of the infinite series solution using auxiliary parameters. The auxiliary parameters provide a convenient way of controlling the convergent region of series solutions. Numerical solutions obtained by HAM indicate that the approach is highly accurate, computationally very attractive and easy to implement. The solutions obtained with HAM have been shown to be in good agreement with those obtained using the method of characteristics (MOC) and the reduced order modelling (ROM) technique.

## 1. Introduction

One of the strategies to reduce gas transportation costs is the use of natural gas pipeline networks by petroleum companies . These networks are capable of supplying gas in long distances under high pressure and through compression stations . Changes in pipeline pressure are a function of gas velocity, valve closure time, and arrangement of the closing valve .
When the valve is closed at the end of the pipeline, there is the possibility of the occurrence of maximum pressure, which can be decreased in short times during its closure. It is of utmost importance to control factors affecting transient pressure, such as initial pressure and mass ratio. This is because the damage caused by this pressure is not evident shortly after the event [4,5,6].
Several studies have been conducted on transient flow in the mixtures of hydrogen and natural gas with the use of isothermal flow and horizontal pipelines, which is not the case in reality [2,7,8,9]. Furthermore, another study has made an attempt to study the flow of these mixtures under high pressure through inclined pipelines . In most pipelines working under high pressure, there are slow and fast fluid transients. As gas properties are not constant, a one-dimensional and non-isothermal gas flow model should be presented to simulate these transients .
The reason for proposing hydrogen and natural gas mixtures is their transportation through the same pipelines for the purpose of cost reduction. This is while the existing lines are just designed for natural gas, whose properties are significantly different from that of hydrogen [11,12]. The solution to this problem has been the mixture of the both with a great deal of care and attention, as hydrogen is a reactive gas with high pressure that can cause leakage [13,14]. This problem is of great importance since leakage can cause many economic, environmental, and safety problems and threaten industries and citizens by wasting natural gas .
According to the reports, two thirds of the 375 pipeline events between 1994 and 1999 were caused by leakage . In addition, high-pressure wave celerity causes pipe splitting, and even, exploding, sometimes making intense holes that lead to inward collapse of pipes, necessitating the careful study of pressure wave celerity.
Studies have been done on leakage and its location for natural gas [15,16], leading to the introduction of methods [17,18], such as the acoustic method (AM) [18,19] and the negative pressure wave method (NPW) [20,21]. Means of transients and using unsteady-state tests, which give rise to small overpressure, can be considered as an appropriate method for detecting leaks locations in pressurised pipes . Autocorrelation analysis of vibro-acoustic signals measured in a test field and amplitude distortion of measured leak noise signals caused by instrumentation have been used for water leak detection in [23,24]. In water-filled small-diameter polyethylene pipes by means of acoustic Emission Measurements,  has been used for detecting leak locations. However, there is paucity of research on this issue for hydrogen or its mixture with natural gas [15,16]. In this regard, isothermal and non-isothermal flow models have been proposed for hydrogen and natural gas mixtures [7,8,14].
There have been several studies on the detection of leakage location through novel approaches. For example, new leakage detection using AM  and new algorithm based on the attenuation of NPW in isothermal cases have been introduced in recent years .
Accordingly, the present study made an attempt to determine leakage location in an inclined pipe for isothermal flow containing hydrogen-natural gas mixture with the use of homotpy analysis method. This method is used for solving the governing equations, leading to quick and accurate analytical solutions for nonlinear transportation equations. Factors affecting pressure and celerity waves in inclined pipes, such as inclination angles and mass ratio of mixtures, have also been discussed. The obtained results are in good agreement for isothermal flow in a horizontal pipeline. Results showed that pressure drop and leak discharge are increased with an increase in the inclination angle, while the celerity wave and the leak location do not seem to be affected.

## 2. Mathematical Formulation

Figure 1 shows an inclined pipeline, which has a reservoir at the top and a valve at its bottom. The governing equations consist of three partial differential equations that are all coupled, non-linear and hyperbolic. The non-isothermal flow in the pipeline, a homogenous mixture of hydrogen and natural gas, was considered to be one-dimensional that is compressible and covers transient condition .

#### 2.1. Governing Equation

The governing equations for the transport of hydrogen/natural gas mixture in an inclined pipeline from the principle of conserving mass and momentum are given by the following,
$∂ ρ ∂ t + ∂ ρ u ∂ x = 0 ,$
$∂ ρ u ∂ t + ∂ ( ρ u 2 + P ) ∂ x + f ρ u | u | 2 D + ρ g sin ( θ ) = 0 ,$
with $u = Q / A$, $A = π D 2 / 4$, $ρ$ is density, u is the gas velocity, P is the pressure, e is the gas internal energy per unit mass, D is the diameter of the pipeline, f is the coefficient of friction, g is the gravitational force and $θ$ is an angle between the friction force and the direction.
Boundary conditions of this equations depend on the types of closure and the valve operational time. The boundary conditions at the initial point $x = 0$ and at the end point $x = L$, respectively are given by,
$ρ ( 0 , t ) = ρ 0 ( t ) , u ( 0 , t ) = u 0 ( t ) ,$
$ρ ( L , t ) = ρ L ( t ) , u ( L , t ) = u L ( t ) ,$
where $ρ 0$ and $u 0$ are defined as density and gas velocity at the inlet pipeline, respectively and $ρ L$ and $u L$ are defined as density and gas velocity at the outlet pipeline, respectively. The initial conditions that are assumed to be in a steady state condition at $t = 0$ are ,
$∂ ρ u ∂ x ( x , 0 ) = 0 ,$
$∂ ( ρ u 2 + P ) ∂ x ( x , 0 ) + f ρ u | u | 2 D + ρ g sin ( θ ) = 0 ,$
The commonly used equation of state for perfect gas is as follows:
$P = ρ R T ,$
where,
• R: is the specific gas constant.
• T: is temperature.
The equation of state for the compressible flow, where there is a celerity pressure wave, is:
$P = c 2 ρ ,$
The following equations are also achieved from ideal gas relation,
$C p − C v = R , γ = C p C v , C v = R γ − 1 .$
where,
• $C v$: is the specific heat at constant volume.
• $C p$: is the specific heat at constant pressure.
• R: is the specific gas constant.
• P: is pressure.
• $γ$: is the flow process index.

#### 2.2. Hydrogen-Natural Gas Mixture Equation

The mass ratio and the density of hydrogen-natural gas mixture are defined as,
$ϕ = m h m h + m g , 1 ρ = v h + v g m h + m g ,$
with $ρ h = m h v h$, $ρ g = m g v g$, $ρ h = ρ h 0 P 0 P 1 n 1$ and $ρ g = ρ g 0 P 0 P 1 n 2$. Where $m g$, $m h$, $V g$ and $V h$ are defined as the mass of natural gas and hydrogen and volume of natural gas and hydrogen, respectively.
Therefore, the expression of the average density of the gas mixture is given by,
The celerity pressure wave for compressible flow is defined as,
$c = ∂ ρ ∂ P s − 1 2 ,$
where the subscript s is defined the constant entropy condition. The derivative of Equation (11) with respect to P, and substituting into Equation (12), then the celerity pressure wave yields ,
The properties of hydrogen and natural gas used in the calculations are shown in the Table 1. For the simulation, the parameters are assumed as Table 2.

## 3. Homotopy Analysis Method

A brief description of the standard homotopy analysis method (HAM) presented by [28,29,30,31,32]. This will be followed by a description of the algorithm of the homotopy analysis method (HAM). First, we consider the following differential equation,
where $N$ are nonlinear operators, x and t denotes the independent variable, $u ( x , t )$ are unknown functions, and $G ( x , t )$ are known analytic functions. For $G ( x , t ) = 0$, Equation (14) reduces to the homogeneous equation. By means of generalizing the traditional homotopy method, Liao  constructed the so-called zero-order deformation equation,
where $p ∈ [ 0 , 1 ]$ is an embedding parameter, are nonzero auxiliary functions, $L$ is an auxiliary linear operator, $u 0 ( x , t )$ are initial guesses of $u ( x , t )$, $H ( x , t )$ denotes a nonzero auxiliary function and $Ψ ( x , t ; q )$ are unknown functions. It is important to note that one has great freedom to choose auxiliary objects such as and $L$ in HAM. Obviously, when $q = 0$ and $q = 1$, Equation (15) becomes,
$Ψ ( x , t ; 0 ) = u 0 ( x , t ) , Ψ ( x , t ; 1 ) = u ( x , t ) ,$
Thus, as q increases from 0 to 1, the solution $Ψ ( x , t ; q )$ varies from the initial guesses $u 0 ( x , t )$ to the solutions $u ( x , t )$. Expanding $Ψ ( x , t ; q )$ in Taylor series with respect to q, one has
$Ψ ( x , t ; q ) = u 0 ( x , t ) + ∑ m = 1 ∞ u m ( x , t ) q m ,$
where,
$u m ( x , t ) = 1 m ! ∂ m Ψ ( x , t ; q ) ∂ q m | q = 0 ,$
If the auxiliary linear operator, the initial guesses, the auxiliary parameters , and the auxiliary functions are so properly chosen, then series Equation (17) converges at $q = 1$, and one has,
$u ( x , t ) = u 0 ( x , t ) + ∑ m = 1 ∞ u m ( x , t ) ,$
which must be one of the solutions of the original nonlinear equations, as proved by Liao . As $ℏ = − 1$ and $H ( x , t ) = 1$, Equation (15) becomes,
which is used mostly in the homotopy perturbation method. Define the vectors,
Differentiate the zeroth-order deformation Equation (14) m-times with respect to q and then dividing them by $m !$ and finally setting $q = 0$, we get the following mth-order deformation equation,
where,
with,
It should be noted that the linear Equation (22), which has linear boundary conditions, governs $u m ( x , t )$ for $m ≤ 1$ . Boundary conditions stem from the main problem, the solution for which can be provided by Matlab, Maple, or Mathematica. The requirement for the limit of Equation (17) is that it should meet the conditions of the main equation when it is convergent at $q = 1$. It is noteworthy that drawing “-curves” or “curves for convergence-control parameter” aim to find a proper convergence-control parameter , a convergent series solution, or and accelerate its convergence rate. It is such that these curves with unknown quantities are drawn against to approximately find the convergence region, though they are just graphical. This is because it is not possible to find which $ℏ 0 ∈ R h$ provides the fastest convergent series (see Liao [28,34] for further reading). Another note to be made is that a unique solution is achieved when Equation (14) accepts a unique solution; otherwise, many possible solutions will be obtained from HAM.

#### 3.1. Solving the Steady State Equations by High-Order Deformation HAM

We define the vectors,
Differentiating Equations (5) and (6) m times with respect to the embedding parameter q and then setting $q = 0$ and finally dividing them by $m !$, we have the so-called mth-order deformation equations,
with the initial conditions,
$P ( 0 ) = P 0 , u ( 0 ) = u 0 ,$
where,
with the celerity pressure wave $c i$ defined as follows,
with the following linear operators,
with the property that,
$L 1 C 1 = 0 , L 2 C 2 = 0 ,$
which implies that,
$L 1 − 1 . = ∫ 0 x . d x , L 2 . = ∫ 0 x . d ,$
Now, the solution of the mth-order deformation Equations (5) and (6) becomes,
which can be easily solved by a symbolic computation software such as Matlab, Maple, and Mathematica. Therefore, we will have $P ( x )$ and $u ( x )$ as follows,
$P ( x ) ≃ P M ( x ) = P 0 ( x ) + ∑ m = 1 M P m ( x ) ,$
$u ( x ) ≃ u M ( x ) = u 0 ( x ) + ∑ m = 1 M u m ( x ) .$
Furthermore, to construct the zeroth-order deformation equations we can define the nonlinear operators and as follows,
with the celerity pressure wave c defined as follows,

#### 3.2. Solving Isothermal Flow of Hydrogen-Natural Gas Mixture by HAM

We define the vectors,
Differentiating Equations (1) and (2) m times with respect to the embedding parameter q and then setting $q = 0$ and finally dividing them by $m !$, we have the so-called mth-order deformation equations,
with the initial and boundary conditions as follows,
where,
with the celerity pressure wave $c i$ defined as follows,
with the following linear operators,
with the property that,
$L 1 C 1 = 0 , L 2 C 2 = 0 ,$
which implies that,
$L 1 − 1 . = ∫ 0 t . d t , L 2 . = ∫ 0 t . d t ,$
Now, the solution of the mth-order deformation Equations (1) and (2) becomes,
which can be easily solved by a symbolic computation software such as Matlab, Maple, and Mathematica. Therefore, we will have $P ( x , t )$ and $u ( x , t )$ as follows,
$P ( x , t ) ≃ P M ( x , t ) = P 0 ( x , t ) + ∑ m = 1 M P m ( x , t ) ,$
$u ( x , t ) ≃ u M ( x , t ) = u 0 ( x , t ) + ∑ m = 1 M u m ( x , t ) .$
Furthermore, to construct the zeroth-order deformation equations we can define the nonlinear operators and as follows,
with the celerity pressure wave c defined as follows,

#### 3.3. Results and Discussion

For solving the Equations (5) and (6) by suing the homotopy analysis method according the Equations (25)–(36) we can have,
therefore, pressure $P ( x )$ is as follows,
Equation (47) is a approximation solution for pressure P to the problem Equations (25)–(36) in terms of the convergence parameters and order $m = 12$ with $H ( x ) = 1$. To find the valid region of , the -curves given by the 12th-order HAM approximation at different values of x are drawn in Figure 2; this figure shows the interval of in which the value of $P 12$ is constant at certain x, and M; we chose the horizontal line parallel to x-axis () as a valid region which provides us with a simple way to adjust and control the convergence region.
Figure 3 is showing the comparison between the homotopy analysis method with Subani et al., 2017 and Elaoud et al., 2010 methods. In this comparison the order of homotopy analysis method have been used as $M = 5$ and $M = 12$. The auxiliary parameter is chosen as $ℏ = − 0.15$ from the convergence interval as showed in the Figure 2. As seen from this figure, with order $M = 12$ the homotopy analysis method is comparable with Subani et al., 2017 and Elaoud et al., 2010 methods. In this problem the auxiliary parameter $H ( x , t )$ is chosen equal 1.
Now we want to solve the Equations (1) and (2) with the homotopy analysis method (Equations (37)–(46)) using the following initial approximations,
$P 0 ( x , t ) = x ( x − L ) ( 1 + t ) ( x + t ) ( x − L + t ) P 0 ( x ) + t ( x − L ) ( 1 + x ) ( x + t ) ( x − L + x ) P 0 ( t ) + x t ( 1 + x − L ) x t + x − L P L ( t ) ,$
$u 0 ( x , t ) = x ( x − L ) ( 1 + t ) ( x + t ) ( x − L + t ) u 0 ( x ) + t ( x − L ) ( 1 + x ) ( x + t ) ( x − L + x ) u 0 ( t ) + x t ( 1 + x − L ) x t + x − L u L ( t ) ,$
we guessed the initial approximations Equations (48) and (49) using the initial and boundary conditions (for $x = 0 , L$ results will be as Equations (3) and (4)). Therefore, using the homotopy analysis method for solving the Equations (1) and (2) with the initial approximation Equations (48) and (49) can obtain the following results,
$P 0 ( x , t ) = − x a 0 P 0 2 t + x P 0 t + 1 P 0 − x a 0 P 0 2 − x a 0 P 0 2 L − x P 0 L − x P 0 − x t a 0 P 0 2 L − x t a 0 P 0 2 L 2 + x t P L P 0 2 L − x t P L P 0 2 , u 0 ( x , t ) = − x b 0 u 0 2 t + x u 0 t + 1 u 0 − x b 0 u 0 2 − x b 0 u 0 2 L − x u 0 L − x u 0 − x t b 0 u 0 2 L − x t b 0 u 0 2 L 2 + x t u L u 0 2 L − x t u L u 0 2 , R 1 1 = x P L + u 0 a 0 + 2 u 0 P 0 + P 0 b 0 + 2 x u L a 0 − 2 x u L P 0 + 2 x b 0 P L − 2 x u 0 P L − x P L L + x a 0 L + x a 0 L 2 + P 0 b 0 L + 2 x P 0 b 1 + 2 x b 0 a 0 + 2 x u 0 a 1 + 2 x u 0 a 0 + 2 x u 0 P 0 + 2 x P 0 b 0 − 2 u 0 P 0 t + u 0 a 0 t + P 0 b 0 t + x P 0 t 2 − x a 0 t 2 + u 0 a 0 L + 2 u 0 P 0 L + 4 x b 0 a 0 t L − 2 x P 0 b 0 t L − 2 x u 0 a 0 t L − 8 x u 0 P 0 t L − 4 x P 0 b 0 t 2 + 6 x u 0 P 0 t 2 + 2 x b 0 a 0 t 2 − 4 x u 0 a 0 t 2 + 8 x b 0 a 0 L + 8 x u 0 P 0 L + 2 x P 0 b 1 t + 4 x b 0 a 0 t + 2 x u 0 a 1 t − 2 x u 0 a 0 t − 8 x u 0 P 0 t − 2 x P 0 b 0 t + 2 x u L P 0 L + 2 x P 0 b 1 L + 2 x u 0 a 1 L + 10 x u 0 P 0 L 2 + 6 x b 0 a 0 L 2 − 2 x b 0 P L L + 2 x u 0 P L L − 2 x u L a 0 L , R 2 1 = 1102501 − 1102500 x + u 0 + u 0 L + 2 x u 0 b 0 a 0 t 2 P 0 + 8 x u 0 b 0 a 0 P 0 L − 2 x u 0 a 0 P 0 t L − 2 x u 0 a 0 2 P 0 2 t L + 2 x b 0 a 0 P 0 t L − 2 x u 0 2 a 0 P 0 t L − 2 x u 0 2 a 0 2 P 0 2 t L + x f u 0 b 0 t D + 4 x u 0 b 0 a 0 P 0 t + 2 x u 0 a 0 P L P 0 2 L + 2 x u 0 2 a 0 P L P 0 2 L + 6 x u 0 b 0 a 0 P 0 L 2 − 2 x u 0 b 0 P L P 0 L − 2 x u 0 u L a 0 P 0 L + x f u 0 b 0 D L + u 0 2 + 1102500 L − 1 − 1102500 t − 1 + g sin θ − 2 x u 0 2 a 0 P L P 0 2 + 2 x u 0 b 0 P L P 0 − 3 x u 0 a 0 P 0 L − 4 x u 0 a 0 2 P 0 2 L + 4 x b 0 a 0 P 0 L − 2 x u 0 2 a 0 P 0 L − 4 x u 0 2 a 0 2 P 0 2 L + x f u 0 b 0 D − 2 x u 0 a 0 P 0 t − 2 x u 0 a 0 2 P 0 2 t + 2 x u 0 2 a 1 P 0 t − 2205000 x a 0 P 0 t L − 2205000 x a 0 2 P 0 2 t L − 2 x u 0 2 a 0 2 P 0 2 t + 2 x b 0 a 0 P 0 t − 2 x u 0 2 a 0 P 0 t + 2 x u 0 a 1 P 0 t − f u 0 2 x t D + 2 x u 0 u L a 0 P 0 + 2205000 x a 0 P L P 0 2 L + f u 0 2 x D L + 2 x u 0 a 1 P 0 L − 3 x u 0 a 0 2 P 0 2 L 2 − 2 x u 0 a 0 P L P 0 2 + 3 x b 0 a 0 P 0 L 2 − x b 0 P L P 0 L − x u 0 P L P 0 L − x u L a 0 P 0 L + 2 x u 0 2 a 1 P 0 L − 3 x u 0 2 a 0 2 P 0 2 L 2 + x b 0 + 3307500 x L 2 + x u 0 2 − u 0 2 t + 1102500 a 0 P 0 + 4 x u 0 b 0 a 0 P 0 t L + 4 x u 0 L 2 + 5 x u 0 2 L 2 − 2 x u 0 u L + 2 x u 0 b 0 + 2 x b 0 L + x b 0 L 2 + 2205000 x P L P 0 + u 0 a 0 P 0 + 3 x u 0 2 t 2 + 3 x u 0 t 2 + u 0 2 L + 1102500 a 0 P 0 L + 2 x u 0 L + 2205000 x a 1 P 0 − 2205000 x a 0 P 0 − 1102500 x a 0 2 P 0 2 + 4 x u 0 2 L − 2 x u 0 t − 4 x u 0 2 t + 1102500 a 0 P 0 t + u 0 2 a 0 P 0 − 2 x b 0 t 2 + 1102500 x t 2 + 1 2 f u 0 2 D − u 0 t − x u 0 a 0 t 2 P 0 − x u 0 a 0 2 t 2 P 0 2 + x b 0 a 0 t 2 P 0 − 2 x u 0 2 a 0 t 2 P 0 − x u 0 2 a 0 2 t 2 P 0 2 + 2 x u 0 b 0 a 0 P 0 + x b 0 P L P 0 + x u 0 P L P 0 + x u L a 0 P 0 + 2205000 x a 1 P 0 L − 3307500 x a 0 2 P 0 2 L 2 − 2205000 x a 0 P L P 0 2 − 2205000 x P L P 0 L + 2 x u 0 u L L + 2 x u 0 b 0 L − 2 x u 0 t L + 2205000 x a 1 P 0 t − 2205000 x a 0 P 0 t − 2205000 x a 0 2 P 0 2 t − 4 x u 0 2 t L + u 0 2 a 0 P 0 t − 2 x u 0 b 0 t 2 − 1102500 x a 0 2 t 2 P 0 2 + u 0 a 0 P 0 L + u 0 2 a 0 P 0 L − x u 0 a 0 P 0 − x u 0 a 0 2 P 0 2 + 2 x u 0 2 a 1 P 0 − 4410000 x a 0 P 0 L − 4410000 x a 0 2 P 0 2 L − x u 0 2 a 0 2 P 0 2 + x b 0 a 0 P 0 + 2 x u 0 a 1 P 0 + u 0 a 0 P 0 t + f u 0 2 x D ,$
therefore, pressure $P ( x , t )$ is as follows,
Equation (50) is a approximation solution for pressure $P ( x , t )$ to the problem Equations (1) and (2) in terms of the convergence parameters with $H ( x ) = 1$. To find the valid region of , the -curves given by the 12th-order HAM approximation at different values of t and $x = 0$ are drawn in Figure 4; this figure shows the interval of in which the value of $P 12 ( 0 , t )$ is constant at certain t, and M; we chose the horizontal line parallel to t-axis () as a valid region which provides us with a simple way to adjust and control the convergence region.

#### 3.4. Leak Detection Using Homotopy Analysis Method

Because of a small orifice between the high-pressure pipeline and the environment, the orifice of leak can be simulated leaning on the flow rate. The discharged flow from the orifice can be computed by the following Equation ,
$Q l = ρ l C d A l 2 P l / ρ l X L ,$
where $A l$ is the leak orifice area with radius $r l$, $P l$ is the pressure of gas mixture at the leak position and $ρ l$ is the density of gas mixture at the leak position respectively, $C d$ is a discharge coefficient and $X L$ is the distance of leak from the reservoir.
Analyzing transient pressure wave for hydrogen/natural gas mixtures is based on transmission and reflection properties of pressure wave effected by a downstream valves sudden closure. When the initial pressure wave reaches the leak, it will produce a reflection as it arrives back at the downstream end section. Then, the difference in time between the initial transient wave and the reflected wave is measured and the leakage position in the pipeline is computed by,
$X L = L − Δ t l c Δ t l 2 ,$
where $X L$ is defined as the distance between the leak and upstream end section, $Δ t l$ is the difference of time between the initial transient wave and reflected wave and $c Δ t l$ is defined as the transient celerity wave at time.

#### 3.5. Results and Discussion

Figure 5 presents the transient pressure of hydrogen natural gas mixture for isothermal flow when leakage occurs at $X L = L / 3$ in horizontal pipeline. The homotopy analysis method of order $M = 12$ with $ℏ = − 0.5$ has been used. This figure shows the comparison between homotopy analysis method from order 12 and Subani et al. method  when $ϕ = 0.25$ and $ϕ = 0.5$.
Figure 6 shows the transient pressure of hydrogen natural gas mixture ($ϕ = 0.5$) for isothermal flow when leakage occurs at $X L = L / 3$ in an inclined pipeline with $θ = 15$. Black line is homotopy analysis method from order 12 with $ℏ = − 0.5$ and red line is Subani et al. method. As indicated in Figure 5 and Figure 6, the leak point are estimated at $t s = 0.81$ and at $t s = 0.808$ for Subani et al. method and HAM respectively.
The transient pressure of mixture of natural gas and hydrogen with a mass ratio of $ϕ = 0.5$ is shown in Figure 7 in case of isothermal flow and leak location at $X L = L / 3$ with diverse angles. The homotopy analysis method from order 12 and $ℏ = − 0.5$ has been used. Red line is for $θ = 0$ and black line is for $θ = 15$.
The celerity wave distribution is presented in Figure 8 as a function of time. In this case, the valve of the horizontal pipeline containing different mass ratios of a mixture of gas and hydrogen is abruptly closed when the leakage is at $X L = L / 3$. The values of celerity wave of the leak point for various mass rations are 819.20 ms$− 1$, 964.60 ms$− 1$ and 1086.60 ms$− 1$ for $ϕ = 0.25 , 0.5$ and $0.75$, respectively.
As shown in Figure 6 and Figure 7, the occurrence of the leakage is possible when $Δ t l$ is equal to $0.808$ s. Equation (53) can be used to calculate the leak location of the mixture of natural gas and hydrogen in case of an isothermal flow in a horizontal pipeline as follows:
$X L = 600 − 0.808 × 964.6 2 ≃ 210.3 .$
As seen earlier, there are various mass ratios of the mixture and various angles of the pipeline each with a specific leak location at $X L = L / 3$, the values of which are presented in Table 3. It can be inferred that the leak location is not a function of pipe angle, it is rather a function of the mass ratio of the natural gas and hydrogen mixture. Therefore, mass ratio is of utmost importance here.
The real location of leak is 200 m, when the leak location is at $X L = L / 3$. The leak location calculations by Subani et al. and HAM turned out to be $211.10$ m and $210.30$ m, respectively. It is a mixture of natural gas and hydrogen with a mass ratio of $0.5$. When the mass ration is increased to $0.75$, the leakage location is less than 200 m. Therefore, when the mass ratio is decreased, the location is greater than 200 m. This is contrary to the calculations since the calculated value is less than 200 m when the mass ratio is $0.5$. This is an indication of the dependence of leak location of mass ratio of the mixture considered. As Elaoud et al., (2010) state, the most important part in early determination of a leak close to the reservoir or compressor is the bottom of the pipeline.
Figure 9 shows the leak location with respect to the gas mixture ($ϕ$). As can be seen from this figure, there is a steep slope for the values $ϕ ∈ [ 0 , 0.25 ]$ and $ϕ ∈ [ 0.75 , 1 ]$, but for values $ϕ ∈ [ 0.25 , 0.75 ]$ there is a mild slope.
In real (physical) pipelines, noise is expected to affect measurements [35,36]. The possible effects of noisy signals on the performance of the proposed method are Brownian motion or Wiener process or White noise, as the physical model of the stochastic procedure, as an indexed collection random variables. A Wiener process (notation $W = ( W t ) t ≥ 0$) is named in the honor of Prof. Norbert Wiener; other name is the Brownian motion (notation $B = ( B t ) t ≥ 0$). Wiener process is Gaussian process. As any Gaussian process, Wiener process is completely described by its expectation and correlation functions. A Brownian motion, also called a Wiener process, is obtained as the integral of a white noise signal as follows,
$W ( t ) = ∫ 0 t d W ( τ ) d τ d τ .$
The effects of noisy signals on the effectiveness of the proposed method and possible effects of noisy signals on the performance of leak locations will be proposed in the future works, by introducing white noise in the simulations.
For accurate pinpointing, we can use the zero-gradient control (ZGC) method which we have discussed in our recently published paper  about optimal mixture and controlling the pressure. In our next manuscript with title “Detecting Optimal Leak Locations using Delta Method and Zero Gradient Control for Non-isothermal Hydrogen/Natural Gas Mixture in an Inclined Pipeline” we used the delta method (DM) and zero gradient control (ZGC) method for detecting optimal leak locations. In our future works we will mixed the proposed methods with Artificial intelligence, Neural Network and Deep Learning  to predict and estimate the optimal mixture parameter for achieving more accurate pinpointing.

## 4. Conclusions

The homotopy analysis method used to solve the flow equations of hydrogen natural gas mixture in an inclined pipeline. To validate the approximation series for pressure compared with the Subani et al. method. The results in Figure 3, Figure 5 and Figure 6 show that the obtained results using proposed method are in good agreement with the reduced order modelling (ROM) proposed by Subani et al, in 2017. Then, homotopy analysis method is working as well as other methods and give the semi-analytical solutions.
The leak locations were detected using the homotopy analysis method for horizontal pipeline ($θ = 0 ∘$) and inclined pipeline ($θ = 15 ∘$) for gas mixture $ϕ = 0 , 0.25 , 0.5 , 0.27 , 1$. Using the homotopy analysis method the celerity wave at leak point of the pipeline are 819.20 ms$− 1$, 964.60 ms$− 1$ and 1086.60 ms$− 1$ for $ϕ = 0.25 , 0.5$ and $0.75$, respectively.
In an inclined pipeline $θ = 15 ∘$ the leak location for gas mixture $ϕ = 0.5$ using the Subani et al. method (ROM) and homotopy analysis method respectively are 211.1 m and 210.3 m. Because of the real leak location is supposed at $200 m$ when the leak is located at $X L = L / 3$, the result of HAM method is more accurate than ROM method. As can be seen from Figure 9, with increases the gas mixture $ϕ$ from 0 to 1 the leak location decreases and there is a steep slope for $ϕ ∈ [ 0 , 0.25 ] ∪ [ 0.75 , 1 ]$, and a mild slope for $ϕ ∈ [ 0.25 , 0.75 ]$.
The proposed HAM method is employed without using linearization, discretization, or transformation. It may be concluded that the HAM is very powerful and efficient in finding the analytical solutions for a wide class of gas transportation equations in a pipeline.

## Author Contributions

Funding acquisition: N.A. and Z.I.; Methodology: S.S.C.; Software: S.S.C.; Supervision: N.A.; Writing (original draft): S.S.C.; Writing (review and editing): N.A. and Z.I. All authors have read and agreed to the published version of the manuscript.

## Funding

This research received no external funding.

## Acknowledgments

The authors gratefully acknowledge financial support from the Ministry of Higher Education, Malaysia and Universiti Teknologi Malaysia through Research and Innovation University Grant Scheme, UTMFR Grant (Vot No. Q.J130000.2554.21H48 and FRGS Grant (Vot No R.J130000.7854.5F255).

## Conflicts of Interest

The authors declare that there was no conflict of interest regarding the publication of this paper.

## References

1. Elaoud, S.; Hadj-Taieb, E. Transient flow in pipelines of high-pressure hydrogen-natural gas mixtures. Int. J. Hydrog. Energy 2008, 33, 4824–4832. [Google Scholar] [CrossRef]
2. Chaczykowski, M. Transient flow in natural gas pipeline the effect of pipeline thermal model. Appl. Math. Model. 2010, 34, 1051–1067. [Google Scholar] [CrossRef]
3. Karney, B.W.; Ruus, E. Charts for water hammer in pipelines resulting from valve closure from full opening only. Can. Civ. Eng. 1985, 12, 241–264. [Google Scholar] [CrossRef]
4. Kim, H.; Kim, S.; Kim, Y.; Kim, J. Optimization of Operation Parameters for Direct Spring Loaded Pressure Relief Valve in a Pipeline System. J. Press. Vessel Technol. 2018, 140, 051603. [Google Scholar] [CrossRef]
5. Jalving, J.; Zavala, V.M. An Optimization-Based State Estimation Framework for Large-Scale Natural Gas Networks. Ind. Eng. Chem. Res. 2018, 57, 5966–5979. [Google Scholar] [CrossRef]
6. Seddighi Chahrborj, S.; Amin, N. Controlling the pressure of hydrogen-natural gas mixture in an inclined pipeline. PLoS ONE 2020, 15, e0228955. [Google Scholar]
7. Subani, N.; Amin, N.; Agaie, B.G. Leak detection of non-isothermal transient flow of hydrogennatural gas mixture. J. Loss Prev. Process. Ind. 2017, 48, 244–253. [Google Scholar] [CrossRef]
8. Subani, N.; Amin, N. Analysis of water hammer with different closing valve laws on transient flow of hydrogen-natural gas mixture. Abstr. Appl. Anal. 2015, 2015, 1–12. [Google Scholar] [CrossRef][Green Version]
9. Subani, N.; Amin, N.; Agaie, B.G. Hydrogen-natural gas mixture leak detection using reduced order modelling. Appl. Comput. Math. 2015, 4, 135–144. [Google Scholar] [CrossRef]
10. Uilhoorn, F.E. Dynamic behaviour of non-isothermal compressible natural gases mixed with hydrogen in pipelines. Int. J. Hydrog. Energy 2009, 34, 6722–6729. [Google Scholar] [CrossRef]
11. Veziroglu, T.N.; Barbir, F. Hydrogen: The wonder fuel. Int. J. Hydrog. Energy 1992, 17, 391–404. [Google Scholar] [CrossRef]
12. Ebrahimzadeh, E.; Shahrak, M.N.; Bazooyar, B. Simulation of transient gas flow using the orthogonal collocation method. Chem. Eng. Res. Des. 2012, 90, 1701–1710. [Google Scholar] [CrossRef]
13. Elaoud, S.; Hadj-Taieb, E. Leak detection of hydrogen-natural gas mixtures in pipes using the pressure-time transient analysis. In Proceedings of the Conference and Exposition International of Ecologic Vehicles and Renewable Energy (EVRE), Monte Carlo, Monaco, 2019. [Google Scholar]
14. Elaoud, S.; Hadj-Taeb, L.; Hadj-Taeb, E. Leak detection of hydrogennatural gas mixtures in pipes using the characteristics method of specified time intervals. J. Loss Prev. Process. Ind. 2010, 23, 637–645. [Google Scholar] [CrossRef]
15. Turner, W.J.; Mudford, N.R. Leak detection, timing, location and sizing in gas pipelines. Math. Comput. Model. 1988, 10, 609–627. [Google Scholar] [CrossRef]
16. Wilkening, H.; Baraldi, D.C.F.D. CFD modelling of accidental hydrogen release from pipelines. Int. J. Hydrog. Energy 2007, 32, 2206–2215. [Google Scholar] [CrossRef]
17. Puust, R.; Kapelan, Z.; Savic, D.A.; Koppel, T. A review of methods for leakage management in pipe networks. Urban Water J. 2010, 7, 25–45. [Google Scholar] [CrossRef]
18. Diao, X.; Shen, G.; Jiang, J.; Chen, Q.; Wang, Z.; Ni, L.; Mebarki, A.; Dou, Z. Leak detection and location in liquid pipelines by analyzing the first transient pressure wave with unsteady friction. J. Loss Prev. Process. Ind. 2019, 60, 303–310. [Google Scholar] [CrossRef]
19. Li, S.; Zhang, J.; Yan, D.; Wang, P.; Huang, Q.; Zhao, X.; Cheng, Y.; Zhou, Q.; Xiang, N.; Dong, T. Leak detection and location in gas pipelines by extraction of cross spectrum of single non-dispersive guided wave modes. J. Loss Prev. Process. Ind. 2016, 44, 255–262. [Google Scholar] [CrossRef]
20. Silva, R.A.; Buiatti, C.M.; Cruz, S.L.; Pereira, J.A. Pressure wave behaviour and leak detection in pipelines. Comput. Chem. Eng. 1996, 20, S491–S496. [Google Scholar] [CrossRef]
21. Ge, C.; Wang, G.; Ye, H. Analysis of the smallest detectable leakage flow rate of negative pressure wave-based leak detection systems for liquid pipelines. Comput. Chem. 2008, 32, 1669–1680. [Google Scholar] [CrossRef]
22. Brunone, B.; Ferrante, M. Detecting leaks in pressurised pipes by means of transients. J. Hydraul. Res. 2001, 39, 539–547. [Google Scholar] [CrossRef]
23. Martini, A.; Rivola, A.; Troncossi, M. Autocorrelation analysis of vibro-acoustic signals measured in a test field for water leak detection. Appl. Sci. 2018, 8, 2450. [Google Scholar] [CrossRef][Green Version]
24. Brennan, M.J.; Gao, Y.; Ayala, P.C.; Almeida, F.C.L.; Joseph, P.F.; Paschoalini, A.T. Amplitude distortion of measured leak noise signals caused by instrumentation: Effects on leak detection in water pipes using the cross-correlation method. J. Sound Vib. 2019, 461, 114905. [Google Scholar] [CrossRef]
25. Martini, A.; Troncossi, M.; Rivola, A. Leak detection in water-filled small-diameter polyethylene pipes by means of acoustic emission measurements. Appl. Sci. 2017, 7, 2. [Google Scholar] [CrossRef][Green Version]
26. Liu, C.; Li, Y.; Fang, L.; Xu, M. New leak-localization approaches for gas pipelines using acoustic waves. Measurement 2019, 134, 54–65. [Google Scholar] [CrossRef]
27. Li, J.; Zheng, Q.; Qian, Z.; Yang, X. A novel location algorithm for pipeline leakage based on the attenuation of negative pressure wave. Process Saf. Environ. 2019, 123, 309–316. [Google Scholar] [CrossRef]
28. Liao, S.J. The Proposed Homotopy Analysis Technique for the Solution of Nonlinear Problems. Ph.D. Thesis, Shanghai Jiao Tong University, Shanghai, China, 1992. [Google Scholar]
29. Rana, P.; Shukla, N.; Gupta, Y.; Pop, I. Homotopy analysis method for predicting multiple solutions in the channel flow with stability analysis. Commun. Nonlinear Sci. Numer. Simul. 2019, 66, 183–193. [Google Scholar] [CrossRef]
30. Yu, C.; Wang, H.; Fang, D.; Ma, J.; Cai, X.; Yu, X. Semi-analytical solution to one-dimensional advective-dispersive-reactive transport equation using homotopy analysis method. J. Hydrol. 2018, 565, 422–428. [Google Scholar] [CrossRef]
31. Seddighi Chahrborj, S.; Sadat Kiai, S.M.; Abu Bakar, M.R.; Ziaeian, I.; Gheisari, Y. Homotopy analysis method to study a quadrupole mass filter. J. Mass Spectrom. 2012, 47, 484–489. [Google Scholar] [CrossRef]
32. Seddighi Chahrborj, S.; Moameni, A. Spectral-homotopy analysis of MHD non-orthogonal stagnation point flow of a nanofluid. J. Appl. Math. Comput. Mech. 2018, 17. [Google Scholar] [CrossRef][Green Version]
33. Liao, S. Beyond Perturbation: Introduction to the Homotopy Analysis Method; CRC Press: Boca Raton, FL, USA, 2003. [Google Scholar]
34. Mehmood, A.; Munawar, S.; Ali, A. Comments to: Homotopy analysis method for solving the MHD flow over a non-linear stretching sheet (Commun. Nonlinear Sci. Numer. Simul. 14 (2009) 26532663). Commun. Nonlinear Sci. Numer. 2010, 15, 4233–4240. [Google Scholar] [CrossRef]
35. Mandal, P.C. Gas leak detection in pipelines & repairing system of titas gas. J. Appl. Eng. 2014, 2, 23–34. [Google Scholar]
36. Seddighi Chahrborj, S.; Kiai, S.M.S.; Arifina, N.M.; Gheisari, Y. Applications of Stochastic Process in the Quadrupole Ion traps. Mass Spectrom. Lett. 2015, 6, 91–98. [Google Scholar] [CrossRef]
37. Seddighi Chahrborj, S.; Chaharborj, S.S.; Mahmoudi, Y. Study of fractional order integro-differential equations by using Chebyshev Neural Network. J. Math. Stat. 2017, 13, 1–13. [Google Scholar] [CrossRef]
 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Figure 1. An inclined pipeline with a reservoir at the top and a valve at its bottom.
Figure 1. An inclined pipeline with a reservoir at the top and a valve at its bottom.
Figure 2. -curve for HAM approximation solution $P 12 ( x )$ of the problem Equations (5) and (6) at different values of x.
Figure 2. -curve for HAM approximation solution $P 12 ( x )$ of the problem Equations (5) and (6) at different values of x.
Figure 3. Comparison between homotopy analysis method of orders $M = 5 , 12$ for $ℏ = − 0.1$; with Subani et al., 2017 and Elaoud et al., 2010 methods.
Figure 3. Comparison between homotopy analysis method of orders $M = 5 , 12$ for $ℏ = − 0.1$; with Subani et al., 2017 and Elaoud et al., 2010 methods.
Figure 4. -curve for HAM approximation solution $P 12 ( x , t )$ of the problem Equations (1) and (2) at different values of t and $x = 0$.
Figure 4. -curve for HAM approximation solution $P 12 ( x , t )$ of the problem Equations (1) and (2) at different values of t and $x = 0$.
Figure 5. Transient pressure of hydrogen natural gas mixture for isothermal flow when leakage occurs at $X L = L / 3$ in horizontal pipeline when $ϕ = 0.25$ and $ϕ = 0.5$.
Figure 5. Transient pressure of hydrogen natural gas mixture for isothermal flow when leakage occurs at $X L = L / 3$ in horizontal pipeline when $ϕ = 0.25$ and $ϕ = 0.5$.
Figure 6. Transient pressure of hydrogen natural gas mixture for isothermal flow when leakage occurs at $X L = L / 3$ in an inclined pipeline when $θ = 15 ∘$ and $ϕ = 0.5$.
Figure 6. Transient pressure of hydrogen natural gas mixture for isothermal flow when leakage occurs at $X L = L / 3$ in an inclined pipeline when $θ = 15 ∘$ and $ϕ = 0.5$.
Figure 7. Transient pressure of hydrogen natural gas mixture with $ϕ = 0.5$ for isothermal flow when leakage occurs at $X L = L / 3$ with different angles $θ$. HAM with order 12 and $ℏ = − 0.5$.
Figure 7. Transient pressure of hydrogen natural gas mixture with $ϕ = 0.5$ for isothermal flow when leakage occurs at $X L = L / 3$ with different angles $θ$. HAM with order 12 and $ℏ = − 0.5$.
Figure 8. Celerity wave of hydrogen natural gas mixture for isothermal flow when leakage occurs at $X L = L / 3$ in horizontal pipeline with different mass ratio $ϕ$.
Figure 8. Celerity wave of hydrogen natural gas mixture for isothermal flow when leakage occurs at $X L = L / 3$ in horizontal pipeline with different mass ratio $ϕ$.
Figure 9. Leak location with respect to the gas mixture ($ϕ$).
Figure 9. Leak location with respect to the gas mixture ($ϕ$).
Table 1. Hydrogen properties in working conditions, $P = 35$ bar and $T = 15 ∘$C = 288 K (See ).
Table 1. Hydrogen properties in working conditions, $P = 35$ bar and $T = 15 ∘$C = 288 K (See ).
SymbolFluid PropertiesValues (J/kgK)
HydrogenNatural Gas
$C p$Specific heat at constant pressure14,6001497.5
$C v$Specific heat at constant volume10,4401056.8
RGas constant4160440.7
Table 2. Parameters used for the simulation (See ).
Table 2. Parameters used for the simulation (See ).
SymbolsValuesSymbolsValues
Pipe lengthL = 600 mMass ratio$ϕ = 0 , 0.5 , 1$
Timet = 20Angle$θ = 0 , π / 6 , π / 4 , π / 3$
Pipe diameterD = $0.4$ mMass flow$Q 0$ = 55 kg/s
Friction coefficient$f = 0.03$Absolute pressure$P 0$ = 35 bar
Temperature$T = 15 ∘$C = 288 K
Table 3. Leak location for the hydrogen-natural gas mixture for isothermal flow at leakage $X L = L / 3$.
Table 3. Leak location for the hydrogen-natural gas mixture for isothermal flow at leakage $X L = L / 3$.
Gas Mixture
$( ϕ )$
Pipeline’s Angle
$( θ )$
Leak Location (m)
Subani et al., MethodHAM
0$0 ∘$439.4439.8
$15 ∘$439.4439.8
0.25$0 ∘$268.3269.04
$15 ∘$268.3269.04
0.5$0 ∘$211.1210.3
$15 ∘$211.1210.3
0.75$0 ∘$160.6161.01
$15 ∘$160.6161.01
1$0 ∘$95.896.2
$15 ∘$95.896.2

## Share and Cite

MDPI and ACS Style

S. Chaharborj, S.; Ismail, Z.; Amin, N. Detecting Optimal Leak Locations Using Homotopy Analysis Method for Isothermal Hydrogen-Natural Gas Mixture in an Inclined Pipeline. Symmetry 2020, 12, 1769. https://doi.org/10.3390/sym12111769

AMA Style

S. Chaharborj S, Ismail Z, Amin N. Detecting Optimal Leak Locations Using Homotopy Analysis Method for Isothermal Hydrogen-Natural Gas Mixture in an Inclined Pipeline. Symmetry. 2020; 12(11):1769. https://doi.org/10.3390/sym12111769

Chicago/Turabian Style

S. Chaharborj, Sarkhosh, Zuhaila Ismail, and Norsarahaida Amin. 2020. "Detecting Optimal Leak Locations Using Homotopy Analysis Method for Isothermal Hydrogen-Natural Gas Mixture in an Inclined Pipeline" Symmetry 12, no. 11: 1769. https://doi.org/10.3390/sym12111769

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.