Hydrodynamic Study of Oil Leakage in Pipeline via CFD

This paper describes the transient dynamics behavior of oil flow in a pipe with the presence of one or two leaks through fluid dynamics simulations using the Ansys CFX commercial software. The pipe section is three-dimensional with a pipe length of 10 m, a pipe diameter of 20 cm, and leak diameter of 1.6 mm. The interest of this work is to evaluate the influence of the flow velocity, and the number and position of leaks on the transient pressure behavior. These new data may provide support for more efficient detection systems. Thus, this work intends to contribute to the development of tools of operations in oil and gas industry.


Introduction
Nowadays, the ducts are the way of transport most used to connect the resources of production, refinery, and, in some cases, the consumers centers. However, some accidents have happened; for instance, an accident occurred in July 2010, where a duct was broken in the State of Michigan (north of United States) and about 1,1 million of gallons of crude oil leaked and went into the Kalamazoo River.
According to Zhang et al. [1], pipeline leak detection technologies have been playing an important role in protecting the safety of pipeline transportation. Due to corrosion, geological disasters, third party damage, and other factors, pipeline leak accidents have been happening frequently bringing great hidden hazards to the safe operation of pipelines. Therefore, it is of important practical significance to detect and locate the pipeline leaks timely, reducing or minimizing fluid loss in ducts.
Agbakwuru [2] distributed the causes of pipeline leaks in four main classes: operational, structural, unintentional, and intentional. The operational class includes all leaks due to operations with oil/gas pipeline, for instance, human error and equipment failure. The class of structural problems includes failures in pipelines as explosion, collapse, fatigue, fracture, buckling, corrosion, breakage, and so forth. The unintended damage is often caused by construction workers in nearby duct. Intentional damage can be caused by terrorist attacks and sabotage/theft, for example.
The occurrence of a leak divides the duct system into three parts: exact location, upstream, and downstream, as illustrated in Figure 2. The profiles of pressure and flow rate, over the pipeline, show the leak location. Edrisi and Kam [3] studying gas monophase flow reported that the fluid loss in the leak location can be given by (1), where up and up represent the pressure and temperature inside the duct and in the leak location, respectively, SC and are the gas flow rate and gas specific gravity at standard conditions, respectively, is the opening size of the leak, and is a constant that depends on the material and geometry. The leakage coefficient is given by (2), where and are parameters determined by experimental conditions and Re is the Reynolds number. The authors fixed values of flow rate at input and pressure at the output of the duct and compared two permanent states, with and without leakage. The disturbances in the input pressure and in the output flow rate indicate the presence of leakage.
Edrisi and Kam [3] have used experimental results of Scott and Yi (1998) to study the use of the coefficient of leakage ( ). The experiments consist of a methane gas monophase flow in a horizontal duct with a length of 9.46 ft and an internal diameter of 3.64 in. A range of output pressure values between 610 and 680 psia and a range of gas flow rate injection from 1 to 6 MMscf/Day were assumed as boundary conditions. The leakage is located in the middle of the duct and has its diameter varied in three values equal to 1/8, 1/4, and 3/8 inches. The values range from 0.55 to 4.11. Several data analyses were made and can be seen in detail in Edrisi and Kam [3]. In Figure 1 the behavior of the flow rate and the pressure over the duct is observed. The author concluded that the coefficient of leakage is proportional to Reynolds number, differently from what is shown in (2). Consider the following: Zhang et al. [1] say that the method of pipeline leak detection called negative pressure wave (NPW) method is between the three widely used and investigated methods of pipeline leak detection worldwide. Actually leak detection monitoring system (LDMS) based on the NPW method has already been installed on crude oil pipelines more than 20,000 km in China, even though it has been playing a significant role in the pipeline running safety, reducing the false alarm rate. The NPW method has some drawbacks in detecting a slow leak or a small leak, resulting in a lower accuracy in a detection of a leak location. Zhang et al. [1] propose the use of a novel LDMS of long distance oil pipeline based on a dynamic pressure transmitter (DPT) to solve the main problems of signal recognition. For this propose, the authors performed experiments using the oil pipeline of PetroChina, with a pipe length of 94.21 km and a pipe diameter of 457 mm. The pipeline leaks were simulated at a distance of 75.5 km from the inlet station and the dynamic pressure transmitters were installed, respectively, in the inlet and outlet stations. The leak detection monitoring based on DPT is designed utilizing the WPE feature extraction method for pipeline leak judgment. The results show that the pipeline leak detection based on DPT has higher sensitivity and resolution than those of ordinary pressure transmitter. Moreover the leak correct recognition rate of field experiment is 96.7%, and the greatest leak localization error is 101 m.
There are variables in the leak phenomenon that are not so easy to measure in practice. Recently, some authors used the computational fluid dynamic as a tool to help in this process. The cases described below can be cited as examples.
Barbosa et al. [4] simulated the three-phase and nonisothermal flow of oil, water, and gas. The flow domain consists of a vertical duct with a length of 7 meters and a diameter of 12.5 cm. The duct has a leak with a diameter   The results of numeric simulation showed a disturbance in the temperature field with a leakage. The fluid leak magnitude is proportional to the growth of temperature around them. The pressure drop over the duct was analyzed and it was noticed that the pressure drop is directly proportional to viscosity, initial velocity of oil, and magnitude of leak.
Sousa et al. [5] simulated the flow of a two-phase mixture (water and oil) in a vertical duct with a length of 8 meters and diameter of 15 cm containing a leak with a diameter of 6 mm located 4 m from the input section of the duct. The simulations were run using Ansys CFX. These authors changed the volumetric fraction of oil in the input flow in a range from 0.75 to 1, and they noted that the higher the volume fraction of water in the mixture, the greater the flow passing through the leak orifice.
Tavares [6] studied numerically two types of isothermal flow: two-phase (oil and water) and three-phase (oil, water, and gas), in a horizontal duct with a pipe length of 10 meters and a pipe diameter of 20 cm containing a leak with a diameter of 16 mm located 5 m from the input section of the duct. The effect of the position of the leak orifice (up, lateral, and bottom) and mixture composition (oil fraction from 90% to 80%, water fraction from 5% to 10%, and gas fraction from 0% to 10%) was analyzed.
The results showed an increase of the pressure drop at the first 0.02 s, period without leak. After this time the leak condition was defined, putting a prescribed velocity of 0.06 m/s on the leak orifice surface. Between 0.02 and 0.03 s there was a decrease in a pressure drop and then an increase until a constant value. The cases with a two-phase flow had a smaller variation of the pressure drop than the cases with a three-phase flow. Araújo et al. [7] used the computational fluid dynamic to simulate a two-phase flow (oil and water) in a duct with leaks, studying how the size of the leak can perturb the hydrodynamic of flow inside the duct and how the volumetric fraction of oil can influence the amount of oil lost. One of the conclusions is the following: by increasing the diameter of the leak orifice, the volume of fluid leaving the orifice is greater.
To evaluate the influence of the leak in a tee junction about the flow dynamics parameter, Araújo et al. [8] simulated the oil flow in a tee junction with one or two leak orifices. The main pipe has a length of 6 m and pipe diameter of 10 cm, while the secondary pipe has the same diameter and has a length of 3 m. There is a leak in the main pipe and another leak in the secondary pipe, both with a diameter of 8 mm. By measurement of the pressure at the inlet section of the main pipe, one of the conclusions of the authors is that the leak in the main pipe causes a bigger disturbance in the pressure field than the leak in the secondary pipe.
In this sense, this paper aims to study the transient dynamic behavior of the oil flow in pipes containing one or two leaks, in terms of velocity and pressure fields, specifically, to analyze the behavior of the flow on the emergence of a leak when there is already another leak in the pipeline.

Study Domain.
The domain is a horizontal duct with a length of 10 meters and a diameter of 0.2 m. The pipe has two leaks with a diameter of 1.6 cm and located at 5 m and at 7.5 m from the inlet section of the duct, as illustrated in Figure 2.
The mesh utilized in the simulations is shown in Figure 3, beyond the details of the leak and inlet and outlet sections. This mesh has 326768 tetrahedral elements, and it is the result of several refinements to assure the nondependence of the numerical results with the use of this mesh in simulations, as well as a suitable computational cost.

Mathematical
Modeling. The governing equations to describe the phenomenon of the fluid flow in the pipe and leak are the conservation of mass and momentum represented, considering the Eulerian-Eulerian approach and the following assumptions: (i) the flow is transient and laminar; (ii) the fluid is Newtonian, incompressible, and with constants thermophysical and chemical properties; (iii) the flow is isothermal; (iv) there is no occurrence of chemical reactions; (v) the gravitational effect was considered.
The equations that describe the flow were withdrawn from Ansys CFX.
(a) Permanent regime: (i) mass conservation equation is where and U are, respectively, the density and the velocity vector; 4 Advances in Mechanical Engineering where is the pressure and is the stress tensor.
(b) Transient model: (i) mass conservation equation is where is the time; (ii) momentum conservation equation is (v) When there are leaks in the two orifices (a) leak 1 is opened: average static pressure equal to 101325 Pa; (b) leak 2 is opened: average static pressure equal to 101325 Pa.

Initial Conditions.
For all cases the numerical results of the simulation of oil laminar flow in steady state without leakage like initial condition were adopted, having an inlet Advances in Mechanical Engineering 5 0.17 Cunha [9] oil velocity of 0.5 m/s (Cases 05 to 08) and 1.0 m/s (Cases 09 to 12), a condition of no slip in the wall and in the leak, and static pressure of 101325 Pa in the outlet section of the pipe. Optimizing the simulation time to minimize the occupation of memory in the hardware and to obtain accuracy in the results, the time step was changed throughout the simulation. Data for the studied cases are shown in Table 1.

Fluid Data.
The properties of the oil used in the present work are shown in Table 2.

Mesh Refinement Study.
The mesh dependence was analyzed by the refinement of the mesh in four different levels ( Table 3). The convergence criterion adopted was the root mean square with a residual target of 10 −8 .
The parameter used to choose the mesh was the pressure drop. The analytical value of the pressure difference in a section of the duct with the length of 1 m was calculated from Darcy-Weisbach equation (7), where is the friction factor. The numerical value of the pressure difference in a section of the duct with the length of 1 m was calculated from the difference between the calculated average pressure in the cross-section in = 3 m and in the cross-section in = 4 m (fully developed region). The relative error between analytical and numerical values is calculated from (8), where Δ predicted is the numerical value and Δ analytical is the analytical value. Consider

Dependence of the Mesh and Validation.
The values of pressure differences in the pipe section are shown in Table 4.
The results indicate that there is virtually no variation between Cases 03 and 04. Based on these results, the mesh for Case 03 was chosen for the next simulations, because this case gives good results Table 3: Meshes used in the refining study. Number of nodes  01  1  144694  138904  02  2  206894  199926  03  3  281810  273282  04 4 309720 300482  Table 4 can be used for validation of the mesh and mathematical modeling presented in this work.

Leaks in Pipeline
3.2.1. Velocity Analysis. Figure 4 shows the behavior of oil velocity field on the longitudinal plane for Cases 08 and 12 (Table 1), after the flow regime reaches a permanent regime.
In the details of leak region, there is a disorder in the velocity profile caused by leakage. Note that the region of leak 1 (at 5.0 m from inlet section) presents a bigger velocity than the region of leak 2 (at 7.5 m from inlet section). This behavior explains the reason of escape of a bigger volume of fluid through leak 1 than through leak 2. Figure 5 shows the velocities in the leak orifices changing with time. It is clear to notice how the presence of a new leak perturbs the velocity field around the previous leak. In Figures 6 and 7 the streamlines and the velocity vector fields are shown at 3.2 s. Figure 8 shows the field of pressure on the longitudinal plane, for Cases 08 and 12 (Table 2), after the flow regime to acquire a permanent regime (3.2 s). In the details of leak region there is a variation in the pressure caused by leakage. Leak 1 shows a higher pressure in the neighborship than leak 2. It occurs due to leak 1 being closer to the inlet section, region in the pipe with the higher pressure, than leak 2. Figure 9 illustrates the pressure fields of Cases 08 and 12, respectively, in one axial plane and in two transverse planes passing the center of leak orifice. A discontinuity of the pressure distribution illustrating a pressure gradient toward the output of the fluid in the leak orifices is noticed. Figures 10, 11, and 12 show the average pressures, measured at input section, changing with time. There is, in the first moments of flow, presence of a sharp decline of pressure caused by leak, followed by a sudden increase in pressure.   It is visible in Figure 10 that the place of leak orifice provokes pressure variations caused by leak. The pressure drop due to the leak at 5 m from input (Cases 05 and 09) is bigger than drop due to the leak at 7.5 m from input (Cases 06 and 10).

Pressure Analysis.
The results shown in Figure 11 are a comparison between the situations where the two leaks are activated at the beginning of the simulation (Cases 08 and 12) and the situation where leak 1 is initialized at 0 s (the leak located at 5 m from input) and leak 2 after 1.6 s (the leak located at 7.5 m from input) (Cases 07 and 11). The time 1.6 s was chosen due to the fact that this time is enough to stabilize the pressure. It is observed that, regardless of the time of onset of leakage, if they have the same diameter and are located in the same regions, the final pressure measured in a particular section, after stabilizing the pressure, will be dependent on the inlet conditions (pressure or velocity specified).
It is noted in Figure 12 how a presence of one leak can influence the detection of another. In Cases 06 and 10 leak 2 was activated when there is no leakage before, causing disturbances in the pressure at the inlet section of the pipe. However, if leak 1 was opened previously (at 5 m), the activation of leak 2 at 1.6 s (Cases 07 and 11) causes a smaller disturbance in pressure comparing to the situation where leak 2 exists alone, and it occurs because the pressure measured at the inlet section is small around the time of 1.5 s for Cases 06 and 10. X X X X X X X X X X X X X X X X X X X X X X X X X X

Conclusions
Based on the results the following conclusions are described: (i) the mesh used presented results that do not depend on their sophistication, being classified as able to be used in the simulations; (ii) the leakage causes a disturbance on the fields of velocity and pressure along the flow; (iii) the leak closest to the duct entrance has provoked the greatest pressure drop measured at the inlet section of the pipe; (iv) a pipeline containing two or more leaks has the same pressure measured at the input section regardless of the time of opening of the leaks and inlet fluid velocity;