Safety Study on Wax Deposition in Crude Oil Pipeline

: The Shunbei crude oil pipeline is prepared to use the unheated transportation process to transport waxy crudes. However, the wax formation in the pipeline is unknown. In order to predict the wax deposition of the pipeline, the physical property experiment of Shunbei crude oil was carried out through ﬁeld sampling. The density, freezing point, hydrocarbon composition, and viscosity–temperature characteristics of crude oil are obtained. The cloud point and wax precipitation characteristics of the crude oil were obtained using the differential scanning calorimetry (DSC) thermal analysis method. Then, the wax deposition rate of the pipeline was predicted by two methods: OLGA software and wax deposition kinetic model. Finally, the optimal pigging cycle of the pipeline was calculated on this basis. The results show that: Shunbei crude oil is a light crude oil with low wax content, a low freezing point, and a high cloud point. Comparing the OLGA simulation results with the calculation results of the Huang Qiyu model, the development trend of wax deposition along the pipeline was the same under different working conditions. The relative error of the maximum wax layer thickness was 6%, proving that it is feasible for OLGA to simulate wax deposition in long-distance crude oil pipelines. Affected by the wax precipitation characteristics of Shunbei crude oil, there was a peak of wax precipitation between the pipeline section where crude oil temperature was 9.31–13.31 ◦ C and the recommended pigging cycle at the lowest throughput was 34 days in winter and 51 days in spring and autumn.


Introduction
Safety is essential for the normal operation of pipelines [1][2][3][4][5]. Among safety issues, wax deposition is a problem that cannot be ignored. Wax deposition in oil and gas pipelines is a severe issue in many counties and regions, including West Texas, western onshore India, Indonesia, and Malaysia [6]. For example, in 2008, Zhu et al. indicated that in the United State of America, the Alaskan North Slope oil field encountered severe wax deposition problems and ended with production loss, high operation costs, and even facing the risk of being abandoned [7]. More than half of the crude oil produced in China is waxy crude, which is easy to condense and has poor liquidity. In the process of crude oil pipeline transportation, when the pipeline temperature is lower than the cloud point of crude oil, the wax or paraffin of crude oil begins to precipitate and deposit on the pipe wall. Specifically, the subsea pipeline is more problematic, due to the low water temperature in the deep sea, usually below the cloud point or wax appearance temperature (WAT). This causes a reduction in the pipeline flow area and transmission capacity, which in turn results in further pipeline operation losses and even wax blockage accidents. In addition, the increase in the thickness of the wax layer at the pipe wall hinders the restart process during shutdown conditions. It may even fail to start in severe cases, which poses a considerable Processes 2021, 9, 1572 2 of 11 threat to the safety of the pipeline's operation [8,9]. Hence, the study of wax deposition management is significant in determining pipeline transportation process formulation and realizing an economical and safe operation.
Scholars have done much research on the formation mechanism and prediction model of wax deposition. At present, most scholars believe that molecular diffusion is the most important mechanism of wax deposition. Brownian motion and gravity sedimentation have little effect on the formation of wax deposition and can be ignored in modeling [10,11]. In addition, scholars also pay attention to the influence of shear peeling and the aging mechanism, and the research on the influence of shear dispersion on wax deposition has not yet been unified [12,13]. Molecular diffusion, aging, and shear peeling are considered the most significant mechanisms influencing the formation of wax deposits [14,15]. The OLGA software is based on the deposition mechanism of molecular diffusion, shear peeling, and aging, considering the hydraulic and thermal effects of wax deposition on the flow process, and simulating the process of wax crystal precipitation and deposition in the pipeline, thereby predicting the distribution of wax deposition along the pipeline.
The Shunbei crude oil pipeline transports waxy crude by an unheated transportation process. The state of wax deposition in the pipeline is unknown. Therefore, it is necessary to predict the wax deposition in the pipeline and calculate the optimal pigging cycle to ensure the economic benefits of pipeline operation.

The Basic Situation of the Shunbei Crude Oil Pipeline
The newly-built Shunbei crude oil Ppipeline starts at No. 5 combination station and ends at No. 1 intermediate station. The total length of the pipeline is 198.5 km and the pipe diameter is 400 mm. As shown in Figure 1 a considerable threat to the safety of the pipeline's operation [8,9]. Hence, the study of wax deposition management is significant in determining pipeline transportation process formulation and realizing an economical and safe operation. Scholars have done much research on the formation mechanism and prediction model of wax deposition. At present, most scholars believe that molecular diffusion is the most important mechanism of wax deposition. Brownian motion and gravity sedimentation have little effect on the formation of wax deposition and can be ignored in modeling [10,11]. In addition, scholars also pay attention to the influence of shear peeling and the aging mechanism, and the research on the influence of shear dispersion on wax deposition has not yet been unified [12,13]. Molecular diffusion, aging, and shear peeling are considered the most significant mechanisms influencing the formation of wax deposits [14,15]. The OLGA software is based on the deposition mechanism of molecular diffusion, shear peeling, and aging, considering the hydraulic and thermal effects of wax deposition on the flow process, and simulating the process of wax crystal precipitation and deposition in the pipeline, thereby predicting the distribution of wax deposition along the pipeline.
The Shunbei crude oil pipeline transports waxy crude by an unheated transportation process. The state of wax deposition in the pipeline is unknown. Therefore, it is necessary to predict the wax deposition in the pipeline and calculate the optimal pigging cycle to ensure the economic benefits of pipeline operation.

The Basic Situation of the Shunbei Crude Oil Pipeline
The newly-built Shunbei crude oil Ppipeline starts at No. 5 combination station and ends at No. 1 intermediate station. The total length of the pipeline is 198.5 km and the pipe diameter is 400 mm. As shown in Figure 1  The overall design transportation scale of the pipeline is 1.8 million tons/yr. The Shunbei 1 processing station and the TP13 transition measuring station are equipped with crude oil insertion points. The crude oil transportation throughput of each station is shown in Table 1. The annual production time is considered to be 350 days. The pipeline adopts the closed and unheated transportation process, and the buried part of the line is not insulated. The lowest average ground temperature at the buried depth of the pipeline is 5 °C. The overall design transportation scale of the pipeline is 1.8 million tons/year. The Shunbei 1 processing station and the TP13 transition measuring station are equipped with crude oil insertion points. The crude oil transportation throughput of each station is shown in Table 1. The annual production time is considered to be 350 days. The pipeline adopts the closed and unheated transportation process, and the buried part of the line is not insulated. The lowest average ground temperature at the buried depth of the pipeline is 5 • C.

Physical Property Experiment of Shunbei Crude Oil
To determine the fundamental physical properties of the Shunbei crude oil, an Anton Paar rheometer was used to determine the viscosity-temperature curve of the crude oil in the range of 5 • C to 40 • C. As shown in Figure 2, the viscosity of the crude oil at 20 • C was 6.47 mPa·s.

Physical Property Experiment of Shunbei Crude Oil
To determine the fundamental physical properties of the Shunbei crude oil, an Anton Paar rheometer was used to determine the viscosity-temperature curve of the crude oil in the range of 5 °C to 40 °C. As shown in Figure 2, the viscosity of the crude oil at 20 °C was 6.47 mPa·s. The heat flow-temperature curve of Shunbei crude oil was measured by DSC thermal analysis method, and the wax crystal solubility coefficient curve of Shunbei crude oil was obtained according to Li et al. [16], as shown in Figure 3. Analyzing the graph, it is found that the wax content of Shunbei crude oil is 4.46%, the cloud point is 17.31 °C, and the peak of wax deposition is between 9.31 and 13.31 °C.  The heat flow-temperature curve of Shunbei crude oil was measured by DSC thermal analysis method, and the wax crystal solubility coefficient curve of Shunbei crude oil was obtained according to Li et al. [16], as shown in Figure 3. Analyzing the graph, it is found that the wax content of Shunbei crude oil is 4.46%, the cloud point is 17.31 • C, and the peak of wax deposition is between 9.31 and 13.31 • C.

Physical Property Experiment of Shunbei Crude Oil
To determine the fundamental physical properties of the Shunbei crude oil, an Anton Paar rheometer was used to determine the viscosity-temperature curve of the crude oil in the range of 5 °C to 40 °C. As shown in Figure 2, the viscosity of the crude oil at 20 °C was 6.47 mPa·s. The heat flow-temperature curve of Shunbei crude oil was measured by DSC thermal analysis method, and the wax crystal solubility coefficient curve of Shunbei crude oil was obtained according to Li et al. [16], as shown in Figure 3. Analyzing the graph, it is found that the wax content of Shunbei crude oil is 4.46%, the cloud point is 17.31 °C, and the peak of wax deposition is between 9.31 and 13.31 °C.  The chemical composition results of the Shunbei crude oil samples were analyzed by gas chromatography-mass spectrometry, and the carbon number distribution results of the crude oil were sorted out as shown in Figure 4.
The chemical composition results of the Shunbei crude oil samples were analyzed by gas chromatography-mass spectrometry, and the carbon number distribution results of the crude oil were sorted out as shown in Figure 4.  The density and freezing point of the crude oil were measured by a density meter and a multifunctional low-temperature tester. The density of Shunbei crude oil at 20 °C is 789 kg/m 3 , and the freezing point is −24 °C. In summary, Shunbei crude oil generally exhibits the characteristics of low density, low viscosity, low freezing point, low wax content, and a high cloud point.

Prediction of Wax Deposition Rate Based on OLGA
The cloud point of the Shunbei crude oil is higher than the ground temperature at the buried depth of the pipeline, and wax deposition occurs in the pipeline. To solve the problem of unclear wax deposition in the pipeline, the OLGA software is used to predict the wax deposition rate of the Shunbei crude oil pipeline.

Model Building
1. Crude oil physical properties setting: Based on the total hydrocarbon gas chromatographic analysis data of Shunbei crude oil, the PVTSim software was applied to simulate the physical properties of crude oil. Combined with crude oil viscosity-temperature data and wax deposition properties for correction, the fluid physical property files and wax files were generated; 2. Geometric model setting: Collect the elevation and mileage data of the Shunbei crude oil pipeline, and establish the pipeline geometric model according to the pipeline direction; 3. Boundary condition setting: Set the flow node at No. 5 combination station (first station), set the inlet flow and temperature of the pipeline, set the pressure node at No. 1 intermediate station, and set source at the Shunbei 1 processing station and TP-13 transition measuring station. Input the quality and temperature of the crude oil blended in each station, and define the connection between the system and the environment; 4. Wax deposition setting: Start the wax deposition module. Considering the wax deposition formation mechanism more thoroughly, the Matzain model is not restricted by the flow regime, and has a wide range of applications. Therefore, the Matzain model is selected for simulation; 5. Output setting: Select the output variables as pressure (PT), temperature (TM), wax appearance temperature (WAXAP), and wax deposition thickness on the pipe wall (DXWX). The density and freezing point of the crude oil were measured by a density meter and a multifunctional low-temperature tester. The density of Shunbei crude oil at 20 • C is 789 kg/m 3 , and the freezing point is −24 • C. In summary, Shunbei crude oil generally exhibits the characteristics of low density, low viscosity, low freezing point, low wax content, and a high cloud point.

Prediction of Wax Deposition Rate Based on OLGA
The cloud point of the Shunbei crude oil is higher than the ground temperature at the buried depth of the pipeline, and wax deposition occurs in the pipeline. To solve the problem of unclear wax deposition in the pipeline, the OLGA software is used to predict the wax deposition rate of the Shunbei crude oil pipeline.

1.
Crude oil physical properties setting: Based on the total hydrocarbon gas chromatographic analysis data of Shunbei crude oil, the PVTSim software was applied to simulate the physical properties of crude oil. Combined with crude oil viscositytemperature data and wax deposition properties for correction, the fluid physical property files and wax files were generated; 2.
Geometric model setting: Collect the elevation and mileage data of the Shunbei crude oil pipeline, and establish the pipeline geometric model according to the pipeline direction; 3.
Boundary condition setting: Set the flow node at No. 5 combination station (first station), set the inlet flow and temperature of the pipeline, set the pressure node at No. 1 intermediate station, and set source at the Shunbei 1 processing station and TP-13 transition measuring station. Input the quality and temperature of the crude oil blended in each station, and define the connection between the system and the environment; 4.
Wax deposition setting: Start the wax deposition module. Considering the wax deposition formation mechanism more thoroughly, the Matzain model is not restricted by the flow regime, and has a wide range of applications. Therefore, the Matzain model is selected for simulation; 5.
Output setting: Select the output variables as pressure (PT), temperature (TM), wax appearance temperature (WAXAP), and wax deposition thickness on the pipe wall (DXWX).

Plan Formulation
In order to explore the influence of the buried depth of the pipeline, the first station delivery volume, and the temperature of crude oil exiting the station on the wax deposition in the pipeline, 12 sets of wax deposition simulation programs were formulated as shown  Table 2. The first station's throughput is 54, 80, and 1.4 million tons/year, which are the minimum, the short-term, and the long-term throughput, respectively. Two groups of exit temperatures were taken: 30 • C and 40 • C; and two groups of the pipeline ground temperatures were taken: 5 • C and 10 • C. The amount of crude oil blended in the Shunbei 1 processing station and the TP13 transition measuring station is 200,000 tons/year each, and the total heat transfer coefficient of the pipeline is 3 W/(m 2 · • C) under the most unfavorable conditions. The simulation time was 30 days.

Analysis of Simulation Results
The wax thickness distribution along the pipeline under different conditions was simulated by OLGA software, as shown in Figures 5-7.

Plan Formulation
In order to explore the influence of the buried depth of the pipeline, the first station delivery volume, and the temperature of crude oil exiting the station on the wax deposition in the pipeline, 12 sets of wax deposition simulation programs were formulated as shown in Table 2. The first station's throughput is 54, 80, and 1.4 million tons/year, which are the minimum, the short-term, and the long-term throughput, respectively. Two groups of exit temperatures were taken: 30 °C and 40 °C; and two groups of the pipeline ground temperatures were taken: 5 °C and 10 °C. The amount of crude oil blended in the Shunbei 1 processing station and the TP13 transition measuring station is 200,000 tons/year each, and the total heat transfer coefficient of the pipeline is 3 W/(m 2 ·°C) under the most unfavorable conditions. The simulation time was 30 days.

Analysis of Simulation Results
The wax thickness distribution along the pipeline under different conditions was simulated by OLGA software, as shown in Figures 5-7.

Plan Formulation
In order to explore the influence of the buried depth of the pipeline, the first station delivery volume, and the temperature of crude oil exiting the station on the wax deposition in the pipeline, 12 sets of wax deposition simulation programs were formulated as shown in Table 2. The first station's throughput is 54, 80, and 1.4 million tons/year, which are the minimum, the short-term, and the long-term throughput, respectively. Two groups of exit temperatures were taken: 30 °C and 40 °C; and two groups of the pipeline ground temperatures were taken: 5 °C and 10 °C. The amount of crude oil blended in the Shunbei 1 processing station and the TP13 transition measuring station is 200,000 tons/year each, and the total heat transfer coefficient of the pipeline is 3 W/(m 2 ·°C) under the most unfavorable conditions. The simulation time was 30 days.

Analysis of Simulation Results
The wax thickness distribution along the pipeline under different conditions was simulated by OLGA software, as shown in Figures 5-7.   Analyzing Figures 5-7, we can see that the outlet temperature has little effect on the maximum wax layer thickness and average wax layer thickness, and has a greater impact on the location of the maximum wax layer thickness of the pipeline. As the ground temperature increases, the wax deposition phenomenon in the pipeline is alleviated, however the condition of the most severe wax deposition phenomenon in the pipeline is almost unchanged. As the throughput increases, the maximum wax layer thickness in the pipeline decreases, the average wax layer thickness of the pipeline does not change much, and the maximum wax layer thickness of the pipeline decreases.
Simulation results indicate that there are three peaks in the wax deposition distribution curve along the pipeline. Analysis of this phenomenon suggests that crude oil blended in the TP13 transition measuring station and the Shunbei 1 processing station changed the temperature of the crude oil in the pipeline, and that the wax deposition characteristics of crude oil are greatly affected by temperature. The wax deposition peak of the Shunbei crude oil is 9-13 °C. In this temperature range, wax deposition in the pipeline is serious.

Wax Deposition Model
Based on the molecular diffusion mechanism, Huang Qiyu considered the pipe wall shear stress and the pipe wall temperature gradient, and established a universal model through a large number of experiments [17].
Among them: W is the wax deposition rate, g/(m 2 ·h); τw is the shear stress at the pipe wall, Pa; μ is the viscosity of the crude oil, mPa·s; is the wax crystal solubility coefficient at the pipe wall, 10 −3 /°C; is temperature gradient at the pipe wall, °C/mm. Combining the results of the loop experiment, as shown in Table 3, the coefficients k, m, and n in the wax deposition model were calculated using the multiple nonlinear regression analysis method to obtain the wax deposition model of the Shunbei crude oil. 0.777 Analyzing Figures 5-7, we can see that the outlet temperature has little effect on the maximum wax layer thickness and average wax layer thickness, and has a greater impact on the location of the maximum wax layer thickness of the pipeline. As the ground temperature increases, the wax deposition phenomenon in the pipeline is alleviated, however the condition of the most severe wax deposition phenomenon in the pipeline is almost unchanged. As the throughput increases, the maximum wax layer thickness in the pipeline decreases, the average wax layer thickness of the pipeline does not change much, and the maximum wax layer thickness of the pipeline decreases.
Simulation results indicate that there are three peaks in the wax deposition distribution curve along the pipeline. Analysis of this phenomenon suggests that crude oil blended in the TP13 transition measuring station and the Shunbei 1 processing station changed the temperature of the crude oil in the pipeline, and that the wax deposition characteristics of crude oil are greatly affected by temperature. The wax deposition peak of the Shunbei crude oil is 9-13 • C. In this temperature range, wax deposition in the pipeline is serious.

Wax Deposition Model
Based on the molecular diffusion mechanism, Huang Qiyu considered the pipe wall shear stress and the pipe wall temperature gradient, and established a universal model through a large number of experiments [17].
Among them: W is the wax deposition rate, g/(m 2 ·h); τ w is the shear stress at the pipe wall, Pa; µ is the viscosity of the crude oil, mPa·s; dC dt is the wax crystal solubility coefficient at the pipe wall, 10 −3 / • C; dT dt is temperature gradient at the pipe wall, • C/mm. Combining the results of the loop experiment, as shown in Table 3, the coefficients k, m, and n in the wax deposition model were calculated using the multiple nonlinear regression analysis method to obtain the wax deposition model of the Shunbei crude oil.

Solving Model Parameters
To calculate the wax deposition thickness along the pipeline, it is necessary to solve the model parameters, such as the temperature gradient at the pipe wall, the temperature drop along the pipe, the shear rate at the pipe wall, and the solubility of wax crystals.
The temperature gradient dT dL at the pipe wall is calculated by the heat balance relationship by the micro-element pipe section with a length of dL [18]: where: λ is the thermal conductivity of crude oil, generally 0.14, W/m· • C; C p is the specific heat of crude oil, J/kg· • C; G is the mass flow, kg/s; dT dL is axial temperature gradient, • C/m, by derivative calculation of the axial temperature drop formula.
where: T R is the starting temperature of the pipeline, • C; T L is the oil temperature L m away from the starting point, • C; K is the total heat transfer coefficient of the pipeline, W/m 2 · • C. For Newtonian fluids, the shear rate and shear stress at the pipe wall in the hydraulically smooth zone are calculated using the calculation formula in Wardhaugh-Boger's paper [19]: where: µ w is the viscosity of crude oil, mPa·s; . γ w is the shear rate at the pipe wall, s −1 ; τ w is the shear stress at the pipe wall, Pa.
The solubility coefficient of wax crystals is obtained from the DSC experiment analysis of crude oil.

Waxing Programming
Based on the established Shunbei crude oil wax deposition model, combined with the hydraulic and thermal calculation results of the Shunbei crude oil pipeline during operation, the wax crystal solubility coefficient, temperature gradient, shear stress, and viscosity of each micro-segment of the pipeline under different operating times are obtained. Thus, the wax deposition rate of the pipeline was calculated, and the wax deposition procedure of the Shunbei crude oil pipeline was compiled and is shown in Figure 8.

Waxing Programming
Based on the established Shunbei crude oil wax deposition model, combine the hydraulic and thermal calculation results of the Shunbei crude oil pipeline dur eration, the wax crystal solubility coefficient, temperature gradient, shear stress, a cosity of each micro-segment of the pipeline under different operating times are ob Thus, the wax deposition rate of the pipeline was calculated, and the wax depositio cedure of the Shunbei crude oil pipeline was compiled and is shown in Figure 8.

Comparison of OLGA Simulation and Huang Qiyu Model Prediction
The OLGA simulation results and the Huang Qiyu model calculation results a sistent with the wax deposition trend under different working conditions, listed in 4. The relative error of the average wax layer thickness is 8%, and the relative erro maximum wax layer thickness is 6%, indicating that the OLGA simulation of wax sition in crude oil long-distance pipelines under the optimal parameters is reliable

Comparison of OLGA Simulation and Huang Qiyu Model Prediction
The OLGA simulation results and the Huang Qiyu model calculation results are consistent with the wax deposition trend under different working conditions, listed in Table 4. The relative error of the average wax layer thickness is 8%, and the relative error of the maximum wax layer thickness is 6%, indicating that the OLGA simulation of wax deposition in crude oil long-distance pipelines under the optimal parameters is reliable.

Pigging Cycle Forecast
On the premise of ensuring the safety of crude oil pipelines, maximizing economic benefits is the core of studying the economic operation of crude oil pipelines. For pipelines transporting waxy crudes, on the one hand, as the operating time increases, the thickness of wax deposits increases, which causes further operating loss. On the other hand, increasing the number of days of the pipeline pigging cycle could reduce the total pigging cost. Therefore, two aspects constitute the main factors affecting the economic operation of pipelines: additional power loss caused by wax deposition and the pigging costs. According to Russian standards, the extreme pigging limit is set when the pipeline transportation capacity drops by 3%. Within this range, the cost of transporting 1 ton of crude oil per unit pipe length, that is, the number of days corresponding to the minimum total pipeline operating cost as the accordance of pigging, is the economic efficient pigging cycle.
Combined with the Shunbei crude oil pipeline data, the pigging cycle calculation software is used to calculate the optimal pigging cycle under different working conditions. Parameters of the pipeline, including the ground temperature, outlet pressure, and throughput, are set as shown in Table 5, and the pipeline pigging cycle was calculated.

Conclusions
• According to the physical property analysis of Shunbei crude oil, using DSC experiment, the wax content of Shunbei crude oil is 4.55%, the starting point of waxing is 17.31 • C, and the peak of waxing is 9.31-13.31 • C. Overall, Shunbei crude oil exhibits the characteristics of low density, low viscosity, low freezing point, low wax content and a high cloud point. • After applying OLGA software and a wax deposition kinetic model to predict the wax deposition rate of pipelines, the simulation results and model calculation results are consistent with the wax deposition trend under different working conditions. The relative error of the maximum wax layer thickness is 6%, indicating that OLGA simulation of crude oil pipeline is reliable. At the lowest throughput, the ground temperature is 5 • C; after the pipeline runs for 30 days, the exit temperature is 30 • C, the average wax layer thickness of the pipeline is 1.448 mm, and the maximum wax layer thickness of the pipeline is 1.923 mm. • Affected by the properties of wax deposition of crude oil, the wax deposition peak of the Shunbei crude oil pipeline is between the pipe sections where the crude oil temperature is 9.31-13.31 • C. Under the lowest throughput, the pigging cycle is 34 days in winter, and 51 days in spring and autumn; under the recent throughput, the pigging cycle is 48 days in winter, and 74 days in spring and autumn.